Shannon_mu пре 3 година
родитељ
комит
d20567e894

+ 1 - 1
energyManagement/src/views/meterReadingManagement/index.vue

@@ -37,7 +37,7 @@
             @page-change="pageChange"
         >
             <template slot="readData" slot-scope="scope">{{ scope.row.data.readData }}</template>
-            <template slot="readStatus" slot-scope="scope">{{ scope.row.data.readStatus === 1 ? '未抄' : '已抄' }}</template>
+            <template slot="readStatus" slot-scope="scope">{{ scope.row.data.readStatus == 1 ? '未抄' : '已抄' }}</template>
             <template slot="readTime" slot-scope="scope">{{ getTypeDate(scope.row.data.readTime) }}</template>
 
             <template slot-scope="scope" slot="opt">

+ 103 - 0
operationSupport/package-lock.json

@@ -2921,6 +2921,39 @@
       "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
       "dev": true
     },
+    "bpmn-font": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npm.taobao.org/bpmn-font/download/bpmn-font-0.8.0.tgz",
+      "integrity": "sha1-hbGHFfrt40XNM8ikj1C75Vf/dsI="
+    },
+    "bpmn-js": {
+      "version": "3.5.0",
+      "resolved": "https://registry.npm.taobao.org/bpmn-js/download/bpmn-js-3.5.0.tgz",
+      "integrity": "sha1-w1h37orHO8Dm0KEXHqlNHnyjGMI=",
+      "requires": {
+        "bpmn-font": "^0.8.0",
+        "bpmn-moddle": "^5.1.6",
+        "css.escape": "^1.5.1",
+        "diagram-js": "^3.3.1",
+        "diagram-js-direct-editing": "^1.4.3",
+        "ids": "^0.2.0",
+        "inherits": "^2.0.1",
+        "min-dash": "^3.4.0",
+        "min-dom": "^3.0.0",
+        "object-refs": "^0.3.0",
+        "tiny-svg": "^2.2.1"
+      }
+    },
+    "bpmn-moddle": {
+      "version": "5.1.6",
+      "resolved": "https://registry.npm.taobao.org/bpmn-moddle/download/bpmn-moddle-5.1.6.tgz",
+      "integrity": "sha1-mOnThSShyJcePDQE+7omETCIfTk=",
+      "requires": {
+        "min-dash": "^3.0.0",
+        "moddle": "^4.1.0",
+        "moddle-xml": "^7.2.3"
+      }
+    },
     "brace-expansion": {
       "version": "1.1.11",
       "resolved": "https://registry.nlark.com/brace-expansion/download/brace-expansion-1.1.11.tgz",
@@ -3732,6 +3765,11 @@
       "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=",
       "dev": true
     },
+    "component-event": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmmirror.com/component-event/-/component-event-0.1.4.tgz",
+      "integrity": "sha512-GMwOG8MnUHP1l8DZx1ztFO0SJTFnIzZnBDkXAj8RM2ntV2A6ALlDxgbMY1Fvxlg6WPQ+5IM/a6vg4PEYbjg/Rw=="
+    },
     "compressible": {
       "version": "2.0.18",
       "resolved": "https://registry.nlark.com/compressible/download/compressible-2.0.18.tgz",
@@ -4222,6 +4260,11 @@
       "integrity": "sha1-6nAm/LAXd+295SEk4h8yfnrpUOQ=",
       "dev": true
     },
+    "css.escape": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmmirror.com/css.escape/-/css.escape-1.5.1.tgz",
+      "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="
+    },
     "cssesc": {
       "version": "3.0.0",
       "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz",
@@ -4685,6 +4728,15 @@
       "integrity": "sha1-yccHdaScPQO8LAbZpzvlUPl4+LE=",
       "dev": true
     },
+    "diagram-js-direct-editing": {
+      "version": "1.6.4",
+      "resolved": "https://registry.npmmirror.com/diagram-js-direct-editing/-/diagram-js-direct-editing-1.6.4.tgz",
+      "integrity": "sha512-yn5l/Q4jl1QI8CDN1mYSV08/O0srSDl3eM8yOv6ZWVu76Ig3IDUHzIw9tYQaifw0slRYFoLW3AxYNirH0mKakg==",
+      "requires": {
+        "min-dash": "^3.5.2",
+        "min-dom": "^3.1.3"
+      }
+    },
     "diffie-hellman": {
       "version": "5.0.3",
       "resolved": "https://registry.nlark.com/diffie-hellman/download/diffie-hellman-5.0.3.tgz",
@@ -4802,6 +4854,11 @@
         }
       }
     },
+    "domify": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmmirror.com/domify/-/domify-1.4.1.tgz",
+      "integrity": "sha512-x18nuiDHMCZGXr4KJSRMf/TWYtiaRo6RX8KN9fEbW54mvbQ6pieUuerC2ahBg+kEp1wycFj8MPUI0WkIOw5E9w=="
+    },
     "domutils": {
       "version": "1.7.0",
       "resolved": "https://registry.nlark.com/domutils/download/domutils-1.7.0.tgz?cache=0&sync_timestamp=1630106606599&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdomutils%2Fdownload%2Fdomutils-1.7.0.tgz",
@@ -5859,6 +5916,11 @@
         }
       }
     },
+    "hammerjs": {
+      "version": "2.0.8",
+      "resolved": "https://registry.npmmirror.com/hammerjs/-/hammerjs-2.0.8.tgz",
+      "integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ=="
+    },
     "handle-thing": {
       "version": "2.0.1",
       "resolved": "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.1.tgz",
@@ -6606,6 +6668,11 @@
       "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=",
       "dev": true
     },
+    "indexof": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmmirror.com/indexof/-/indexof-0.0.1.tgz",
+      "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg=="
+    },
     "infer-owner": {
       "version": "1.0.4",
       "resolved": "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz",
@@ -7461,6 +7528,11 @@
         "object-visit": "^1.0.0"
       }
     },
+    "matches-selector": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/matches-selector/-/matches-selector-1.2.0.tgz",
+      "integrity": "sha512-c4vLwYWyl+Ji+U43eU/G5FwxWd4ZH0ePUsFs5y0uwD9HUEFBXUQ1zUUan+78IpRD+y4pUfG0nAzNM292K7ItvA=="
+    },
     "mavon-editor": {
       "version": "2.10.1",
       "resolved": "https://registry.npmmirror.com/mavon-editor/download/mavon-editor-2.10.1.tgz",
@@ -7613,6 +7685,22 @@
       "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=",
       "dev": true
     },
+    "min-dash": {
+      "version": "3.8.1",
+      "resolved": "https://registry.npmmirror.com/min-dash/-/min-dash-3.8.1.tgz",
+      "integrity": "sha512-evumdlmIlg9mbRVPbC4F5FuRhNmcMS5pvuBUbqb1G9v09Ro0ImPEgz5n3khir83lFok1inKqVDjnKEg3GpDxQg=="
+    },
+    "min-dom": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmmirror.com/min-dom/-/min-dom-3.1.3.tgz",
+      "integrity": "sha512-Lbi1NZjLV9Hg6/bEe2Lfk2Fzsv1MwheR61whqTLP+FxLndYo9TxpksEgM5Kr1khjfCtFTMr0waeEfwIpStkRdw==",
+      "requires": {
+        "component-event": "^0.1.4",
+        "domify": "^1.3.1",
+        "indexof": "0.0.1",
+        "matches-selector": "^1.2.0"
+      }
+    },
     "mini-css-extract-plugin": {
       "version": "0.8.2",
       "resolved": "https://registry.npmmirror.com/mini-css-extract-plugin/download/mini-css-extract-plugin-0.8.2.tgz?cache=0&sync_timestamp=1637170561761&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fmini-css-extract-plugin%2Fdownload%2Fmini-css-extract-plugin-0.8.2.tgz",
@@ -8114,6 +8202,11 @@
       "resolved": "https://registry.nlark.com/object-keys/download/object-keys-1.1.1.tgz",
       "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4="
     },
+    "object-refs": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmmirror.com/object-refs/-/object-refs-0.3.0.tgz",
+      "integrity": "sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ=="
+    },
     "object-visit": {
       "version": "1.0.1",
       "resolved": "https://registry.nlark.com/object-visit/download/object-visit-1.0.1.tgz",
@@ -10214,6 +10307,11 @@
       "resolved": "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz",
       "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk="
     },
+    "saxen": {
+      "version": "8.1.2",
+      "resolved": "https://registry.npmmirror.com/saxen/-/saxen-8.1.2.tgz",
+      "integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw=="
+    },
     "schema-utils": {
       "version": "3.1.1",
       "resolved": "https://registry.npmmirror.com/schema-utils/download/schema-utils-3.1.1.tgz?cache=0&sync_timestamp=1637075997986&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fschema-utils%2Fdownload%2Fschema-utils-3.1.1.tgz",
@@ -11467,6 +11565,11 @@
       "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
       "dev": true
     },
+    "tiny-svg": {
+      "version": "2.2.2",
+      "resolved": "https://registry.npmmirror.com/tiny-svg/-/tiny-svg-2.2.2.tgz",
+      "integrity": "sha512-u6zCuMkDR/3VAh83X7hDRn/pi0XhwG2ycuNS0cTFtQjGdOG2tSvEb8ds65VeGWc3H6PUjJKeunueXqgkZqtMsg=="
+    },
     "to-arraybuffer": {
       "version": "1.0.1",
       "resolved": "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz",

+ 3 - 1
operationSupport/package.json

@@ -13,6 +13,8 @@
   "dependencies": {
     "axios": "^0.18.0",
     "babel-polyfill": "^6.26.0",
+    "bpmn-js": "^3.5.0",
+    "bpmn-moddle": "5.1.6",
     "element-ui": "^2.11.0",
     "html2canvas": "^1.4.1",
     "mavon-editor": "^2.6.17",
@@ -37,4 +39,4 @@
     "style-vw-loader": "^1.0.2",
     "vue-template-compiler": "^2.6.10"
   }
-}
+}

+ 1 - 1
operationSupport/src/api/common_api.js

@@ -13,7 +13,7 @@ export default (http) => ({
   */
   getTreeData: (sysId = '', type = '') => http.get(`/common/getTreeData?sysId=${sysId}&type=${type}`),
   /*查询字典库数据*/
-  getDictionaryData: (parentDictCode = '') => http.post('/sc-community/dict/selectList',{parentDictCode}),
+  getDictionaryData: (parentDictCode = '') => http.post('/sc-user-center/dict/selectList',{parentDictCode}),
   /*获取相关gis服务 */
   getGis:(serviceType='')=>http.post('/systemSetting/selectGis',{serviceType}),
 })

+ 2 - 2
operationSupport/src/config/env.development.js

@@ -12,9 +12,9 @@ module.exports = {
 
   baseUrl: "http://114.135.61.186:21020/sc-operation/", // 项目地址
 
-  baseApi: "http://114.135.61.186:21012/", // 本地api请求地址
+  baseApi: "http://192.168.110.4:8082/", // 本地api请求地址
   baseMapApi: "http://114.135.61.187:38082", // arcgis API
-  baseImgApi: "http://114.135.61.186:21012/", // 图片api请求地址
+  baseImgApi: "http://192.168.110.4:8082/", // 图片api请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
   loginUrl: "http://114.135.61.186:21020/sc-login/",
   websoketUrl: '114.135.61.186:21012',

+ 6 - 0
operationSupport/src/router/index.js

@@ -156,6 +156,12 @@ const zRoute = [
         name: "systemSetup",
     },
 
+    {
+        path: '/flowManagement',
+        component: () => import(/* webpackChunkName: "404" */ '@views/flow/index.vue'),
+        meta: { title: '流程管理' },
+        name: "flowManagement",
+    },
 ]
 
 const quietRoute = [

+ 21 - 0
operationSupport/src/utils/translate.js

@@ -0,0 +1,21 @@
+import translations from './translations';
+
+
+export default function customTranslate(template, replacements) {
+  replacements = replacements || {};
+
+  // Translate
+  template = translations[template] || template;
+
+  // Replace
+  return template.replace(/{([^}]+)}/g, function(_, key) {
+  	let kv = {
+  		'EndEvent': '结束事件',
+  		'Task': '任务',
+  		'TextAnnotation': '文本注释',
+  		'DataObjectReference': '数据对象引用',
+  		'DataStoreReference': '数据存储引用',
+  	}
+    return kv[replacements[key]] || '{' + key + '}';
+  });
+}

+ 239 - 0
operationSupport/src/utils/translations.js

@@ -0,0 +1,239 @@
+
+/**
+ * This is a sample file that should be replaced with the actual translation.
+ *
+ * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available
+ * translations and labels to translate.
+ */
+export default {
+  'Exclusive Gateway': 'Exklusives Gateway',
+  'Parallel Gateway': 'Paralleles Gateway',
+  'Inclusive Gateway': 'Inklusives Gateway',
+  'Complex Gateway': 'Komplexes Gateway',
+  'Event based Gateway': 'Ereignis-basiertes Gateway',
+  'Message Start Event': '消息启动事件',
+  'Timer Start Event': '定时启动事件',
+  'Conditional Start Event': '条件启动事件',
+  'Signal Start Event': '信号启动事件',
+  'Error Start Event': '错误启动事件',
+  'Escalation Start Event': '升级启动事件',
+  'Compensation Start Event': '补偿启动事件',
+  'Message Start Event (non-interrupting)': '消息启动事件 (非中断)',
+  'Timer Start Event (non-interrupting)': '定时启动事件 (非中断)',
+  'Conditional Start Event (non-interrupting)': '条件启动事件 (非中断)',
+  'Signal Start Event (non-interrupting)': '信号启动事件 (非中断)',
+  'Escalation Start Event (non-interrupting)': '升级启动事件 (非中断)',
+  'General': '通用设置',
+  'Listeners': '事件',
+  'Execution Listener': '执行事件',
+  'User Task': '用户任务',
+  // Labels
+  'Activate the global connect tool' : '激活全局连接工具',
+  'Append {type}': '添加 {type}',
+  'Append Gateway': '添加网关',
+  'Default Flow': '默认流',
+  'Sequence Flow': '顺序流',
+  'Conditional Flow': '条件流',
+  'Add Lane above': '在上面添加道',
+  'Divide into two Lanes': '分割成两个道',
+  'Divide into three Lanes': '分割成三个道',
+  'Add Lane below': '在下面添加道',
+  'Append compensation activity': '追加补偿活动',
+  'Change type': '修改类型',
+  'Connect using Association': '使用关联连接',
+  'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接',
+  'Connect using DataInputAssociation': '使用数据输入关联连接',
+  'Remove': '移除',
+  'Activate the hand tool': '激活抓手工具',
+  'Activate the lasso tool': '激活套索工具',
+  'Activate the create/remove space tool': '激活创建/删除空间工具',
+  'Create expanded SubProcess': '创建扩展子过程',
+  'Create IntermediateThrowEvent/BoundaryEvent' : '创建中间抛出事件/边界事件',
+  'Create Pool/Participant': '创建池/参与者',
+  'Parallel Multi Instance': '并行多重事件',
+  'Sequential Multi Instance': '时序多重事件',
+  'DataObjectReference':'数据对象参考',
+  'DataStoreReference':'数据存储参考',
+  'Loop': '循环',
+  'Ad-hoc': '即席',
+  'Create {type}': '创建 {type}',
+  'Task': '任务',
+  'Send Task': '发送任务',
+  'Receive Task': '接收任务',
+  'User Task': '用户任务',
+  'Manual Task': '手工任务',
+  'Business Rule Task': '业务规则任务',
+  'Service Task': '服务任务',
+  'Script Task': '脚本任务',
+  'Call Activity': '调用活动',
+  'Sub Process (collapsed)': '子流程(折叠的)',
+  'Sub Process (expanded)': '子流程(展开的)',
+  'Start Event': '开始事件',
+   'StartEvent': '开始事件',
+  'Intermediate Throw Event': '中间事件',
+  'End Event': '结束事件',
+    'EndEvent': '结束事件',
+  'Create Gateway': '创建网关',
+  'Create Intermediate/Boundary Event': '创建中间/边界事件',
+  'Message Start Event': '消息开始事件',
+  'Timer Start Event': '定时开始事件',
+  'Conditional Start Event': '条件开始事件',
+  'Signal Start Event': '信号开始事件',
+  'Error Start Event': '错误开始事件',
+  'Escalation Start Event': '升级开始事件',
+  'Compensation Start Event': '补偿开始事件',
+  'Message Start Event (non-interrupting)': '消息开始事件(非中断)',
+  'Timer Start Event (non-interrupting)': '定时开始事件(非中断)',
+  'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)',
+  'Signal Start Event (non-interrupting)': '信号开始事件(非中断)',
+  'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)',
+  'Message Intermediate Catch Event': '消息中间捕获事件',
+  'Message Intermediate Throw Event': '消息中间抛出事件',
+  'Timer Intermediate Catch Event': '定时中间捕获事件',
+  'Escalation Intermediate Throw Event': '升级中间抛出事件',
+  'Conditional Intermediate Catch Event': '条件中间捕获事件',
+  'Link Intermediate Catch Event': '链接中间捕获事件',
+  'Link Intermediate Throw Event': '链接中间抛出事件',
+  'Compensation Intermediate Throw Event': '补偿中间抛出事件',
+  'Signal Intermediate Catch Event': '信号中间捕获事件',
+  'Signal Intermediate Throw Event': '信号中间抛出事件',
+  'Message End Event': '消息结束事件',
+  'Escalation End Event': '定时结束事件',
+  'Error End Event': '错误结束事件',
+  'Cancel End Event': '取消结束事件',
+  'Compensation End Event': '补偿结束事件',
+  'Signal End Event': '信号结束事件',
+  'Terminate End Event': '终止结束事件',
+  'Message Boundary Event': '消息边界事件',
+  'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)',
+  'Timer Boundary Event': '定时边界事件',
+  'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)',
+  'Escalation Boundary Event': '升级边界事件',
+  'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)',
+  'Conditional Boundary Event': '条件边界事件',
+  'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)',
+  'Error Boundary Event': '错误边界事件',
+  'Cancel Boundary Event': '取消边界事件',
+  'Signal Boundary Event': '信号边界事件',
+  'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)',
+  'Compensation Boundary Event': '补偿边界事件',
+  'Exclusive Gateway': '互斥网关',
+  'Parallel Gateway': '并行网关',
+  'Inclusive Gateway': '相容网关',
+  'Complex Gateway': '复杂网关',
+  'Event based Gateway': '事件网关',
+  'Transaction': '转运',
+  'Sub Process': '子流程',
+  'Event Sub Process': '事件子流程',
+  'Collapsed Pool': '折叠池',
+  'Expanded Pool': '展开池',
+
+  // Errors
+  'no parent for {element} in {parent}': '在{parent}里,{element}没有父类',
+  'no shape type specified': '没有指定的形状类型',
+  'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类',
+  'out of bounds release': 'out of bounds release',
+  'more than {count} child lanes': '子道大于{count} ',
+  'element required': '元素不能为空',
+  'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范',
+  'no diagram to display': '没有可展示的流程图',
+  'no process or collaboration to display': '没有可展示的流程/协作',
+  'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制',
+  'already rendered {element}': '{element} 已被渲染',
+  'failed to import {element}': '导入{element}失败',
+  //属性面板的参数
+  'Id':'编号',
+  'Name':'名称',
+  'General':'常规',
+  'Details':'详情',
+  'Message Name':'消息名称',
+  'Message':'消息',
+  'Initiator':'创建者',
+  'Asynchronous Continuations':'持续异步',
+  'Asynchronous Before':'异步前',
+  'Asynchronous After':'异步后',
+   'Job Configuration':'工作配置',
+  'Exclusive':'排除',
+  'Job Priority':'工作优先级',
+  'Retry Time Cycle':'重试时间周期',
+  'Documentation':'文档',
+  'Element Documentation':'元素文档',
+  'History Configuration':'历史配置',
+  'History Time To Live':'历史的生存时间',
+  'Forms':'表单',
+  'Form Key':'表单key',
+  'Form Fields':'表单字段',
+  'Business Key':'业务key',
+  'Form Field':'表单字段',
+  'ID':'编号',
+  'Type':'类型',
+  'Label':'名称',
+  'Default Value':'默认值',
+  'Validation':'校验',
+  'Add Constraint':'添加约束',
+  'Config':'配置',
+  'Properties':'属性',
+  'Add Property':'添加属性',
+  'Value':'值',
+  'Listeners':'监听器',
+  'Execution Listener':'执行监听',
+  'Event Type':'事件类型',
+  'Listener Type':'监听器类型',
+  'Java Class':'Java类',
+  'Expression':'表达式',
+  'Must provide a value':'必须提供一个值',
+  'Delegate Expression':'代理表达式',
+  'Script':'脚本',
+  'Script Format':'脚本格式',
+  'Script Type':'脚本类型',
+  'Inline Script':'内联脚本',
+  'External Script':'外部脚本',
+  'Resource':'资源',
+  'Field Injection':'字段注入',
+  'Extensions':'扩展',
+  'Input/Output':'输入/输出',
+  'Input Parameters':'输入参数',
+  'Output Parameters':'输出参数',
+  'Parameters':'参数',
+  'Output Parameter':'输出参数',
+  'Timer Definition Type':'定时器定义类型',
+  'Timer Definition':'定时器定义',
+  'Date':'日期',
+  'Duration':'持续',
+  'Cycle':'循环',
+  'Signal':'信号',
+  'Signal Name':'信号名称',
+  'Escalation':'升级',
+  'Error':'错误',
+  'Link Name':'链接名称',
+  'Condition':'条件名称',
+  'Variable Name':'变量名称',
+  'Variable Event':'变量事件',
+  'Specify more than one variable change event as a comma separated list.':'多个变量事件以逗号隔开',
+  'Wait for Completion':'等待完成',
+  'Activity Ref':'活动参考',
+  'Version Tag':'版本标签',
+  'Executable':'可执行文件',
+  'External Task Configuration':'扩展任务配置',
+  'Task Priority':'任务优先级',
+  'External':'外部',
+  'Connector':'连接器',
+  'Must configure Connector':'必须配置连接器',
+  'Connector Id':'连接器编号',
+  'Implementation':'实现方式',
+  'Field Injections':'字段注入',
+  'Fields':'字段',
+  'Result Variable':'结果变量',
+  'Topic':'主题',
+  'Configure Connector':'配置连接器',
+  'Input Parameter':'输入参数',
+  'Assignee':'代理人',
+  'Candidate Users':'候选用户',
+  'Candidate Groups':'候选组',
+  'Due Date':'到期时间',
+  'Follow Up Date':'跟踪日期',
+  'Priority':'优先级',
+  'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':'跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00',
+  'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':'跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00',
+  'Variables':'变量',
+};

+ 49 - 0
operationSupport/src/views/flow/api.js

@@ -0,0 +1,49 @@
+export default (http) => ({
+  // 获取角色列表
+  getRoleList: () => http.get('/system/user/getRoleList'),
+  // 获取指派用户
+  getUserList: () => {
+    return new Promise(resolve => {
+      http.get('/sc-user-center/user/findUserList').then(({ status, data = [] }) => {
+        let i = data.length,
+          opt = {}
+        while (i--) {
+          opt[data[i].id] = data[i].username
+        }
+        resolve({
+          data: opt
+        })
+      })
+    })
+  },
+  // 获取指派机构
+  getOrganTree: () => {
+    return new Promise(resolve => {
+      http.post('/sc-user-center/org/getAllByTenantId').then(({ data }) => {
+        let result = []
+        console.log('获取的机构的值', data)
+        // function flat(nodes, parentName) {
+        //   if(!nodes || nodes.length === 0) return []
+        //   nodes.forEach(node => {
+        //     if(parentName) {
+        //       result.push({
+        //         name: node.name + '['+parentName+']', id: node.id
+        //       })
+        //       return flat(node.children, parentName + '-' + node.name)
+        //     } else {
+        //       result.push({name: node.name, id: node.id})
+        //       return flat(node.children, node.name)
+        //     }
+        //   })
+        // }
+        // flat(data);
+        resolve({
+          list: result,
+          tree: data
+        })
+      })
+    })
+  },
+  // 获取处理表单
+  getForm: () => http.get('/sc-community/workflow/form/list')
+})

+ 84 - 0
operationSupport/src/views/flow/communityTree.vue

@@ -0,0 +1,84 @@
+<template>
+    <div class="organ-tree">
+        <el-input v-model="filterText" placeholder="请输入关键字" suffix-icon="el-icon-search"></el-input>
+        <div class="tree-style-box no-scrollbar">
+            <el-tree
+                class="tree-style"
+                :data="organList"
+                ref="tree"
+                node-key="id"
+                :highlight-current="true"
+                :props="defaultProps"
+                :expand-on-click-node="false"
+                @node-click="treeClick"
+                default-expand-all
+                :filter-node-method="filterNode"
+            >
+            </el-tree>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'organTree',
+    data() {
+        return {
+            filterText: '',
+            organList: [],
+            defaultProps: {
+                label: 'communityName'
+            }
+        };
+    },
+    watch: {
+        filterText(val) {
+            this.$refs.tree.filter(val);
+        }
+    },
+    methods: {
+        getOrgTreeList() {
+            this.$http.get('/sc-community-web/assets/community/list').then(({ status, data, msg }) => {
+                if (status === 0 && data) {
+                    this.organList = data;
+                    this.$nextTick().then(() => {
+                        const firstNode = document.querySelector('.el-tree-node');
+                        firstNode.click();
+                    });
+                }
+            });
+        },
+
+        filterNode(value, data) {
+            if (!value) return true;
+            return data.communityName.indexOf(value) !== -1;
+        },
+        treeClick(e) {
+            this.$emit('organId', e.id);
+        }
+    },
+    created() {
+        this.getOrgTreeList();
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.organ-tree {
+    width: 260px;
+    background: #ffffff;
+    padding: 20px;
+    box-sizing: border-box;
+    float: left;
+    height: 100%;
+    overflow: auto;
+    &::before {
+        clear: both;
+    }
+    .tree-style-box {
+        margin-top: 20px;
+        max-height: calc(100vh - 200px);
+        overflow: scroll;
+    }
+}
+</style>

+ 253 - 0
operationSupport/src/views/flow/index.vue

@@ -0,0 +1,253 @@
+<!--
+ * @Author: zwy
+ * @Date: 2021-01-30 16:14:28
+ * @LastEditors: zwy
+ * @LastEditTime: 2021-04-27 11:09:07
+ * @Descripttion: 工作流管理
+-->
+<template>
+    <div class="workflow">
+        <!-- <organ-tree @organId="currentOrganId" ></organ-tree> -->
+        <community-tree @organId="currentOrganId" style="float: left"></community-tree>
+        <div class="flow-content">
+            <div class="search">
+                <el-input placeholder="请输入流程名称" class="search-input" v-model.trim="mixins_query.name"></el-input>
+                <el-button type="primary" placeholder="状态" class="search-btn" @click="mixins_search" icon="el-icon-search"
+                    >查询
+                </el-button>
+
+                <div class="search-icon">
+                    <el-tooltip class="item" effect="light" placement="bottom" content="新增">
+                        <i class="iconfont" @click="addOrEdit('add')">&#xe641;</i>
+                    </el-tooltip>
+                </div>
+            </div>
+            <zz-table
+                :cols="cols"
+                :settings="{ showIndex: true }"
+                :pageset="mixins_pageset"
+                @page-change="pageChange"
+                :data="mixins_list"
+                :loading="mixins_onQuery"
+            >
+                <template slot-scope="scope" slot="status">
+                    <p v-if="scope.row.processStatus == 2">启用</p>
+                    <p v-else style="color: #d8d8d8">未启用</p>
+                </template>
+                <template slot-scope="scope" slot="opt">
+                    <div class="opt">
+                        <el-tooltip effect="light" placement="bottom" content="设计">
+                            <i class="zoniot_font zoniot-icon-liucheng1" @click="workflowSetting(scope.index)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="部署">
+                            <i class="zoniot_font zoniot-icon-fabu1" @click="dispose(scope.row.id)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="编辑">
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope.index)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="删除">
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deleteOne(scope.row.id)"></i>
+                        </el-tooltip>
+                    </div>
+                </template>
+            </zz-table>
+        </div>
+    </div>
+</template>
+
+<script>
+var taskTypeList = [];
+import list from '@utils/list.js';
+import communityTree from './communityTree.vue';
+export default {
+    mixins: [list],
+    name: 'flowManagement',
+    components: {
+        communityTree
+    },
+    data() {
+        return {
+            currentId: '',
+            cols: [
+                {
+                    label: '名称',
+                    prop: 'processName'
+                },
+                {
+                    label: '描述',
+                    prop: 'processDesc'
+                },
+                {
+                    label: '业务类型',
+                    prop: 'businessType',
+                    format(val) {
+                        let arr = ['', '安保巡更', '设备巡检', '运维工单'];
+                        return arr[val];
+                    }
+                },
+                {
+                    label: '任务类型',
+                    prop: 'taskType',
+                    format(val) {
+                        return taskTypeList.filter((item) => item.dictCode == val)[0].dictValue;
+                    }
+                },
+                {
+                    label: '创建时间',
+                    prop: 'dateCreate'
+                },
+                {
+                    label: '状态',
+                    slot: 'status'
+                },
+                {
+                    label: '操作',
+                    width: 200,
+                    slot: 'opt'
+                }
+            ]
+        };
+    },
+    methods: {
+        // 流程设计
+        workflowSetting(index) {
+            new Promise((resolve) => {
+                let row;
+                row = this.mixins_list[index] || {};
+                this.$store.dispatch('openModal', {
+                    url: '/flow/popups/workflowsetting.vue',
+                    title: row.processName,
+                    width: '1500px',
+                    height: '806px',
+                    notip: true,
+                    props: {
+                        data: row,
+                        // todo: todo,
+                        callback: resolve
+                    }
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        currentOrganId(data) {
+            this.currentId = data || '';
+        },
+        addOrEdit(todo, index) {
+            new Promise((resolve) => {
+                let row,
+                    title = '编辑流程';
+                if ('add' == todo) {
+                    title = '新增流程';
+                } else {
+                    row = this.mixins_list[index] || {};
+                    row = JSON.parse(JSON.stringify(row));
+                }
+                this.$store.dispatch('openModal', {
+                    url: '/flow/popups/AddOrEdit.vue',
+                    title: title,
+                    width: todo == 'add' ? '800px' : '500px',
+                    height: '480px',
+                    props: {
+                        data: row,
+                        todo: todo,
+                        callback: resolve
+                    }
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        deleteOne(id) {
+            this.$msgBox(`刪除流程`, '删除后将无法恢复,请问是否继续?')
+                .then(() => {
+                    this.$http.delete('/sc-community/workflow/process/delete', { id }).then(({ msg, status, data }) => {
+                        if (status == 0) {
+                            this.$message.success(msg);
+                            this.mixins_search();
+                        } else {
+                            this.$message.error(msg);
+                        }
+                    });
+                })
+                .catch(() => {});
+        },
+        dispose(id) {
+            this.$http.get('/sc-community/workflow/process/deploy', { id }).then(({ msg, status, data }) => {
+                if (status == 0) {
+                    this.$message.success(msg);
+                    this.mixins_search();
+                } else {
+                    this.$message.error(data);
+                }
+            });
+        },
+        // 获取工单,任务类型
+        getWorkList() {
+            this.$api.common.getDictionaryData('SC_SECURITY_PATROL ').then(({ msg, status, data }) => {
+                if (status == 0) {
+                    let item = data;
+                    this.$api.common.getDictionaryData('SC_EQUIPMENT_INSPECTION').then(({ msg, status, data }) => {
+                        if (status == 0) {
+                            taskTypeList = item.concat(data);
+                            this.$api.common.getDictionaryData('SC_WORK_ORDER_TYPE').then(({ msg, status, data }) => {
+                                if (status == 0) {
+                                    taskTypeList = taskTypeList.concat(data);
+                                }
+                            });
+                        }
+                    });
+                }
+            });
+        }
+    },
+    watch: {
+        currentId(newValue, oldValue) {
+            this.mixins_query.comunityId = newValue;
+            this.mixins_search();
+        }
+    },
+    created() {
+        this.getWorkList();
+        this.mixins_dataUrl = '/sc-community/workflow/process/getPage';
+        this.mixins_post = 'get';
+        this.mixins_query = {
+            name: '',
+            comunityId: ''
+        };
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.workflow {
+    // display: flex;
+    height: 100%;
+    .flow-content {
+        margin-left: 20px;
+        width: calc(100% - 280px);
+        float: left;
+        .search {
+            background: #ffffff;
+            height: 60px;
+            padding: 16px 20px 14px 20px;
+            .search-icon {
+                vertical-align: top;
+                float: right;
+                .fr-fs-fc {
+                    color: #2787f1;
+                    font-size: 30px;
+                }
+            }
+            .search-btn {
+                height: 30px;
+                background: #2787f1;
+                border-radius: 4px;
+                padding: 9px 8px;
+                box-sizing: border-box;
+                // line-height: 10px;
+            }
+        }
+    }
+}
+</style>

+ 219 - 0
operationSupport/src/views/flow/popups/AddOrEdit.vue

@@ -0,0 +1,219 @@
+<!--
+ * @Author: zwy
+ * @Date: 2021-02-01 11:46:07
+ * @LastEditors: zwy
+ * @LastEditTime: 2021-03-11 11:16:24
+ * @Descripttion: 工作流管理-编辑弹框
+-->
+<template>
+    <div class="flowModal">
+        <div class="tree-style" v-if="params.todo == 'add'">
+            <el-tree
+                :data="organList"
+                ref="tree"
+                node-key="id"
+                :highlight-current="true"
+                :props="defaultProps"
+                :expand-on-click-node="false"
+                default-expand-all
+                :check-strictly="true"
+                @check="changeOrgan"
+                :show-checkbox="true"
+            >
+            </el-tree>
+        </div>
+        <zz-form class="form" :cols="formCols" :data="formData" :rules="formRules" labelWidth="100" ref="form">
+            <template slot="businessType">
+                <el-select v-model="formData.businessType" placeholder="请选择业务类型" @change="changeBusinessType">
+                    <el-option label="安保巡更" :value="1"></el-option>
+                    <el-option label="设备巡检" :value="2"></el-option>
+                    <el-option label="运维工单" :value="3"></el-option>
+                </el-select>
+            </template>
+            <template slot="taskType">
+                <el-select v-model="formData.taskType" placeholder="请选择任务类型">
+                    <el-option
+                        v-for="(item, index) in taskTypeList"
+                        :key="index"
+                        :value="+item.dictCode"
+                        :label="item.dictValue"
+                    ></el-option>
+                </el-select>
+            </template>
+        </zz-form>
+    </div>
+</template>
+
+<script>
+export default {
+    props: ['params'],
+    data() {
+        return {
+            organList: [],
+            defaultProps: {
+                children: 'orgs',
+                label: 'communityName'
+            },
+            formData: {
+                processName: '',
+                businessType: '',
+                taskType: '',
+                companyIds: [],
+                id: '',
+                processDesc: '',
+                companyOrgId: ''
+            },
+            taskTypeList: [],
+            formCols: [
+                [
+                    {
+                        label: '名称',
+                        prop: 'processName',
+                        input: true
+                    },
+                    {
+                        label: '业务类型',
+                        prop: 'businessType',
+                        slot: 'businessType'
+                    },
+                    {
+                        label: '任务类型',
+                        prop: 'taskType',
+                        slot: 'taskType'
+                    },
+                    {
+                        label: '描述',
+                        prop: 'processDesc',
+                        input: true
+                    }
+                ]
+            ],
+            formRules: {
+                processName: [this.$valid.inputRequired('名称')],
+                businessType: [this.$valid.selectRequired('业务类型')],
+                taskType: [this.$valid.selectRequired('业务类型')]
+            }
+        };
+    },
+    methods: {
+        changeOrgan() {
+            var data = this.$refs.tree.getCheckedNodes();
+            let arr = [];
+            data.map((item, index) => {
+                arr.push(item.id);
+            });
+            this.formData.companyIds = arr;
+        },
+        getOrgTreeList() {
+            this.$http.get('/sc-community-web/assets/community/list').then(({ status, data, msg }) => {
+                if (status === 0 && data) {
+                    this.organList = data;
+                    // this.$nextTick().then(() => {
+                    //     const firstNode = document.querySelector('.el-tree-node');
+                    //     firstNode.click();
+                    // });
+                }
+            });
+        },
+        getTaskType(typeKey) {
+            this.$api.common.getDictionaryData(typeKey).then(({ msg, status, data }) => {
+                if (status == 0) {
+                    this.taskTypeList = data;
+                }
+            });
+        },
+        submit() {
+            new Promise((resolve) => {
+                this.$refs.form.validate(resolve);
+            }).then(() => {
+                var posturl = '',
+                    method = 'post';
+                if (this.params.todo === 'edit') {
+                    method = 'put';
+                    posturl = '/sc-community/workflow/process/edit';
+                    delete this.formData.companyIds;
+                } else {
+                    posturl = '/sc-community/workflow/process/add';
+                    if (!this.formData.companyIds.length) {
+                        this.$message.error('请勾选所属公司');
+                        loading.close();
+                        return;
+                    }
+                }
+                var loading = this.$loading();
+                this.$http[method](posturl, this.formData)
+                    .then(({ status, data, msg }) => {
+                        loading.close();
+                        if (0 == status) {
+                            this.$message.success(msg);
+                            this.params.callback && this.params.callback();
+                            this.$emit('close');
+                        } else {
+                            this.$message.error(data);
+                        }
+                    })
+                    .catch((err) => {
+                        loading.close();
+                    });
+            });
+        },
+        changeBusinessType() {
+            this.formData.taskType = '';
+            switch (this.formData.businessType) {
+                case 1:
+                    // this.getWorkList();
+                    this.getTaskType('SC_SECURITY_PATROL');
+                    break;
+                case 2:
+                    // this.getTaskList();
+                    this.getTaskType('SC_EQUIPMENT_INSPECTION');
+                    break;
+                case 3:
+                    this.getTaskType('SC_WORK_ORDER_TYPE');
+            }
+        }
+    },
+    created() {
+        this.getOrgTreeList();
+        if (this.params.todo == 'edit') {
+            this.__setValue('formData');
+            switch (this.formData.businessType) {
+                case 1:
+                    // this.getWorkList();
+                    this.getTaskType('SC_SECURITY_PATROL');
+                    break;
+                case 2:
+                    // this.getTaskList();
+                    this.getTaskType('SC_EQUIPMENT_INSPECTION');
+                    break;
+                case 3:
+                    // this.getTaskType();
+                    this.getTaskType('SC_WORK_ORDER_TYPE');
+            }
+            // this.isEdit=true
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.flowModal {
+    display: flex;
+    height: 100%;
+    .tree-style {
+        width: 340px;
+        height: 100%;
+        border: 1px solid #d8d8d8;
+        border-radius: 4px;
+        overflow: auto;
+        padding: 20px;
+    }
+    .form {
+        height: 100%;
+        width: 100%;
+        margin-left: 20px;
+        border: 1px solid #d8d8d8;
+        padding: 20px;
+    }
+}
+</style>

+ 60 - 0
operationSupport/src/views/flow/popups/bpmn/ContextPad.js

@@ -0,0 +1,60 @@
+/**
+ * 自定义元素的contexPad
+ */
+export default class CustomContextPad {
+  constructor(config, contextPad, create, elementFactory, injector, translate) {
+    this.create = create;
+    this.elementFactory = elementFactory;
+    this.translate = translate;
+    // if (config.autoPlace !== false) {
+    //   this.autoPlace = injector.get('autoPlace', false);
+    // }
+    contextPad.registerProvider(this);//继承自contextPad
+  }
+  //要在contextPad这个容器里显示哪些自定义的元素, 比如我这里需要给容器里添加一个lindaidai-task的元素, 那么我们可以在返回的对象中添加上append.lindaidai-task这个属性.
+  getContextPadEntries(element) {
+    const {
+      // autoPlace,
+      create,
+      elementFactory,
+      translate
+    } = this;
+
+    function appendServiceTask(event, element) {
+      // if (autoPlace) { //autoPlace的判断, 因为流程元素的位置需要拖动调整,autoplace应该是按照普遍规则摆放这些元素
+      //   const shape = elementFactory.createShape({ type: 'bpmn:UserTask' });
+  
+      //   autoPlace.append(element, shape);
+      // } else {
+        appendServiceTaskStart(event, element);
+      // }
+    }
+    function appendServiceTaskStart(event) {
+      const shape = elementFactory.createShape({ type: 'bpmn:ServiceTask' });
+      create.start(event, shape, element);
+    }
+    //action,用户操作时会触发的事件title: 鼠标移动到元素上面给出的提示信息
+    //className: 样式类名, 我们可以通过它给元素修改样式
+    //group: 属于哪个分组, 比如tools、event、gateway、activity等等,用于分类
+    return {
+      'append.service-task': {
+        group: 'model',
+        className: 'bpmn-icon-service-task',
+        title: translate('Append ServiceTask'),
+        action: {
+          click: appendServiceTask,
+          dragstart: appendServiceTaskStart
+        }
+      }
+    };
+  }
+}
+//引入一些后面要用到的方法或者属性,通过¥inject注入进来
+CustomContextPad.$inject = [
+  'config',
+  'contextPad',
+  'create',
+  'elementFactory',
+  'injector',
+  'translate'
+];

+ 70 - 0
operationSupport/src/views/flow/popups/bpmn/Provider.js

@@ -0,0 +1,70 @@
+/*
+ * @Author: wf 
+ * @Date: 2021-07-Th 07:36:26 
+ * @Last Modified by:   wf 
+ * @Last Modified time: 2021-07-Th 07:36:26 
+ * @description:左边工具栏覆写
+ */
+export default function Provider(palette, create, elementFactory) {
+	this._create = create;
+	this._elementFactory = elementFactory;
+	palette.registerProvider(this)
+}
+Provider.$inject = [
+	'palette', 'create', 'elementFactory'
+]
+Provider.prototype.getPaletteEntries = function() {//核心代码,流程如下:定义一个类,使用$inject注入一些需要的变量在类中,
+	// 使用palette.registerProvider(this)指定这是一个palette
+	var elementFactory = this._elementFactory,
+		create = this._create;
+	function startCreate(e, type) {
+		var shape = elementFactory.create(
+			'shape', {type}
+			)
+		create.start(e, shape)
+	}
+	return {
+		'create-user-task': {
+			group: 'custome',
+			title: '用户任务',
+			className: 'bpmn-icon-user-task',
+			// imageUrl: '/static/imgs/icon_alarm.png',
+			action: {
+				dragstart(e) {
+					startCreate(e, 'bpmn:UserTask')//开始拖拽时调用的事件
+				},
+				click(e) {
+					startCreate(e, 'bpmn:UserTask')//点击时调用的事件
+				}
+			}
+		},
+		'create.service-task': {
+			group: 'custome',
+			title: '服务任务',
+			className: 'bpmn-icon-service-task',
+			// imageUrl: '/static/imgs/icon_gzcs.png',
+			action: {
+				dragstart(e) {
+					startCreate(e, 'bpmn:ServiceTask')
+				},
+				click(e) {
+					startCreate(e, 'bpmn:ServiceTask')
+				}
+			}
+		},
+		'append.gateway': {
+			group: 'custome',
+			title: '网关',
+			className: 'bpmn-icon-gateway-xor',
+			// imageUrl: '/static/imgs/icon_zsbj.png',
+			action: {
+				dragstart(e) {
+					startCreate(e, 'bpmn:ExclusiveGateway')
+				},
+				click(e) {
+					startCreate(e, 'bpmn:ExclusiveGateway')
+				}
+			}
+		}
+	}
+};

+ 320 - 0
operationSupport/src/views/flow/popups/bpmn/condition.vue

@@ -0,0 +1,320 @@
+<template>
+	<div class='bpmn-codition'>
+		<p class="title">分支条件:</p>
+		<p class='key'>建筑</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-select v-model="buildingSelect" multiple filterable default-first-option reserve-keyword 
+				:filter-method='buildingSearch' @change="selectChange(0)" placeholder="请选择建筑">
+				<el-option
+					v-for="item in buildingList"
+					:key="item.buildingId"
+					:label='item.buildingName'
+					:value="item.buildingId">{{item.buildingName+'【'+item.provinceName+item.cityName+item.regionName+'】'}}
+				</el-option>
+			</el-select>
+		</div>
+		<p class='key'>设备型号</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-select v-model="deviceSelect" multiple filterable default-first-option  reserve-keyword 
+				:filter-method='deviceSearch' @change="selectChange(1)" placeholder="请选择设备型号">
+				<el-option
+					v-for="item in deviceList"
+					:key="item.id"
+					:label='item.model'
+					:value="item.id">{{item.manufacturerName+'/'+item.equipmentType+'/'+item.model}}
+				</el-option>
+			</el-select>
+		</div>
+		<!-- <p class='key'>告警分类</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-select v-model="categorySelect" multiple filterable default-first-option reserve-keyword 
+			 @change="selectChange(2)" placeholder="请选择告警分类">
+				<el-option
+					v-for="item in categoryList"
+					:key="item.value"
+					:label='item.name'
+					:value="item.value">
+				</el-option>
+			</el-select>
+		</div> -->
+		<p class='key'>告警等级</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-select v-model="levelSelect" multiple filterable default-first-option reserve-keyword 
+			 @change="selectChange(3)" placeholder="请选择告警等级">
+				<el-option
+					v-for="item in levelList"
+					:key="item.id"
+					:label='item.level'
+					:value="item.id">
+				</el-option>
+			</el-select>
+		</div>
+		<p class='key'>告警类型</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-select v-model="typeSelect" multiple filterable default-first-option reserve-keyword 
+			 @change="emitChange" placeholder="请选择告警类型">
+				<el-option
+					v-for="item in typeList"
+					:key="item.id"
+					:label='item.name'
+					:value="item.id">
+				</el-option>
+			</el-select>
+		</div>
+		<p class='key'>告警时间</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-time-picker v-model="startTime" placeholder="开始时间" :editable='false' @change='emitChange'></el-time-picker>
+			<span class='range'>至</span>
+			<el-time-picker v-model="endTime" placeholder="结束时间" :editable='false' @change='emitChange' class='last'></el-time-picker>
+		</div>
+		<p class='key'>工单结果</p>
+		<div class='value'>
+			<span class='key'>等于</span>
+			<el-select v-model='result' placeholder='处理结果' @change='emitChange'>
+				<el-option v-for='(item,index) in resultList' :key='index' :label='item.value' :value='item.key'></el-option>
+			</el-select>
+		</div>
+	</div>
+</template>
+<script>
+export default {
+	props: ['channelId', 'values', 'formId'],
+	data() {
+		return {
+			// 建筑
+			buildingList: [],
+			buildingBackup: [],
+			buildingSelect: [],
+			// 设备型号
+			deviceList: [],
+			deviceBackUp: [],
+			deviceSelect: [],
+			// 告警分类
+			categoryList: [],
+			categoryBackup: [],
+			categorySelect: '',
+			// 报警等级
+			levelList: [],
+			levelBackup: [],
+			levelSelect: '',
+			// 告警类型
+			typeList: [],
+			typeBackup: [],
+			typeSelect: '',
+			// 开始时间
+			startTime: '',
+			// 结束时间
+			endTime: '',
+			// 工单结果
+			result: '',
+			resultList: [],
+			// 是否初始化
+			isInit: false
+		}
+	},
+	methods: {
+		// 查询当前场景下的建筑 列表 
+		getBuildingList() {
+			this.$http.get('/system/building/getAllBuildingList', {
+				sysId: this.channelId
+			}).then(({data}) => {
+				this.buildingList = data || []
+				this.buildingBackup = data || []
+			})
+		},
+		selectChange(arg) {
+			if(arg < 1) {
+				this.deviceSelect = []
+				this.getDeviceList()
+			}
+			if(arg < 2) {
+				this.categorySelect = []
+				this.getAlarmCategory()
+			}
+			if(arg < 3) {
+				this.levelSelect = []
+				this.getAlarmLevel()
+			}
+			if(arg < 4) {
+				this.typeSelect = []
+				this.getAlarmType()
+			}
+			this.emitChange()
+		},
+		// 建筑筛选
+		buildingSearch(str) {
+			let list = JSON.parse(JSON.stringify(this.buildingBackup)),
+				i = list.length,
+				arr = [];
+			while(i--) {
+				if(-1 != list[i].provinceName.indexOf(str) || 
+					-1 != list[i].cityName.indexOf(str)|| 
+					-1 != list[i].regionName.indexOf(str) || 
+					-1 != list[i].buildingName.indexOf(str)) {
+					arr.push(list[i])
+				}
+			}
+			this.buildingList = arr;
+		},
+		// 根据场景和建筑ID集合获取设备类型
+		getDeviceList() {
+			this.$http.get('/system/process/condtion/deviceType', {
+				channelId: this.channelId,
+				buildingIds: this.buildingSelect.join(',')
+			}).then(({data}) => {
+				this.deviceBackUp = data || []
+				this.deviceList = data || []
+			})
+		},
+		// 设备类型搜索
+		deviceSearch(qs) {
+			let list = JSON.parse(JSON.stringify(this.deviceBackUp)),
+				i = list.length,
+				arr = [];
+			while(i--) {
+				if(-1 != list[i].manufacturerName.indexOf(qs) || -1 != list[i].equipmentType || -1 != list[i].model) {
+					arr.push(list[i])
+				}
+			}
+			this.deviceList = arr;
+		},
+		// 根据建筑、设备类型来选择告警分类
+		getAlarmCategory() {
+			this.$http.get('/system/process/condtion/alarmCategory', {
+				channelId: this.channelId,
+				buildingIds: this.buildingSelect.join(','),
+				deviceTypeIds: this.deviceSelect.join(',')
+			}).then(({data}) => {
+				this.categoryList = data || []
+				this.categoryBackup = data || []
+			})
+		},
+		// 根据建筑、设备类型、告警分类来选择告警等级
+		getAlarmLevel() {
+			this.$http.get('/system/process/condtion/alarmLevel', {
+				channelId: this.channelId,
+				buildingIds: this.buildingSelect.join(','),
+				deviceTypeIds: this.deviceSelect.join(','),
+				alarmCategorys: this.categorySelect.join(',')
+			}).then(({data}) => {
+				this.levelList = data || []
+				this.levelBackup = data || []
+			})
+		},
+		// 根据建筑、设备类型、告警分类、告警等级来选择告警类型
+		getAlarmType() {
+			this.$http.get('/system/process/condtion/alarmType', {
+				channelId: this.channelId,
+				buildingIds: this.buildingSelect.join(','),
+				deviceTypeIds: this.deviceSelect.join(','),
+				alarmCategorys: this.categorySelect.join(','),
+				alarmLevelIds: this.levelSelect.join(',')
+			}).then(({data}) => {
+				this.typeList = data || []
+				this.typeBackup = data || []
+			})
+		},
+		emitChange() {
+			let startTime = '', endTime = '';
+			if(this.startTime instanceof Date && this.endTime instanceof Date) {
+				startTime = moment(this.startTime).format('HH:mm')
+				endTime = moment(this.endTime).format('HH:mm')
+			}
+			if(this.isInit) return
+			this.$emit('change', {
+				buildingIds: this.buildingSelect,
+				deviceTypeIds: this.deviceSelect,
+				alarmCategorys: this.categorySelect,
+				alarmLevelIds: this.levelSelect,
+				alarmTypeIds: this.typeSelect,
+				alarmTimeRange: startTime + '-' + endTime,
+				preHandleResult: this.result
+			})
+		},
+		// 初始化值 
+		initValue() {
+			this.isInit = true;
+			let obj = {}
+			if(this.values) {
+				obj = this.values.match(/\$\{workFlowConditionService\.checkCondition\(execution,"(\S*)"\)\}/)[1] || '{}'
+				obj = obj.replace(/\\/g, '')
+				obj = JSON.parse(obj)
+			}
+			this.buildingSelect = obj.buildingIds || []
+			this.deviceSelect = obj.deviceTypeIds || []
+			this.categorySelect = obj.alarmCategorys || []
+			this.levelSelect = obj.alarmLevelIds || []
+			this.typeSelect = obj.alarmTypeIds || []
+			this.getBuildingList()
+			this.getDeviceList()
+			this.getAlarmCategory()
+			this.getAlarmLevel()
+			this.getAlarmType()
+			if(obj.alarmTimeRange) {
+				let times = obj.alarmTimeRange.split('-'),
+					today = moment().format('YYYY-MM-DD')
+				if(times[0]) {
+					this.startTime = moment(today + ' ' + times[0] + ':00').format('YYYY-MM-DD HH:mm:ss')
+				}
+				if(times[1]) {
+					this.endTime = moment(today + ' ' + times[1] + ':00').format('YYYY-MM-DD HH:mm:ss')
+				}
+			}
+			this.result = obj.preHandleResult
+			this.isInit = false
+		},
+		// 根据FormId获取处理结果
+		getFormResult() {
+			// console.log(this.formId)
+			let list = JSON.parse(JSON.stringify(this.formId)),
+				i = list.length,
+				arr = []
+			while(i--) {
+				arr.push(new Promise(resolve => {
+					this.$http.get('/system/form/'+list[i], {
+						channelId: this.channelId
+					}).then(({data}) => {
+						let actList = data ? data.userActionList || [] : [],
+							j = actList.length,
+							arr = [];
+						while(j--) {
+							if('指派' != actList[j].actionName) {
+								let temps = actList[j].content.split(','),
+									objs = []
+								for(let item in temps) {
+									let temp = temps[item].split(':')
+									objs.push({
+										key: temp[0],
+										value: temp[1]
+									})
+								}
+								arr = arr.concat(objs)
+							}
+						}
+						resolve(arr)
+					})
+				}))
+			}
+			// 获取处理结果
+			Promise.all(arr).then(res => {
+				i = res.length;
+				let arr = []
+				while(i--) {
+					arr = arr.concat(res[i])
+				}
+				this.resultList = arr;
+			})
+		}
+	},
+	created() {
+		this.initValue()
+		this.getFormResult()
+	}
+}
+</script>

+ 83 - 0
operationSupport/src/views/flow/popups/bpmn/form.vue

@@ -0,0 +1,83 @@
+<template>
+    <div class="bpmn-form">
+        <div class="bpmn-user">节点表单</div>
+        <div class="bpmn-content">
+            <el-radio
+                v-model="check"
+                v-for="(item, index) in form"
+                :key="index"
+                :label="item.formKey"
+                @change="change"
+                class="sys-pop-bpmn__radio"
+                >{{ item.formName }}</el-radio
+            >
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    props: ['values', 'channelId','getFormList'],
+    data() {
+        return {
+            check: '',
+            isWaterMeterChannel: false,
+        };
+    },
+    computed: {
+        form() {
+            let formList = this.getFormList,
+                arr = [],
+                i = formList.length;
+            // 获取水表的自定义表单key(BPMNFORM对象的key)
+            let customFormKey = new Set();
+            if (this.isWaterMeterChannel) {
+                while (i--) {
+                    if (customFormKey.has(formList[i].formKey)) {
+                        arr.push(formList[i]);
+                    }
+                }
+            } else {
+                while (i--) {
+                    if (!customFormKey.has(formList[i].formKey)) {
+                        arr.push(formList[i]);
+                    }
+                }
+            }
+            return arr;
+        }
+    },
+    methods: {
+        change(val) {
+            this.$emit('change', val);
+        },
+        
+    },
+    created() {
+        this.check = this.values;
+    },
+    watch: {
+        values(n) {
+            this.check = n;
+        }
+    }
+};
+</script>
+<style lang='scss' scoped>
+.bpmn-form {
+    width: 100%;
+    height: 160px;
+    border: 1px solid #d8d8d8;
+    margin: 5px 0;
+    .bpmn-user {
+        font-size: 14px;
+        line-height: 30px;
+        border-bottom: 1px solid #d8d8d8;
+        padding: 0 20px;
+    }
+    .sys-pop-bpmn__radio {
+        display: block;
+        margin-top: 10px;
+        margin-left: 20px;
+    }
+}
+</style>

+ 89 - 0
operationSupport/src/views/flow/popups/bpmn/sequence.vue

@@ -0,0 +1,89 @@
+<!--
+ * @Author: zzy6937@qq.com
+ * @Date: 2019-07-11 14:25:43
+ * @LastEditors: zwy
+ * @LastEditTime: 2021-03-09 14:59:56
+ * @Description: 节点之间连线的配置页
+ -->
+<template>
+    <div class="bppmn">
+        <ul class="bpmn-user_select">
+            <div class="bpmn-title">节点动作</div>
+            <div class="bpmn-content">
+                <li>
+                    <label>等于</label>
+                    <el-select v-model="result" placeholder="请选择节点动作" clearable @change="resultChange">
+                        <el-option
+                            v-for="opt in resultList"
+                            :key="opt.actionValue"
+                            :value="opt.actionValue"
+                            :label="opt.actionName"
+                        ></el-option>
+                    </el-select>
+                </li>
+            </div>
+        </ul>
+    </div>
+</template>
+<script>
+export default {
+    props: ['formKey', 'channelId', 'values'],
+    data() {
+        return {
+            resultList: [],
+            result: ''
+        };
+    },
+    methods: {
+        // 根据表单获取处理结果
+        getFormResult() {
+            this.$http.get('/workflow/form/' + this.formKey, { channelId: this.channelId }).then(({ data }) => {
+                let actList = data ? data.userActionList || [] : [],
+                    j = actList.length,
+                    arr = [];
+                while (j--) {
+                    if ('指派' != actList[j].actionName) {
+                        arr = arr.concat({
+                            actionName: actList[j].actionName,
+                            actionValue: actList[j].actionValue
+                        });
+                    }
+                }
+                this.resultList = arr;
+                // 设置初始值
+                if (this.values) {
+                    this.result = this.values.substr(11).replace('"}', '');
+                }
+            });
+        },
+        resultChange(val) {
+            this.$emit('change', val);
+        }
+    },
+    created() {
+        this.getFormResult();
+    }
+};
+</script>
+<style lang="scss" scoped>
+.bppmn {
+    border: 1px solid #d8d8d8;
+    .bpmn-title {
+        line-height: 30px;
+        border-bottom: 1px solid #d8d8d8;
+        padding: 0 20px;
+    }
+    .bpmn-content {
+        padding: 20px;
+        li {
+            margin: 10px 0;
+            label {
+                margin-right: 10px;
+            }
+            .el-select {
+                width: 80%;
+            }
+        }
+    }
+}
+</style>

+ 88 - 0
operationSupport/src/views/flow/popups/bpmn/service.vue

@@ -0,0 +1,88 @@
+<!--
+ * @Author: zwy
+ * @Date: 2021-02-21 14:18:08
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2021-03-03 11:26:14
+ * @Descripttion: 服务任务
+-->
+<template>
+    <div>
+        <div class="bpmn-service">
+            <div class="bpmn-user">服务任务</div>
+            <div class="sys-pop-bpmn-service_row">
+                <el-select v-model="channel" placeholder="请选择服务任务类型" class="sys-pop-bpmn-service_select" @change="change">
+                    <el-option v-for="item in options5" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+                </el-select>
+            </div>
+        </div>
+        <user :channelId="channelId" :values="userValues" @change="userChange" :prevTask="prevTask" ref="user"></user>
+    </div>
+</template>
+<script>
+import user from './user.vue';
+export default {
+    props: ['values', 'channelId', 'prevTask'],
+    components: { user },
+    data() {
+        return {
+            channel: '',
+            options5: [
+                {
+                    label: 'pc消息推送',
+                    value: '0'
+                },
+                {
+                    label: 'app消息推送',
+                    value: '1'
+                }
+            ],
+            userValues: '',
+            userSelect: { orgIds: [], userFormFlag: 0, userIds: [], channel: '' }
+        };
+    },
+    methods: {
+        userChange(obj) {
+            this.userSelect = obj;
+            this.change();
+        },
+        init() {
+            if (this.values) {
+                let data = this.values;
+                this.channel = data.channel;
+                this.userValues = JSON.stringify({
+                    orgIds: data.orgIds,
+                    userFormFlag: data.userFormFlag,
+                    userIds: data.userIds
+                });
+            }
+        },
+        change() {
+            let arr = this.userSelect;
+            arr['channel'] = this.channel;
+            this.$emit('change', arr);
+        }
+    },
+    created() {
+        this.init();
+    },
+    mounted() {
+        let $el = this.$refs.user.$el,
+            $user = $el.querySelector('.bpmn-user');
+        $el.removeChild($user);
+    },
+    watch: {
+        values(n) {
+            this.init();
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+.bpmn-service {
+    padding: 0 20px 20px 20px;
+    border: 1px solid #d8d8d8;
+    .bpmn-user {
+        line-height: 30px;
+    }
+}
+</style>

+ 146 - 0
operationSupport/src/views/flow/popups/bpmn/user.vue

@@ -0,0 +1,146 @@
+<!-- 节点用户--用户选择 -->
+<template>
+    <div class="user">
+        <!-- {{ isAssign ? '指派用户:' : '节点用户:' }} -->
+        <div class="bpmn-user">节点用户</div>
+        <ul class="bpmn-user_select">
+            <li>
+                <label>用户</label>
+                <el-select
+                    class="el-select"
+                    v-model="selectUser"
+                    placeholder="请选择用户"
+                    multiple
+                    filterable
+                    reserve-keyword
+                    @change="dataChange"
+                >
+                    <el-option v-for="(opt, optIndex) in userList" :key="optIndex" :value="opt.id" :label="opt.label"></el-option>
+                </el-select>
+            </li>
+            <li>
+                <label>机构</label>
+                <el-select
+                    class="el-select"
+                    v-model="selectOrgan"
+                    placeholder="请选择机构"
+                    multiple
+                    filterable
+                    reserve-keyword
+                    @change="dataChange"
+                >
+                    <el-option v-for="(opt, optIndex) in organTree" :key="optIndex" :value="opt.id" :label="opt.orgName"></el-option>
+                </el-select>
+            </li>
+        </ul>
+        <el-checkbox class="bpmn_checkbox" v-model="checked" true-value="1" @change="dataChange" false-value="0">表单用户</el-checkbox>
+    </div>
+</template>
+<script>
+export default {
+    // values 节点处理用户
+    // isAssign 是否为指派,为true时为指派,
+    // channelId 当前流程的场景ID
+    // prevTask 历史节点name,value的对象
+    // rejectUser 驳回节处理人
+    // isReject 所选表单是否包括驳回操作
+    props: ['values', 'isAssign', 'channelId', 'prevTask', 'rejectUser', 'isReject'],
+    data() {
+        return {
+            personTypeList: [],
+            selectUser: [],
+            selectOrgan: [],
+            selectRole: [],
+            selectPersonType: [],
+            historyNode: '',
+            isUnion: true,
+            isRejectForm: false,
+            organTree: [],
+            userList: [],
+            checked: 0
+        };
+    },
+    methods: {
+        dataChange() {
+            let arr = { orgIds: [], userFormFlag: 0, userIds: [] };
+            if (this.selectOrgan.length) {
+                arr['orgIds'] = this.selectOrgan;
+            }
+            if (this.selectUser.length) {
+                arr['userIds'] = this.selectUser;
+            }
+            if (this.checked) {
+                arr['userFormFlag'] = 1;
+            } else {
+                arr['userFormFlag'] = 0;
+            }
+            this.$emit('change', arr);
+        },
+        init() {
+            if (this.values) {
+                let value = JSON.parse(this.values);
+                this.selectOrgan = value.orgIds;
+                this.selectUser = value.userIds;
+                if (value.userFormFlag) {
+                    this.checked = true;
+                } else {
+                    this.checked = false;
+                }
+            }
+        },
+        getOrganTree() {
+            this.$http.post('/sc-user-center/org/getAll').then(({ msg, data, status }) => {
+                if (status == 0) {
+                    this.organTree = data;
+                }
+            });
+        },
+        getUserList() {
+            this.$http.get('/sc-user-center/user/findUserList', { type: 1 }).then(({ msg, data, status }) => {
+                if (status == 0) {
+                    this.userList = data;
+                }
+            });
+        }
+    },
+    created() {
+        this.init();
+        this.getOrganTree();
+        this.getUserList();
+    },
+    watch: {
+        values(n) {
+            this.init();
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+.user {
+    width: 100%;
+    min-height: 210px;
+    border: 1px solid #d8d8d8;
+    margin: 5px 0;
+    .bpmn-user {
+        font-size: 14px;
+        line-height: 30px;
+        border-bottom: 1px solid #d8d8d8;
+        padding: 0 20px;
+    }
+    .bpmn-user_select {
+        padding: 20px;
+        li {
+            margin: 10px 0;
+            label {
+                margin-right: 10px;
+            }
+            .el-select {
+                width: 80%;
+            }
+        }
+    }
+    .bpmn_checkbox {
+        margin-left: 20px;
+    }
+}
+</style>

+ 946 - 0
operationSupport/src/views/flow/popups/workflowsetting.vue

@@ -0,0 +1,946 @@
+<!--
+ * @Author: zwy
+ * @Date: 2021-02-21 10:11:08
+ * @LastEditors: zwy
+ * @LastEditTime: 2021-03-11 15:39:12
+ * @Descripttion: 巡检任务流程
+-->
+<template>
+    <div class="bpmn">
+        <div class="bpmn-left" ref="bpmn">
+            <div class="bpmn-title">流程图设计</div>
+        </div>
+        <div class="bpmn-right">
+            <div class="bpmn-title">节点配置</div>
+            <div class="no-scrollbar">
+                <div class="bpmn-node">节点ID: {{ nodeId }}</div>
+                <user
+                    :values="userValues"
+                    v-if="showUserSelect"
+                    :channelId="channelId"
+                    :prevTask="prevUserTaskObj"
+                    :isReject="isReject"
+                    :rejectUser="rejectUserValue"
+                    @change="userChange"
+                    @rejectUserChange="rejectUserChange"
+                ></user>
+                <condition
+                    :values="conditionValues"
+                    :channelId="channelId"
+                    :formId="prevFormId"
+                    @change="conditionChange"
+                    v-if="showConditionSelect"
+                ></condition>
+                <bpmn-form v-if="showFormSelect" :values="formValues" @change="formChange" :channelId="channelId" :getFormList='getFormList'></bpmn-form>
+                <service
+                    v-if="showSerivceSelect"
+                    :values="serviceValues"
+                    @change="serviceChange"
+                    :channelId="channelId"
+                    :prevTask="prevUserTaskObj"
+                ></service>
+                <!-- <user v-if='showAssign' :values='assignValues' @change='assignChange' :isAssign='true' :channelId='channelId'></user> -->
+                <sequence
+                    v-if="showSequence"
+                    :formKey="sequenceFormKey"
+                    :channelId="channelId"
+                    @change="sequenceChange"
+                    :values="sequenceValue"
+                ></sequence>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import 'bpmn-js/dist/assets/diagram-js.css'; //左边工具栏以及编辑节点的样式
+import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css';
+import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css';
+import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'; //这四个为bpmn工作流绘图工具的样式
+import BpmnModeler from 'bpmn-js/lib/Modeler'; //建模器
+import translateModer from '@utils/translate.js';
+import Provider from './bpmn/Provider';
+import BpmnModdle from 'bpmn-moddle';
+
+import condition from './bpmn/condition.vue';
+import user from './bpmn/user.vue';
+import bpmnForm from './bpmn/form.vue';
+import service from './bpmn/service.vue';
+import sequence from './bpmn/sequence.vue';
+
+// 初始化的xml
+let initXml = '';
+export default {
+    props: ['params'],
+    components: {
+        condition,
+        user,
+        bpmnForm,
+        service,
+        sequence
+    },
+    data() {
+        return {
+            bmpn: '',
+            model: '',
+            // 节点ID
+            nodeId: '',
+            // 是否显示条件选择
+            showConditionSelect: false,
+            // 是否显示用户选择
+            showUserSelect: false,
+            // 是否显示表单
+            showFormSelect: false,
+            // 是否显示服务设置
+            showSerivceSelect: false,
+            // 是否显示指派设置
+            showAssign: false,
+            // 显示节点之间连接的节点动作配置
+            showSequence: false,
+            prevUserTaskObj: {},
+            // 是否为驳回表单
+            isReject: '',
+            // 驳回节点处理的值
+            rejectUserValue: '',
+            // 连线起始节点的表单Key
+            sequenceFormKey: '',
+            sequenceValue: '',
+            // 节点ID的顺序集合
+            nodeIdOrderList: [],
+
+						getFormList:[],
+        };
+    },
+    methods: {
+        fromXML() {
+            return new Promise((resolve) => {
+                this.model.fromXML(xml, { format: true }, (err, res) => {
+                    resolve(res);
+                });
+            });
+        },
+        toXML(result) {
+            return new Promise((resolve) => {
+                this.model.toXML(result, { format: true }, (err, xml) => {
+                    resolve(xml);
+                });
+            });
+        },
+        getBpmn() {
+            return new Promise((resolve) => {
+                this.$http
+                    .get('/sc-community/workflow/process/getBpmnContent', {
+                        id: this.params.data.id
+                    })
+                    .then((res) => {
+                        initXml = res.data || '';
+                        resolve(res.data || '');
+                    });
+            });
+        },
+        getXML() {
+            //下载为bpmn格式
+            return new Promise((resolve) => {
+                this.bpmn.saveXML({ format: true }, (err, xml) => {
+                    this.model.fromXML(xml, { format: true }, (err, definitions, context) => {
+                        resolve({ definitions, context });
+                    });
+                });
+            });
+        },
+        getIdOrder(root) {
+            let i = root.length,
+                dataArr = [],
+                loop = function (node, arr) {
+                    if (!node) return;
+                    if (node instanceof Array) {
+                        let j = node.length;
+                        while (j--) {
+                            let arrs = [...arr];
+                            if (node[j].$type == 'bpmn:EndEvent' || (!node[j].outgoing && !node[j].targetRef)) {
+                                dataArr.push(arr);
+                                return;
+                            }
+                            loop(node[j].targetRef, arrs);
+                        }
+                    } else {
+                        let set = new Set(arr);
+                        if (set.has(node.id)) return;
+                        if (node.$type == 'bpmn:UserTask' || node.$type == 'bpmn:ServiceTask') {
+                            arr.push(node.id);
+                        }
+                        if (node.$type == 'bpmn:EndEvent' || (!node.outgoing && !node.targetRef)) {
+                            dataArr.push(arr);
+                            return;
+                        }
+                        loop(node.outgoing, arr);
+                    }
+                },
+                start;
+            while (i--) {
+                if ('bpmn:StartEvent' == root[i].$type) {
+                    start = root[i];
+                    break;
+                }
+            }
+            loop(start.outgoing, []);
+            this.nodeIdOrderList = dataArr;
+        },
+        // 获取选择的用户
+        userChange(arr) {
+            if (!this.nodeId) return;
+            this.getXML().then(({ definitions, context }) => {
+                let eles = definitions.rootElements[0].flowElements,
+                    selectModel,
+                    i = eles.length;
+                while (i--) {
+                    if (this.nodeId == eles[i].id) {
+                        selectModel = eles[i];
+                        break;
+                    }
+                }
+                if (selectModel.documentation == undefined) {
+                    selectModel.extensionElements = this.model.create('bpmn:Documentation', { text: JSON.stringify(arr) });
+                } else {
+                    selectModel.documentation[0].text = JSON.stringify(arr);
+                }
+
+                // 渲染xml
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml, (_) => {
+                        // 改变元素颜色
+                        // let modeling = this.bpmn.get('modeling');
+                        // let elementRegistry = this.bpmn.get('elementRegistry');//使用elementRegistry来获取Shape信息
+                        // let elementToColor = elementRegistry.get(this.nodeId);//传递id进去
+                        // modeling.setColor(elementToColor, {
+                        // 	stroke: 'green',
+                        // 	fill: 'yellow'
+                        // })
+                    });
+                });
+            });
+        },
+        // 用户节点驳回处理人员改变
+        rejectUserChange(val) {
+            if (!this.nodeId) return;
+            this.getXML().then(({ definitions, context }) => {
+                let root = definitions.rootElements[0],
+                    obj = {},
+                    documentation = root.get('documentation');
+                // 根节点添加documentation,用来存储各个节点的驳回处理人
+                if (documentation.length) {
+                    obj = documentation[0].text ? JSON.parse(documentation[0].text) : {};
+                    obj[this.nodeId] = val;
+                    documentation[0].text = JSON.stringify(obj);
+                } else {
+                    obj[this.nodeId] = val;
+                    documentation = this.model.create('bpmn:Documentation', { text: JSON.stringify(obj) });
+                    root.get('documentation').push(documentation);
+                }
+                // 2,驳回后的节点加监听器
+                // <extensionElements>
+                // 		<activiti:taskListener event="create" class="com.bz.smart_city.activiti.listener.ReturnTaskListener"></activiti:taskListener>
+                // </extensionElements>
+                // 3,驳回后的节点加内容
+                // from上级节点
+                // assignee:first受理人,last处理人
+                // <documentation>{"rejectConfig":[{"from":"usertask2","assignee":"first"},{"from":"usertask3","assignee":"last"}]}</documentation>
+                let selectEl = context.elementsById[this.nodeId],
+                    out = selectEl.outgoing || [],
+                    i = out.length,
+                    targetRef;
+                // 获取驳回连线的目标节点
+                while (i--) {
+                    if (out[i].conditionExpression && out[i].conditionExpression.body == '${action=="reject"}') {
+                        targetRef = out[i].targetRef;
+                        break;
+                    }
+                }
+                if (targetRef) {
+                    let targetRefDoc = targetRef.get('documentation');
+                    if (targetRefDoc.length) {
+                        let temp = targetRefDoc[0].text;
+                        temp = temp ? JSON.parse(temp) : {};
+                        let config = temp.rejectConfig,
+                            tag = false;
+                        // 如果已有,则替换assignee的值
+                        for (let i in config) {
+                            if (config[i].from == this.nodeId) {
+                                tag = true;
+                                config[i].assignee = val;
+                                break;
+                            }
+                        }
+                        // 没有则添加一条记录
+                        if (!tag) {
+                            config.push({
+                                from: this.nodeId,
+                                assignee: val
+                            });
+                        }
+                        targetRefDoc[0].text = JSON.stringify({ rejectConfig: config });
+                    } else {
+                        let doc = this.model.create('bpmn:Documentation', {
+                            text: '{"rejectConfig":[{"from":"' + this.nodeId + '","assignee":"' + assignee + '"}]}'
+                        });
+                        targetRefDoc.push(doc);
+                    }
+                    // let extensionElements = this.model.create('bpmn:ExtensionElements'),
+                    // 		foo = this.model.createAny('activiti:taskListener', 'http://activiti.org/bpmn', {
+                    // 			event: 'create',
+                    // 			class: 'com.bz.smart_city.activiti.listener.ReturnTaskListener'
+                    // 		});
+
+                    // extensionElements.get('values').push(foo);
+                    // targetRef.extensionElements = extensionElements
+                }
+
+                // 渲染xml
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml);
+                });
+            });
+        },
+        // 获取分支条件
+        // conditionChange(obj) {
+        // 	let temp = {}
+        // 	for(let item in obj) {
+        // 		if(obj[item] instanceof Array && obj[item].length) {
+        // 			temp[item] = obj[item]
+        // 		}
+        // 		if('alarmTimeRange' == item && '-' != obj[item]) {
+        // 			temp[item] = obj[item]
+        // 		}
+        // 		if('preHandleResult' == item && obj[item]) {
+        // 			temp[item] = obj[item]
+        // 		}
+        // 	}
+        // 	if(!this.nodeId) return
+        // 	this.getXML().then(({definitions, context}) => {
+        // 		let eles = definitions.rootElements[0].flowElements,
+        // 			selectModel,
+        // 			i = eles.length;
+        // 		while(i--) {
+        // 			if(this.nodeId == eles[i].id) {
+        // 				selectModel = eles[i]
+        // 				break;
+        // 			}
+        // 		}
+        // 		if('{}' != JSON.stringify(temp)) {
+        // 			selectModel.conditionExpression = this.model.create('bpmn:FormalExpression', {
+        // 				body: "${workFlowConditionService.checkCondition(execution,\""+JSON.stringify(temp).replace(/\"/g,"\\\"")+"\")}"
+        // 			})
+        // 		} else {
+        // 			selectModel.conditionExpression = null;
+        // 		}
+        // 		// 渲染xml
+        // 		definitions.$model.toXML(definitions, {format: true}, (err,xml) => {
+        // 			this.bpmn.importXML(xml)
+        // 		})
+        // 	})
+        // },
+        // 表单选择
+        formChange(val) {
+            if (!this.nodeId) return;
+            this.getFormDetail(val);
+            this.getXML().then(({ definitions, context }) => {
+                let eles = definitions.rootElements[0].flowElements,
+                    selectModel,
+                    i = eles.length;
+                while (i--) {
+                    if (this.nodeId == eles[i].id) {
+                        selectModel = eles[i];
+                        break;
+                    }
+                }
+                // 置空下游连接线上的节点动作值
+                let outgoing = selectModel.outgoing || [],
+                    j = outgoing.length,
+                    temp;
+                while (j--) {
+                    outgoing[j].conditionExpression = null;
+                }
+                selectModel.$attrs['activiti:formKey'] = val;
+                // 渲染xml
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml);
+                });
+            });
+        },
+        // 根据表单key获取表单详情
+        getFormDetail(key, resolve) {
+            this.showAssign = false;
+            this.isReject = false;
+            if ('water-form' == key) {
+                this.showAssign = true;
+                resolve && resolve();
+                return;
+            }
+            this.$http
+                .get('/sc-community/workflow/form/' + key, {
+                    channelId: this.channelId
+                })
+                .then(({ data = {} }) => {
+                    let actionList = data.userActionList || [],
+                        i = actionList.length;
+                    while (i--) {
+                        if ('指派' == actionList[i].actionName) {
+                            this.showAssign = true;
+                            break;
+                        }
+                        if ('reject' == actionList[i].actionValue) {
+                            this.isReject = true;
+                        }
+                    }
+                    resolve && resolve();
+                });
+        },
+        // 服务任务改变
+        serviceChange(arr) {
+            if (!this.nodeId) return;
+            this.getXML().then(({ definitions, context }) => {
+                let eles = definitions.rootElements[0].flowElements,
+                    selectModel,
+                    i = eles.length;
+                while (i--) {
+                    if (this.nodeId == eles[i].id) {
+                        selectModel = eles[i];
+                        break;
+                    }
+                }
+                // selectModel.$arrts['activiti:delegateExpression']="";
+                // activiti:delegateExpression="${progressSevice.runWithParticipants(execution,'')}
+                selectModel.$attrs['activiti:expression'] =
+                    "#{progressSevice.runWithParticipants(execution,'" + JSON.stringify(arr) + "')}";
+
+                // console.log('服务任务的节点',selectModel)
+                // console.log("arr的值",arr)
+                if (selectModel.documentation == undefined) {
+                    selectModel.extensionElements = this.model.create('bpmn:Documentation', { text: JSON.stringify(arr) });
+                } else {
+                    selectModel.documentation[0].text = JSON.stringify(arr);
+                }
+                // selectModel.$attrs['activiti:field'] = JSON.stringify(arr);
+                // let extensionElements = this.model.create('bpmn:ExtensionElements'),
+                // 	field = this.model.createAny('activiti:field', 'http://activiti.org/bpmn', {
+                // 		event: 'create',
+                // 		name:'expression',
+                // 	}),
+                // 	string = this.model.createAny('activiti:string', 'http://activiti.org/bpmn', {
+                // 		event: 'create',
+
+                // 	});
+                // console.log("field",field)
+                // field.extensionElements = string
+                // extensionElements.get('values').push(field);
+                // selectModel.extensionElements = extensionElements
+                // selectModel.value.push(field)
+                // 渲染xml
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml);
+                });
+            });
+        },
+        // 指派用户改变事件
+        // assignChange(arr) {
+        // 	if(!this.nodeId) return
+        // 	this.getXML().then(({definitions, context}) => {
+        // 		let eles = definitions.rootElements[0].extensionElements;
+        // 		if(eles) {
+        // 			let values = eles.get('values'),
+        // 				i = values.length,
+        // 				index;
+        // 			while(i--) {
+        // 				if('sc:transfer' == values[i].$type && this.nodeId == values[i].taskRef) {
+        // 					index = i;
+        // 					break
+        // 				}
+        // 			}
+        // 			if(index) {
+        // 				if(arr.length) {
+        // 					values[index].usersRange = "${workOrderUserService.findUsers('"+arr+"')}"
+        // 				} else {
+        // 					values.splice(index, 1)
+        // 				}
+        // 			} else {
+        // 				if(arr.length) {
+        // 					let scTransfer = this.model.createAny('sc:transfer', 'http://sc', {
+        // 							id: 'sc_transfer_'+(+new Date()),
+        // 							taskRef: this.nodeId,
+        // 							usersRange: "${workOrderUserService.findUsers('"+arr+"')}"
+        // 						})
+        // 					eles.get('values').push(scTransfer);
+        // 				}
+        // 			}
+        // 		} else {
+        // 			// if(arr.length) {
+        // 			// 	eles = this.model.create('bpmn:ExtensionElements');
+        // 			// 	let scTransfer = this.model.createAny('sc:transfer', 'http://sc', {
+        // 			// 			id: 'sc_transfer_'+(+new Date()),
+        // 			// 			taskRef: this.nodeId,
+        // 			// 			usersRange: "${workOrderUserService.findUsers('"+arr+"')}"
+        // 			// 		})
+        // 			// 	eles.get('values').push(scTransfer);
+        // 			// } else {
+        // 			// 	return;
+        // 			// }
+        // 		}
+        // 		// 渲染xml
+        // 		definitions.$model.toXML(definitions, {format: true}, (err,xml) => {
+        // 			this.bpmn.importXML(xml)
+        // 		})
+        // 	})
+        // },
+        // 节点连线的节点动作值改变
+        sequenceChange(val) {
+            if (!this.nodeId) return;
+            this.getXML().then(({ definitions, context }) => {
+                let eles = definitions.rootElements[0].flowElements,
+                    selectModel,
+                    i = eles.length;
+                while (i--) {
+                    if (this.nodeId == eles[i].id) {
+                        selectModel = eles[i];
+                        break;
+                    }
+                }
+                console.log('节点动作的值', val);
+                let scTransfer = this.model.create('bpmn:FormalExpression', {
+                    body: '${action=="' + val + '"}'
+                });
+                if (!val) {
+                    scTransfer = null;
+                }
+                /**
+				 * 
+				2,驳回后的节点加监听器
+				<extensionElements>
+						<activiti:taskListener event="create" class="com.bz.smart_city.activiti.listener.ReturnTaskListener"></activiti:taskListener>
+				</extensionElements>
+				3,驳回后的节点加内容
+				from上级节点
+				assignee:first受理人,last处理人
+
+				<documentation>{"rejectConfig":[{"from":"usertask2","assignee":"first"},{"from":"usertask3","assignee":"last"}]}</documentation>
+				 */
+                if (val === 'reject') {
+                    // 获取节点的驳回处理人
+                    let root = definitions.rootElements[0],
+                        obj = {},
+                        documentation = root.get('documentation');
+                    if (documentation.length) {
+                        obj = documentation[0].text ? JSON.parse(documentation[0].text) : {};
+                    }
+                    let sourceRef = selectModel.sourceRef,
+                        targetRef = selectModel.targetRef,
+                        targetRefDoc = targetRef.get('documentation'),
+                        doc = this.model.create('bpmn:Documentation', {
+                            text: '{"rejectConfig":[{"from":"' + sourceRef.id + '","assignee":"' + obj[sourceRef.id] + '"}]}'
+                        });
+                    if (obj[sourceRef.id]) {
+                        if (targetRefDoc.length) {
+                            let temp = targetRefDoc[0].text;
+                            temp = temp ? JSON.parse(temp) : {};
+                            let config = temp.rejectConfig,
+                                tag = false;
+                            // 如果已有,则替换assignee的值
+                            for (let i in config) {
+                                if (config[i].from == sourceRef.id) {
+                                    tag = true;
+                                    config[i].assignee = obj[sourceRef.id];
+                                    break;
+                                }
+                            }
+                            // 没有则添加一条记录
+                            if (!tag) {
+                                config.push({
+                                    from: sourceRef.id,
+                                    assignee: obj[sourceRef.id]
+                                });
+                            }
+                            targetRefDoc[0].text = JSON.stringify({ rejectConfig: config });
+                        } else {
+                            targetRefDoc.push(doc);
+                        }
+
+                        // let extensionElements = this.model.create('bpmn:ExtensionElements'),
+                        // 	foo = this.model.createAny('activiti:taskListener', 'http://activiti.org/bpmn', {
+                        // 		event: 'create',
+                        // 		class: 'com.bz.smart_city.activiti.listener.ReturnTaskListener'
+                        // 	});
+
+                        // extensionElements.get('values').push(foo);
+                        // targetRef.extensionElements = extensionElements
+                    } else {
+                        // this.$message.error('该驳回操作没有设置驳回处理人员')
+                    }
+                }
+                selectModel.conditionExpression = scTransfer;
+                // // 渲染xml
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml);
+                });
+            });
+        },
+        // 获取所有的上游用户节点ID及名字
+        getPrevUserTaskObj(id, context) {
+            let list = this.nodeIdOrderList,
+                i = list.length,
+                index,
+                temp;
+            while (i--) {
+                index = list[i].indexOf(id);
+                while (index > 0 && index--) {
+                    temp = context.elementsById[list[i][index]];
+                    if (temp.$type == 'bpmn:UserTask') {
+                        this.prevUserTaskObj[list[i][index]] = temp.name || temp.id;
+                    }
+                }
+            }
+        },
+        // 保存BPMN内容
+        submit(callback) {
+            //
+            this.getXML().then(({ definitions, context }) => {
+                let rootElements = definitions.rootElements[0];
+                rootElements.id = this.params.data.processKey;
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml); //将字符串转换成图表显示出来,  this.bpmnModeler.importXML(xmlStr, (err) => {if(err){}else{成功之后的回调}}
+                    let $loading = this.$loading();
+                    initXml = xml;
+                    this.$http
+                        .postForm('/sc-community/workflow/process/saveBpmnContent', {
+                            id: this.params.data.id,
+                            content: xml,
+                            svg: ''
+                        })
+                        .then((res) => {
+                            $loading.close();
+                            if (0 == res.status) {
+                                this.$message.success(res.msg);
+                                this.params.callback && this.params.callback();
+                                this.$emit('close');
+                            } else {
+                                this.$message.error(res.msg);
+                            }
+                            callback && callback();
+                        })
+                        .catch((err) => {
+                            $loading.close();
+                            callback && callback();
+                        });
+                });
+            });
+        },
+        getForm() {
+            this.$http
+                .get('/sc-community/workflow/form/list')
+                .then((data) => {
+                    this.getFormList = data.data;
+                })
+
+                .catch(function () {});
+        }
+    },
+    mounted() {
+        this.bpmn = new BpmnModeler({
+            container: this.$refs.bpmn,
+            additionalModules: [
+                {
+                    __init__: ['Provider'], //定义完provider这个类后,必须导出
+                    translate: ['value', translateModer],
+                    Provider: ['type', Provider]
+                    // Context: ['type', Context]
+                }
+            ]
+        });
+        //向后台请求xml数据,如果没有的话,给一段默认的xml字符串
+        this.getBpmn().then((xml) => {
+            if (xml) {
+                this.bpmn.importXML(xml, (err) => {
+                    // 连接两个节点
+                    // let elementRegistry = this.bpmn.get('elementRegistry'),
+                    // 	ele1 = elementRegistry.get('startevent1'),
+                    // 	ele2 = elementRegistry.get('Task_1iyqgyp'),
+                    // 	ele3 = elementRegistry.get('EndEvent_0botuxl'),
+                    // 	modeling = this.bpmn.get('modeling')
+                    // modeling.connect(ele1, ele2, {
+                    // 	type: 'bpmn:SequenceFlow'//线
+                    // })
+                    // modeling.connect(ele2, ele3, {
+                    // 	type: 'bpmn:SequenceFlow'
+                    // })
+                });
+            } else {
+                this.bpmn.importXML(
+                    `
+					<?xml version="1.0" encoding="UTF-8"?>
+					<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+					  <process id="myProcess" name="My process" isExecutable="true">
+					    <startEvent id="startevent1" name="开始"></startEvent>
+					  </process>
+					  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
+					    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
+					      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
+					        <omgdc:Bounds height="35.0" width="35.0" x="84.0" y="150.0"></omgdc:Bounds>
+					      </bpmndi:BPMNShape>
+					    </bpmndi:BPMNPlane>
+					  </bpmndi:BPMNDiagram>
+					</definitions>
+					`,
+                    (err) => {
+                        // 手动创建节点
+                        // this.getXML().then(({definitions, context}) => {
+                        // 	let model = new BpmnModdle();
+                        // 	var bpmnProcess = model.create('bpmn:UserTask', {
+                        // 		id: 'UserTask_1_1',
+                        // 	});
+                        // 	var bpmdi = model.create('bpmndi:BPMNShape', {
+                        // 		// 填充颜色
+                        // 		fill: '#fff',
+                        // 		// 边框颜色
+                        // 		stroke: '#000',
+                        // 		bpmnElement: bpmnProcess,
+                        // 		bounds: model.create('dc:Bounds', { x: 100.0, y: 200.0, width: 100.0, height: 50.0 })
+                        // 	})
+                        // 	definitions.get('rootElements')[0].flowElements.push(bpmnProcess);
+                        // 	definitions.diagrams[0].plane.planeElement.push(bpmdi)
+                        // 	model.toXML(definitions, (err, xmlStrUpdated) => {
+                        // 		// console.log(xmlStrUpdated)
+                        // 		this.bpmn.importXML(xmlStrUpdated)
+                        // 	});
+                        // })
+                    }
+                );
+            }
+        });
+        // 给图绑定事件,当图有发生改变就会触发这个事件
+        // this.bpmn.on('commandStack.changed', (e) => {
+        // 	console.log(e)
+        // 	// this.bpmn.on('canvas.viewbox.changed', () => {
+        // 	// 	this.bpmn.saveXML({format: true}, (err, xml) => {
+        // 	// 		console.log(xml)
+        // 	// 	})
+        // 	// })
+        // })
+        // this.bpmn.injector._instances.eventBus所有事件// 监听 element
+        // console.log(this.bpmn.injector._instances.eventBus._listeners)
+        // 删除元素
+        this.bpmn.on('commandStack.elements.delete.postExecuted', (e) => {
+            this.getXML().then(({ definitions, context }) => {
+                definitions.$model.toXML(definitions, { format: true }, (err, xml) => {
+                    this.bpmn.importXML(xml);
+                });
+            });
+        });
+        // 自动给添加的节点赋名
+        // this.bpmn.on('element.changed', e => {
+        // 	this.getXML().then(({definitions, context}) => {
+        // 		let el = context.elementsById[e.element.id];
+        // 		if(!el || el.name) return
+        // 		let type = el.$type,
+        // 		 set = new Set(['bpmn:UserTask', 'bpmn:ServiceTask', 'bpmn:EndEvent', 'bpmn:StartEvent', 'bpmn:ExclusiveGateway'])//ExclusiveGateway:网关
+        // 		if(!set.has(type)) return
+        // 		if(type === 'bpmn:UserTask') {
+        // 			el.name = '用户节点' + el.id.replace('UserTask_', '')
+        // 		}
+        // 		if(type === 'bpmn:ServiceTask') {
+        // 			el.name = '服务节点' + el.id.replace('ServiceTask_', '')
+        // 		}
+        // 		if(type === 'bpmn:EndEvent') {
+        // 			el.name = '结束'
+        // 		}
+        // 		if(type === 'bpmn:StartEvent') {
+        // 			el.name = '开始'
+        // 		}
+        // 		if(type === 'bpmn:ExclusiveGateway') {
+        // 			el.name = '网关' + el.id.replace('ExclusiveGateway_', '')
+        // 		}
+        // 		definitions.$model.toXML(definitions, {format: true}, (err,xml) => {
+        // 			this.bpmn.importXML(xml)
+        // 		})
+        // 	})
+        // })
+
+        this.model = new BpmnModdle();
+        // 控制用户选择模块、网关条件显示
+        this.bpmn.on('element.click', (e) => {
+            this.nodeId = e.element.id;
+            this.showConditionSelect = false;
+            this.showUserSelect = false;
+            this.showFormSelect = false;
+            this.showSerivceSelect = false;
+            this.showAssign = false;
+            this.showSequence = false;
+            this.prevUserTaskObj = {};
+            this.isReject = false;
+            this.rejectUserValue = '';
+            this.sequenceFormKey = null;
+            this.sequenceValue = null;
+            this.getXML().then(({ definitions, context }) => {
+                this.getIdOrder(definitions.rootElements[0].flowElements);
+                let el = context.elementsById[this.nodeId];
+                if (!el) return;
+
+                // 用户设置显示控制
+                if ('bpmn:UserTask' == el.$type) {
+                    // 获取节点的驳回处理人
+                    let root = definitions.rootElements[0],
+                        obj = {},
+                        documentation = root.get('documentation');
+                    if (documentation.length) {
+                        obj = documentation[0].text ? JSON.parse(documentation[0].text) : {};
+                        this.rejectUserValue = obj[this.nodeId];
+                    }
+                    this.showUserSelect = true;
+                    this.showFormSelect = true;
+                    let arrts = el.$attrs;
+                    this.userValues = el.documentation[0].text;
+                    this.formValues = arrts['activiti:formKey'];
+                    // 驳回表单
+                    this.userFormKey = this.formValues;
+                    this.assignValues = '';
+                    new Promise((resolve) => {
+                        this.getFormDetail(this.formValues, resolve);
+                    }).then((_) => {
+                        // 获取指派信息
+                        // let values = definitions.rootElements[0].extensionElements.values,
+                        // 	i = values.length;
+                        // while(i--) {
+                        // 	if('sc:transfer' == values[i].$type && this.nodeId == values[i].taskRef) {
+                        // 		this.assignValues = values[i].usersRange
+                        // 	}
+                        // }
+                    });
+                    // 获取所有上游用户节点对象
+                    this.getPrevUserTaskObj(el.id, context);
+                } else {
+                    this.showUserSelect = false;
+                    this.showFormSelect = false;
+                    this.userValues = '';
+                    this.formValues = '';
+                    this.prevUserTaskObj = {};
+                }
+                // 服务设置显示控制
+                if ('bpmn:ServiceTask' == el.$type) {
+                    console.log('ServiceTask', el);
+                    this.showSerivceSelect = true;
+                    let arrts = el.$attrs;
+                    this.serviceValues = JSON.parse(el.documentation[0].text);
+                    // this.serviceValues = arrts['activiti:expression']
+
+                    // 获取所有上游用户节点对象
+                    this.getPrevUserTaskObj(el.id, context);
+                } else {
+                    this.showSerivceSelect = false;
+                    this.serviceValues = '';
+                }
+                // 连接线显示控制
+                if ('bpmn:SequenceFlow' == el.$type) {
+                    // 网关条件设置显示控制
+                    if (el.sourceRef && 'bpmn:ExclusiveGateway' == el.sourceRef.$type) {
+                        this.showConditionSelect = true;
+                        this.conditionValues = el.conditionExpression && el.conditionExpression.body;
+                        // 获取当前网关条件上游最近一个用户节点
+                        let id = this.getPrevNode(context, el);
+                        // 获取节点的表单key集合
+                        let formArr = [],
+                            node,
+                            i = id.length;
+                        while (i--) {
+                            node = context.elementsById[id[i]];
+                            if (node.$attrs) {
+                                formArr.push(node.$attrs['activiti:formKey']);
+                            }
+                        }
+                        this.prevFormId = formArr;
+                        // 获取网关节点的上游连接线的actionValue
+                        let incoming = el.sourceRef.incoming,
+                            actionValueArr = [],
+                            temp;
+                        i = incoming.length;
+                        while (i--) {
+                            temp = incoming[i].conditionExpression;
+                            if (temp && temp.body) {
+                                actionValueArr.push(temp.body.substr(20, 4));
+                            }
+                        }
+                    } else {
+                        this.showConditionSelect = false;
+                        this.conditionValues = '';
+
+                        let sourceRef = el.sourceRef, // 起始节点
+                            targetRef = el.targetRef; // 目标节点
+                        this.showSequence = true;
+                        // 获取起始节点的formKey
+                        this.sequenceFormKey = sourceRef.$attrs['activiti:formKey'];
+                        this.sequenceValue = el.conditionExpression && el.conditionExpression.body;
+                    }
+                } else {
+                    this.showSequence = false;
+                    this.sequenceFormKey = null;
+                    this.sequenceValue = null;
+                }
+            });
+        });
+    },
+    created() {
+        this.getForm();
+    }
+};
+</script>
+
+<style lang='scss'>
+.bpmn {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    justify-content: space-between;
+    .bpmn-title {
+        line-height: 30px;
+        // padding: 0 20px;
+        border-bottom: 1px solid #d8d8d8;
+    }
+    .bpmn-left {
+        width: 80%;
+        height: 100%;
+    }
+    .bpmn-right {
+        width: 20%;
+        .bpmn-node {
+            padding: 20px;
+            border: 1px solid #d8d8d8;
+            margin: 5px 0;
+        }
+    }
+    .djs-palette.two-column.open {
+        width: auto;
+        .entry {
+            float: inherit;
+        }
+    }
+    .djs-context-pad .entry {
+        .bpmn-icon-end-event-none {
+            display: none;
+            width: 0;
+            height: 0;
+        }
+    }
+    .bjs-powered-by,
+    .group[data-group='tools'],
+    .group[data-group='gateway'],
+    .group[data-group='activity'],
+    .group[data-group='data-object'],
+    .group[data-group='data-store'],
+    .group[data-group='collaboration'],
+    .bpmn-icon-intermediate-event-none,
+    .bpmn-icon-subprocess-expanded,
+    .bpmn-icon-gateway-xor,
+    .djs-context-pad .group[data-group='model'],
+    .djs-context-pad .bpmn-icon-screw-wrench {
+        display: none;
+        width: 0;
+        height: 0;
+    }
+}
+</style>