From 994433a3ba4a0a6fd4864d23614da806341204b6 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 11 Nov 2020 17:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E4=BB=A4=E5=AD=97=E5=85=B8=20?= =?UTF-8?q?=E5=A4=8D=E5=88=BB=E6=8C=87=E4=BB=A4=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/QueryListPage/DataForm.vue | 1 + .../system/commandDictionary/copyParam.vue | 49 +++++++++++++------ src/views/system/commandDictionary/index.vue | 14 +++--- 3 files changed, 41 insertions(+), 23 deletions(-) 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; } } }