From 75b117a3ce84f8d2b16e95c9ca58d2892491683f Mon Sep 17 00:00:00 2001 From: liudianxin Date: Wed, 19 Aug 2020 17:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BA=91=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=B7=AF=E5=BE=84=EF=BC=8Corigin=EF=BC=8C?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=9C=8D=E5=8A=A1=E6=B5=8B=E8=AF=95?= =?UTF-8?q?oid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/order-list/order-list-cell.vue | 4 +- src/components/work-flow/super-flow.vue | 106 +++++++++++++++--- src/pages/user/order/order_detail.vue | 21 +++- .../process-design/edit.vue | 71 ++++++++++-- .../process-design/index.vue | 21 +++- src/pages/workbench/fwzc_fwcs.vue | 28 +++-- src/request/http.js | 4 +- 7 files changed, 209 insertions(+), 46 deletions(-) diff --git a/src/components/order-list/order-list-cell.vue b/src/components/order-list/order-list-cell.vue index 60b0de8..c934464 100644 --- a/src/components/order-list/order-list-cell.vue +++ b/src/components/order-list/order-list-cell.vue @@ -271,7 +271,7 @@ export default { } else if (this.cellItem.order_type == 2) { query = { app_id: parseFloat(this.cellItem.app_id), - spec_id: this.cellItem.spec_app, + spec_id: this.cellItem.spec_app++, duration: this.cellItem.duration, duration_unit: this.cellItem.duration_unit, }; @@ -281,7 +281,7 @@ export default { }); } else if (this.cellItem.order_type == 3) { this.$router.push({ - path: "/shop/shop_cloud", + path: "/shop/cloud", }); } }, diff --git a/src/components/work-flow/super-flow.vue b/src/components/work-flow/super-flow.vue index c0162f0..ec4099f 100644 --- a/src/components/work-flow/super-flow.vue +++ b/src/components/work-flow/super-flow.vue @@ -4,11 +4,11 @@
- +
{{ scale_num }}%
- +
@@ -400,6 +400,10 @@ export default { type: Array, default: () => [], }, + origin: { + type: Array, + default: () => [0, 0], + }, }, watch: { node_list: { @@ -412,7 +416,6 @@ export default { data() { return { scale_num: 100, - origin: [0, 0], nodeList: [], linkList: [], drawerType, @@ -619,7 +622,6 @@ export default { }; }, mounted() { - this.setOrigin(); this.setVal(); this.getProcessServiceList(); document.addEventListener("mousemove", this.docMousemove); @@ -630,10 +632,6 @@ export default { }); }, methods: { - setOrigin() { - let width = this.$refs.flowContainer.clientWidth; - this.origin = [width / 2, 0]; - }, linkStyle(link) { return {}; }, @@ -680,6 +678,7 @@ export default { clientX - conf.offsetLeft, clientY - conf.offsetTop ); + console.log(clientX, conf.offsetLeft, coordinate); // 添加节点 let query = { width: 120, height: 48, meta: {} }; query.meta.type = conf.info.meta.type; @@ -807,9 +806,14 @@ export default { return item.id == self.nodeItem.id; }); if (meta) { - let index = meta.plugins.findIndex((item) => { - return item.plugin_type === 1; - }); + let index = -1; + if (meta.plugins && meta.plugins.length != 0) { + index = meta.plugins.findIndex((item) => { + return item.plugin_type === 1; + }); + } else { + meta.plugins = []; + } if (index !== -1) { let data = meta.plugins[index]; let arr0 = JSON.parse(data.body_fields); @@ -991,6 +995,14 @@ export default { this.response_fields = []; this.select = 1; }, + refleshTimeout() { + this.max_time_0 = undefined; + this.max_time_1 = undefined; + this.max_time_type_0 = 1; + this.max_time_type_1 = 1; + this.max_time_check_0 = false; + this.max_time_check_1 = false; + }, interfaceCancel() { this.refleshItem(); this.dialog_interface = false; @@ -1080,8 +1092,30 @@ export default { } }, showProcessService() { - if (this.checkNodeCouldEdit()) { - this.dialog_process = true; + let self = this; + if (self.checkNodeCouldEdit()) { + let meta = self.nodeParamsList.find((item) => { + return item.id == self.nodeItem.id; + }); + if (meta) { + let index = -1; + if (meta.plugins && meta.plugins.length != 0) { + index = meta.plugins.findIndex((item) => { + return item.plugin_type === 2; + }); + } else { + meta.plugins = []; + } + if (index !== -1) { + let data = meta.plugins[index]; + self.service = data.ref_workflows_id; + } else { + self.refleshTimeout(); + } + } else { + self.refleshTimeout(); + } + self.dialog_process = true; } }, processCancel() { @@ -1104,8 +1138,35 @@ export default { } }, showTimeoutManagement() { - if (this.checkNodeCouldEdit()) { - this.dialog_timeout = true; + let self = this; + if (self.checkNodeCouldEdit()) { + let meta = self.nodeParamsList.find((item) => { + return item.id == self.nodeItem.id; + }); + if (meta) { + let index = -1; + if (meta.plugins && meta.plugins.length != 0) { + index = meta.plugins.findIndex((item) => { + return item.plugin_type === 3; + }); + } else { + meta.plugins = []; + } + if (index !== -1) { + let data = meta.plugins[index]; + self.max_time_check_0 = data.timeout_notify; + self.max_time_check_1 = data.timeout_stop; + self.max_time_0 = data.notice_max_time; + self.max_time_type_0 = data.notice_time_unit; + self.max_time_1 = data.stop_max_time; + self.max_time_type_1 = data.stop_time_unit; + } else { + self.refleshTimeout(); + } + } else { + self.refleshTimeout(); + } + self.dialog_timeout = true; } }, timeoutCancel() { @@ -1187,6 +1248,9 @@ export default { }; console.log(this.nodeList, this.linkList, this.nodeParamsList); }, + changeScale(type) { + + } }, }; @@ -1729,6 +1793,18 @@ export default { margin-left: 20px; line-height: 40px; font-size: 16px; + color: #242c43; + .el-checkbox__input.is-checked + .el-checkbox__label { + color: #242c43; + } + .el-checkbox__input.is-checked .el-checkbox__inner, + .el-checkbox__input.is-indeterminate .el-checkbox__inner { + background-color: #626de9; + border-color: #515fe7; + } + .el-checkbox__input.is-focus .el-checkbox__inner { + border-color: #515fe7; + } } } } diff --git a/src/pages/user/order/order_detail.vue b/src/pages/user/order/order_detail.vue index d46bc32..bf37f09 100644 --- a/src/pages/user/order/order_detail.vue +++ b/src/pages/user/order/order_detail.vue @@ -479,19 +479,28 @@ export default { duration: this.orderDetail.duration, duration_unit: this.orderDetail.duration_unit, }; + window.sessionStorage.setItem("shoppingCart", JSON.stringify(query)); + this.$router.push({ + path: "/shop/shop_car_apply", + query: query, + }); } else if (this.orderDetail.order_type == 2) { query = { app_id: parseFloat(this.orderDetail.app_id), - spec_id: this.orderDetail.spec_app, + spec_id: this.orderDetail.spec_app++, duration: this.orderDetail.duration, duration_unit: this.orderDetail.duration_unit, }; + window.sessionStorage.setItem("shoppingCart", JSON.stringify(query)); + this.$router.push({ + path: "/shop/shop_car_apply", + query: query, + }); + } else if (this.orderDetail.order_type == 3) { + this.$router.push({ + path: "/shop/cloud", + }); } - window.sessionStorage.setItem("shoppingCart", JSON.stringify(query)); - this.$router.push({ - path: "/shop/shop_car_apply", - query: query, - }); }, cancelDetail() { this.$api.user diff --git a/src/pages/workbench/component-center/process-management/process-design/edit.vue b/src/pages/workbench/component-center/process-management/process-design/edit.vue index 4d953ad..2f1bcea 100644 --- a/src/pages/workbench/component-center/process-management/process-design/edit.vue +++ b/src/pages/workbench/component-center/process-management/process-design/edit.vue @@ -14,7 +14,7 @@ :active-icon="require('@/assets/imgs/progress_ic_xinxitx.png')" class="apaas_step" > -
+

流程名称:

@@ -57,12 +57,13 @@ :active-icon="require('@/assets/imgs/progress_ic_liucheng.png')" class="apaas_step" > -
+