| | |
| | | noOptionsText="没有可选项" |
| | | noResultsText="没有匹配的结果" /> |
| | | </el-form-item> |
| | | <el-form-item label="" style="display: inline-block;margin-left: 10px; " > |
| | | <el-select v-model="item.deviceId" filterable placeholder="请选择监控点" @change="changeCamera(item)" > |
| | | <el-form-item label="" style="display: inline-block;margin-left: 10px;width: 120px; " > |
| | | <el-select v-model="item.deviceType" filterable placeholder="请选择设备类型" clearable @change="changeDeviceType(item)" > |
| | | <el-option label="监控点" :value="0" ></el-option> |
| | | <el-option label="消防设备" :value="1" ></el-option> |
| | | <el-option label="消防传感器" :value="2" ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" v-if="item.deviceType>=0 || item.deviceType <=2" style="display: inline-block;margin-left: 10px; " > |
| | | <el-select v-model="item.deviceId" filterable placeholder="请选择监控点" clearable @change="changeCamera(item)" > |
| | | <el-option v-for="item1 in item.carmeraList" :label="item1.name" :value="item1.indexCode" ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | children: node.childList |
| | | } |
| | | }, |
| | | changeDeviceType (item) { |
| | | if (item.regionId) { |
| | | var reg = this.getSelectedObject(item.regionId) |
| | | if (reg) { |
| | | item.carmeraList = [] |
| | | if (item.deviceType === 1) { |
| | | item.carmeraList = reg.deviceList |
| | | } else if (item.deviceType === 2) { |
| | | item.carmeraList = reg.sensorList |
| | | }else if (item.deviceType === 0){ |
| | | item.carmeraList = reg.carmeraList |
| | | } |
| | | } |
| | | }else{ |
| | | item.carmeraList = [] |
| | | } |
| | | this.$nextTick(() => { |
| | | if (!item.deviceType || this.notInCarmeraList(item.carmeraList, item.deviceId)) { |
| | | item.deviceId = null |
| | | item.deviceName = null |
| | | } |
| | | }) |
| | | }, |
| | | changeCamera (curitem) { |
| | | var list = curitem.carmeraList |
| | | if (list && list.length) { |
| | |
| | | } |
| | | }, |
| | | changeSel (opt) { |
| | | console.log('=================changeSel',opt,this.form.detailList) |
| | | console.log('=================changeSel', opt, this.form.detailList) |
| | | var item = this.form.detailList[opt] |
| | | this.form.detailList[opt].regionCode = null |
| | | this.form.detailList[opt].regionName = null |
| | |
| | | if (reg) { |
| | | this.form.detailList[opt].regionCode = reg.indexCode |
| | | this.form.detailList[opt].regionName = reg.name |
| | | this.form.detailList[opt].carmeraList = reg.carmeraList |
| | | if (item.deviceType === 1) { |
| | | this.form.detailList[opt].carmeraList = reg.deviceList |
| | | } else if (item.deviceType === 2) { |
| | | this.form.detailList[opt].carmeraList = reg.sensorList |
| | | }else{ |
| | | this.form.detailList[opt].carmeraList = reg.carmeraList |
| | | } |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | console.log('=================changeSel1' , this.form.detailList[opt].carmeraList,this.form.detailList[opt].deviceId) |
| | | if(this.notInCarmeraList( this.form.detailList[opt].carmeraList,this.form.detailList[opt].deviceId) ){ |
| | | console.log('=================changeSel1', this.form.detailList[opt].carmeraList, this.form.detailList[opt].deviceId) |
| | | if (this.notInCarmeraList(this.form.detailList[opt].carmeraList, this.form.detailList[opt].deviceId)) { |
| | | this.form.detailList[opt].deviceId = null |
| | | this.form.detailList[opt].deviceName = null |
| | | } |
| | |
| | | } |
| | | // 编辑 |
| | | this.$nextTick(() => { |
| | | this.form.detailList =target.detailList |
| | | this.form.detailList = target.detailList |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | this.form.memberNotice = this.form.memberNotice || 0 |
| | |
| | | var region = this.getSelectedObject(item.regionId) |
| | | if (region) { |
| | | item.carmeraList = region.carmeraList || [] |
| | | if(item.deviceType === 1){ |
| | | item.carmeraList = region.deviceList || [] |
| | | }else if(item.deviceType === 2){ |
| | | item.carmeraList = region.sensorList || [] |
| | | } |
| | | } |
| | | } |
| | | }) |