sh4wmoo пре 2 година
родитељ
комит
1bf9ae31a0

+ 2 - 6
src/components/business/process/node-modal/node-modal.vue

@@ -802,12 +802,6 @@ export default {
       this.removeInvalidEdge(cell)
       //设置节点数据
       cell.setData(this.nodeData, { overwrite: true })
-      //设置节点样式
-      cell.setAttrs({
-        // label: { text: this.nodeData.nodeName },
-        // text: { text: this.nodeData.nodeName },
-        // body: { stroke: '#5F95FF' }
-      })
       // endregion
 
       //region 如果是一览页面的编辑,直接提交保存
@@ -880,6 +874,8 @@ export default {
       // }
       // 销毁提示弹窗
       this.$Message.destroy()
+      // 通过校验标识
+      this.nodeData.isValid=true
       return true
     },
     /**

+ 6 - 4
src/view/process/process-flow/config/ProcessConfig.js

@@ -695,10 +695,7 @@ export default class Process {
       //节点
       if(cell.shape=='custom-image'){
         //添加节点设置业务数据id
-        cell.setData({'nodeId':cell.id,'ftyId': store.state.user.ftyId,'flowId':parseInt(router.app._route.params.id)})
-        //设置初始未校验样式
-        cell.setAttrs({body: {stroke: 'red',}})
-        //todo 通过业务数据key,结合html()回调来控制是否通过保存校验
+        cell.setData({'nodeId':cell.id,'ftyId': store.state.user.ftyId,'flowId':parseInt(router.app._route.params.id),"isValid":false})
       }
       //连接线
       if(cell.shape=='edge'){
@@ -873,6 +870,11 @@ export default class Process {
         div.appendChild(left)
         div.appendChild(right)
 
+        if(cell.getData().isValid===false){
+          left.style.borderColor='#ed4014'
+          right.style.borderColor='#ed4014'
+        }
+
         return div;
       },
       ports: { ...ports },

+ 5 - 3
src/view/process/process-flow/process-setting.vue

@@ -350,7 +350,7 @@ export default {
 
       //节点的单个校验未通过
       let invalidNodes =allNodes.filter(it => {
-        if (it.getAttrs()?.body?.stroke === 'red') {
+        if (!it.getData().isValid) {
           this.$Message.warning('[' + it.getData()?.nodeName + '] 节点设置有误,请检查')
           return true
         }
@@ -559,7 +559,8 @@ export default {
   background: #E9F1FF;
   height: 100%;
   width: 40%;
-  border: solid 1px #E9F1FF;
+  border: solid 2px #E9F1FF;
+  border-right: none;
   border-top-left-radius: 10px;
   border-bottom-left-radius: 10px;
   display: flex;
@@ -572,7 +573,8 @@ export default {
   background: #fff;
   height: 100%;
   /*width: 60%;*/
-  border: solid 1px #fff;
+  border: solid 2px #fff;
+  border-left: none;
   border-top-right-radius: 10px;
   border-bottom-right-radius: 10px;
   box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);