diff --git a/src/api/modules/process.js b/src/api/modules/process.js index 509cb58..80f9b1d 100644 --- a/src/api/modules/process.js +++ b/src/api/modules/process.js @@ -76,7 +76,7 @@ export default { // 导出 exportStandard(data) { return request({ - url: '/api/historyExport', + url: '/api/task/historyExport', method: 'get', params: data , responseType:'blob' @@ -92,7 +92,6 @@ export default { }, // 通用流程详细信息查询 getProcessDetail( data ){ - console.log(data,"datdtatdtatdatdtat") return request({ url: '/api/queryDetail', method: 'get', diff --git a/src/components/Menu.vue b/src/components/Menu.vue index ef0ac64..a418acc 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -57,6 +57,7 @@ export default { methods: { handleRouter (item) { this.$store.commit('setActiveTabIndex','') + console.log("我点击的",item) if (item.belong == 0) { this.$store.commit('saveMenuName', item.label) if (this.$route.path == '/system/401Page') { @@ -78,12 +79,16 @@ export default { }) } else { this.$store.commit('saveMenuName', item.label) - this.$router.push({ name: 'urlIndex', query: param }) + this.$router.push({ name: 'urlIndex', query: { + id:param.id + } }) } } else { if (this.$route.path === item.href) return // delete(this.$route.query.itemHref) - this.$router.push({ path: item.href, query: this.$route.query }) + this.$router.push({ path: item.href, query: { + id:this.$route.query.id + } }) } } }, diff --git a/src/components/ProcessMixin.vue b/src/components/ProcessMixin.vue index 960bc14..49b7ceb 100644 --- a/src/components/ProcessMixin.vue +++ b/src/components/ProcessMixin.vue @@ -28,7 +28,10 @@ taskId: '', userId: '', }, - processOld:{} //存储流程的就信息 + processOld:{} , //存储流程的就信息 + prcId: '', + prcNum: '', + prcName:'' } }, methods: { @@ -101,11 +104,15 @@ }) }, // 获取流程详细信息 - getProcessDetail(params){ + getProcessDetail(){ return new Promise((resolve,reject)=>{ - this.$api.process.getProcessDetail(params).then(res=>{ + this.$api.process.getProcessDetail({ + prcId: this.prcId, + prcType: this.prcType + }).then(res=>{ let data=res.data - this.processOld=data.data + this.processOld=data + console.log( this.processOld,"processOld") resolve() }).catch(err=>{ reject() diff --git a/src/utils/Enum/enum.js b/src/utils/Enum/enum.js index 48b0c0d..b594b8e 100644 --- a/src/utils/Enum/enum.js +++ b/src/utils/Enum/enum.js @@ -2,8 +2,8 @@ import Esenum from './index.js' // 权限申请 export const PERMISSION = new Esenum([ - { label: '预览', value: 1 }, - { label: '预览+下载', value: 2 } + { label: '预览', value: "1" }, + { label: '预览+下载', value: "2" } ]) // 流程状态 export const PROCESSSTATE = new Esenum( diff --git a/src/utils/request.js b/src/utils/request.js index ab21b0a..7195f80 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -87,6 +87,26 @@ instance.interceptors.response.use(function (response) { // 登录过期 if (error.response.status === 401) { store.commit('saveUserInfo', null) + store.commit('saveUserInfo', null) + store.commit('savePathUrl', null) + store.commit('saveMenuName', null) + store.commit('saveMenuData', null) + router.push('/login') + Message.error('登录超时过期') + // window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self'); + // var url = 'http://192.168.144.22:9966/login?loginType=1' + // // var url = 'http://10.64.23.30:7766/home' + // + // return window.open('http://192.168.144.29:9090/cas/login?service='+url, '_self'); + // // return window.open('https://caddmuat.changan.com.cn/cas/login?service='+url, '_self'); + } + // 登录过期 + if (error.response.status === 500) { + store.commit('saveUserInfo', null) + store.commit('saveUserInfo', null) + store.commit('savePathUrl', null) + store.commit('saveMenuName', null) + store.commit('saveMenuData', null) router.push('/login') Message.error('登录超时过期') // window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self'); diff --git a/src/views/permissionApplication/components/reportDialog.vue b/src/views/permissionApplication/components/reportDialog.vue index ef58bd2..d493866 100644 --- a/src/views/permissionApplication/components/reportDialog.vue +++ b/src/views/permissionApplication/components/reportDialog.vue @@ -48,8 +48,9 @@ - - + + + --> - - - + + + @@ -136,13 +136,13 @@ export default { selectAllEvent ({ checked }) { const records = this.$refs.xTable.getCheckboxRecords() this.checkIds = records.map(item => { - return item.id + return item.reportId }) }, selectChangeEvent ({ checked }) { const records = this.$refs.xTable.getCheckboxRecords() this.checkIds = records.map(item => { - return item.id + return item.reportId }) }, addReport () { @@ -159,7 +159,7 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - this.$emit('updateTable', this.value.filter(item => item.id !== id)) + this.$emit('updateTable', this.value.filter(item => item.reportId !== id)) }) } else { if (Array.isArray(id)) { @@ -168,7 +168,7 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - this.$emit('updateTable', this.value.filter(item => id.indexOf(item.id) === -1)) + this.$emit('updateTable', this.value.filter(item => id.indexOf(item.reportId) === -1)) }) } } diff --git a/src/views/permissionApplication/examine.vue b/src/views/permissionApplication/examine.vue index e9ea0e6..68cf2c4 100644 --- a/src/views/permissionApplication/examine.vue +++ b/src/views/permissionApplication/examine.vue @@ -56,6 +56,7 @@ { - this.applicationForm.name = JSON.parse(this.processOld.dataJson).name - this.applicationForm.send = JSON.parse(this.processOld.dataJson).send - this.tableData = JSON.parse(this.processOld.dataJson).dataMsg - this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName + this.tableData = JSON.parse(this.processOld.dataJson) + this.applicationForm.power = this.tableData[0].power + this.applicationForm.applyReason = this.tableData[0].applyReason + this.processForm.prcName = this.prcName this.disabled=false this.formControl= true if(this.$route.query.type=='yiban'){ @@ -167,41 +172,47 @@ export default { }, methods: { // 获取表格列表 吧查询到的值传给子组件 - reportList (ids) { - this.$api.report.reportList({ id: ids }).then(({ data }) => { + reportList(ids) { + this.$api.report.reportList({id: ids}).then(({data}) => { this.tableData = data.records }) }, // 转办 - handleTransfer () { + handleTransfer() { this.visibleTree = true }, // 选择转办 - handleDblClick (treeNode) { + handleDblClick(treeNode) { // taskId: this.$store.getters.getHandleInfo.taskId, // 任务id // assignee: treeNode[0].userId, // 转办人 // userId: this.$store.getters.userInfo.userId, // dangqian人 // pId: this.$store.getters.getHandleInfo.prcId // 流程实例 - this.$api.process.changeAssignee({ - taskId:this.processOld.taskId, - assignee: treeNode[0].USID, - userId: this.$store.getters.userInfo.usid, - pId:this.processOld.pId - }).then(()=>{ - this.$message.success('转办成功') - this.$router.push({path:'/processCenter',query:{id:this.$route.query.id}}) - this.visibleTree = false - }) + this.$api.process.changeAssignee({ + taskId: this.processOld.taskId, + assignee: treeNode[0].USID, + userId: this.$store.getters.userInfo.usid, + pId: this.processOld.pId + }).then(() => { + this.$message.success('转办成功') + this.$router.push({path: '/processCenter', query: {id: this.$route.query.id}}) + this.visibleTree = false + }) }, - handleSubmit () { - if (this.$refs.operationRef.submit()) { - // 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson - let submit= JSON.parse(this.processOld.submitJson) - let dataJson= JSON.parse(this.processOld.dataJson) - let submitJson= {...data , ...this.$refs.operationRef.examineForm} - this.completeProcess(dataJson,submitJson) - } - } + handleSubmit() { + // if (this.$refs.operationRef.submit()) { + // 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson + let submit = JSON.parse(this.processOld.submitJson) + let dataJson = this.processOld.dataJson + let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm}) + this.completeProcess({ + dataJson, + submitJson, + taskId: this.taskId, + userId: this.$store.getters.userInfo.usid, + prcType: this.prcType + }) + } + } } diff --git a/src/views/permissionApplication/launch.vue b/src/views/permissionApplication/launch.vue index 82f8a0b..b7adf74 100644 --- a/src/views/permissionApplication/launch.vue +++ b/src/views/permissionApplication/launch.vue @@ -95,6 +95,7 @@ { + this.getProcessDetail().then(res =>{ //基础信息 this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason this.applicationForm.power = JSON.parse(this.processOld.dataJson).power - this.tableData = JSON.parse(this.processOld.dataJson).dataMsg + this.tableData = JSON.parse(this.processOld.dataJson) this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName //指派信息 this.assignForm=JSON.parse(this.processOld.submitJson) @@ -228,6 +226,9 @@ export default { } if(this.$route.query.type=='yiban'){ this.taskId=this.$route.query.taskId + this.prcNum = this.$route.query.prcNum + this.prcId = this.$route.query.prcId + this.formControl = true this.getProcessDetail().then(()=>{ this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason this.applicationForm.power = JSON.parse(this.processOld.dataJson).power @@ -330,7 +331,7 @@ export default { if(this.initShow){ let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData}) let submitJson=JSON.stringify(this.assignForm) - this.completeProcess({dataJson,submitJson,taskId:this.taskId,userId:form.userId}) + this.completeProcess({dataJson,submitJson,taskId:this.taskId,userId:this.$store.getters.userInfo.usid,prcType:this.prcType}) }else{ this.startProcess() } @@ -347,15 +348,19 @@ export default { }, startProcess() { + //把表单都整合到form中 + // dataJson与submitJson需要发到completeProcess let form = {} - form={...this.assignForm,approveData:{...this.applicationForm,...this.processForm},dataMsg:this.tableData} - form.prcType= '1' + form={approveData:{...this.applicationForm,...this.processForm,...this.assignForm,userId:this.$store.getters.userInfo.usid},dataMsg:this.tableData} + + form.prcType= this.prcType form.prcName= this.processForm.prcName form.userId= this.$store.getters.userInfo.usid - let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData}) - let submitJson=JSON.stringify(this.assignForm) + //...this.applicationForm,...this.processForm, + let dataJson=JSON.stringify(this.tableData) + let submitJson=JSON.stringify({...this.assignForm,userId:this.$store.getters.userInfo.usid}) this.$api.process.startProcess(form).then( ({data}) =>{ - this.completeProcess({dataJson,submitJson,taskId:data.result,userId:form.userId}) + this.completeProcess({dataJson,submitJson,taskId:data.result,userId:form.userId,prcType: this.prcType}) }) }, //获取流程详细信息 diff --git a/src/views/userCenter/processCenter/finishProcess.vue b/src/views/userCenter/processCenter/finishProcess.vue index 97bbcf1..e3d80cd 100644 --- a/src/views/userCenter/processCenter/finishProcess.vue +++ b/src/views/userCenter/processCenter/finishProcess.vue @@ -24,7 +24,7 @@
{{row.prcName}}
- -
+
@@ -18,16 +18,16 @@ v-if="tabsName !=='AlreadyProcess'"> 调整处理人 -
- 催办 - 导出 -
+ + + + + + + + + + @@ -47,19 +47,27 @@ v-table-min-height="'calc(100% - 50px)'" max-height="95%" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent"> - - + title="创建时间"> + +
+ + + - + @@ -67,12 +75,14 @@ import {PROCESSSTATE} from '@/utils/Enum/enum' import monitorModal from './monitorModal.vue' import ProcessMixin from "@/components/ProcessMixin"; +import { formatDate } from '@/utils/date' export default { name: 'processDetail', mixins: [ProcessMixin], data () { return { + formatDate, PROCESSSTATE, assigneeNewLoading: false, // 调整处理人确定loading loginPeople: '', @@ -203,8 +213,9 @@ export default { this.checkList = records }, showDialog() { - if(this.checkList.length < 0){ + if(this.checkList.length < 1){ this.$message.warning("至少选择一条数据") + return }else{ let check=[] check = this.checkList.filter(item=>{ @@ -215,7 +226,7 @@ export default { if(check.length > 0){ this.$message.warning("请选择状态为未完成的数据") }else{ - this.$refs.monitorModal.open(this.checkIds) + this.$refs.monitorModal.open(this.checkIds,this.checkList[0].id) } } }, @@ -252,7 +263,7 @@ export default { sortWord: this.shunxu ? this.paixu : '', shunxu: this.shunxu }).then(res=>{ - this.detailData = [{name:1,state:'1'},{name:1},{name:1},] + this.detailData = res.data // res[res.length - 1].endTime ? this.urgeRowFlag = false : this.urgeRowFlag = true }) }, @@ -302,8 +313,10 @@ export default { width: 100%; height: calc(100% - 30px); .process-img{ - //width: 100%; - //height: 100%; + height: auto; + overflow: auto; + max-width: 100%; + object-fit: none; } } }