{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/components/widget_system_workflow.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/components/widget_system_workflow.vue","mtime":1740130327259},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport API from \"@/api.js\";\nexport default {\n inject: [\"reload\"],\n props: ['data'],\n created() {\n this.$api.getHomePageConfigWithPhone(this.$root.appid, { //现在只有流程处理,所以放在这里判断,之后首页有报表等更多时,移到组件main_homepage进行判断\n onSucess: response => {\n this.system_workflow = response.data.data.system_workflow\n }\n })\n let url = window.location.href\n let appId = ''\n if (url.indexOf(\"?\") != -1) { \n let str = url.substr(1)\n let strs = str.split(\"?\")[1] \n let strsArr = strs.split(\"&\")\n let obj = {}\n strsArr.forEach(el => {\n let els = el.split(\"=\")\n obj[els[0]] = els[1]\n });\n if(obj.application || obj.applicationId || obj.appId) {\n appId = obj.application || obj.applicationId || obj.appId\n appId = appId.split(\"#/\")[0]\n }\n } \n\n if(appId) { //获取当前的软件的流程\n this.$api.getPendingList(appId, { pageNo: 1, linesPerPage: 5, isMobile: true },\n {\n onSucess: res => {\n let pl = res.data.data.datas\n this.pendingList = pl;\n this.showPending = true;\n this.rowCount = res.data.data.rowCount;\n for(let i=0; i < pl.length; i++) {\n this.$api.getAvatar(pl[i].initiatorId, {\n onSucess: res => {\n pl[i].photo = res.data.data;\n this.$forceUpdate();\n }\n })\n }\n if(pl[0]) {\n this.appId = pl[0].applicationId;\n }\n }\n }\n )\n this.completeProcess(appId)\n }else {\n this.$api.getHomePageConfigWithPhone(this.$root.appid, { //现在只有流程处理,所以放在这里判断,之后首页有报表等更多时,移到组件main_homepage进行判断\n onSucess: response => {\n this.system_workflow = response.data.data.system_workflow;\n }\n })\n let workflowOrder = this.data.data.workflowOrder;\n API.getPendingListWithWidget(1, 5, workflowOrder, {\n onSucess: response => {\n let pl = response.data.data.datas\n this.pendingList = pl;\n this.showPending = true;\n this.rowCount = response.data.data.rowCount;\n for(let i=0; i < pl.length; i++) {\n this.$api.getAvatar(pl[i].initiatorId, {\n onSucess: response => {\n pl[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n if(pl[0]) {\n this.appId = pl[0].applicationId;\n }\n }\n });\n this.finished(workflowOrder);\n }\n },\n data: function() {\n return {\n selected: \"tab_pending\",\n rowCount: \"\",\n row_count:\"\",\n pendingList: [],\n processedList: [],\n conceal: false,\n dispose: true, //控制流程处理隐藏或这显示\n GonnaSelect: \"pending\",\n showPending:false,\n showProcessed:false,\n system_workflow:'',\n appId:'',\n };\n },\n methods: {\n onMoreClick(appId) {\n let params = {\n appId\n };\n this.$router.push({ \n name: 'flowcenter',\n query: params,\n })\n },\n\n setSubjectFormat(str) {\n if (str && typeof str == 'string') {\n try {\n let obj = JSON.parse(str);\n if (typeof obj == 'object' && obj) {\n return obj.summaryText;\n } else {\n return str;\n }\n } catch (e) {\n return str;\n }\n }\n },\n\n loadTop() {\n API.getPendingList(this.appId, { pageNo: 1, linesPerPage: 5 },\n {\n onSucess: response => {\n this.pendingList = response.data.data.datas;\n this.showPending = true;\n this.rowCount = response.data.data.rowCount;\n this.$refs.loadmorepending.onTopLoaded();\n for(let i=0; i {\n this.pendingList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n }\n );\n },\n\n completeProcess(appId){\n this.$api.getProcessedList(\n appId,\n { pageNo: 1, linesPerPage: 5 },\n {\n onSucess: res => {\n let pl = res.data.data.datas;\n this.processedList = pl;\n this.row_count = res.data.data.rowCount;\n this.showProcessed = true;\n for(let i=0; i {\n pl[i].photo = res.data.data;\n this.$forceUpdate();\n }\n })\n }\n if(!this.appId && pl[0]) {\n this.appId = pl[0].applicationId\n }\n }\n }\n );\n },\n\n finished(workflowOrder) {\n let pageNo = 1,\n linesPerPage = 5;\n API.getProcessedListWithWidget(pageNo, linesPerPage, workflowOrder, {\n onSucess: response => {\n let pl = response.data.data.datas;\n this.processedList = pl;\n this.row_count = response.data.data.rowCount;\n this.showProcessed = true;\n for(let i=0; i {\n pl[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n if(!this.appId && pl[0]) {\n this.appId = pl[0].applicationId\n }\n }\n }\n )\n },\n //流程处理的局部刷新\n Partialrefresh() {\n this.reload();\n }\n },\n filters: {\n formatDate: function (value) {// 时间戳转换日期格式方法\n if (value == null) {\n return '';\n } else {\n let date = new Date(value);\n let y = date.getFullYear();// 年\n let MM = date.getMonth() + 1;// 月\n MM = MM < 10 ? ('0' + MM) : MM;\n let d = date.getDate();// 日\n d = d < 10 ? ('0' + d) : d;\n let h = date.getHours();// 时\n h = h < 10 ? ('0' + h) : h;\n let m = date.getMinutes();// 分\n m = m < 10 ? ('0' + m) : m;\n let s = date.getSeconds();// 秒\n s = s < 10 ? ('0' + s) : s;\n return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;\n }\n }\n }\n};\n",null]}