diff --git a/src/components/QueryListPage/DataForm.vue b/src/components/QueryListPage/DataForm.vue index f9edadf9c..f843a0365 100644 --- a/src/components/QueryListPage/DataForm.vue +++ b/src/components/QueryListPage/DataForm.vue @@ -183,6 +183,7 @@ :placeholder="item.placeholder" :disabled="item.disabled" multiple + @change="((val)=>{deviceChange(val, item)})" > { - if (item.value != lineCode) { - this.targetList.push(item); - } else { - this.formModel.fromCode = item.value; - this.formModel.fromName = item.label; - } - }); - } + this.targetList = []; + this.originList = []; + this.taskStatusList.forEach(item => { + this.targetList.push(item); + this.originList.push(item); + }); }, doSave() { this.$refs.dataform.validateForm(() => { @@ -93,6 +88,28 @@ export default { handleClose() { this.$refs.dataform.resetForm(); this.dialogVisible = false; + }, + originChange(fromCode) { + this.formModel.fromCode = fromCode; + this.formModel.targetIds = ''; + this.targetList = this.targetList.map(each=>{ + if (each.value == fromCode) { + each.disabled = true; + } else { + each.disabled = false; + } + return each; + }); + }, + targetChange(targetIds) { + this.originList = this.originList.map(each=>{ + if (targetIds.includes(each.value)) { + each.disabled = true; + } else { + each.disabled = false; + } + return each; + }); } } }; diff --git a/src/views/system/commandDictionary/index.vue b/src/views/system/commandDictionary/index.vue index f73039cd4..8ecaf1833 100644 --- a/src/views/system/commandDictionary/index.vue +++ b/src/views/system/commandDictionary/index.vue @@ -126,9 +126,7 @@ export default { { text: this.$t('global.add'), handler: this.handleAdd }, { text: '复刻', handler: this.handleCopyAll } ] - }, - - currentModel: {} + } }; }, mounted () { @@ -201,8 +199,8 @@ export default { cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { - const param = row; - createCommand(param).then(response => { + // const param = row; + createCommand(row).then(response => { this.$message.success('复制指令成功!'); }).catch(error => { console.log(error); @@ -212,13 +210,15 @@ export default { }, // 复制线路到其他线路 操作 handleCopyAll() { - this.$refs.copyParam.doShow(this.lineCode); + // this.lineCode = this.taskStatusList[0].value; + // this.lineCode + this.$refs.copyParam.doShow(); }, reloadTable() { this.queryList.reload(); }, convertField(list, status) { - console.log(list, typeof list, status); + // console.log(list, typeof list, status); if (list && list.length > 0) { return list.find(each=>{ return status == each.value; }).label; } } }