forked from zhurui/management
1 line
19 KiB
JSON
1 line
19 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\mixins\\process-module.js","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\mixins\\process-module.js","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"C:\\\\Users\\\\27446\\\\Desktop\\\\up\\\\front\\\\dkha-web-sz-main\\\\node_modules\\\\@babel\\\\runtime-corejs2/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport { addDynamicRoute } from '@/router';\nexport default {\n data: function data() {\n return {\n processVisible: false\n };\n },\n methods: {\n // 初始化流程配置(集成发起流程和任务处理功能)\n initProcessMultiple: function initProcessMultiple(callbacks) {\n var _this = this;\n\n // showType 用于区分流程启动(start)、任务处理(taskHandle)以及查看详情(null)\n // 流程启动显示的是“流程启动”按钮,任务处理显示的是“通过、委托、回退、驳回、终止”按钮,查看详情都不显示\n var showType = this.$route.params.processShowType;\n this.processVisible = true;\n this.$nextTick(function () {\n if (_this.$route.params.processDefinitionKey) {\n _this.$refs.renProcessMultiple.dataForm.processDefinitionKey = _this.$route.params.processDefinitionKey;\n }\n\n if (_this.$route.params.taskId) {\n _this.$refs.renProcessMultiple.dataForm.taskId = _this.$route.params.taskId;\n }\n\n if (_this.$route.params.processInstanceId) {\n _this.$refs.renProcessMultiple.dataForm.processInstanceId = _this.$route.params.processInstanceId;\n }\n\n _this.$refs.renProcessMultiple.dataForm.businessKey = _this.$route.params.businessKey;\n _this.$refs.renProcessMultiple.showType = showType;\n _this.$refs.renProcessMultiple.parentObj = _this;\n _this.$refs.renProcessMultiple.callbacks = callbacks;\n });\n },\n // 关闭当前窗口\n closeCurrentTab: function closeCurrentTab(data) {\n var tabName = this.$store.state.contentTabsActiveName;\n this.$store.state.contentTabs = this.$store.state.contentTabs.filter(function (item) {\n return item.name !== tabName;\n });\n\n if (this.$store.state.contentTabs.length <= 0) {\n this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home';\n return false;\n }\n\n if (tabName === this.$store.state.contentTabsActiveName) {\n this.$router.push({\n name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name\n });\n }\n },\n // 获取流程定义的表单路由配置信息\n getProcDefRouteSet: function getProcDefRouteSet(data, callback) {\n var _this2 = this;\n\n this.$http.get(\"/activiti/process/getProcDefBizRoute/\".concat(data.processDefinitionId)).then(function (_ref) {\n var res = _ref.data;\n\n if (res.code !== 0) {\n return _this2.$message.error(res.msg);\n }\n\n if (!res.data || !res.data.bizRoute) {\n return _this2.$message.error(_this2.$t('process.routeError'));\n }\n\n var param = _objectSpread({}, data, {}, res.data);\n\n callback(param);\n }).catch(function () {});\n },\n getProcDefBizRouteAndProcessInstance: function getProcDefBizRouteAndProcessInstance(params, callback) {\n var _this3 = this;\n\n this.$http.get(\"/activiti/process/getProcDefBizRouteAndProcessInstance\", {\n params: params\n }).then(function (_ref2) {\n var res = _ref2.data;\n\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\n\n if (!res.data || !res.data.bizRoute) {\n return _this3.$message.error(_this3.$t('process.routeError'));\n }\n\n var param = _objectSpread({}, params, {}, res.data);\n\n callback(param);\n }).catch(function () {});\n },\n // 根据流程定义KEY获取最新的表单路由配置信息\n getLatestProcDefRouteSet: function getLatestProcDefRouteSet(procDefKey, callback) {\n var _this4 = this;\n\n this.$http.get(\"/activiti/process/getLatestProcDefBizRoute\", {\n params: {\n procDefKey: procDefKey\n }\n }).then(function (_ref3) {\n var res = _ref3.data;\n\n if (res.code !== 0) {\n return _this4.$message.error(res.msg);\n }\n\n if (!res.data || !res.data.bizRoute) {\n return _this4.$message.error(_this4.$t('process.routeError'));\n }\n\n var param = _objectSpread({\n procDefKey: procDefKey\n }, res.data);\n\n callback(param);\n }).catch(function () {});\n },\n // 查看流程图\n forwardDetail: function forwardDetail(data) {\n var routeParams = {\n routeName: \"\".concat(this.$route.name, \"__detail_\").concat(data.processInstanceId),\n menuId: \"\".concat(this.$route.meta.menuId),\n title: \"\".concat(this.$route.meta.title, \" - \").concat(data.processDefinitionName),\n path: data.bizRoute,\n params: {\n processInstanceId: data.processInstanceId,\n businessKey: data.businessKey\n }\n };\n addDynamicRoute(routeParams, this.$router);\n },\n // 子级 查看流程图\n forwardTaskDetail: function forwardTaskDetail(data) {\n var routeParams = {\n routeName: \"\".concat(this.$route.name, \"__detail_\").concat(data.taskId),\n menuId: \"\".concat(this.$route.meta.menuId),\n title: \"\".concat(this.$route.meta.title, \" - \").concat(data.taskName),\n path: data.bizRoute,\n params: {\n taskId: data.taskId,\n processInstanceId: data.processInstanceId,\n businessKey: data.businessKey\n }\n };\n addDynamicRoute(routeParams, this.$router);\n },\n forwardHandleUrl: function forwardHandleUrl(data) {\n var routeParams = {\n routeName: \"\".concat(this.$route.name, \"__handle_\").concat(data.taskId),\n menuId: \"\".concat(this.$route.meta.menuId),\n title: \"\".concat(this.$route.meta.title, \" - \").concat(data.taskName),\n path: data.bizRoute,\n params: {\n taskId: data.taskId,\n processInstanceId: data.processInstanceId,\n processShowType: 'taskHandle',\n businessKey: data.businessKey\n }\n };\n addDynamicRoute(routeParams, this.$router);\n }\n }\n};",{"version":3,"sources":["C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\mixins\\process-module.js"],"names":["addDynamicRoute","data","processVisible","methods","initProcessMultiple","callbacks","showType","$route","params","processShowType","$nextTick","processDefinitionKey","$refs","renProcessMultiple","dataForm","taskId","processInstanceId","businessKey","parentObj","closeCurrentTab","tabName","$store","state","contentTabsActiveName","contentTabs","filter","item","name","length","sidebarMenuActiveName","$router","push","getProcDefRouteSet","callback","$http","get","processDefinitionId","then","res","code","$message","error","msg","bizRoute","$t","param","catch","getProcDefBizRouteAndProcessInstance","getLatestProcDefRouteSet","procDefKey","forwardDetail","routeParams","routeName","menuId","meta","title","processDefinitionName","path","forwardTaskDetail","taskName","forwardHandleUrl"],"mappings":";;;;;;;;;;AAAA,SAASA,eAAT,QAAgC,UAAhC;AAEA,eAAe;AACbC,EAAAA,IADa,kBACL;AACN,WAAO;AACLC,MAAAA,cAAc,EAAE;AADX,KAAP;AAGD,GALY;AAMbC,EAAAA,OAAO,EAAE;AACP;AACAC,IAAAA,mBAFO,+BAEcC,SAFd,EAEyB;AAAA;;AAC9B;AACA;AACA,UAAIC,QAAQ,GAAG,KAAKC,MAAL,CAAYC,MAAZ,CAAmBC,eAAlC;AACA,WAAKP,cAAL,GAAsB,IAAtB;AACA,WAAKQ,SAAL,CAAe,YAAM;AACnB,YAAI,KAAI,CAACH,MAAL,CAAYC,MAAZ,CAAmBG,oBAAvB,EAA6C;AAC3C,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AAAA,KAAK,YAAK,KAAKhD,MAAL,CAAY+C,IAAZ,CAAiBC,KAAtB,gBAAiCtD,IAAI,CAAC0D,QAAtC,CAHW;AAIhBF,QAAAA,IAAI,EAAExD,IAAI,CAAC0C,QAJK;AAKhBnC,QAAAA,MAAM,EAAE;AACNO,UAAAA,MAAM,EAAEd,IAAI,CAACc,MADP;AAENC,UAAAA,iBAAiB,EAAEf,IAAI,CAACe,iBAFlB;AAGNC,UAAAA,WAAW,EAAEhB,IAAI,CAACgB;AAHZ;AALQ,OAAlB;AAWAjB,MAAAA,eAAe,CAACmD,WAAD,EAAc,KAAKrB,OAAnB,CAAf;AACD,KApHM;AAqHP8B,IAAAA,gBArHO,4BAqHW3D,IArHX,EAqHiB;AACtB,UAAIkD,WAAW,GAAG;AAChBC,QAAAA,SAAS,YAAK,KAAK7C,MAAL,CAAYoB,IAAjB,sBAAiC1B,IAAI,CAACc,MAAtC,CADO;AAEhBsC,QAAAA,MAAM,YAAK,KAAK9C,MAAL,CAAY+C,IAAZ,CAAiBD,MAAtB,CAFU;AAGhBE,QAAAA,KAAK,YAAK,KAAKhD,MAAL,CAAY+C,IAAZ,CAAiBC,KAAtB,gBAAiCtD,IAAI,CAAC0D,QAAtC,CAHW;AAIhBF,QAAAA,IAAI,EAAExD,IAAI,CAAC0C,QAJK;AAKhBnC,QAAAA,MAAM,EAAE;AACNO,UAAAA,MAAM,EAAEd,IAAI,CAACc,MADP;AAENC,UAAAA,iBAAiB,EAAEf,IAAI,CAACe,iBAFlB;AAGNP,UAAAA,eAAe,EAAE,YAHX;AAINQ,UAAAA,WAAW,EAAEhB,IAAI,CAACgB;AAJZ;AALQ,OAAlB;AAYAjB,MAAAA,eAAe,CAACmD,WAAD,EAAc,KAAKrB,OAAnB,CAAf;AACD;AAnIM;AANI,CAAf","sourcesContent":["import { addDynamicRoute } from '@/router'\n\nexport default {\n data () {\n return {\n processVisible: false\n }\n },\n methods: {\n // 初始化流程配置(集成发起流程和任务处理功能)\n initProcessMultiple (callbacks) {\n // showType 用于区分流程启动(start)、任务处理(taskHandle)以及查看详情(null)\n // 流程启动显示的是“流程启动”按钮,任务处理显示的是“通过、委托、回退、驳回、终止”按钮,查看详情都不显示\n var showType = this.$route.params.processShowType\n this.processVisible = true\n this.$nextTick(() => {\n if (this.$route.params.processDefinitionKey) {\n this.$refs.renProcessMultiple.dataForm.processDefinitionKey = this.$route.params.processDefinitionKey\n }\n if (this.$route.params.taskId) {\n this.$refs.renProcessMultiple.dataForm.taskId = this.$route.params.taskId\n }\n if (this.$route.params.processInstanceId) {\n this.$refs.renProcessMultiple.dataForm.processInstanceId = this.$route.params.processInstanceId\n }\n this.$refs.renProcessMultiple.dataForm.businessKey = this.$route.params.businessKey\n this.$refs.renProcessMultiple.showType = showType\n this.$refs.renProcessMultiple.parentObj = this\n this.$refs.renProcessMultiple.callbacks = callbacks\n })\n },\n // 关闭当前窗口\n closeCurrentTab (data) {\n var tabName = this.$store.state.contentTabsActiveName\n this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)\n if (this.$store.state.contentTabs.length <= 0) {\n this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'\n return false\n }\n if (tabName === this.$store.state.contentTabsActiveName) {\n this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name })\n }\n },\n // 获取流程定义的表单路由配置信息\n getProcDefRouteSet (data, callback) {\n this.$http.get(`/activiti/process/getProcDefBizRoute/${data.processDefinitionId}`).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n if (!res.data || !res.data.bizRoute) {\n return this.$message.error(this.$t('process.routeError'))\n }\n var param = {\n ...data,\n ...res.data\n }\n callback(param)\n }).catch(() => {})\n },\n getProcDefBizRouteAndProcessInstance (params, callback) {\n this.$http.get(`/activiti/process/getProcDefBizRouteAndProcessInstance`, {\n params: params\n }).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n if (!res.data || !res.data.bizRoute) {\n return this.$message.error(this.$t('process.routeError'))\n }\n var param = {\n ...params,\n ...res.data\n }\n callback(param)\n }).catch(() => {})\n },\n // 根据流程定义KEY获取最新的表单路由配置信息\n getLatestProcDefRouteSet (procDefKey, callback) {\n this.$http.get(`/activiti/process/getLatestProcDefBizRoute`, {\n params: {\n procDefKey: procDefKey\n }\n }).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n if (!res.data || !res.data.bizRoute) {\n return this.$message.error(this.$t('process.routeError'))\n }\n var param = {\n procDefKey: procDefKey,\n ...res.data\n }\n callback(param)\n }).catch(() => {})\n },\n // 查看流程图\n forwardDetail (data) {\n var routeParams = {\n routeName: `${this.$route.name}__detail_${data.processInstanceId}`,\n menuId: `${this.$route.meta.menuId}`,\n title: `${this.$route.meta.title} - ${data.processDefinitionName}`,\n path: data.bizRoute,\n params: {\n processInstanceId: data.processInstanceId,\n businessKey: data.businessKey\n }\n }\n addDynamicRoute(routeParams, this.$router)\n },\n // 子级 查看流程图\n forwardTaskDetail (data) {\n var routeParams = {\n routeName: `${this.$route.name}__detail_${data.taskId}`,\n menuId: `${this.$route.meta.menuId}`,\n title: `${this.$route.meta.title} - ${data.taskName}`,\n path: data.bizRoute,\n params: {\n taskId: data.taskId,\n processInstanceId: data.processInstanceId,\n businessKey: data.businessKey\n }\n }\n addDynamicRoute(routeParams, this.$router)\n },\n forwardHandleUrl (data) {\n var routeParams = {\n routeName: `${this.$route.name}__handle_${data.taskId}`,\n menuId: `${this.$route.meta.menuId}`,\n title: `${this.$route.meta.title} - ${data.taskName}`,\n path: data.bizRoute,\n params: {\n taskId: data.taskId,\n processInstanceId: data.processInstanceId,\n processShowType: 'taskHandle',\n businessKey: data.businessKey\n }\n }\n addDynamicRoute(routeParams, this.$router)\n }\n }\n}\n"]}]} |