030c794deb6288c2ffda136c2df48848.json 14 KB

1
  1. {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\activiti\\process.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\activiti\\process.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["\r\nimport mixinViewModule from '@/mixins/view-module'\r\nimport Deploy from './process-deploy'\r\nimport ProcessBizRoute from './process-biz-route'\r\nimport Cookies from 'js-cookie'\r\nimport qs from 'qs'\r\nexport default {\r\n mixins: [mixinViewModule],\r\n data () {\r\n return {\r\n mixinViewModuleOptions: {\r\n getDataListURL: '/act/process/page',\r\n getDataListIsPage: true,\r\n deleteURL: '/act/process',\r\n deleteIsBatch: true,\r\n deleteIsBatchKey: 'deploymentId'\r\n },\r\n dataForm: {\r\n processName: '',\r\n key: ''\r\n },\r\n deployVisible: false,\r\n setBizRouteVisible: false\r\n }\r\n },\r\n components: {\r\n Deploy,\r\n ProcessBizRoute\r\n },\r\n methods: {\r\n // 获取流程(xml/image)url地址\r\n getResourceURL (id, name) {\r\n var params = qs.stringify({\r\n 'token': Cookies.get('token'),\r\n 'deploymentId': id,\r\n 'resourceName': name\r\n })\r\n return `${window.SITE_CONFIG['apiURL']}/act/process/resource?${params}`\r\n },\r\n // 部署流程文件\r\n deployHandle () {\r\n this.deployVisible = true\r\n this.$nextTick(() => {\r\n this.$refs.deploy.init()\r\n })\r\n },\r\n setBizRoute (row) {\r\n this.setBizRouteVisible = true\r\n this.$nextTick(() => {\r\n this.$refs.processBizRoute.dataForm.procDefId = row.id\r\n this.$refs.processBizRoute.dataForm.procDefKey = row.key\r\n this.$refs.processBizRoute.dataForm.version = row.version\r\n this.$refs.processBizRoute.init()\r\n })\r\n },\r\n // 激活\r\n activeHandle (id) {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('process.active') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.put(`/act/process/active/${id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.getDataList()\r\n }\r\n })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n },\r\n // 挂起\r\n suspendHandle (id) {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('process.suspend') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.put(`/act/process/suspend/${id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.getDataList()\r\n }\r\n })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n },\r\n // 转换为模型\r\n convertToModelHandle (id) {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('process.convertToModel') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.post(`/act/process/convertToModel/${id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.getDataList()\r\n }\r\n })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n }\r\n }\r\n}\r\n",{"version":3,"sources":["process.vue"],"names":[],"mappings":";AAuEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"process.vue","sourceRoot":"src/views/modules/activiti","sourcesContent":["<template>\r\n <el-card shadow=\"never\" class=\"aui-card--fill\">\r\n <div class=\"mod-activiti__process\">\r\n <el-form :inline=\"true\" :model=\"dataForm\" @keyup.enter.native=\"getDataList()\">\r\n <el-form-item>\r\n <el-input v-model=\"dataForm.processName\" :placeholder=\"$t('process.name')\" clearable></el-input>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-input v-model=\"dataForm.key\" :placeholder=\"$t('process.key')\" clearable></el-input>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button @click=\"getDataList()\">{{ $t('query') }}</el-button>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" @click=\"deployHandle()\">{{ $t('process.deployFile') }}</el-button>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"danger\" @click=\"deleteHandle()\">{{ $t('deleteBatch') }}</el-button>\r\n </el-form-item>\r\n </el-form>\r\n <el-table\r\n v-loading=\"dataListLoading\"\r\n :data=\"dataList\"\r\n border\r\n @selection-change=\"dataListSelectionChangeHandle\"\r\n @sort-change=\"dataListSortChangeHandle\"\r\n style=\"width: 100%;\">\r\n <el-table-column type=\"selection\" header-align=\"center\" align=\"center\" width=\"50\"></el-table-column>\r\n <el-table-column prop=\"id\" :label=\"$t('process.id')\" header-align=\"center\" align=\"center\"></el-table-column>\r\n <el-table-column prop=\"deploymentId\" :label=\"$t('process.deploymentId')\" header-align=\"center\" align=\"center\" width=\"80\"></el-table-column>\r\n <el-table-column prop=\"name\" :label=\"$t('process.name')\" header-align=\"center\" align=\"center\"></el-table-column>\r\n <el-table-column prop=\"key\" :label=\"$t('process.key')\" header-align=\"center\" align=\"center\"></el-table-column>\r\n <el-table-column prop=\"version\" :label=\"$t('process.version')\" header-align=\"center\" align=\"center\"></el-table-column>\r\n <el-table-column prop=\"resourceName\" :label=\"$t('process.resourceName')\" header-align=\"center\" align=\"center\" :show-overflow-tooltip=\"true\" width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <a :href=\"getResourceURL(scope.row.deploymentId, scope.row.resourceName)\" target=\"_blank\">{{ scope.row.resourceName }}</a>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"diagramResourceName\" :label=\"$t('process.diagramResourceName')\" header-align=\"center\" align=\"center\" :show-overflow-tooltip=\"true\" width=\"100\">\r\n <template slot-scope=\"scope\">\r\n <a :href=\"getResourceURL(scope.row.deploymentId, scope.row.diagramResourceName)\" target=\"_blank\">{{ scope.row.diagramResourceName }}</a>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"deploymentTime\" :label=\"$t('process.deploymentTime')\" header-align=\"center\" align=\"center\" width=\"180\"></el-table-column>\r\n <el-table-column :label=\"$t('handle')\" fixed=\"right\" header-align=\"center\" align=\"center\" width=\"150\">\r\n <template slot-scope=\"scope\">\r\n <el-button v-if=\"scope.row.suspended\" type=\"text\" size=\"small\" @click=\"activeHandle(scope.row.id)\">{{ $t('process.active') }}</el-button>\r\n <el-button v-else type=\"text\" size=\"small\" @click=\"suspendHandle(scope.row.id)\">{{ $t('process.suspend') }}</el-button>\r\n <el-button type=\"text\" size=\"small\" @click=\"deleteHandle(scope.row.deploymentId)\">{{ $t('delete') }}</el-button>\r\n <el-button type=\"text\" size=\"small\" @click=\"convertToModelHandle(scope.row.id)\">{{ $t('process.convertToModel') }}</el-button>\r\n <el-button type=\"text\" size=\"small\" @click=\"setBizRoute(scope.row)\">{{ $t('process.bizRouteSet') }}</el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <el-pagination\r\n :current-page=\"page\"\r\n :page-sizes=\"[10, 20, 50, 100]\"\r\n :page-size=\"limit\"\r\n :total=\"total\"\r\n layout=\"total, sizes, prev, pager, next, jumper\"\r\n @size-change=\"pageSizeChangeHandle\"\r\n @current-change=\"pageCurrentChangeHandle\">\r\n </el-pagination>\r\n <!-- 弹窗, 部署流程文件 -->\r\n <deploy v-if=\"deployVisible\" ref=\"deploy\" @refreshDataList=\"getDataList\"></deploy>\r\n <process-biz-route v-if=\"setBizRouteVisible\" ref=\"processBizRoute\" @refreshDataList=\"getDataList\"></process-biz-route>\r\n </div>\r\n </el-card>\r\n</template>\r\n\r\n<script>\r\nimport mixinViewModule from '@/mixins/view-module'\r\nimport Deploy from './process-deploy'\r\nimport ProcessBizRoute from './process-biz-route'\r\nimport Cookies from 'js-cookie'\r\nimport qs from 'qs'\r\nexport default {\r\n mixins: [mixinViewModule],\r\n data () {\r\n return {\r\n mixinViewModuleOptions: {\r\n getDataListURL: '/act/process/page',\r\n getDataListIsPage: true,\r\n deleteURL: '/act/process',\r\n deleteIsBatch: true,\r\n deleteIsBatchKey: 'deploymentId'\r\n },\r\n dataForm: {\r\n processName: '',\r\n key: ''\r\n },\r\n deployVisible: false,\r\n setBizRouteVisible: false\r\n }\r\n },\r\n components: {\r\n Deploy,\r\n ProcessBizRoute\r\n },\r\n methods: {\r\n // 获取流程(xml/image)url地址\r\n getResourceURL (id, name) {\r\n var params = qs.stringify({\r\n 'token': Cookies.get('token'),\r\n 'deploymentId': id,\r\n 'resourceName': name\r\n })\r\n return `${window.SITE_CONFIG['apiURL']}/act/process/resource?${params}`\r\n },\r\n // 部署流程文件\r\n deployHandle () {\r\n this.deployVisible = true\r\n this.$nextTick(() => {\r\n this.$refs.deploy.init()\r\n })\r\n },\r\n setBizRoute (row) {\r\n this.setBizRouteVisible = true\r\n this.$nextTick(() => {\r\n this.$refs.processBizRoute.dataForm.procDefId = row.id\r\n this.$refs.processBizRoute.dataForm.procDefKey = row.key\r\n this.$refs.processBizRoute.dataForm.version = row.version\r\n this.$refs.processBizRoute.init()\r\n })\r\n },\r\n // 激活\r\n activeHandle (id) {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('process.active') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.put(`/act/process/active/${id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.getDataList()\r\n }\r\n })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n },\r\n // 挂起\r\n suspendHandle (id) {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('process.suspend') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.put(`/act/process/suspend/${id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.getDataList()\r\n }\r\n })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n },\r\n // 转换为模型\r\n convertToModelHandle (id) {\r\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('process.convertToModel') }), this.$t('prompt.title'), {\r\n confirmButtonText: this.$t('confirm'),\r\n cancelButtonText: this.$t('cancel'),\r\n type: 'warning'\r\n }).then(() => {\r\n this.$http.post(`/act/process/convertToModel/${id}`).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.$message({\r\n message: this.$t('prompt.success'),\r\n type: 'success',\r\n duration: 500,\r\n onClose: () => {\r\n this.getDataList()\r\n }\r\n })\r\n }).catch(() => {})\r\n }).catch(() => {})\r\n }\r\n }\r\n}\r\n</script>\r\n"]}]}