【修改】修改流程传参 修改名称样式

This commit is contained in:
zhoulingpo
2023-04-24 21:11:53 +08:00
parent 95b35ed77a
commit 21f68b0bd8
12 changed files with 106 additions and 65 deletions
+3 -2
View File
@@ -12,7 +12,7 @@ export default {
// 获取审批历史 // 获取审批历史
getHistory (data) { getHistory (data) {
return request({ return request({
url: '/api/get_list_by_instance', url: '/api/task/get_list_by_instance',
method: 'get', method: 'get',
params: data params: data
}) })
@@ -92,8 +92,9 @@ export default {
}, },
// 通用流程详细信息查询 // 通用流程详细信息查询
getProcessDetail( data ){ getProcessDetail( data ){
console.log(data,"datdtatdtatdatdtat")
return request({ return request({
url: '/api/zcfgrklcDetail', url: '/api/queryDetail',
method: 'get', method: 'get',
params: data params: data
+24 -18
View File
@@ -9,15 +9,15 @@
height: '48px'}" height: '48px'}"
border border
@sort-change="sortChange"> @sort-change="sortChange">
<el-table-column <!-- <el-table-column-->
show-overflow-tooltip <!-- show-overflow-tooltip-->
prop="orgName" <!-- prop="orgName"-->
align="center" <!-- align="center"-->
label="审批人所在部门"> <!-- label="审批人所在部门">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span >{{ scope.row.orgName }}</span> <!-- <span >{{ scope.row.orgName }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column <el-table-column
prop="assignee" prop="assignee"
align="center" align="center"
@@ -53,9 +53,9 @@
align="center" align="center"
label="开始时间" label="开始时间"
prop="startTime" prop="startTime"
sortable="custom"> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.startTime ? formatIssueDate(scope.row.startTime) : '' }}</span> <span> {{formatDate(scope.row.startTime,"yyyy-mm-dd hh:mm:ss")}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -64,11 +64,12 @@
align="center" align="center"
label="完成时间" label="完成时间"
prop="endTime" prop="endTime"
sortable="custom"> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.endTime ? formatIssueDate(scope.row.endTime) : '' }}</span> <span>{{formatDate(scope.row.endTime?scope.row.endTime:'',"yyyy-mm-dd hh:mm:ss")}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
width="150px" width="150px"
@@ -106,12 +107,17 @@
</template> </template>
<script> <script>
import { formatDate } from '@/utils/date'
export default { export default {
name: 'approvalHistory', name: 'approvalHistory',
props: ['query'], props: {
prcNum:{
type:String
}
},
data () { data () {
return { return {
formatDate,
loading: false, loading: false,
standTableList: [], standTableList: [],
importModalshowflagtemp: false, importModalshowflagtemp: false,
@@ -147,10 +153,10 @@ export default {
}, },
getListByInstance (form) { getListByInstance (form) {
this.$api.process.getHistory({ this.$api.process.getHistory({
prcNum: this.query.prcNum, prcNum: this.prcNum,
...form ...form
}).then(res => { }).then(res => {
this.standTableList = res this.standTableList = res.data
}) })
} }
+5 -2
View File
@@ -131,8 +131,8 @@
></pagination> ></pagination>
<!-- 已选择的用户 --> <!-- 已选择的用户 -->
<el-divider content-position="left">已选择</el-divider> <el-divider v-if="maxSelected !== 1" content-position="left">已选择</el-divider>
<div class="checked-user-list"> <div v-if="maxSelected !== 1" class="checked-user-list">
<el-tag <el-tag
size="medium" size="medium"
closable closable
@@ -703,6 +703,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.org-table { .org-table {
::v-deep .el-form-item--mini .el-form-item__content{
line-height: 40px;
}
::v-deep .el-dialog__header { ::v-deep .el-dialog__header {
padding: 0 20px; padding: 0 20px;
height: 50px; height: 50px;
+1 -1
View File
@@ -317,7 +317,7 @@ export default {
}).then(() => { }).then(() => {
changeAssigneeNew({ changeAssigneeNew({
taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id taskId: this.$store.getters.getHandleInfo.taskId, // 任务id
assignee, // 被委托人 assignee, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人 userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$store.getters.getHandleInfo.prcId // 流程实例 pId: this.$store.getters.getHandleInfo.prcId // 流程实例
+8 -3
View File
@@ -92,13 +92,18 @@
completeProcess(obj) { completeProcess(obj) {
this.$api.process.completeTask(obj).then(res=>{ this.$api.process.completeTask(obj).then(res=>{
this.$message['success']('提交成功') this.$message['success']('提交成功')
this.$router.back(-1) this.$router.push({
path:"/userCenter/processCenter",
query:{
id:'AEHJB8YNJ3'
}
})
}) })
}, },
// 获取流程详细信息 // 获取流程详细信息
getProcessDetail(){ getProcessDetail(params){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
this.$api.process.getProcessDetail({taskId:this.taskIds}).then(res=>{ this.$api.process.getProcessDetail(params).then(res=>{
let data=res.data let data=res.data
this.processOld=data.data this.processOld=data.data
resolve() resolve()
@@ -35,7 +35,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item"> <el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审批意见:</template> <template slot="label">审批意见:</template>
<el-input :maxlength='1000' <el-input :disabled="formdisableflag" :maxlength='1000'
v-model="examineForm.approvalOpinion" v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见" placeholder="请输入审批意见"
:autosize="{ minRows: 2, maxRows: 4}" :autosize="{ minRows: 2, maxRows: 4}"
+31 -11
View File
@@ -2,7 +2,7 @@
<!-- 此页面主要展示审核和已完成--> <!-- 此页面主要展示审核和已完成-->
<div class="process"> <div class="process">
<div class="process_box"> <div class="process_box">
<process-header :title="'权限审批'" :proceesNum="this.processOld.prcNum"></process-header> <process-header :title="'权限审批'" :proceesNum="prcNum"></process-header>
<div class="procedure"> <div class="procedure">
<div class="process_content"> <div class="process_content">
<span class="base_title">基础信息</span> <span class="base_title">基础信息</span>
@@ -26,13 +26,13 @@
:disabled="formControl"> :disabled="formControl">
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="申请原因:" prop="name"> <el-form-item label="申请原因:" prop="applyReason">
<el-input type="textarea" v-model="applicationForm.name" placeholder="请输入申请原因"></el-input> <el-input type="textarea" v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9" :offset="6"> <el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="send"> <el-form-item label="选择申请权限:" prop="power">
<el-select v-model="applicationForm.send" placeholder="请选择申请权限"> <el-select v-model="applicationForm.power" placeholder="请选择申请权限">
<el-option <el-option
v-for="item in PERMISSION" v-for="item in PERMISSION"
:key="item.value" :key="item.value"
@@ -48,7 +48,7 @@
</div> </div>
<div class="process_content"> <div class="process_content">
<span class="base_title">审批历史</span> <span class="base_title">审批历史</span>
<process-approval-history></process-approval-history> <process-approval-history :prcNum="prcNum"></process-approval-history>
</div> </div>
<div class="process_content"> <div class="process_content">
<span class="base_title">审核信息</span> <span class="base_title">审核信息</span>
@@ -67,7 +67,7 @@
<process-choose-tree <process-choose-tree
dialog-model dialog-model
:visible.sync="visibleTree" :visible.sync="visibleTree"
:maxSelected="100" :maxSelected="1"
:config="{value: '',valueName:''}" :config="{value: '',valueName:''}"
@confirm="handleDblClick" @confirm="handleDblClick"
></process-choose-tree> ></process-choose-tree>
@@ -97,6 +97,15 @@ export default {
}, },
data () { data () {
return { return {
applicationFormRule: {
applyReason: [{
max: 1000, message: '申请原因最多填写1000字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
processFormRule: { processFormRule: {
prcName: [{ prcName: [{
required: true, required: true,
@@ -124,18 +133,29 @@ export default {
pageNo: 1 pageNo: 1
}, },
PERMISSION, PERMISSION,
submitjson:{} submitjson:{},
taskId:'',
prcNum:''
} }
}, },
created () { created () {
this.getProcessDetail().then(res=>{ this.taskId=this.$route.query.taskId
this.prcNum=this.$route.query.prcNum
let params={
taskId: this.taskId,
prcType: 1
}
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.name = JSON.parse(this.processOld.dataJson).name
this.applicationForm.send = JSON.parse(this.processOld.dataJson).send this.applicationForm.send = JSON.parse(this.processOld.dataJson).send
this.tableData = JSON.parse(this.processOld.dataJson).dataMsg this.tableData = JSON.parse(this.processOld.dataJson).dataMsg
this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
this.disabled=false this.disabled=false
this.formControl= true this.formControl= true
if(this.$route.query.yiban){ if(this.$route.query.type=='yiban'){
this.disabled=true this.disabled=true
this.submitjson=JSON.parse(this.processOld.submitJson) this.submitjson=JSON.parse(this.processOld.submitJson)
}else{ }else{
@@ -158,7 +178,7 @@ export default {
}, },
// 选择转办 // 选择转办
handleDblClick (treeNode) { handleDblClick (treeNode) {
// taskId: this.$store.getters.getHandleInfo.taskIds, // 任务id // taskId: this.$store.getters.getHandleInfo.taskId, // 任务id
// assignee: treeNode[0].userId, // 转办人 // assignee: treeNode[0].userId, // 转办人
// userId: this.$store.getters.userInfo.userId, // dangqian人 // userId: this.$store.getters.userInfo.userId, // dangqian人
// pId: this.$store.getters.getHandleInfo.prcId // 流程实例 // pId: this.$store.getters.getHandleInfo.prcId // 流程实例
+13 -8
View File
@@ -2,7 +2,7 @@
<div class="process"> <div class="process">
<div class="process_box"> <div class="process_box">
<process-header v-if="initShow" :title="'发起流程'"></process-header> <process-header v-if="initShow" :title="'发起流程'"></process-header>
<process-header v-else :title="'发起人修改'" :proceesNum="this.processOld.prcNum"></process-header> <process-header v-else :title="'发起人修改'" :proceesNum="prcNum"></process-header>
<div class="procedure"> <div class="procedure">
<div class="process_content"> <div class="process_content">
<span class="base_title">基础信息</span> <span class="base_title">基础信息</span>
@@ -48,7 +48,7 @@
</div> </div>
<div class="process_content" v-if="initShow"> <div class="process_content" v-if="initShow">
<span class="base_title">审批历史</span> <span class="base_title">审批历史</span>
<process-approval-history></process-approval-history> <process-approval-history :prcNum="prcNum"></process-approval-history>
</div> </div>
<div class="process_content"> <div class="process_content">
<span class="base_title">指派信息</span> <span class="base_title">指派信息</span>
@@ -196,7 +196,8 @@ export default {
max: 1000, message: '说明最多填写1000字符' max: 1000, message: '说明最多填写1000字符'
}] }]
}, },
taskIds:'' taskId:'',
prcNum:''
} }
}, },
created () { created () {
@@ -208,10 +209,14 @@ export default {
this.handleReset() this.handleReset()
} }
if(this.$route.query.taskDefinitionKey == 'aid4'){ if(this.$route.query.taskDefinitionKey == 'aid4'){
this.taskIds=this.$route.query.taskIds this.taskId=this.$route.query.taskId
this.prcNum=this.$route.query.prcNum
this.initShow = true this.initShow = true
this.formControlname=true this.formControlname=true
this.getProcessDetail().then(res =>{ this.getProcessDetail({
taskId: this.taskId,
prcType: 1
}).then(res =>{
//基础信息 //基础信息
this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason
this.applicationForm.power = JSON.parse(this.processOld.dataJson).power this.applicationForm.power = JSON.parse(this.processOld.dataJson).power
@@ -221,8 +226,8 @@ export default {
this.assignForm=JSON.parse(this.processOld.submitJson) this.assignForm=JSON.parse(this.processOld.submitJson)
}) })
} }
if(this.$route.query.yiban){ if(this.$route.query.type=='yiban'){
this.taskIds=this.$route.query.taskIds this.taskId=this.$route.query.taskId
this.getProcessDetail().then(()=>{ this.getProcessDetail().then(()=>{
this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason
this.applicationForm.power = JSON.parse(this.processOld.dataJson).power this.applicationForm.power = JSON.parse(this.processOld.dataJson).power
@@ -325,7 +330,7 @@ export default {
if(this.initShow){ if(this.initShow){
let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData}) let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData})
let submitJson=JSON.stringify(this.assignForm) let submitJson=JSON.stringify(this.assignForm)
this.completeProcess({dataJson,submitJson,taskId:this.taskIds,userId:form.userId}) this.completeProcess({dataJson,submitJson,taskId:this.taskId,userId:form.userId})
}else{ }else{
this.startProcess() this.startProcess()
} }
@@ -108,9 +108,10 @@ export default {
path: '/permission/launch', path: '/permission/launch',
query: { query: {
id: 'AEHJB8YNJ3', id: 'AEHJB8YNJ3',
taskIds:row.taskIds, taskId:row.taskId,
type:'yiban', type:'yiban',
taskDefinitionKey: row.taskDefinitionKey taskDefinitionKey: row.taskDefinitionKey,
prcNum: row.prcNum,
} }
}) })
}else{ }else{
@@ -118,9 +119,10 @@ export default {
path: '/permission/examine', path: '/permission/examine',
query: { query: {
id: 'AEHJB8YNJ3', id: 'AEHJB8YNJ3',
taskIds:row.taskIds, taskId:row.taskId,
type:'yiban', type:'yiban',
taskDefinitionKey: row.taskDefinitionKey taskDefinitionKey: row.taskDefinitionKey,
prcNum: row.prcNum,
} }
}) })
} }
@@ -10,7 +10,7 @@
<vxe-column show-overflow show-header-overflow field="prcNum" <vxe-column show-overflow show-header-overflow field="prcNum"
title="流程编号"> title="流程编号">
<template #default="{ row,index }" > <template #default="{ row,index }" >
<div class="blurcolor" @click.native.prevent="handle(row)">{{row.prcNum}}</div> <div class="blurcolor" @click="handle(row)">{{row.prcNum}}</div>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column show-overflow show-header-overflow field="prcType" <vxe-column show-overflow show-header-overflow field="prcType"
@@ -21,7 +21,7 @@
</vxe-column> </vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称"> <vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
<template #default="{ row,index }" > <template #default="{ row,index }" >
<div class="blurcolor" @click.native.prevent="handle(row)">{{row.prcName}}</div> <div class="blurcolor" @click="handle(row)">{{row.prcName}}</div>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column show-overflow show-header-overflow field="creatUserName" <vxe-column show-overflow show-header-overflow field="creatUserName"
@@ -103,7 +103,8 @@ export default {
path: '/permission/launch', path: '/permission/launch',
query: { query: {
id: 'AEHJB8YNJ3', id: 'AEHJB8YNJ3',
taskIds:row.taskIds taskId:row.taskId,
prcNum: row.prcNum,
} }
}) })
}else{ }else{
@@ -111,7 +112,8 @@ export default {
path: '/permission/examine', path: '/permission/examine',
query: { query: {
id: 'AEHJB8YNJ3', id: 'AEHJB8YNJ3',
taskIds:row.taskIds taskId:row.taskId,
prcNum: row.prcNum,
} }
}) })
} }
@@ -40,7 +40,8 @@ export default {
} }
] ]
}, },
taskId:'' taskId:'',
pId:''
}; };
}, },
@@ -58,8 +59,9 @@ export default {
this.userList = data.records; this.userList = data.records;
}) })
}, },
open(taskId) { open(taskId,pId) {
this.taskId=taskId this.taskId=taskId
this.pId=pId
this.form.name={ this.form.name={
assignee:'' assignee:''
} }
@@ -94,7 +94,7 @@ export default {
const prcType = row.prcType const prcType = row.prcType
console.log(prcType); console.log(prcType);
this.loading = true this.loading = true
this.$api.getAlreadData({taskIds:row.taskIds}) this.$api.getAlreadData({taskId:row.taskId})
.then(res=>{ .then(res=>{
switch (prcType) { switch (prcType) {
case '1': case '1':
@@ -132,18 +132,16 @@ export default {
this.loadData() this.loadData()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
this.tableData = [{name: 1}]
}) })
}) })
}, },
loadData() { loadData() {
let userId=this.$store.getters.userInfo.usid let userId=this.$store.getters.userInfo.usid
this.$api.processCenter.sentProcessPage({...this.q,...this.form,userId:userId}).then(res=>{ this.$api.processCenter.sentProcessPage({...this.q,...this.form,userId:userId}).then(res=>{
this.tableData = res.data.list.length>0 ?res.data.list:[{name:1}] this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}).catch(err=>{ }).catch(err=>{
console.log(err)
this.tableData = [{name:1}]
}) })
}, },
// 单页数据量 // 单页数据量
@@ -168,10 +166,7 @@ export default {
} }
}) })
}, },
back(index, tableData) {
console.log('index', index);
console.log('tableData', tableData);
},
}, },
}; };
</script> </script>