diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/addPhotoDialog.vue b/src/views/management/monitoringEquipment/photographicDevice/components/addPhotoDialog.vue index 941404c..dc291a4 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/addPhotoDialog.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/addPhotoDialog.vue @@ -14,11 +14,11 @@ :rules="rules" :model="formInfo" > - + - - + + - - + + { @@ -172,11 +173,11 @@ export default { this.formInfo = { channelid: this.formInfo.channelVal, cmdid: this.formInfo.cmdid, - lineid: this.formInfo.lineVal, + lineid: this.formInfo.lineid, equipName: this.formInfo.equipName, - sim: this.formInfo.simCard, + sim: this.formInfo.sim, displayName: this.formInfo.cmdid, - towerid: this.formInfo.towerVal, + towerid: this.formInfo.towerid, id: this.formInfo.id, }; updateTerminalJoggle(this.formInfo) @@ -201,11 +202,13 @@ export default { this.lineOptions = res.data.list; if (res.data.list.length == 0) { this.lineOptions = []; - this.formInfo.lineVal = ""; + this.formInfo.lineid = ""; } else { this.lineOptions = res.data.list; - // this.formInfo.lineVal = res.data.list[0].id; - this.$set(this.formInfo, "lineVal", res.data.list[0].id); + if (this.photoDialogTitle == "新增") { + // this.formInfo.lineid = res.data.list[0].id; + this.$set(this.formInfo, "lineid", res.data.list[0].id); + } } // this.dyOptions = res.data.list; // this.formdata.dyid = res.data.list == [] ? "" : res.data.list[0].id; @@ -214,19 +217,28 @@ export default { }, //获取所有杆塔 getTower() { - getSearchInfo({ type: 3, id: this.formInfo.lineVal }) + getSearchInfo({ type: 3, id: this.formInfo.lineid }) .then((res) => { if (res.data.list.length == 0) { this.toweridOptions = []; - this.formInfo.towerVal = ""; + this.formInfo.towerid = ""; } else { this.toweridOptions = res.data.list; - // this.formInfo.towerVal = res.data.list[0].id; - this.$set(this.formInfo, "towerVal", res.data.list[0].id); + if (this.photoDialogTitle == "新增" || this.photoDialogtype == 1 ) { + // this.formInfo.towerid = res.data.list[0].id; + this.$set(this.formInfo, "towerid", res.data.list[0].id); + this.photoDialogtype = 0 + } } }) .catch((err) => {}); }, + getTowerchange(){ + if (this.photoDialogTitle == "修改") { + this.photoDialogtype = 1 + } + this.getTower() + }, //获取所有通道 getChannel() { getAllChannelListJoggle()