lex-xin 4 år sedan
förälder
incheckning
614ccd73b3

+ 6 - 6
src/components/wfd/behavior/deleteItem.js

@@ -9,10 +9,10 @@ export default function(G6) {
     },
     onKeydown(e, env) {
       const items = this.graph.get('selectedItems')
-      const focus = this.graph.get('focusGraphWrapper')
-      // console.log(items, e, focus, this.graph, this.graph.executeCommand, env)
+      // const focus = this.graph.get('focusGraphWrapper')
+      // console.log(items, e, focus, this.graph, 'ini')
       // 下
-      if (e.keyCode === 40 && items && items.length > 0 && focus) {
+      if (e.keyCode === 40 && items && items.length > 0) {
         if (this.graph.executeCommand) {
           this.graph.executeCommand('toDown')
         } else {
@@ -20,7 +20,7 @@ export default function(G6) {
         }
       }
       // 上
-      if (e.keyCode === 38 && items && items.length > 0 && focus) {
+      if (e.keyCode === 38 && items && items.length > 0) {
         if (this.graph.executeCommand) {
           this.graph.executeCommand('toUp')
         } else {
@@ -28,7 +28,7 @@ export default function(G6) {
         }
       }
       // 左
-      if (e.keyCode === 37 && items && items.length > 0 && focus) {
+      if (e.keyCode === 37 && items && items.length > 0) {
         if (this.graph.executeCommand) {
           this.graph.executeCommand('toLeft')
         } else {
@@ -36,7 +36,7 @@ export default function(G6) {
         }
       }
       // 右
-      if (e.keyCode === 39 && items && items.length > 0 && focus) {
+      if (e.keyCode === 39 && items && items.length > 0) {
         if (this.graph.executeCommand) {
           this.graph.executeCommand('toRight')
         } else {

+ 2 - 1
src/components/wfd/components/DetailPanel/DefaultDetail.vue

@@ -1,7 +1,8 @@
 <template>
   <div>
     <div class="panelRow">
-      <div><span style="color: red">*</span> {{ i18n['label'] }}:</div>
+      <!-- <span style="color: red">*</span> -->
+      <div> {{ i18n['label'] }}:</div>
       <el-input
         style="width:90%; font-size:12px"
         :disabled="readOnly"

+ 5 - 5
src/components/wfd/components/ItemPanel.vue

@@ -3,7 +3,7 @@
     <el-collapse v-model="activeNames">
       <el-collapse-item :title="i18n['conventional']" name="1">
         <img
-          data-item="{clazz:'start',size:'30*30',label:''}"
+          data-item="{clazz:'start',size:'30*30',label:'开始'}"
           :src="require('../assets/flow/start.svg')"
           style="width:42px;height:42px;margin-top:10px"
         >
@@ -24,7 +24,7 @@
                      :src="require('../assets/flow/script-task.svg')" style="width:80px;height:44px;margin-top:10px" />
                 <div>{{i18n['scriptTask']}}</div> -->
         <img
-          data-item="{clazz:'end',size:'30*30',label:''}"
+          data-item="{clazz:'end',size:'30*30',label:'结束'}"
           :src="require('../assets/flow/end.svg')"
           style="width:42px;height:42px;margin-top:10px"
         >
@@ -36,13 +36,13 @@
           :src="require('../assets/flow/exclusive-gateway.svg')"
           style="width:48px;height:48px;margin-top:10px"
         >
-        <!-- <div>{{ i18n['exclusiveGateway'] }}</div>
-        <img
+        <div>{{ i18n['exclusiveGateway'] }}</div>
+        <!-- <img
           data-item="{clazz:'parallelGateway',size:'40*40',label:''}"
           :src="require('../assets/flow/parallel-gateway.svg')"
           style="width:48px;height:48px;margin-top:10px"
         > -->
-        <div>{{ i18n['parallelGateway'] }}</div>
+        <!-- <div>{{ i18n['parallelGateway'] }}</div> -->
         <!-- <img data-item="{clazz:'inclusiveGateway',size:'40*40',label:''}"
                      :src="require('../assets/flow/inclusive-gateway.svg')" style="width:48px;height:48px;margin-top:10px" />
                 <div>{{i18n['inclusiveGateway']}}</div> -->

+ 7 - 6
src/components/wfd/components/Wfd.vue

@@ -210,9 +210,10 @@ export default {
       return data
     },
     verifyProcess(pv) {
-      if (pv.label === undefined || pv.label === null || pv.label === '') {
-        return '标题不能为空'
-      } else if (pv.sort === undefined || pv.sort === null || pv.sort === '') {
+      // if (pv.label === undefined || pv.label === null || pv.label === '') {
+      //   return '标题不能为空'
+      // } else
+      if (pv.sort === undefined || pv.sort === null || pv.sort === '') {
         return '顺序不能为空'
       }
       if (pv.clazz === 'userTask' || pv.clazz === 'receiveTask') {
@@ -274,14 +275,14 @@ export default {
         if (this.graph.executeCommand) {
           this.graph.executeCommand('update', {
             itemId: items[0],
-            updateModel: { [key]: value }
+            updateModel: { [key]: value || null }
           })
         } else {
-          this.graph.updateItem(item, { [key]: value })
+          this.graph.updateItem(item, { [key]: value || null })
         }
         this.selectedModel = { ...item.getModel() }
       } else {
-        const canvasModel = { ...this.processModel, [key]: value }
+        const canvasModel = { ...this.processModel, [key]: value || null }
         this.selectedModel = canvasModel
         this.processModel = canvasModel
       }

+ 5 - 2
src/components/wfd/shape/edge.js

@@ -16,7 +16,8 @@ export default function(G6) {
       },
       stateStyles: {
         selected: {
-          lineWidth: editorStyle.edgeSelectedStyle.lineWidth
+          lineWidth: editorStyle.edgeSelectedStyle.lineWidth,
+          stroke: editorStyle.edgeSelectedStyle.stroke
         },
         hover: {
           stroke: editorStyle.edgeActivedStyle.stroke
@@ -29,9 +30,11 @@ export default function(G6) {
       if (name === 'selected') {
         if (value) {
           path.attr('lineWidth', this.options.stateStyles.selected.lineWidth)
-          path.attr('stroke', this.options.style.stroke)
+          path.attr('stroke', this.options.stateStyles.selected.stroke)
+          // path.attr('stroke', this.options.style.stroke)
         } else {
           path.attr('lineWidth', this.options.style.lineWidth)
+          path.attr('stroke', this.options.style.stroke)
         }
       } else if (name === 'hover') {
         if (value) { path.attr('stroke', this.options.stateStyles.hover.stroke) } else { path.attr('stroke', this.options.style.stroke) }

+ 1 - 1
src/components/wfd/util/defaultStyle.js

@@ -5,7 +5,7 @@ export default {
   edgeActivedStyle: { stroke: '#1890FF', strokeOpacity: 0.92 },
   nodeActivedStyle: { fill: '#F3F9FF', stroke: '#1890FF' },
   groupActivedStyle: { stroke: '#1890FF' },
-  edgeSelectedStyle: { lineWidth: 2, strokeOpacity: 0.92, stroke: '#A3B1BF' },
+  edgeSelectedStyle: { lineWidth: 2, strokeOpacity: 0.92, stroke: '#1890FF' },
   nodeSelectedStyle: { fill: '#F3F9FF', stroke: '#1890FF', fillOpacity: 0.4 },
   groupSelectedStyle: { stroke: '#1890FF', fillOpacity: 0.92 },
   nodeStyle: {

+ 13 - 5
src/views/process/admin/process-manager.vue

@@ -438,13 +438,14 @@ export default {
         .catch(_ => {})
     },
     verifyProcess(structureValue) {
-      console.log(structureValue)
+      // console.log(structureValue)
       for (var r of structureValue.nodes) {
         if (r.sort === undefined || r.sort === null || r.sort === '') {
           return '流程节点顺序不能为空'
-        } else if (r.label === undefined || r.label === null || r.label === '') {
-          return '流程节点标题不能为空'
         }
+        //  else if (r.label === undefined || r.label === null || r.label === '') {
+        //   return '流程节点标题不能为空'
+        // }
         if (r.clazz === 'userTask' || r.clazz === 'receiveTask') {
           if (r.assignType === undefined || r.assignType === null || r.assignType === '') {
             return '审批节点或处理节点的处理人类型不能为空'
@@ -453,11 +454,13 @@ export default {
           }
         }
       }
+      //  else if (e.label === undefined || e.label === null || e.label === '') {
+      //     return '流转标题不能为空'
+      //   }
+      console.log(structureValue)
       for (var e of structureValue.edges) {
         if (e.sort === undefined || e.sort === null || e.sort === '') {
           return '流转顺序不能为空'
-        } else if (e.label === undefined || e.label === null || e.label === '') {
-          return '流转标题不能为空'
         } else if (e.flowProperties === undefined || e.flowProperties === null || e.flowProperties === '') {
           return '流转属性不能为空'
         }
@@ -470,9 +473,12 @@ export default {
           var structureValue = this.$refs.wfd.graph.save()
           for (var n of structureValue.nodes) {
             n.sort = '1'
+            n.activeOrder = false
+            n.isCounterSign = false
           }
           for (var j of structureValue.edges) {
             j.sort = '1'
+            j.flowProperties = '1'
           }
           var r = this.verifyProcess(structureValue)
           if (r !== '') {
@@ -497,6 +503,8 @@ export default {
           var structureValue = this.$refs.wfd.graph.save()
           for (var n of structureValue.nodes) {
             n.sort = '1'
+            n.activeOrder = false
+            n.isCounterSign = false
           }
           for (var j of structureValue.edges) {
             j.sort = '1'

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/index.html


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/css/chunk-33e06368.d261830d.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/css/chunk-b2cdb5c2.ff5d7775.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/app.0fe0ebfa.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/chunk-33e06368.fcc0f6fd.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/chunk-43e58088.64dbcd13.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/chunk-b2cdb5c2.69332d07.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/static/web/js/chunk-b3964496.6bbfe3b6.js


Vissa filer visades inte eftersom för många filer har ändrats