【修改】修改表格数据
This commit is contained in:
@@ -5,10 +5,4 @@ export const PERMISSION = new Esenum([
|
||||
{ label: '预览', value: "1" },
|
||||
{ label: '预览+下载', value: "2" }
|
||||
])
|
||||
// 流程状态
|
||||
export const PROCESSSTATE = new Esenum(
|
||||
{
|
||||
COMPLETED: {name: '已完成', index: 1},
|
||||
INCOMPLETED: {name: '未完成', index: 0}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ export function formatDate (value, fmt) {
|
||||
}
|
||||
return fmt
|
||||
} else {
|
||||
console.log(typeof value)
|
||||
value = value.trim()
|
||||
value = value.replace('T', ' ')
|
||||
return value.substr(0, fmt.length)
|
||||
|
||||
@@ -122,7 +122,7 @@ export default {
|
||||
}
|
||||
})
|
||||
this.checkList = this.checkList.filter(item => {
|
||||
return ids.indexOf(item.id) === -1
|
||||
return ids.indexOf(item.reportId) === -1
|
||||
})
|
||||
if (name.length > 0) {
|
||||
this.$alert(`报告${name.toString()}已经存在`, '提示', {
|
||||
|
||||
@@ -153,20 +153,20 @@ export default {
|
||||
if(this.$route.query.type=='yiban'){
|
||||
this.disabled=true
|
||||
}
|
||||
this.getProcessDetail(params).then(res=>{
|
||||
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'){
|
||||
this.disabled=true
|
||||
this.submitjson=JSON.parse(this.processOld.submitJson)
|
||||
}else{
|
||||
this.getProcessDetail(params).then(res=>{
|
||||
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'){
|
||||
this.disabled=true
|
||||
this.submitjson=JSON.parse(this.processOld.submitJson)
|
||||
}else{
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
@@ -187,16 +187,21 @@ export default {
|
||||
// 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
|
||||
})
|
||||
if( treeNode[0].USID == this.$store.getters.userInfo.usid){
|
||||
this.$message.warning("您不能转办给自己")
|
||||
}else{
|
||||
this.$api.process.changeAssignee({
|
||||
taskId: this.taskId,
|
||||
assignee: treeNode[0].USID,
|
||||
userId: this.$store.getters.userInfo.usid,
|
||||
pId: this.prcId
|
||||
}).then(() => {
|
||||
this.$message.success('转办成功')
|
||||
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
|
||||
this.visibleTree = false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
handleSubmit() {
|
||||
// if (this.$refs.operationRef.submit()) {
|
||||
@@ -204,7 +209,7 @@ export default {
|
||||
let submit = JSON.parse(this.processOld.submitJson)
|
||||
let dataJson = this.processOld.dataJson
|
||||
let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm})
|
||||
this.completeProcess({
|
||||
this.completeProcess({
|
||||
dataJson,
|
||||
submitJson,
|
||||
taskId: this.taskId,
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div class="process">
|
||||
<div class="process_box">
|
||||
<process-header v-if="initShow" :title="'发起流程'"></process-header>
|
||||
<process-header v-else :title="'发起人修改'" :proceesNum="prcNum"></process-header>
|
||||
<process-header v-if="initShow" :title="'发起人修改'" :proceesNum="prcNum"></process-header>
|
||||
<process-header v-else :title="'发起流程'"></process-header>
|
||||
<div class="procedure">
|
||||
<div class="process_content">
|
||||
<span class="base_title">基础信息</span>
|
||||
<el-form ref="processFormRef" :model="processForm" label-width="150px"
|
||||
:rules="processFormRule" class="label-input-form" size="medium">
|
||||
:rules="processFormRule" class="label-input-form" size="medium">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="流程名称:" prop="prcName">
|
||||
<el-input :disabled="formControl || formControlname" v-model="processForm.prcName"
|
||||
<el-form-item label="流程名称:" prop="prcName">
|
||||
<el-input :disabled="formControl || formControlname" v-model="processForm.prcName"
|
||||
placeholder="请输入流程名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}"></report-table>
|
||||
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}" :disabled="showTableD"></report-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
|
||||
@@ -27,7 +27,8 @@
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="申请原因:" prop="applyReason">
|
||||
<el-input :disabled="formControl" type="textarea" v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input>
|
||||
<el-input :disabled="formControl" type="textarea" v-model="applicationForm.applyReason"
|
||||
placeholder="请输入申请原因"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="6">
|
||||
@@ -53,73 +54,63 @@
|
||||
<div class="process_content">
|
||||
<span class="base_title">指派信息</span>
|
||||
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
|
||||
:rules="assignFormRules" class="label-input-form" size="medium">
|
||||
:rules="assignFormRules" class="label-input-form" size="medium">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="选择一级审批人员:" prop="oneApprove">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName" @click.native="handleCheck('spr1')"
|
||||
placeholder="请选择一级审批人员"></el-input>
|
||||
<el-form-item label="选择一级审批人员:" prop="oneApprove">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName"
|
||||
@click.native="handleCheck('spr1')"
|
||||
placeholder="请选择一级审批人员"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" >
|
||||
<el-form-item label="选择二级审批人员:" prop="twoApprove">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName" @click.native="handleCheck('spr2')"
|
||||
<el-col :span="9">
|
||||
<el-form-item label="选择二级审批人员:" prop="twoApprove">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName"
|
||||
@click.native="handleCheck('spr2')"
|
||||
placeholder="请选择二级审批人员"></el-input>
|
||||
<!-- <el-input v-model="assignForm.twoApprove" placeholder="请选择二级审批人员"></el-input>-->
|
||||
<!-- <el-select v-model="assignForm.twoApprove"-->
|
||||
<!-- class="icon-auth"-->
|
||||
<!-- multiple-->
|
||||
<!-- collapse-tags-->
|
||||
<!-- @change="changeSelect"-->
|
||||
<!-- @visible-change="changeSelect"-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-checkbox class="check-all" v-model="checked" @change="selectAll">全选</el-checkbox>-->
|
||||
<!-- <template v-for="item in userList">-->
|
||||
<!-- <el-option :label="item.USNAME" :value="item.USID" :key="item.USID"></el-option>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-select>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" >
|
||||
<el-col :span="24">
|
||||
<el-form-item label="说明:">
|
||||
<el-input type="textarea" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
|
||||
<el-input type="textarea" :disabled="formControl" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<process-footer
|
||||
v-if="!formControl"
|
||||
showCancel
|
||||
:show-reset="isShowReset"
|
||||
:show-submit="isShowSubmit"
|
||||
:submitLoading="isSubmit"
|
||||
:resetLoading="resetLoading"
|
||||
@reset="handleReset"
|
||||
@submit="handleSubmit"
|
||||
></process-footer>
|
||||
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
|
||||
<process-footer
|
||||
v-if="!formControl"
|
||||
showCancel
|
||||
:show-reset="isShowReset"
|
||||
:show-submit="isShowSubmit"
|
||||
:submitLoading="isSubmit"
|
||||
:resetLoading="resetLoading"
|
||||
@reset="handleReset"
|
||||
@submit="handleSubmit"
|
||||
></process-footer>
|
||||
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
|
||||
value: orgTableVal,
|
||||
valueName: orgTableValName
|
||||
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import processHeader from '@/components/ProcessHeader'
|
||||
import processFooter from '@/components/ProcessFooter'
|
||||
import processApprovalHistory from '@/components/ProcessApprovalHistory'
|
||||
import reportTable from './components/reportTable'
|
||||
import { PERMISSION } from '@/utils/Enum/enum'
|
||||
import {PERMISSION} from '@/utils/Enum/enum'
|
||||
import orgTable from '../../components/OrgTable'
|
||||
import processMixin from "../../components/ProcessMixin";
|
||||
|
||||
export default {
|
||||
name: 'launch',
|
||||
components: {
|
||||
@@ -130,8 +121,9 @@ export default {
|
||||
orgTable
|
||||
},
|
||||
mixins: [processMixin],
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
showTableD: false,
|
||||
initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
|
||||
treeType: '',
|
||||
orgTableVal: '',
|
||||
@@ -146,13 +138,14 @@ export default {
|
||||
assignForm: {
|
||||
oneApprove: '',
|
||||
twoApprove: '',
|
||||
twoApproveName:'',
|
||||
oneApproveName:''
|
||||
twoApproveName: '',
|
||||
oneApproveName: '',
|
||||
remark:''
|
||||
},
|
||||
tableData: [],
|
||||
applicationForm: {
|
||||
applyReason:'',
|
||||
power:''
|
||||
applyReason: '',
|
||||
power: ''
|
||||
},
|
||||
q: {
|
||||
pageSize: 10000,
|
||||
@@ -160,14 +153,14 @@ export default {
|
||||
},
|
||||
PERMISSION,
|
||||
processForm: {
|
||||
prcName:''
|
||||
prcName: ''
|
||||
},
|
||||
processFormRule: {
|
||||
prcName: [{
|
||||
required: true,
|
||||
message: '请输入流程名称',
|
||||
trigger: 'change'
|
||||
},{
|
||||
}, {
|
||||
max: 100,
|
||||
message: '申请原因最多填写100字符',
|
||||
trigger: 'change'
|
||||
@@ -197,68 +190,77 @@ export default {
|
||||
max: 1000, message: '说明最多填写1000字符'
|
||||
}]
|
||||
},
|
||||
prcType:1
|
||||
prcType: 1,
|
||||
prcName:''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
created() {
|
||||
// 第一次进入此页面 需要清楚校验
|
||||
if (this.$route.query.ids) {
|
||||
if(this.$route.query.ids.split(',').length>0){
|
||||
if (this.$route.query.ids.split(',').length > 0) {
|
||||
this.reportList(this.$route.query.ids)
|
||||
}
|
||||
this.handleReset()
|
||||
}
|
||||
if(this.$route.query.taskDefinitionKey == 'aid4'){
|
||||
this.taskId=this.$route.query.taskId
|
||||
if (this.$route.query.taskDefinitionKey == 'aid4') {
|
||||
this.taskId = this.$route.query.taskId
|
||||
this.prcNum = this.$route.query.prcNum
|
||||
this.prcId = this.$route.query.prcId
|
||||
this.prcName = this.$route.query.prcName
|
||||
this.initShow = true
|
||||
this.formControlname=true
|
||||
this.getProcessDetail().then(res =>{
|
||||
this.formControlname = true
|
||||
|
||||
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)
|
||||
this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
|
||||
this.applicationForm.power = this.tableData[0].power
|
||||
this.applicationForm.applyReason = this.tableData[0].applyReason
|
||||
this.processForm.prcName = this.prcName
|
||||
debugger
|
||||
//指派信息
|
||||
this.assignForm=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))
|
||||
})
|
||||
}
|
||||
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
|
||||
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.type == 'yiban') {
|
||||
this.taskId = this.$route.query.taskId
|
||||
this.prcNum = this.$route.query.prcNum
|
||||
this.prcId = this.$route.query.prcId
|
||||
this.prcName = this.$route.query.prcName
|
||||
this.formControl = true
|
||||
this.initShow = true
|
||||
this.showTableD = true
|
||||
this.getProcessDetail().then(() => {
|
||||
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
|
||||
//指派信息
|
||||
// ({ name: a.name, age: a.age } = b)
|
||||
this.assignForm = JSON.parse(this.processOld.submitJson)
|
||||
|
||||
})
|
||||
}
|
||||
console.log(this.PERMISSION, 'ddd')
|
||||
},
|
||||
methods: {
|
||||
handleCheck (name) {
|
||||
if(this.initShow){
|
||||
handleCheck(name) {
|
||||
if (this.initShow) {
|
||||
return false
|
||||
}
|
||||
this.treeType = name
|
||||
this.orgTableVal = ''
|
||||
this.orgTableValName = ''
|
||||
if (name === 'spr1') {
|
||||
this.orgTableVal = this.assignForm.oneApprove ?this.assignForm.oneApprove:''
|
||||
this.orgTableValName = this.assignForm.oneApproveName ?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.assignForm.twoApprove:''
|
||||
this.orgTableValName = this.assignForm.twoApproveName?this.assignForm.twoApproveName:''
|
||||
this.orgTableVal = this.assignForm.twoApprove ? this.assignForm.twoApprove : ''
|
||||
this.orgTableValName = this.assignForm.twoApproveName ? this.assignForm.twoApproveName : ''
|
||||
}
|
||||
this.visibleOrgTable = true
|
||||
},
|
||||
// 树点击
|
||||
isTreeOk (checkedList) {
|
||||
isTreeOk(checkedList) {
|
||||
// console.log(checkedList)
|
||||
const parts = []
|
||||
const partsName = []
|
||||
@@ -278,26 +280,34 @@ export default {
|
||||
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
|
||||
},
|
||||
// 获取表格列表 吧查询到的值传给子组件
|
||||
reportList (ids) {
|
||||
this.$api.report.reportList({ ids: ids.split(',') }).then(({ data }) => {
|
||||
this.tableData = data.records.map(item=>{
|
||||
item.reportId=item['id']
|
||||
reportList(ids) {
|
||||
this.$api.permissionProcess.getReportLisy({
|
||||
pageSize:1000,
|
||||
pageNo:1,
|
||||
ids: ids.split(',')
|
||||
}).then(({data}) => {
|
||||
this.tableData = data.records.map(item => {
|
||||
item.reportId = item['id']
|
||||
delete item['id']
|
||||
return item
|
||||
})
|
||||
})
|
||||
},
|
||||
handleReset () {
|
||||
this.applicationForm = {
|
||||
applyReason:'',
|
||||
power:''
|
||||
handleReset() {
|
||||
this.processForm.prcName = ''
|
||||
if(this.$route.query.taskDefinitionKey == 'aid4'){
|
||||
this.processForm.prcName = this.prcName
|
||||
}
|
||||
this.processForm.prcName=''
|
||||
this.applicationForm = {
|
||||
applyReason: '',
|
||||
power: ''
|
||||
}
|
||||
|
||||
this.assignForm = {
|
||||
oneApprove: '',
|
||||
twoApprove: ''
|
||||
}
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applicationFormRef.clearValidate()
|
||||
this.$refs.assignFormRef.clearValidate()
|
||||
})
|
||||
@@ -306,17 +316,17 @@ export default {
|
||||
// 整理数据
|
||||
organizeData() {
|
||||
let userId = this.$store.getters.userInfo.usid
|
||||
this.tableData=this.tableData.map(item=>{
|
||||
item = {...item, ... this.applicationForm,userId:userId}
|
||||
this.tableData = this.tableData.map(item => {
|
||||
item = {...item, ...this.applicationForm, userId: userId}
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
handleSubmit () {
|
||||
console.log( this.$store.getters.userInfo.usid," this.$store.getters.userInfo.USID")
|
||||
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 =>{
|
||||
this.$refs.processFormRef.validate(z => {
|
||||
if (v && m && z) {
|
||||
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
|
||||
// 表格数据没有不能提交 需要提示
|
||||
@@ -328,12 +338,18 @@ export default {
|
||||
// 处理表格数据
|
||||
this.organizeData()
|
||||
//如果不是第一次
|
||||
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:this.$store.getters.userInfo.usid,prcType:this.prcType})
|
||||
}else{
|
||||
this.startProcess()
|
||||
if (this.initShow) {
|
||||
let dataJson = JSON.stringify(this.tableData)
|
||||
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
|
||||
this.completeProcess({
|
||||
dataJson,
|
||||
submitJson,
|
||||
taskId: this.taskId,
|
||||
userId: this.$store.getters.userInfo.usid,
|
||||
prcType: this.prcType
|
||||
})
|
||||
} else {
|
||||
this.startProcess()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -344,23 +360,28 @@ export default {
|
||||
})
|
||||
},
|
||||
//修改参数
|
||||
changeParam(){
|
||||
changeParam() {
|
||||
|
||||
},
|
||||
startProcess() {
|
||||
//把表单都整合到form中
|
||||
// dataJson与submitJson需要发到completeProcess
|
||||
let form = {}
|
||||
form={approveData:{...this.applicationForm,...this.processForm,...this.assignForm,userId:this.$store.getters.userInfo.usid},dataMsg:this.tableData}
|
||||
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
|
||||
form.prcType = this.prcType
|
||||
form.prcName = this.processForm.prcName
|
||||
form.userId = this.$store.getters.userInfo.usid
|
||||
//...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,prcType: this.prcType})
|
||||
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, prcType: this.prcType})
|
||||
})
|
||||
},
|
||||
//获取流程详细信息
|
||||
|
||||
@@ -30,9 +30,14 @@
|
||||
<vxe-column show-overflow show-header-overflow field="taskBackAssignee"
|
||||
title="上一处理人"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="overTime"
|
||||
<vxe-column show-overflow show-header-overflow field="endTime"
|
||||
title="完成时间"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status" title="状态"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status" title="状态">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.isEnd === '0'">未完成</span>
|
||||
<span v-if="row.isEnd === '1'">已完成</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button @click.native.prevent="view(row)" type="text" size="small">
|
||||
@@ -113,7 +118,7 @@ export default {
|
||||
taskDefinitionKey: row.taskDefinitionKey,
|
||||
prcNum: row.prcNum,
|
||||
prcId: row.prcId,
|
||||
prcName: row.prcName
|
||||
prcName: row.prcName,
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
@@ -106,7 +106,8 @@ export default {
|
||||
taskId:row.taskId,
|
||||
prcNum: row.prcNum,
|
||||
prcId: row.prcId,
|
||||
prcName: row.prcName
|
||||
prcName: row.prcName,
|
||||
taskDefinitionKey: row.taskDefinitionKey
|
||||
}
|
||||
})
|
||||
}else{
|
||||
@@ -117,7 +118,8 @@ export default {
|
||||
taskId:row.taskId,
|
||||
prcNum: row.prcNum,
|
||||
prcId: row.prcId,
|
||||
prcName: row.prcName
|
||||
prcName: row.prcName,
|
||||
taskDefinitionKey: row.taskDefinitionKey
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -30,9 +30,14 @@
|
||||
<vxe-column show-overflow show-header-overflow field="taskBackAssignee"
|
||||
title="上一处理人"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="overTime"
|
||||
<vxe-column show-overflow show-header-overflow field="endTime"
|
||||
title="完成时间"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status" title="状态"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status" title="状态">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.isEnd === '0'">未完成</span>
|
||||
<span v-if="row.isEnd === '1'">已完成</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button @click.native.prevent="view(row)" type="text" size="small">
|
||||
@@ -107,6 +112,7 @@ export default {
|
||||
id: this.$route.query.id,
|
||||
prcNum: row.prcNum,
|
||||
prcType: row.prcType,
|
||||
prcId: row.prcId,
|
||||
tabsName: 'MonitorProcess'
|
||||
}
|
||||
})
|
||||
|
||||
@@ -64,7 +64,12 @@
|
||||
<vxe-column show-overflow show-header-overflow field="approvalOpinion"
|
||||
title="审批意见"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status"
|
||||
title="状态"></vxe-column>
|
||||
title="状态">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.endTime">已完成</span>
|
||||
<span v-else>未完成</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<monitorModal ref="monitorModal" :prcId="prcId"></monitorModal>
|
||||
@@ -72,18 +77,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {PROCESSSTATE} from '@/utils/Enum/enum'
|
||||
import monitorModal from './monitorModal.vue'
|
||||
import ProcessMixin from "@/components/ProcessMixin";
|
||||
import { formatDate } from '@/utils/date'
|
||||
export default {
|
||||
name: 'processDetail',
|
||||
mixins: [ProcessMixin],
|
||||
|
||||
data () {
|
||||
return {
|
||||
formatDate,
|
||||
PROCESSSTATE,
|
||||
assigneeNewLoading: false, // 调整处理人确定loading
|
||||
loginPeople: '',
|
||||
// 调整处理人抽屉状态
|
||||
@@ -113,7 +115,8 @@ export default {
|
||||
checkIds: [],
|
||||
checkList: [],
|
||||
tabsName:'',
|
||||
prcNum:''
|
||||
prcNum:'',
|
||||
prcId:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -214,19 +217,23 @@ export default {
|
||||
},
|
||||
showDialog() {
|
||||
if(this.checkList.length < 1){
|
||||
this.$message.warning("至少选择一条数据")
|
||||
this.$message.warning("请选择一条数据")
|
||||
return
|
||||
}else{
|
||||
if(this.checkList.length > 2){
|
||||
this.$message.warning("请选择一条数据")
|
||||
return
|
||||
}
|
||||
let check=[]
|
||||
check = this.checkList.filter(item=>{
|
||||
if(+item.state == this.PROCESSSTATE['COMPLETED'].index){
|
||||
if(item.endTime ){
|
||||
return item
|
||||
}
|
||||
})
|
||||
if(check.length > 0){
|
||||
this.$message.warning("请选择状态为未完成的数据")
|
||||
}else{
|
||||
this.$refs.monitorModal.open(this.checkIds,this.checkList[0].id)
|
||||
this.$refs.monitorModal.open(this.checkIds,this.checkList[0].taskId,this.checkList[0].assigneeId)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -276,6 +283,7 @@ export default {
|
||||
this.tabsName=this.$route.query.tabsName
|
||||
this.prcType=this.$route.query.prcType
|
||||
this.prcNum=this.$route.query.prcNum
|
||||
this.prcId=this.$route.query.prcId
|
||||
this.processNum()
|
||||
this.processTable()
|
||||
}
|
||||
|
||||
@@ -1,99 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="调整处理人" :visible.sync="dialogVisible" width="500px">
|
||||
<div class="label-input-form addModel">
|
||||
<el-form ref="form" :model="form" label-width="120px" :rules="rules" class="formData">
|
||||
<el-form-item label="选择人员" prop="assignee" class="el-form-item">
|
||||
<el-select v-model="form.assignee" class="icon-auth" collapse-tags
|
||||
placeholder="请选择">
|
||||
<template v-for="item in userList">
|
||||
<el-option :label="item.USNAME" :value="item.USID" :key="item.USID"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div>
|
||||
<el-dialog title="调整处理人" :visible.sync="dialogVisible" width="500px">
|
||||
<div class="label-input-form addModel">
|
||||
<el-form ref="form" :model="form" label-width="120px" :rules="rules" class="formData">
|
||||
<el-form-item label="选择人员" prop="assignee" class="el-form-item">
|
||||
<el-select v-model="form.assignee" class="icon-auth" collapse-tags
|
||||
placeholder="请选择">
|
||||
<template v-for="item in userList">
|
||||
<el-option :label="item.USNAME" :value="item.USID" :key="item.USID"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false" class="btn">取 消</el-button>
|
||||
<el-button type="primary" @click="submit" class="btn">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'modal',
|
||||
data() {
|
||||
return {
|
||||
userList: [],
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
assignee:''
|
||||
},
|
||||
rules: {
|
||||
assignee: [
|
||||
{
|
||||
required: 'true',
|
||||
trigger: 'change',
|
||||
message: '请选择调整处理人'
|
||||
}
|
||||
]
|
||||
},
|
||||
taskId:'',
|
||||
pId:''
|
||||
};
|
||||
},
|
||||
name: 'modal',
|
||||
data() {
|
||||
return {
|
||||
userList: [],
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
assignee: ''
|
||||
},
|
||||
rules: {
|
||||
assignee: [
|
||||
{
|
||||
required: 'true',
|
||||
trigger: 'change',
|
||||
message: '请选择调整处理人'
|
||||
}
|
||||
]
|
||||
},
|
||||
taskId: '',
|
||||
pId: ''
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.sysUserList()
|
||||
mounted() {
|
||||
this.sysUserList()
|
||||
},
|
||||
methods: {
|
||||
changeSelect(val) {
|
||||
this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length;
|
||||
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
|
||||
},
|
||||
methods: {
|
||||
changeSelect(val) {
|
||||
this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length;
|
||||
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
|
||||
},
|
||||
// 获取所有用户
|
||||
sysUserList() {
|
||||
this.$api.user.sysUserList({ pageNo: 1, pageSize: 999999 }).then(({ data }) => {
|
||||
this.userList = data.records;
|
||||
})
|
||||
},
|
||||
open(taskId,pId) {
|
||||
this.taskId=taskId
|
||||
this.pId=pId
|
||||
this.form.name={
|
||||
assignee:''
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let userId=this.form.assignee
|
||||
let assignee=this.$store.getters.userInfo.usid
|
||||
this.$api.process.changeAssignee({
|
||||
taskId:this.taskId.join(','),
|
||||
assignee:assignee,
|
||||
userId: userId,
|
||||
pId:this.pId
|
||||
})
|
||||
.then(res=>{
|
||||
//转办完应该跳到哪个页面?
|
||||
//转办完这个人还能看到这个监控流程吗
|
||||
this.dialogVisible = false
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
// 获取所有用户
|
||||
sysUserList() {
|
||||
this.$api.user.sysUserList({pageNo: 1, pageSize: 999999}).then(({data}) => {
|
||||
this.userList = data.records;
|
||||
})
|
||||
},
|
||||
open(taskId, pId,assigneeId) {
|
||||
this.taskId = taskId
|
||||
this.pId = pId
|
||||
this.form.name = {
|
||||
assignee: ''
|
||||
}
|
||||
this.assigneeId=assigneeId
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let userId = this.form.assignee
|
||||
let assignee = this.assigneeId
|
||||
if (userId == assignee) {
|
||||
this.$message.warning("当前任务受理人就是您选择的")
|
||||
} else {
|
||||
this.$api.process.changeAssignee({
|
||||
taskId: this.taskId.join(','),
|
||||
assignee: assignee,
|
||||
userId: userId,
|
||||
pId: this.pId
|
||||
})
|
||||
.then(res => {
|
||||
//转办完应该跳到哪个页面?
|
||||
//转办完这个人还能看到这个监控流程吗
|
||||
this.dialogVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dialog-footer{
|
||||
margin: 20px 20px ;
|
||||
.dialog-footer {
|
||||
margin: 20px 20px;
|
||||
|
||||
.el-button {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
@@ -101,14 +106,17 @@ export default {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__footer{
|
||||
|
||||
::v-deep .el-dialog__footer {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.addModel{
|
||||
|
||||
.addModel {
|
||||
padding: 20px;
|
||||
}
|
||||
.el-form-item{
|
||||
::v-deep .el-select{
|
||||
|
||||
.el-form-item {
|
||||
::v-deep .el-select {
|
||||
width: 300px;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,14 @@
|
||||
<vxe-column show-overflow show-header-overflow field="taskBackAssignee"
|
||||
title="上一处理人"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="overTime"
|
||||
<vxe-column show-overflow show-header-overflow field="endTime"
|
||||
title="完成时间"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status" title="状态"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="status" title="状态">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.isEnd === '0'">未完成</span>
|
||||
<span v-if="row.isEnd === '1'">已完成</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||
<template #default="{ row,index }">
|
||||
<el-button type="text" size="small" @click="view(row)">
|
||||
|
||||
@@ -65,6 +65,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-tabs__header {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin: 0 14px 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user