设备
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
width="1080px">
|
width="1080px">
|
||||||
<ai-detail style="background: #FFF;">
|
<ai-detail style="background: #FFF;">
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-alert title="温馨提示:请先在设备管理中绑定行政区划" type="warning" show-icon :closable="false" style="margin-bottom: 12px;"></el-alert>
|
<el-alert title="温馨提示:请先在设备管理中绑定行政区划" type="warning" show-icon :closable="false" style="margin-bottom: 12px;padding: 4px;"></el-alert>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
@@ -92,22 +92,38 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="checkBox">
|
<div class="checkBox">
|
||||||
<el-checkbox v-model="checked">全选</el-checkbox>
|
<!-- <el-checkbox v-model="isAll">全选</el-checkbox> -->
|
||||||
|
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-input placeholder="请输入" v-model="input3" class="input-with-select" size="small">
|
<el-input placeholder="请输入" v-model="input3" class="input-with-select" size="small">
|
||||||
<el-button slot="append" icon="el-icon-search"></el-button>
|
<el-button slot="append" icon="el-icon-search" @click="searchEquipment"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content"></div>
|
<div class="content">
|
||||||
|
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
||||||
|
<el-checkbox v-for="city in cities" :label="city" :key="city" style="display: block;">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div>已选择</div>
|
<div>已选择</div>
|
||||||
<el-button type="info" size="small">清空</el-button>
|
<el-button type="info" size="mini" @click="emptyBtn">清空</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<el-tag
|
||||||
|
v-for="tag in tags"
|
||||||
|
:key="tag.name"
|
||||||
|
size="mini"
|
||||||
|
closable
|
||||||
|
@close="closeTags(tag)"
|
||||||
|
:type="tag.type"
|
||||||
|
style="margin-right: 5px;margin-bottom: 5px;">
|
||||||
|
{{tag.name}}
|
||||||
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="content"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -211,11 +227,13 @@ export default {
|
|||||||
mediaList: [],
|
mediaList: [],
|
||||||
equipmentList: [],
|
equipmentList: [],
|
||||||
detailDialog: false,
|
detailDialog: false,
|
||||||
checked: false,
|
isAll: false,
|
||||||
|
input3: '',
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'label'
|
label: 'label'
|
||||||
},
|
},
|
||||||
|
// tree
|
||||||
data: [{
|
data: [{
|
||||||
label: '一级 1',
|
label: '一级 1',
|
||||||
children: [{
|
children: [{
|
||||||
@@ -251,6 +269,20 @@ export default {
|
|||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
}],
|
}],
|
||||||
|
// 复选框
|
||||||
|
checkAll: false,
|
||||||
|
checkedCities: [],
|
||||||
|
cities: ['上海', '北京', '广州', '深圳','湖北','湖南','河北','河南'],
|
||||||
|
isIndeterminate: true,
|
||||||
|
// 标签
|
||||||
|
tags: [
|
||||||
|
{ name: '标签一', type: '' },
|
||||||
|
{ name: '标签二', type: 'success' },
|
||||||
|
{ name: '标签三', type: 'info' },
|
||||||
|
{ name: '标签四', type: 'warning' },
|
||||||
|
{ name: '标签五', type: 'danger' }
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -292,6 +324,29 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 全选按钮
|
||||||
|
handleCheckAllChange(val) {
|
||||||
|
this.checkedCities = val ? this.cities : [];
|
||||||
|
this.isIndeterminate = false;
|
||||||
|
},
|
||||||
|
// 复选框
|
||||||
|
handleCheckedCitiesChange(value) {
|
||||||
|
let checkedCount = value.length;
|
||||||
|
this.checkAll = checkedCount == this.cities.length;
|
||||||
|
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
||||||
|
},
|
||||||
|
// 搜索设备
|
||||||
|
searchEquipment() {
|
||||||
|
console.log('搜索设备');
|
||||||
|
},
|
||||||
|
// 关闭标签
|
||||||
|
closeTags(tag) {
|
||||||
|
this.tags.splice(this.tags.indexOf(tag), 1);
|
||||||
|
},
|
||||||
|
// 清空标签
|
||||||
|
emptyBtn() {
|
||||||
|
this.tags = []
|
||||||
|
},
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
},
|
},
|
||||||
@@ -394,6 +449,10 @@ export default {
|
|||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.content {
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user