diff --git a/src/api/modules/processCenter.js b/src/api/modules/processCenter.js index 43ab7b2..e7543f5 100644 --- a/src/api/modules/processCenter.js +++ b/src/api/modules/processCenter.js @@ -35,13 +35,13 @@ export default { return request({ url: '/api/task/get_list_by_instance', method: 'GET', - data: data + params: data }) }, // 获取监控流程详情 getMonitorImg(data){ return request({ - url: '/api/model/getImg', + url: '/api/instance/getImg', method: 'GET', params: data, responseType: 'blob', diff --git a/src/assets/css/process.scss b/src/assets/css/process.scss index cfdd7a5..77daf1c 100644 --- a/src/assets/css/process.scss +++ b/src/assets/css/process.scss @@ -58,5 +58,8 @@ } } } - +.blurcolor{ + color: #1890FF ; + cursor: pointer; +} diff --git a/src/components/ProcessMixin.vue b/src/components/ProcessMixin.vue index 227ff84..ad47499 100644 --- a/src/components/ProcessMixin.vue +++ b/src/components/ProcessMixin.vue @@ -89,29 +89,25 @@ }) }, // 所有流程的完成任务 - completeProcess(dataJson,submitJson,taskId,userId) { - this.$api.process.completeTask({ - taskId:taskId, - userId:userId, - dataJson, - submitJson - }).then(res=>{ - this.$message['success']('提交成功') - this.$router.back(-1) - }) + completeProcess(obj) { + this.$api.process.completeTask(obj).then(res=>{ + this.$message['success']('提交成功') + this.$router.back(-1) + }) }, // 获取流程详细信息 getProcessDetail(){ return new Promise((resolve,reject)=>{ this.$api.process.getProcessDetail({taskId:this.taskIds}).then(res=>{ let data=res.data - this.processOld=res.data + this.processOld=data.data resolve() }).catch(err=>{ reject() }) }) - } + }, + }, computed: {}, watch: {}, diff --git a/src/views/Report/ReportList.vue b/src/views/Report/ReportList.vue index a4d92dc..886fe5e 100644 --- a/src/views/Report/ReportList.vue +++ b/src/views/Report/ReportList.vue @@ -155,8 +155,8 @@ @@ -172,9 +172,6 @@ - - - @@ -304,8 +301,8 @@ export default { } ], - content: '', - checkIds: [] + checkIds: [], + checkList: [] } }, watch: { @@ -320,17 +317,26 @@ export default { }, selectAllEvent ({ checked }) { const records = this.$refs.xTable.getCheckboxRecords() + this.checkList= records this.checkIds = records.map(item => { return item.id }) }, selectChangeEvent ({ checked }) { const records = this.$refs.xTable.getCheckboxRecords() + this.checkList= records this.checkIds = records.map(item => { return item.id }) }, permissionApp () { + // 有预览权限的时候是否还让继续申请 + let temp=this.checkList.filter(item =>{ + if(item.power == 1 || item.power == 2){ + return item + } + }) + this.$router.push({ path: '/permission/launch', query: { id: 'AEHJB8YNJ3', ids: this.checkIds.toString() } diff --git a/src/views/permissionApplication/components/AuditOperation.vue b/src/views/permissionApplication/components/AuditOperation.vue index 753b2a7..a1872dc 100644 --- a/src/views/permissionApplication/components/AuditOperation.vue +++ b/src/views/permissionApplication/components/AuditOperation.vue @@ -69,7 +69,15 @@ export default { name: 'AuditOperation', - props: ['query'], + props: { + isDisable:{ + type:Boolean, + default:false + }, + examine:{ + type:Object + } + }, data () { return { @@ -93,8 +101,8 @@ export default { }, created () { // 判断穿过来的query里的参数 是不是查看 - if (this.query.isViewDetails && this.query.isViewDetails === 1) { - this.examineForm = this.query + if (this.isDisable) { + this.examineForm = this.examine this.formdisableflag = true } }, diff --git a/src/views/permissionApplication/components/reportDialog.vue b/src/views/permissionApplication/components/reportDialog.vue index f68666e..ef58bd2 100644 --- a/src/views/permissionApplication/components/reportDialog.vue +++ b/src/views/permissionApplication/components/reportDialog.vue @@ -115,9 +115,9 @@ export default { const name = [] const ids = [] this.alreadyData.forEach(item => { - if (this.checkIds.indexOf(item.id) > -1) { + if (this.checkIds.indexOf(item.reportId) > -1) { name.push(item.name) - ids.push(item.id) + ids.push(item.reportId) } }) this.checkList = this.checkList.filter(item => { @@ -157,7 +157,11 @@ export default { // 列表 reportList () { this.$api.permissionProcess.getReportLisy({ ...this.q, ...this.searchForm,usid:this.$store.getters.userInfo.USID }).then(({ data }) => { - this.tableData = data.records + this.tableData = data.records.map(item=>{ + item.reportId=item['id'] + delete item['id'] + return item + }) this.total = data.total this.q.pageNo = data.current this.q.pageSize = data.size @@ -184,14 +188,14 @@ export default { const records = this.$refs.xTable.getCheckboxRecords() this.checkList = records this.checkIds = records.map(item => { - return item.id + return item.reportId }) }, selectChangeEvent ({ checked }) { const records = this.$refs.xTable.getCheckboxRecords() this.checkList = records this.checkIds = records.map(item => { - return item.id + return item.reportId }) } } diff --git a/src/views/permissionApplication/examine.vue b/src/views/permissionApplication/examine.vue index cd02f1b..d751d14 100644 --- a/src/views/permissionApplication/examine.vue +++ b/src/views/permissionApplication/examine.vue @@ -52,7 +52,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).tableData + this.tableData = JSON.parse(this.processOld.dataJson).dataMsg this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName + this.disabled=false this.formControl= true if(this.$route.query.yiban){ - + this.disabled=true + this.submitjson=JSON.parse(this.processOld.submitJson) }else{ } @@ -176,20 +158,20 @@ export default { }, // 选择转办 handleDblClick (treeNode) { - // changeAssigneeNew({ - // taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id + // taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id // assignee: treeNode[0].userId, // 转办人 - // userId: this.$store.getters.userInfo.userId, // 转办人 + // userId: this.$store.getters.userInfo.userId, // dangqian人 // pId: this.$store.getters.getHandleInfo.prcId // 流程实例 - // }).then(res => { - // if (res.success) { - // this.$message.success('转办成功') - // this.$router.push('/processCenter') - // this.visibleTree = false - // } else { - // this.$message.warning(res.message) - // } - // }) + 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()) { diff --git a/src/views/permissionApplication/launch.vue b/src/views/permissionApplication/launch.vue index 0c49bc7..123a16e 100644 --- a/src/views/permissionApplication/launch.vue +++ b/src/views/permissionApplication/launch.vue @@ -1,7 +1,8 @@ @@ -143,12 +144,14 @@ export default { formControlname: false, assignForm: { oneApprove: '', - twoApprove: '' + twoApprove: '', + twoApproveName:'', + oneApproveName:'' }, tableData: [], applicationForm: { - name:'', - send:'' + applyReason:'', + power:'' }, q: { pageSize: 10000, @@ -170,10 +173,10 @@ export default { }] }, applicationFormRule: { - name: [{ + applyReason: [{ max: 1000, message: '申请原因最多填写1000字符' }], - send: [{ + power: [{ required: true, message: '请选择申请权限' }] @@ -192,45 +195,59 @@ export default { remark: [{ max: 1000, message: '说明最多填写1000字符' }] - } + }, + taskIds:'' } }, created () { // 第一次进入此页面 需要清楚校验 if (this.$route.query.ids) { - this.reportList(this.$route.query.ids) + if(this.$route.query.ids.split(',').length>0){ + this.reportList(this.$route.query.ids) + } this.handleReset() } - if(this.$route.query.taskDefinitionKey){ + if(this.$route.query.taskDefinitionKey == 'aid4'){ + this.taskIds=this.$route.query.taskIds this.initShow = true this.formControlname=true this.getProcessDetail().then(res =>{ - //指派信息 - 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).tableData - this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName //基础信息 + 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.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName + //指派信息 this.assignForm=JSON.parse(this.processOld.submitJson) }) } if(this.$route.query.yiban){ - + this.taskIds=this.$route.query.taskIds + this.getProcessDetail().then(()=>{ + 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.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName + //指派信息 + this.assignForm=JSON.parse(this.processOld.submitJson) + }) } console.log(this.PERMISSION, 'ddd') }, methods: { - handleCheck (name) { + if(this.initShow){ + return false + } this.treeType = name this.orgTableVal = '' this.orgTableValName = '' if (name === 'spr1') { - this.orgTableVal = this.assignForm.Approve - this.orgTableValName = this.assignForm.oneApproveName + this.orgTableVal = this.assignForm.oneApprove ?this.assignForm.oneApprove:'' + this.orgTableValName = this.assignForm.oneApproveName ?this.assignForm.oneApproveName:'' } else { - this.orgTableVal = this.assignForm.twoApprove - this.orgTableValName = this.assignForm.twoApproveName + this.orgTableVal = this.assignForm.twoApprove?this.assignForm.twoApprove:'' + this.orgTableValName = this.assignForm.twoApproveName?this.assignForm.twoApproveName:'' } this.visibleOrgTable = true }, @@ -256,26 +273,33 @@ export default { }, // 获取表格列表 吧查询到的值传给子组件 reportList (ids) { - this.$api.report.reportList({ id: ids }).then(({ data }) => { - this.tableData = data.records + this.$api.report.reportList({ ids: ids.split(',') }).then(({ data }) => { + this.tableData = data.records.map(item=>{ + item.reportId=item['id'] + delete item['id'] + return item + }) }) }, handleReset () { this.applicationForm = { - name:'', - send:'' + applyReason:'', + power:'' } this.processForm.prcName='' this.assignForm = { oneApprove: '', twoApprove: '' } - this.$refs.applicationFormRef.clearValidate() - this.$refs.assignFormRef.clearValidate() + this.$nextTick(()=>{ + this.$refs.applicationFormRef.clearValidate() + this.$refs.assignFormRef.clearValidate() + }) + }, // 整理数据 organizeData() { - let userId = this.$store.getters.userInfo.USID + let userId = this.$store.getters.userInfo.usid this.tableData=this.tableData.map(item=>{ item = {...item, ... this.applicationForm,userId:userId} return item @@ -283,6 +307,7 @@ export default { }, // 提交 handleSubmit () { + console.log( this.$store.getters.userInfo.usid," this.$store.getters.userInfo.USID") this.$refs.assignFormRef.validate(v => { this.$refs.applicationFormRef.validate(m => { this.$refs.processFormRef.validate(z =>{ @@ -298,10 +323,11 @@ export default { this.organizeData() //如果不是第一次 if(this.initShow){ - this.completeProcess() + let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData}) + let submitJson=JSON.stringify(this.assignForm) + this.completeProcess({dataJson,submitJson,taskId:this.taskIds,userId:form.userId}) }else{ this.startProcess() - this.completeProcess() } } } else { @@ -311,8 +337,21 @@ export default { }) }) }, - startProcess() { + //修改参数 + changeParam(){ + }, + startProcess() { + let form = {} + form={...this.assignForm,approveData:{...this.applicationForm,...this.processForm},dataMsg:this.tableData} + form.prcType= '1' + 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.$api.process.startProcess(form).then( ({data}) =>{ + this.completeProcess({dataJson,submitJson,taskId:data.result,userId:form.userId}) + }) }, //获取流程详细信息 diff --git a/src/views/userCenter/processCenter.vue b/src/views/userCenter/processCenter.vue index 671172f..5725e75 100644 --- a/src/views/userCenter/processCenter.vue +++ b/src/views/userCenter/processCenter.vue @@ -9,12 +9,14 @@
- - + + + +
diff --git a/src/views/userCenter/processCenter/finishProcess.vue b/src/views/userCenter/processCenter/finishProcess.vue index 9a6172a..207de04 100644 --- a/src/views/userCenter/processCenter/finishProcess.vue +++ b/src/views/userCenter/processCenter/finishProcess.vue @@ -7,16 +7,21 @@ {{ rowIndex + (q.current - 1) * q.size + 1 }} + + + @@ -95,8 +100,31 @@ export default { this.q.current = val; this.loadData(); }, - view() { - alert(111) + view(row) { + switch (row.prcType) { + case '1' : + if (row.taskDefinitionKey == 'aid1' || row.taskDefinitionKey == 'aid3') { + this.$router.push({ + path: '/permission/launch', + query: { + id: 'AEHJB8YNJ3', + taskIds:row.taskIds, + type:'yiban', + taskDefinitionKey: row.taskDefinitionKey + } + }) + }else{ + this.$router.push({ + path: '/permission/examine', + query: { + id: 'AEHJB8YNJ3', + taskIds:row.taskIds, + type:'yiban', + taskDefinitionKey: row.taskDefinitionKey + } + }) + } + } }, } } diff --git a/src/views/userCenter/processCenter/gencyProcess.vue b/src/views/userCenter/processCenter/gencyProcess.vue index f24a202..e0cf020 100644 --- a/src/views/userCenter/processCenter/gencyProcess.vue +++ b/src/views/userCenter/processCenter/gencyProcess.vue @@ -10,7 +10,7 @@ -