-
+
+
基础信息
@@ -10,7 +11,7 @@
-
@@ -25,13 +26,13 @@
>
-
-
+
+
-
-
+
+
-
+ }" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk">
@@ -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 }}
+
+
+ {{row.prcNum}}
+
+
- {{getPrcName(row.prcType)}}
+ {{getPrcName(row.prcType)}}
- {{row.prcName}}
+ {{row.prcName}}
-
+
查看
@@ -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 @@
- {{row.prcNum}}
+ {{row.prcNum}}
- {{row.prcName}}
+ {{row.prcName}}
-
- {{row.prcNum}}
+
+ {{row.prcNum}}
-
{{getPrcName(row.prcType)}}
-
-
- {{row.prcName}}
+
+
+ {{row.prcName}}
-
{
console.log(res)
// let blob = new Blob([res.data], {type: 'image/jpg'})
// let url = window.URL.createObjectURL(res.data)
- this.processStep = window.URL.createObjectURL(res)
+ this.processStep = window.URL.createObjectURL(res.data)
}).finally(_ => {
this.imgLoading = false;
})
@@ -248,7 +248,7 @@ export default {
// 请求列表
processTable (row) {
this.$api.processCenter.getMonitorPageList({
- prcNum:(row && row.parentFlowNum) || this.$route.query.prcNum,
+ prcNum: this.prcNum,
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}).then(res=>{
@@ -264,6 +264,7 @@ export default {
mounted () {
this.tabsName=this.$route.query.tabsName
this.prcType=this.$route.query.prcType
+ this.prcNum=this.$route.query.prcNum
this.processNum()
this.processTable()
}
diff --git a/src/views/userCenter/processCenter/sentProcess.vue b/src/views/userCenter/processCenter/sentProcess.vue
index cb56b3f..bb25d01 100644
--- a/src/views/userCenter/processCenter/sentProcess.vue
+++ b/src/views/userCenter/processCenter/sentProcess.vue
@@ -11,19 +11,19 @@
- {{row.prcNum}}
+ {{row.prcNum}}
- {{getPrcName(row.prcType)}}
+ {{getPrcName(row.prcType)}}
- {{row.prcName}}
+ {{row.prcName}}