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

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