diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue index 95811c77..ae8017d7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue @@ -1,5 +1,5 @@ - + - + @@ -112,20 +116,24 @@ export default { props: { visible: Boolean, eventType: Number, - // process: { - // type: Array, - // default: () => [] - // } + tableData: { + type: Array, + default: () => [{ + deviceType: 1, + searchRule: 1, + qbb: '安全行驶' + }] + } }, data() { return { - tableData: [ - { - deviceType: 1, - phrases2: 1, - phrases4: '安全行驶' - } - ], + // tableData: [ + // { + // deviceType: 1, + // searchRule: 1, + // qbb: '安全行驶' + // } + // ], deviceOptions: [ { value: 1, @@ -208,53 +216,14 @@ export default { } }, methods: { - getProcess() { - this.tableData = []; - request({ - url: `/business/dcEventType/${this.eventType}`, - method: "get", - }).then(result => { - if (result.code != 200) return Message.error(result.msg); - //流程列表 - this.process = []; - this.tableData = []; - result.data.processConfigList?.forEach((it, index) => { - let commonPhrasesArr = it.commonPhrases ? it.commonPhrases.split(',') : ['']; - let phrs = []; - commonPhrasesArr?.forEach(phr => { - phrs.push({ id: it.id, phrases: phr }) - }) - this.process.push({ - ...it, - phrs: phrs, - label: it.processNode, - isActive: index == 0 ? true : false, - }) - if (index == 0) { - this.id = it.id; - this.tableData = phrs; - } - }) - - }) - }, changeDeviceType(value) { this.deviceType = value; }, - getTableData() { - let rows = this.process.find(item => item.id == this.id); - return rows?.phrs || []; - }, - updateTableData(id = 1) { - this.id = id; - this.tableData = []; - let pros = this.process.find(item => item.id == id); - this.tableData = pros.phrs; - }, onAdd(id) { this.tableData.push({ - id: id, - phrases: '' + deviceType: 1, + // searchRule: 1, + // qbb: '安全行驶' }) }, onDel(index) { @@ -263,35 +232,6 @@ export default { } this.tableData.splice(index, 1) }, - submitTable() { - let data = [] - this.process.forEach((lc) => { - let commonPhrases = []; - lc.phrs.forEach(phr => { if (phr.phrases) commonPhrases.push(phr.phrases) }) - data.push({ - commonPhrases: commonPhrases.join(','), - id: lc.id, - eventType: lc.eventType, - nodeNode: lc.nodeNode, - processNode: lc.processNode - }) - }) - console.log('data', data) - // return; - request({ - url: `/business/dcEventType/updateDcProcessConfig`, - method: "post", - data: { - eventType: this.eventType, - processConfigList: data - } - }).then(result => { - if (result.code != 200) return Message.error(result.msg); - Message.success(result.msg); - this.modelVisible = false; - this.$emit('reInitData', true) - }) - } } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue index 5ec17711..d9153625 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue @@ -17,8 +17,8 @@ 刷新 - + @@ -41,8 +41,7 @@ - +