{"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/views/FlowCenter.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/views/FlowCenter.vue","mtime":1740130327260},{"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//\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\";\n//import axios from \"axios\";\nimport { MessageBox } from 'mint-ui';\nimport { Toast } from 'mint-ui';\nimport { Indicator } from \"mint-ui\";\nexport default {\n inject: ['reload'],\n created() {\n let queryData = this.$route.query;\n this.appId = queryData.appId?queryData.appId:'';\n this.finished();\n },\n watch: {\n rowCount() {\n this.$nextTick(function() {\n this.$refs.pendingwrapper.scrollTop = -50;\n });\n },\n selected() {\n this.isMySponsor = false;\n this.isCompleted = false;\n this.isPending = false;\n this.selectedCompanyId = '';\n this.selectedFlowId = '';\n this.selectedProcessedFlowId = '';\n }\n },\n mounted() {\n this.$nextTick(function() {\n this.pendingContentH =\n document.documentElement.clientHeight -\n this.$refs.pendingwrapper.getBoundingClientRect().top -\n 60;\n this.$refs.pendingwrapper.scrollTop = -50;\n this.processedContentH =\n document.documentElement.clientHeight -\n this.$refs.processedwrapper.getBoundingClientRect().top - 100;\n });\n \n },\n\n data: function() {\n return {\n appId:'',\n scrollTopH:'',\n pendingContentH: 0,\n processedContentH: 0,\n allPendingLoaded: false,\n allProcessedLoaded: false,\n showMore: false, //显示更多操作\n checkedItems: [],\n selected: \"tab_pending\",\n rowCount: \"\",\n pendingList: [],\n processedList: [],\n conceal: false,\n dispose: true, //控制流程处理隐藏或这显示\n GonnaSelect: \"pending\",\n selectedDocIds:[], //选择的DocId\n disabled:true,\n popupVisible:false,\n pendingSortList:[], //待定流程分类\n whetherToSelect:'SELECTED',\n selectedFlowId:'', //代审批选中的Id\n selectedProcessedFlowId:'', //已审批选中的id\n allChecked:false,\n selectedCompanyId:'',\n isMySponsor:false,\n isCompleted:false,\n isPending:false,\n companyList: [],\n isShow:true,\n userId:'',\n pendingLoading:'',\n processLoading:''\n };\n },\n methods: {\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 this.$refs.loadmorepending.onTopLoaded();\n },\n doBack() {\n Indicator.close();\n this.$router.go(-1)\n },\n //展开或者收缩\n expandOrContract(isShow) {\n this.isShow = !isShow;\n },\n\n //我发起的\n selfInitiated(){\n this.isMySponsor = !this.isMySponsor;\n if(this.isMySponsor) {\n this.userId = this.$store.state.userId;\n }else {\n this.userId = '';\n }\n },\n\n //已完成\n completed(){\n this.isCompleted = !this.isCompleted;\n if(this.isCompleted){\n this.isCompleted = this.isCompleted\n this.isPending = false\n }\n },\n\n //未完成\n Pending(){\n this.isPending = !this.isPending;\n if(this.isPending){\n this.isPending = this.isPending\n this.isCompleted = false\n }\n },\n\n reset() {\n this.selectedFlowId = '';\n this.isMySponsor = false;\n this.isCompleted = false;\n this.isPending = false;\n this.selectedCompanyId = '';\n },\n\n onOk(){\n let appId = this.appId || this.$root.appid,\n status,\n title,\n flowId,\n initiatorId,\n pageNo,\n linesPerPage,\n isMobile;\n if(this.selected == \"tab_pending\") {\n let title = '',\n flowId = this.selectedFlowId,\n initiatorId = this.userId && this.isMySponsor?this.userId:'',\n pageNo = 1,\n linesPerPage = 10,\n isMobile = true; //是否为手机端\n this.$api.getPendingSortList(appId, title, flowId, initiatorId, pageNo, linesPerPage, isMobile, {\n onSucess: response => {\n this.pendingList = response.data.data.datas\n let oldLength = this.pendingList.length;\n this.rowCount = response.data.data.rowCount;\n this.allPendingLoaded =\n this.pendingList.length >= response.data.data.rowCount;\n if(oldLength >= 0) {\n for(let i=0; i {\n this.pendingList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n this.popupVisible = false;\n }\n });\n }else if(this.selected == \"tab_done\") {\n let isMyWorkFlow = this.isMySponsor;\n title = '',\n status = (this.isCompleted || this.isPending)?(this.isCompleted?'completed':'pending'):'all';\n flowId = this.selectedProcessedFlowId;\n initiatorId = this.userId&&this.isMySponsor?this.userId:'';\n pageNo = 1;\n linesPerPage = 10;\n this.$api.getProcessedsSortList(appId, title, flowId, initiatorId, status, isMyWorkFlow, pageNo, linesPerPage, {\n onSucess: response => {\n this.processedList = response.data.data.datas\n let oldLength = this.processedList.length;\n this.allProcessedLoaded =\n this.processedList.length >= response.data.data.rowCount;\n if(oldLength >= 0) {\n for(let i=0; i {\n this.processedList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n this.popupVisible = false;\n }\n });\n }\n },\n\n clickCompany(id) {\n let appId = this.appId || this.$root.appid;\n if(id == this.selectedCompanyId) {\n this.selectedCompanyId = '';\n }else {\n if(this.selected == 'tab_pending') {\n this.selectedCompanyId = id;\n this.$api.getFilterPendings(appId, id, {\n onSucess: response => {\n let data = response.data.data;\n this.pendingSortList = data;\n }\n })\n }else if (this.selected == 'tab_done') {\n this.selectedCompanyId = id;\n this.$api.getProcesseds(appId, {\n onSucess: response => {\n let data = response.data.data;\n this.pendingSortList = data;\n }\n })\n }\n }\n \n },\n\n clickSelect(id) {\n if(this.selected == \"tab_pending\") {\n this.selectedFlowId = id;\n }else if(this.selected == \"tab_done\") {\n this.selectedProcessedFlowId = id;\n } \n },\n\n onFilterClick(){\n this.$api.enterpriseDomainList({\n onSucess: response => {\n this.companyList = response.data.data;\n }\n })\n this.popupVisible = true;\n },\n\n //确认是否同意(弹出框)\n confirmAgree() {\n let that = this;\n let arr = [];\n let warning =[];\n this.selectedDocIds.forEach(item => {\n for(let i=0; i {\n Indicator.open({\n text: this.$t('submitting'),\n spinnerType: \"fading-circle\"\n });\n let appId = this.appId || this.$root.appid;\n let docJson = {\n limistStrList:\" \",\n docIds:arr,\n actId:\"11e7\",\n attitude:\"同意\",\n remark:\"好的\",\n }\n this.$api.batchApprove(appId, docJson, {\n onSucess: response => {\n Indicator.close();\n Toast({\n message: response.data.data.content,\n iconClass: 'fa fa-check fa-2x'\n });\n let errorIds = response.data.data.errorIds;\n if(sessionStorage.getItem(\"errorIds\")){\n var errorList =sessionStorage.getItem(\"errorIds\").split(\",\");\n for(var i=0;i {\n Indicator.close();\n Toast({\n message: 'Server Error',\n iconClass: 'fa fa-close fa-2x'\n });\n that.reload();\n }\n \n });\n }).catch(() =>{\n });\n },\n\n //全选\n onChange(ev) {\n if(ev.target.checked) {\n let arr = [];\n this.pendingList.forEach((item, index) => {\n arr.push(index);\n })\n this.selectedDocIds = arr;\n this.disabled = false;\n }else {\n this.selectedDocIds = [];\n this.disabled = true;\n }\n },\n\n isChecked(ev){\n if(ev.target.checked !=true &&this.selectedDocIds.length<=1) {\n this.disabled = true;\n }else if(ev.target.checked ==false){\n this.allChecked = false\n }else{\n this.disabled = false;\n this.selectedDocIds.push(ev.target.value)\n if(this.selectedDocIds.length == this.pendingList.length){\n this.allChecked = true\n }\n }\n },\n\n onMaskClick() {\n this.showMore = false;\n this.popupVisible = false\n },\n \n onMoreClick() {\n this.showMore = true;\n },\n\n loadMorePending() {\n let that=this;\n let appId = this.appId || this.$root.appid;\n let lastPage = Math.floor(this.pendingList.length / 10) + 1;\n if(sessionStorage.getItem(\"errorIds\")){\n var errorIds = sessionStorage.getItem(\"errorIds\").split(\",\"); \n }\n if(!this.selectedFlowId && this.allPendingLoaded==false && !this.userId) {\n API.getPendingList(appId, { pageNo: lastPage, linesPerPage: 10, isMobile: true },\n {\n onSucess: response => {\n this.pendingLoading = true\n // if(this.pendingLoading && this.processLoading) {\n // Indicator.close();\n // }\n let oldLength = that.pendingList.length;\n\n that.pendingList = that.pendingList.concat(\n response.data.data.datas\n );\n this.rowCount = response.data.data.rowCount;\n this.allPendingLoaded =\n this.pendingList.length >= response.data.data.rowCount;\n if(oldLength >= 0) {\n for(let i=oldLength; i {\n this.pendingList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n this.$refs.loadmorepending.onBottomLoaded();\n for(var i=0;i {\n let oldLength = this.pendingList.length;\n this.pendingList = this.pendingList.concat(\n response.data.data.datas\n );\n this.rowCount = response.data.data.rowCount;\n\n this.allPendingLoaded =\n this.pendingList.length >= response.data.data.rowCount;\n\n if(oldLength >= 0) {\n for(let i=oldLength; i {\n this.pendingList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n \n this.$refs.loadmorepending.onBottomLoaded();\n }\n })\n }\n },\n\n //已审批加载更多\n loadMoreProcessed() {\n let appId = this.appId || this.$root.appid;\n let lastPage = Math.floor(this.processedList.length / 10) + 1;\n if(!this.selectedProcessedFlowId && this.allProcessedLoaded==false && !this.userId) {\n API.getProcessedList(\n appId,\n { pageNo: lastPage, linesPerPage: 10 },\n {\n onSucess: response => {\n let oldLength = this.processedList.length;\n //服务器方法当页面数为2时返回错误,很奇怪,要检查一下\n // this.$set(this.pendingList, this.pendingList.concat(response.data.data.datas));\n this.processedList = this.processedList.concat(\n response.data.data.datas\n );\n\n this.allProcessedLoaded =\n this.processedList.length >= response.data.data.rowCount;\n if(oldLength >= 0) {\n for(let i=oldLength; i {\n this.processedList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n\n this.$refs.loadmoreprocessed.onBottomLoaded();\n }\n }\n );\n }else if(this.selectedProcessedFlowId || this.userId) {\n let isComplete = this.isMySponsor,\n isMyWorkFlow = this.isMySponsor,\n title = '',\n flowId = this.selectedProcessedFlowId,\n initiatorId = this.userId?this.userId:'',\n pageNo = Math.floor(this.processedList.length / 10) + 1,\n linesPerPage = 10;\n this.$api.getProcessedsSortList(appId, title, flowId, initiatorId, isComplete, isMyWorkFlow, pageNo, linesPerPage, {\n onSucess: response => {\n let oldLength = this.processedList.length;\n this.processedList = this.processedList.concat(\n response.data.data.datas\n );\n this.allProcessedLoaded =\n this.processedList.length >= response.data.data.rowCount;\n if(oldLength >= 0) {\n for(let i=oldLength; i {\n this.processedList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n }\n this.$refs.loadmoreprocessed.onBottomLoaded();\n }\n });\n }\n \n },\n\n finished() {\n let appId = this.appId || this.$root.appid;\n this.$store.dispatch('landingUser');\n let pageNo = 1,\n linesPerPage = 10;\n this.$api.getProcessedList(\n appId,\n { pageNo: pageNo, linesPerPage: linesPerPage },\n {\n onSucess: response => {\n this.processLoading = true\n // if(this.pendingLoading && this.processLoading) {\n // Indicator.close();\n // }\n this.processedList = response.data.data.datas;\n this.allProcessedLoaded =\n this.processedList.length >= response.data.data.rowCount;\n for(let i=0; i {\n this.processedList[i].photo = response.data.data;\n this.$forceUpdate();\n }\n })\n }\n this.$refs.loadmoreprocessed.onBottomLoaded();\n }\n }\n );\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]}