【修改】修改传参
This commit is contained in:
@@ -48,8 +48,9 @@
|
||||
<vxe-column type="checkbox" width="60"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="name" title="报告名称"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="year" title="报告年份"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="createDate" title="涉密等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="createDate" title="隐私等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="department" title="报告部门"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="涉密等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="隐私等级"></vxe-column>
|
||||
</vxe-table>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
<!-- <vxe-column show-overflow show-header-overflow field="labelTwoName" :title="tagsForm.tags02.name"></vxe-column>-->
|
||||
<!-- <vxe-column show-overflow show-header-overflow field="labelThreeName" :title="tagsForm.tags03.name"></vxe-column>-->
|
||||
<vxe-column show-overflow show-header-overflow field="year" title="报告年份" width="200" ></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="year" title="报告部门"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="createDate" title="涉密等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="createDate" title="隐私等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="department" title="报告部门"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="涉密等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="隐私等级"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right" v-if="!disabled">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" class="del-btn" @click="reportDelete(row.id)">删除</el-button>
|
||||
<el-button type="text" class="del-btn" @click="reportDelete(row.reportId)">删除</el-button>
|
||||
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -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))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<process-footer
|
||||
v-if="!disabled"
|
||||
showCancel
|
||||
:show-transfer="isShowTran"
|
||||
:show-submit="isShowSubmit"
|
||||
@@ -127,32 +128,36 @@ export default {
|
||||
disabled:false,
|
||||
assignForm: {},
|
||||
tableData: [],
|
||||
applicationForm: {},
|
||||
applicationForm: {
|
||||
power:'',
|
||||
applyReason:''
|
||||
},
|
||||
q: {
|
||||
pageSize: 10000,
|
||||
pageNo: 1
|
||||
},
|
||||
PERMISSION,
|
||||
submitjson:{},
|
||||
taskId:'',
|
||||
prcNum:''
|
||||
prcType:1
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.taskId=this.$route.query.taskId
|
||||
this.prcNum=this.$route.query.prcNum
|
||||
this.prcId=this.$route.query.prcId
|
||||
this.prcName=this.$route.query.prcName
|
||||
let params={
|
||||
taskId: this.taskId,
|
||||
prcType: 1
|
||||
prcId: this.prcId,
|
||||
prcType: this.prcType
|
||||
}
|
||||
if(this.$route.query.type=='yiban'){
|
||||
this.disabled=true
|
||||
}
|
||||
this.getProcessDetail(params).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).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
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<process-footer
|
||||
v-if="!formControl"
|
||||
showCancel
|
||||
:show-reset="isShowReset"
|
||||
:show-submit="isShowSubmit"
|
||||
@@ -196,8 +197,7 @@ export default {
|
||||
max: 1000, message: '说明最多填写1000字符'
|
||||
}]
|
||||
},
|
||||
taskId:'',
|
||||
prcNum:''
|
||||
prcType:1
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -210,17 +210,15 @@ export default {
|
||||
}
|
||||
if(this.$route.query.taskDefinitionKey == 'aid4'){
|
||||
this.taskId=this.$route.query.taskId
|
||||
this.prcNum=this.$route.query.prcNum
|
||||
this.prcNum = this.$route.query.prcNum
|
||||
this.prcId = this.$route.query.prcId
|
||||
this.initShow = true
|
||||
this.formControlname=true
|
||||
this.getProcessDetail({
|
||||
taskId: this.taskId,
|
||||
prcType: 1
|
||||
}).then(res =>{
|
||||
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})
|
||||
})
|
||||
},
|
||||
//获取流程详细信息
|
||||
|
||||
Reference in New Issue
Block a user