Commit e5799bfa by 416409548@qq.com

视频安防/一卡通打卡设置优化

parent 4c42b487
......@@ -78,15 +78,15 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<a-select v-model="model.type" placeholder="请选择状态" disabled>
<a-select-option :value="1">
<a-select v-model="model.status" placeholder="请选择状态">
<a-select-option :value=1>
正常
</a-select-option>
<a-select-option :value="2">
<a-select-option :value=2>
离线
</a-select-option>
<a-select-option :value="3">
自动访客机
<a-select-option :value=3>
维修
</a-select-option>
</a-select>
</a-form-model-item>
......@@ -251,7 +251,8 @@ export default {
statusList: [
{name: '正常', value: 1, imgPath: require('@/assets/door-close.png')},
{name: '离线', value: 2, imgPath: require('@/assets/door-offline.png')},
{name: '损坏', value: 3, imgPath: require('@/assets/door-warning.png')}],
{name: '损坏', value: 3, imgPath: require('@/assets/door-warning.png')}
],
doorIconStyle: {
position: 'absolute',
top: '0px',
......@@ -346,18 +347,6 @@ export default {
this.model.coordinateTmp = x + "," + y;
this.$refs.form.validateField('coordinateTmp');
},
statusChange(value) {
let targetList = this.statusList.filter(status => status.value === value);
this.doorIconPath = targetList.length > 0 ? targetList[0].imgPath : null;
},
buildingChange(value) {
let targetList = this.buildingInfos.filter(buildingInfo => buildingInfo.name === value);
if (targetList != null && targetList.length > 0) {
this.targetFloorList = targetList[0].floorList;
} else {
this.targetFloorList = [];
}
},
floorImgLoadComplete(e) {
if (this.model.coordinate) {
this.model.coordinateTmp = this.model.coordinate.x + ',' + this.model.coordinate.y;
......@@ -371,6 +360,10 @@ export default {
this.doorIconStyle.left = this.model.coordinate.x * offsetWidth - fixX + 'px';
}
},
statusChange(value) {
let targetList = this.statusList.filter(status => status.value === value);
this.doorIconPath = targetList.length > 0 ? targetList[0].imgPath : null;
},
}
}
</script>
\ No newline at end of file
......@@ -6,7 +6,8 @@
<a-row :gutter="24">
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-form-item label="选择区域">
<a-select placeholder="选择区域" v-model="queryParam.districtName">
<a-select v-model="queryParam.districtName">
<a-select-option :value="undefined">请选择</a-select-option>
<a-select-option v-for="va in buildingInfos" :key="va">
{{ va }}
</a-select-option>
......@@ -16,7 +17,6 @@
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-space style="float: left">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button type="default" @click="searchReset">重置</a-button>
</a-space>
</a-col>
</a-row>
......@@ -55,11 +55,11 @@
<div style="position: relative">
<img ref="floorImg" src="@/assets/floor.png" alt="floor" width="100%" height="100%"
@load="floorImgLoadComplete()"/>
<img v-for="(item, index) in list"
<img v-for="item in list"
:key="item.id"
ref="icon"
:src="item.status === 'NORMAL'
? statusList[0].imgPath
: (item.status === 'OFFLINE' ? statusList[1].imgPath : statusList[2].imgPath)"
:src="item.status === 1? statusList[0].imgPath
:(item.status === 2 ? statusList[1].imgPath : statusList[2].imgPath)"
:alt="item.name + ':' + item.ip"/>
</div>
</a-col>
......@@ -137,9 +137,6 @@ export default {
})
});
},
searchReset() {
this.searchQuery();
},
floorImgLoadComplete() {
this.searchQuery();
}
......
......@@ -43,13 +43,13 @@
<a-col :span="12">
<a-form-model-item label="设备状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<a-select placeholder="设备状态" v-model="model.status">
<a-select-option value="1">
<a-select-option :value=1>
正常
</a-select-option>
<a-select-option value="2">
<a-select-option :value=2>
离线
</a-select-option>
<a-select-option value="3">
<a-select-option :value=3>
维修
</a-select-option>
</a-select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment