【新增】流程增加草稿
This commit is contained in:
@@ -99,6 +99,14 @@ export default {
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 通用草稿流程详细信息查询
|
||||||
|
getDraftDetail( data ){
|
||||||
|
return request({
|
||||||
|
url: '/api/queryDetailByDataId',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
},
|
||||||
// 停用流程发起
|
// 停用流程发起
|
||||||
startProcess(data) {
|
startProcess(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -107,6 +115,14 @@ export default {
|
|||||||
data: data
|
data: data
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 保存到草稿
|
||||||
|
saveProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/saveTaskFirst',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,15 @@ export default {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//caogao
|
||||||
|
|
||||||
|
draftProcessPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/queryTaskDraft',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 获取监控流程详情
|
// 获取监控流程详情
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ labelUpdate(data){
|
|||||||
// 报告管理列表
|
// 报告管理列表
|
||||||
reportListManager (data) {
|
reportListManager (data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/report/list-auth',
|
url: '/api/report/reportManagerPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -119,6 +119,34 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//保存到草稿
|
||||||
|
saveProcess(param){
|
||||||
|
return new Promise((resolve,reject)=> {
|
||||||
|
this.$api.process.saveProcess(param).then(res => {
|
||||||
|
resolve()
|
||||||
|
}).catch(()=>{
|
||||||
|
reject()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取草稿详细信息
|
||||||
|
getDraftDetail(){
|
||||||
|
let dataId=this.$store.getters.handleProcess.dataId
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
this.$api.process.getDraftDetail({
|
||||||
|
dataId: dataId,
|
||||||
|
prcType: this.prcType,
|
||||||
|
prcId: this.prcId
|
||||||
|
}).then(res=>{
|
||||||
|
let data=res.data
|
||||||
|
this.processOld=data
|
||||||
|
console.log( this.processOld,"processOld")
|
||||||
|
resolve()
|
||||||
|
}).catch(err=>{
|
||||||
|
reject()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ export default {
|
|||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
},
|
},
|
||||||
show () {
|
show () {
|
||||||
|
this.checkList=[]
|
||||||
|
this.checkIds=[]
|
||||||
// 调取接口获取数据
|
// 调取接口获取数据
|
||||||
this.reset()
|
this.reset()
|
||||||
this.ids = this.alreadyData.map(item => item.id)
|
this.ids = this.alreadyData.map(item => item.id)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="process">
|
<div class="process">
|
||||||
<div class="process_box">
|
<div class="process_box">
|
||||||
<process-header v-if="$route.query.isBegin" :title="'发起流程'"></process-header>
|
<process-header v-if="$route.query.isBegin || $route.query.isDraft" :title="'发起流程'"></process-header>
|
||||||
<process-header v-else-if="$route.query.type == 'yiban'" :title="'已办流程'" :proceesNum="prcNum"></process-header>
|
<process-header v-else-if="$route.query.type == 'yiban'" :title="'已办流程'" :proceesNum="prcNum"></process-header>
|
||||||
<process-header v-else :title="'发起人修改'" :proceesNum="prcNum"></process-header>
|
<process-header v-else :title="'发起人修改'" :proceesNum="prcNum"></process-header>
|
||||||
<div class="procedure">
|
<div class="procedure">
|
||||||
@@ -87,11 +87,11 @@
|
|||||||
<process-footer
|
<process-footer
|
||||||
v-if="!formControl"
|
v-if="!formControl"
|
||||||
showCancel
|
showCancel
|
||||||
:show-reset="isShowReset"
|
:show-save="isShowSave"
|
||||||
:show-submit="isShowSubmit"
|
:show-submit="isShowSubmit"
|
||||||
:submitLoading="isSubmit"
|
:submitLoading="isSubmit"
|
||||||
:resetLoading="resetLoading"
|
:resetLoading="saveLoading"
|
||||||
@reset="handleReset"
|
@save="handleSave"
|
||||||
@submit="handleSubmit"
|
@submit="handleSubmit"
|
||||||
></process-footer>
|
></process-footer>
|
||||||
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
|
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
|
||||||
@@ -130,8 +130,8 @@ export default {
|
|||||||
orgTableValName: '',
|
orgTableValName: '',
|
||||||
visibleOrgTable: false,
|
visibleOrgTable: false,
|
||||||
isSubmit: false,
|
isSubmit: false,
|
||||||
resetLoading: false,
|
saveLoading: false,
|
||||||
isShowReset: true,
|
isShowSave: false,
|
||||||
isShowSubmit: true,
|
isShowSubmit: true,
|
||||||
formControl: false,
|
formControl: false,
|
||||||
formControlname: false,
|
formControlname: false,
|
||||||
@@ -200,21 +200,38 @@ export default {
|
|||||||
// if (this.$route.query.ids.split(',').length > 0) {
|
// if (this.$route.query.ids.split(',').length > 0) {
|
||||||
// this.reportList(this.$route.query.ids)
|
// this.reportList(this.$route.query.ids)
|
||||||
// }
|
// }
|
||||||
|
this.isShowSave = true
|
||||||
|
this.$store.commit('setHandleProcess','')
|
||||||
this.handleReset()
|
this.handleReset()
|
||||||
}
|
}
|
||||||
// 如果是从草稿进入的
|
// 如果是从草稿进入的
|
||||||
if (this.$route.query.isDraft) {
|
if (this.$route.query.isDraft) {
|
||||||
|
this.isShowSave = true
|
||||||
|
this.taskId = this.$store.getters.handleProcess?.taskId
|
||||||
|
this.prcNum = this.$store.getters.handleProcess?.prcNum
|
||||||
|
this.prcId = this.$store.getters.handleProcess?.prcId
|
||||||
|
this.prcName = this.$store.getters.handleProcess?.prcName
|
||||||
this.getDraftDetail().then(res => {
|
this.getDraftDetail().then(res => {
|
||||||
|
let tableData = JSON.parse(this.processOld.dataJson)
|
||||||
|
this.processForm.prcName = this.prcName
|
||||||
|
this.applicationForm.power = tableData[0].power
|
||||||
|
this.applicationForm.applyReason = tableData[0].applyReason
|
||||||
|
if(tableData[0].reportId){
|
||||||
|
this.tableData=tableData
|
||||||
|
}
|
||||||
|
debugger
|
||||||
|
if(this.processOld.submitJson !== '{}'){
|
||||||
|
this.assignForm =JSON.parse(this.processOld.submitJson)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.$store.getters.handleProcess.taskDefinitionKey == 'aid4' ) {
|
if (this.$route.query.taskDefinitionKey == 'aid4' ) {
|
||||||
this.taskId = this.$store.getters.handleProcess.taskId
|
this.taskId = this.$store.getters.handleProcess.taskId
|
||||||
this.prcNum = this.$store.getters.handleProcess.prcNum
|
this.prcNum = this.$store.getters.handleProcess.prcNum
|
||||||
this.prcId = this.$store.getters.handleProcess.prcId
|
this.prcId = this.$store.getters.handleProcess.prcId
|
||||||
this.prcName = this.$store.getters.handleProcess.prcName
|
this.prcName = this.$store.getters.handleProcess.prcName
|
||||||
this.initShow = true
|
this.initShow = true
|
||||||
// this.formControlname = true
|
this.formControlname = true
|
||||||
|
|
||||||
this.getProcessDetail().then(res => {
|
this.getProcessDetail().then(res => {
|
||||||
//基础信息
|
//基础信息
|
||||||
@@ -222,7 +239,6 @@ export default {
|
|||||||
this.applicationForm.power = this.tableData[0].power
|
this.applicationForm.power = this.tableData[0].power
|
||||||
this.applicationForm.applyReason = this.tableData[0].applyReason
|
this.applicationForm.applyReason = this.tableData[0].applyReason
|
||||||
this.processForm.prcName = this.prcName
|
this.processForm.prcName = this.prcName
|
||||||
debugger
|
|
||||||
//指派信息
|
//指派信息
|
||||||
({oneApprove:this.assignForm.oneApprove,oneApproveName:this.assignForm.oneApproveName,twoApprove:this.assignForm.twoApprove,twoApproveName:this.assignForm.twoApproveName,remark:this.assignForm.remark}= JSON.parse(this.processOld.submitJson))
|
({oneApprove:this.assignForm.oneApprove,oneApproveName:this.assignForm.oneApproveName,twoApprove:this.assignForm.twoApprove,twoApproveName:this.assignForm.twoApproveName,remark:this.assignForm.remark}= JSON.parse(this.processOld.submitJson))
|
||||||
})
|
})
|
||||||
@@ -327,6 +343,41 @@ export default {
|
|||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 保存
|
||||||
|
handleSave(){
|
||||||
|
this.saveLoading = true
|
||||||
|
if(this.tableData.length > 0){
|
||||||
|
// 处理表格数据
|
||||||
|
this.organizeData()
|
||||||
|
}else{
|
||||||
|
this.tableData=[{...this.applicationForm}]
|
||||||
|
}
|
||||||
|
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
|
||||||
|
let dataJson = JSON.stringify(this.tableData)
|
||||||
|
let params = {
|
||||||
|
prcName: this.processForm.prcName,
|
||||||
|
userId: this.$store.getters.userInfo.usid,
|
||||||
|
prcType: this.prcType,
|
||||||
|
createUserName: this.$store.getters.userInfo.usname,
|
||||||
|
createUser: this.$store.getters.userInfo.usid,
|
||||||
|
submitJson,
|
||||||
|
dataJson
|
||||||
|
}
|
||||||
|
this.saveProcess(params).then(
|
||||||
|
()=>{
|
||||||
|
this.saveLoading = false
|
||||||
|
this.$message['success']('保存成功')
|
||||||
|
this.$router.push({
|
||||||
|
path: "/userCenter/processCenter",
|
||||||
|
query: {
|
||||||
|
id: 'AEHJB8YNJ3'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
).catch(()=>{
|
||||||
|
this.saveLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
// 提交
|
// 提交
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
<el-tab-pane label="监控流程" name="fourth">
|
<el-tab-pane label="监控流程" name="fourth">
|
||||||
<monitorProcesses v-if="activeName=='fourth'" :form="form"></monitorProcesses>
|
<monitorProcesses v-if="activeName=='fourth'" :form="form"></monitorProcesses>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="草稿箱" name="five">
|
||||||
|
<task-draft v-if="activeName=='five'" :form="form"></task-draft>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -22,13 +25,15 @@ import gencyProcess from './gencyProcess.vue'
|
|||||||
import finishProcess from './finishProcess.vue'
|
import finishProcess from './finishProcess.vue'
|
||||||
import monitorProcesses from './monitorProcesses.vue'
|
import monitorProcesses from './monitorProcesses.vue'
|
||||||
import sentProcess from './sentProcess.vue'
|
import sentProcess from './sentProcess.vue'
|
||||||
|
import taskDraft from './taskDraft'
|
||||||
export default {
|
export default {
|
||||||
name: 'tabs',
|
name: 'tabs',
|
||||||
components:{
|
components:{
|
||||||
gencyProcess,
|
gencyProcess,
|
||||||
finishProcess,
|
finishProcess,
|
||||||
monitorProcesses,
|
monitorProcesses,
|
||||||
sentProcess
|
sentProcess,
|
||||||
|
taskDraft
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="table">
|
||||||
|
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 380px)'">
|
||||||
|
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
|
||||||
|
<template #default="{ row, rowIndex }">
|
||||||
|
{{ rowIndex + (q.current - 1) * q.size + 1 }}
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow field="prcNum"
|
||||||
|
title="流程编号">
|
||||||
|
<template #default="{ row,index }" >
|
||||||
|
<div class="blurcolor" @click="handle(row)">{{row.prcNum}}</div>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow field="prcType"
|
||||||
|
title="流程类型">
|
||||||
|
<template #default="{ row,index }">
|
||||||
|
<div>{{getPrcName(row.prcType)}}</div>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
|
||||||
|
<template #default="{ row,index }" >
|
||||||
|
<div class="blurcolor" @click="handle(row)">{{row.prcName}}</div>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow field="creatUserName"
|
||||||
|
title="发起人"></vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
|
||||||
|
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button @click.native.prevent="handle(row)" type="text" size="small">
|
||||||
|
办理
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="q.current"
|
||||||
|
:page-sizes="[5, 10, 20]" :page-size="q.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ProcessMixin from "../../../components/ProcessMixin";
|
||||||
|
export default {
|
||||||
|
name: "gencyProcess",
|
||||||
|
mixins:[ProcessMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
q:{
|
||||||
|
current:1,
|
||||||
|
size:10
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
tableData: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
form:{
|
||||||
|
type:Object,
|
||||||
|
default:{},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
form:{
|
||||||
|
handler(){
|
||||||
|
console.log("我见他",this.form)
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
deep:true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadData() {
|
||||||
|
let userId=this.$store.getters.userInfo.usid
|
||||||
|
this.$api.processCenter.draftProcessPage({...this.q,...this.form,userId:userId}).then(res=>{
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.total = res.data.count
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 单页数据量
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.q.size = val;
|
||||||
|
this.q.current = 1;
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
// 第几页
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.q.current = val;
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
handle(row) {
|
||||||
|
let params = row
|
||||||
|
this.$store.commit('setHandleProcess',params)
|
||||||
|
switch (row.prcType) {
|
||||||
|
case '1' :
|
||||||
|
this.$router.push({
|
||||||
|
path: '/permission/launch',
|
||||||
|
query: {
|
||||||
|
id: this.$route.query.id,
|
||||||
|
isDraft: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-table__fixed, ::v-deep .el-table__fixed-right ::before{
|
||||||
|
height: 0px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
margin: 0 14px 0 13px;
|
||||||
|
::v-deep .el-pagination {
|
||||||
|
margin-top: 13px;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user