From a2adac0d0a0ffb03658b7cc79dc7d437e630c8d1 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 30 May 2024 18:31:25 +0800 Subject: [PATCH 1/5] =?UTF-8?q?-=20[=E5=8A=9F=E8=83=BD]=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=B5=81=E7=A8=8B=E7=BB=84=E4=BB=B6=E8=8A=82?= =?UTF-8?q?=E7=82=B9=20=20=20-=20[=E5=85=B3=E8=81=94]=20#[1158069810069504?= =?UTF-8?q?]=E8=87=AA=E5=8A=A8=E5=8C=96=E6=B5=81=E7=A8=8B=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E8=8A=82=E7=82=B9=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/story-detail/939050947543040/939050947543042/11580698100?= =?UTF-8?q?69504?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/term/en.json | 3 +- src/resources/assets/languages/term/zh.json | 3 +- .../autoexec/components/param/view/node.vue | 4 +- src/views/pages/process/flow/flow-valid.js | 34 +-- .../components/autoexec/autoexec-setting.vue | 182 +++++++++++++ .../components/autoexec/flowNodeValid.js | 25 ++ .../flowedit/components/autoexec/index.vue | 116 ++++++++ .../setting}/autoexec-config.vue | 0 .../setting}/config-list-dialog.vue | 2 +- .../setting}/joppolicy/base.vue | 41 ++- .../setting}/joppolicy/batchjobpolicy.vue | 37 ++- .../joppolicy/mappingmode-expression.vue | 252 ++++++++++++++++++ .../setting}/joppolicy/singlejobpolicy.vue | 43 ++- .../setting}/protocol-readonly.vue | 0 .../{autoexec-node.vue => base-config.vue} | 238 +++++++++-------- .../process/flow/flowedit/components/index.js | 2 +- 16 files changed, 832 insertions(+), 150 deletions(-) create mode 100644 src/views/pages/process/flow/flowedit/components/autoexec/autoexec-setting.vue create mode 100644 src/views/pages/process/flow/flowedit/components/autoexec/flowNodeValid.js create mode 100644 src/views/pages/process/flow/flowedit/components/autoexec/index.vue rename src/views/pages/process/flow/flowedit/components/{nodesetting/autoexec => autoexec/setting}/autoexec-config.vue (100%) rename src/views/pages/process/flow/flowedit/components/{nodesetting/autoexec => autoexec/setting}/config-list-dialog.vue (97%) rename src/views/pages/process/flow/flowedit/components/{nodesetting/autoexec => autoexec/setting}/joppolicy/base.vue (82%) rename src/views/pages/process/flow/flowedit/components/{nodesetting/autoexec => autoexec/setting}/joppolicy/batchjobpolicy.vue (92%) create mode 100644 src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/mappingmode-expression.vue rename src/views/pages/process/flow/flowedit/components/{nodesetting/autoexec => autoexec/setting}/joppolicy/singlejobpolicy.vue (93%) rename src/views/pages/process/flow/flowedit/components/{nodesetting/autoexec => autoexec/setting}/protocol-readonly.vue (100%) rename src/views/pages/process/flow/flowedit/components/{autoexec-node.vue => base-config.vue} (48%) diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index dc3f4151..1440423c 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -590,7 +590,8 @@ "phase": "·Stage", "channel": "passageway", "saveandstart": "Save and start", - "createcollection": "Create Collection" + "createcollection": "Create Collection", + "taskinformation": "Work order information" }, "autoexec": { "addrootdirectory": "Add root directory", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 5c95e397..81fe5472 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -590,7 +590,8 @@ "phase": "·阶段", "channel": "通道", "saveandstart": "保存并开始", - "createcollection": "创建集合" + "createcollection": "创建集合", + "taskinformation": "工单信息" }, "autoexec": { "addrootdirectory": "添加根目录", diff --git a/src/views/pages/autoexec/components/param/view/node.vue b/src/views/pages/autoexec/components/param/view/node.vue index 4c152002..eb573636 100644 --- a/src/views/pages/autoexec/components/param/view/node.vue +++ b/src/views/pages/autoexec/components/param/view/node.vue @@ -51,10 +51,12 @@ + diff --git a/src/views/pages/process/flow/flowedit/components/autoexec/flowNodeValid.js b/src/views/pages/process/flow/flowedit/components/autoexec/flowNodeValid.js new file mode 100644 index 00000000..945fc0c9 --- /dev/null +++ b/src/views/pages/process/flow/flowedit/components/autoexec/flowNodeValid.js @@ -0,0 +1,25 @@ +import { $t } from '@/resources/init.js'; +const nodeConfigValid = { + autoexec(nodeConfig, d, that) { + //自动化节点 + let validList = []; + let nodeData = nodeConfig.stepConfig || {}; + let autoexecConfig = nodeData.autoexecConfig || {}; + if (nodeConfig.handler === 'autoexec') { + if (!autoexecConfig.failPolicy) { + validList.push({ + name: $t('form.validate.required', { target: $t('page.failurestrategy') }), + href: '#autoexecCombop' + }); + } + if (that.$utils.isEmpty(autoexecConfig.configList)) { + validList.push({ + name: $t('form.validate.leastonetarget', { target: $t('term.autoexec.job') }), + href: '#autoexecCombop' + }); + } + } + return validList; + } +}; +export { nodeConfigValid }; diff --git a/src/views/pages/process/flow/flowedit/components/autoexec/index.vue b/src/views/pages/process/flow/flowedit/components/autoexec/index.vue new file mode 100644 index 00000000..3233f39d --- /dev/null +++ b/src/views/pages/process/flow/flowedit/components/autoexec/index.vue @@ -0,0 +1,116 @@ + + + diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/autoexec-config.vue b/src/views/pages/process/flow/flowedit/components/autoexec/setting/autoexec-config.vue similarity index 100% rename from src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/autoexec-config.vue rename to src/views/pages/process/flow/flowedit/components/autoexec/setting/autoexec-config.vue diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/config-list-dialog.vue b/src/views/pages/process/flow/flowedit/components/autoexec/setting/config-list-dialog.vue similarity index 97% rename from src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/config-list-dialog.vue rename to src/views/pages/process/flow/flowedit/components/autoexec/setting/config-list-dialog.vue index 206c5a34..2ff8d1e5 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/config-list-dialog.vue +++ b/src/views/pages/process/flow/flowedit/components/autoexec/setting/config-list-dialog.vue @@ -15,7 +15,7 @@
#{{ index+1 }}
- +
diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/base.vue b/src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/base.vue similarity index 82% rename from src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/base.vue rename to src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/base.vue index f19bcfff..8a25df95 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/base.vue +++ b/src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/base.vue @@ -10,7 +10,8 @@ export default { TsFormRadio: () => import('@/resources/plugins/TsForm/TsFormRadio'), TsFormInput: () => import('@/resources/plugins/TsForm/TsFormInput'), TsFormSelect: () => import('@/resources/plugins/TsForm/TsFormSelect'), - TsTable: () => import('@/resources/components/TsTable/TsTable.vue') + TsTable: () => import('@/resources/components/TsTable/TsTable.vue'), + MappingmodeExpression: () => import('@/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/mappingmode-expression.vue') }, props: { config: Object, @@ -34,7 +35,14 @@ export default { } ], validateList: ['required'], - formDataList: [] //表单赋值:仅支持文本框、文本域类型的控件赋值 + formDataList: [], //表单赋值:仅支持文本框、文本域类型的控件赋值 + processTaskParamConfig: { + dynamicUrl: '/api/rest/process/condition/list', + textName: 'label', + valueName: 'name', + border: 'border', + transfer: true + } }; }, created() { @@ -58,6 +66,20 @@ export default { }); } }, + runtimeParamMappingModeList(type) { + let dataList = this.$utils.deepClone(this.mappingModeList); + dataList.push({ + text: this.$t('term.process.taskinformation'), + value: 'processTaskParam' + }); + if (type === 'text') { + dataList.push({ + text: this.$t('term.cmdb.expression'), + value: 'expression' + }); + } + return dataList; + }, getRoundCountText(value) { let text = value; if (value === 0) { @@ -106,6 +128,16 @@ export default { this.$set(e, '_disabled', false); } }); + }, + addFilter(filterList) { + filterList.push({ + 'column': '', + 'expression': 'like', + 'value': '' + }); + }, + delFilterItem(filterList, index) { + filterList.splice(index, 1); } }, computed: { @@ -127,7 +159,7 @@ export default { }; }, getAttrList() { - return (value) => { + return (value, column, filterList) => { let dataList = []; if (this.allFormitemList && this.allFormitemList.length > 0) { let find = this.allFormitemList.find(item => item.uuid === value); @@ -135,7 +167,8 @@ export default { find.config.dataConfig.forEach(d => { dataList.push({ text: d.label, - value: d.uuid + value: d.uuid, + _disabled: !!(filterList && filterList.find(f => f.column === d.uuid && f.column != column)) }); }); } diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/batchjobpolicy.vue b/src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/batchjobpolicy.vue similarity index 92% rename from src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/batchjobpolicy.vue rename to src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/batchjobpolicy.vue index da510b7b..5b0c33db 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/batchjobpolicy.vue +++ b/src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/batchjobpolicy.vue @@ -17,12 +17,17 @@
- + - + + + + + {{ $t('term.pbc.adddata') }}
@@ -300,6 +309,28 @@ :isRequired="!!r.isRequired" > + + + + diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/singlejobpolicy.vue b/src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/singlejobpolicy.vue similarity index 93% rename from src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/singlejobpolicy.vue rename to src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/singlejobpolicy.vue index e6698ab6..3acd40ce 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/autoexec/joppolicy/singlejobpolicy.vue +++ b/src/views/pages/process/flow/flowedit/components/autoexec/setting/joppolicy/singlejobpolicy.vue @@ -393,7 +393,7 @@ + +