Merge branch 'sy-dev'

This commit is contained in:
BianLzhaoMin 2025-02-08 17:56:37 +08:00
commit 7e7c68e78d
3 changed files with 439 additions and 273 deletions

View File

@ -1,45 +1,91 @@
<template>
<div class="container">
<div :class="{'content1': this.auditType === '审批信息' , 'content2': this.auditType !== '审批信息' }">
<img src="@/assets/file/no_data.png" alt="暂无数据" v-if="!items" style="position: absolute;top: 30%;left: 43%">
<div style="height: 90%" v-else>
<el-timeline :reverse="reverse" >
<el-timeline-item v-for="(item,index) in items"
:key="index" :timestamp="item.time" placement="top" :color="item.name === userName ? color : color1">
<el-card style="border-radius: 15px">
<span>审批部门{{ item.section }}</span> <span style="margin-left: 50px;">审批人{{ item.name }}</span>
<p>审批时间 {{ item.time }}</p>
<p>审批状态 {{ item.status }}</p>
<p v-if="item.name.indexOf(userName) !=-1 && showType == 2 ">审批意见: <el-input v-model="reason" maxlength="200" show-word-limit placeholder="请输入审批意见" @change="changReason" style="width: 60%"></el-input></p>
<p v-else>审批意见 {{ item.reason.replaceAll(/@@/g, ' ') }}</p>
<p v-if="item.turnDownReason !== '' && showPosition === 2">驳回原因 {{ item.turnDownReason }}</p>
<p v-else-if="item.turnDownReason !== '' && item.name !== userName ">驳回原因 {{ item.turnDownReason }}</p>
</el-card>
</el-timeline-item>
</el-timeline>
<div slot="footer" class="dialog-footer" v-show="btnShow" style="position: absolute;top: 94%;left: 80%;z-index: 999 !important;width: 250px;">
<el-button type="warning" @click="finalInstanceBtn" v-if="finalCheck != '0'">终审</el-button>
<el-button type="primary" @click="passBtn">通过</el-button>
<el-button type="primary" plain @click="turnDownBtn">驳回</el-button>
</div>
</div>
<el-dialog title="驳回原因" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
<el-form :model="form" ref="form" :rules="rules" label-width="80px">
<el-form-item label="请输入驳回原因" label-width="120px" prop="turnDownReason">
<el-input type="textarea" v-model="form.turnDownReason" :rows="6" maxlength="200" show-word-limit placeholder="请输入驳回原因"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('form')" v-preventReClick="5000"> </el-button>
</span>
</el-dialog>
</div>
<div style="width: 38%;position: absolute;left: 65%;top: 0;height: 70vh;overflow: auto" v-if="this.auditType === '审批信息' && auditPersonArr.length > 0">
<el-aside width="100%" style="background: transparent;margin-top: 2%;">
<div style="display: flex;flex-direction: column;align-items: center">
<div style="border-radius: 10px;padding: 15px;border: 1.5px solid black;width: 50%;text-align: center;font-weight: bold">
<div :class="{ content1: this.auditType === '审批信息', content2: this.auditType !== '审批信息' }">
<img
src="@/assets/file/no_data.png"
alt="暂无数据"
v-if="!items"
style="position: absolute; top: 30%; left: 43%"
/>
<div style="height: 90%" v-else>
<el-timeline :reverse="reverse">
<el-timeline-item
v-for="(item, index) in items"
:key="index"
:timestamp="item.time"
placement="top"
:color="item.name === userName ? color : color1"
>
<el-card style="border-radius: 15px">
<span>审批部门{{ item.section }}</span>
<span style="margin-left: 50px">审批人{{ item.name }}</span>
<p>审批时间 {{ item.time }}</p>
<p>审批状态 {{ item.status }}</p>
<p v-if="item.name.indexOf(userName) != -1 && showType == 2">
审批意见
<el-input
v-model="reason"
maxlength="200"
show-word-limit
placeholder="请输入审批意见"
@change="changReason"
style="width: 60%"
></el-input>
</p>
<p v-else>审批意见 {{ item.reason.replaceAll(/@@/g, ' ') }}</p>
<p v-if="item.turnDownReason !== '' && showPosition === 2">驳回原因 {{ item.turnDownReason }}</p>
<p v-else-if="item.turnDownReason !== '' && item.name !== userName">
驳回原因 {{ item.turnDownReason }}
</p>
</el-card>
</el-timeline-item>
</el-timeline>
<div
slot="footer"
class="dialog-footer"
v-show="btnShow"
style="position: absolute; top: 94%; left: 80%; z-index: 999 !important; width: 250px"
>
<el-button type="warning" @click="finalInstanceBtn" v-if="finalCheck != '0'">终审</el-button>
<el-button type="primary" @click="passBtn">通过</el-button>
<el-button type="primary" plain @click="turnDownBtn">驳回</el-button>
</div>
</div>
<el-dialog title="驳回原因" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
<el-form :model="form" ref="form" :rules="rules" label-width="80px">
<el-form-item label="请输入驳回原因" label-width="120px" prop="turnDownReason">
<el-input
type="textarea"
v-model="form.turnDownReason"
:rows="6"
maxlength="200"
show-word-limit
placeholder="请输入驳回原因"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm('form')" v-preventReClick="5000"> </el-button>
</span>
</el-dialog>
</div>
<div
style="width: 38%; position: absolute; left: 65%; top: 0; height: 70vh; overflow: auto"
v-if="this.auditType === '审批信息' && auditPersonArr.length > 0"
>
<el-aside width="100%" style="background: transparent; margin-top: 2%">
<div style="display: flex; flex-direction: column; align-items: center">
<div
style="
border-radius: 10px;
padding: 15px;
border: 1.5px solid black;
width: 50%;
text-align: center;
font-weight: bold;
"
>
开始
</div>
<div class="arrow-container">
@ -47,9 +93,23 @@
<div class="arrow-down"></div>
</div>
<div v-for="(item,index) in auditPersonArr" :key="index" style="width: 100%;display: flex;flex-direction: column;align-items: center;">
<div :class="{'highlight': index < currentCheckIndex, 'normal': index > currentCheckIndex,'currentLight': index === currentCheckIndex }">
{{ item.checkPerson }} ( {{ item.examineType === '0' ? '依次' : item.examineType === '1' ? '会签' : '或签' }})<span style="margin-left: 15px;font-size: 20px;font-weight: bold"> {{index < currentCheckIndex ? '√' : (currentCheckIndex === index ? '?' : '') }}</span>
<div
v-for="(item, index) in auditPersonArr"
:key="index"
style="width: 100%; display: flex; flex-direction: column; align-items: center"
>
<div
:class="{
highlight: index < currentCheckIndex && item.isResult,
normal: index > currentCheckIndex,
currentLight: index === currentCheckIndex || (index === currentCheckIndex - 1 && !item.isResult),
}"
>
{{ item.checkPerson }} (
{{ item.examineType === '0' ? '依次' : item.examineType === '1' ? '会签' : '或签' }})
<span style="margin-left: 15px; font-size: 20px; font-weight: bold">
{{ index < currentCheckIndex && item.isResult ? '√' : currentCheckIndex === index ? '?' : '?' }}
</span>
</div>
<div class="arrow-container">
@ -57,20 +117,24 @@
<div class="arrow-down"></div>
</div>
</div>
<div style="border-radius: 10px;padding: 15px;border: 1.5px solid black;width: 50%;text-align: center;font-weight: bold">
<div
style="
border-radius: 10px;
padding: 15px;
border: 1.5px solid black;
width: 50%;
text-align: center;
font-weight: bold;
"
>
结束
</div>
</div>
</el-aside>
</div>
</div>
</template>
<script>
import { getAuditPerson } from '@/api/pro/approval_cons'
import store from '@/store'
@ -78,17 +142,17 @@ export default {
props: {
auditReason: {
type: Array,
default: []
default: [],
},
showType: Number,// 1 2
isExamine: false,// true false
btnShow: false,//
showType: Number, // 1 2
isExamine: false, // true false
btnShow: false, //
finalCheck: String,
ids: Object, // {proId: '', consId: '', subId: '', supId: '', personId: ''}
auditType:{
type: String,
default: '审批信息'
},//
ids: Object, // {proId: '', consId: '', subId: '', supId: '', personId: ''}
auditType: {
type: String,
default: '审批信息',
}, //
items: {
type: Array,
default: [
@ -99,8 +163,8 @@ export default {
status: '',
reason: '',
turnDownReason: '',
}
]
},
],
},
showPosition: {
type: Number,
@ -112,45 +176,43 @@ export default {
return store
},
isUserIncluded(index) {
console.log("index=========",index)
console.log('index=========', index)
if (this.auditPersonArr[index].checkPerson.includes(this.userName)) {
return true
} else {
return false
}
}
},
},
watch: {
items: {
handler: function (val) {
console.log("=----------------",val)
console.log('=----------------', val)
},
deep: true
}
deep: true,
},
},
data() {
return {
currentCheckIndex: 0,
auditPersonArr:[],
taskId : '',
reason:'',
auditPersonArr: [],
taskId: '',
reason: '',
dialogVisible: false,
height: this.$props.auditType ? 600 : 750,
form: {
turnDownReason: ''
turnDownReason: '',
},
rules:{
turnDownReason: [
{ required: true, message: '请输入驳回原因', trigger: 'blur' }
]
rules: {
turnDownReason: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }],
},
reverse: false,
color: '#0bbd87',
color1: '#ededed',
userName: this.$store.state.user.userData.nickName,
code:1,
num:0,
assignNum:0
code: 1,
num: 0,
assignNum: 0,
}
},
mounted() {
@ -158,14 +220,14 @@ export default {
},
methods: {
assign() {
console.log("111auditType==="+this.auditType)
if (this.assignNum > 5){
console.log('111auditType===' + this.auditType)
if (this.assignNum > 5) {
return
}
if (this.auditType === '审批信息' ||this.auditRecordType === '全部'){
if (this.taskId){
if (this.auditType === '审批信息' || this.auditRecordType === '全部') {
if (this.taskId) {
this.getAuditPerson()
}else{
} else {
if (this.$props.items && this.$props.items.length > 0) {
this.taskId = this.$props.items[0].taskId
}
@ -178,21 +240,31 @@ export default {
}
},
getAuditPerson() {
getAuditPerson({taskId: this.taskId}).then(res => {
getAuditPerson({ taskId: this.taskId }).then(res => {
if (res.code === 200) {
this.auditPersonArr = res.data
console.log('this.auditPersonArr审核流程', this.auditPersonArr)
//isActive1
this.currentCheckIndex = this.auditPersonArr.findIndex(item => item.isActive == '1')
if (this.auditPersonArr[0].isActive == '10'){
if (this.auditPersonArr[0].isActive == '10') {
this.currentCheckIndex = this.auditPersonArr.length
}
console.log("this.auditPersonArr.==="+JSON.stringify(this.auditPersonArr))
console.log("this.currentCheckIndex==="+this.currentCheckIndex)
this.auditPersonArr.forEach(e => {
if (e.isActive == 10) {
e.isResult = true
} else {
e.isResult = false
}
})
console.log('this.auditPersonArr.===' + JSON.stringify(this.auditPersonArr))
console.log('this.currentCheckIndex===' + this.currentCheckIndex)
}
})
},
changReason(e) {
console.log("222auditType==="+this.auditType)
console.log('222auditType===' + this.auditType)
this.$emit('reason', { reason: e, auditType: this.auditType })
},
//
@ -202,52 +274,50 @@ export default {
//
passBtn() {
if (this.reason === '') {
this.reason = '@@'
this.reason = '@@'
}
this.$emit('pass', this.reason)
},
//
turnDownBtn() {
console.log("333auditType==="+JSON.stringify(this.auditReason))
console.log("333auditType==="+this.auditReason.toString())
console.log('333auditType===' + JSON.stringify(this.auditReason))
console.log('333auditType===' + this.auditReason.toString())
let reason = ''
if (this.auditReason && this.auditReason.length > 0){
if (this.auditReason && this.auditReason.length > 0) {
this.auditReason.forEach(item => {
if (item.reason === '' || item.reason === null || item.reason === undefined){
}else{
reason += item.reason + ""
if (item.reason === '' || item.reason === null || item.reason === undefined) {
} else {
reason += item.reason + ''
}
})
reason = reason.substring(0, reason.length - 1)
}else{
} else {
reason = this.reason
}
this.form.turnDownReason =reason
this.form.turnDownReason = reason
this.dialogVisible = true
},
submitForm(){
this.$refs.form.validate((valid) => {
submitForm() {
this.$refs.form.validate(valid => {
if (valid) {
this.dialogVisible = false
if (this.reason === '') {
this.reason = '@@'
}
this.$emit('turnDown',{"rejectReason":this.form.turnDownReason,"reason":this.reason})
this.$emit('turnDown', { rejectReason: this.form.turnDownReason, reason: this.reason })
} else {
return false;
return false
}
});
})
},
addReason(){
addReason() {
this.dialogVisible = true
}
}
},
},
}
</script>
<style scoped>
.container{
.container {
display: flex;
flex-direction: row;
overflow-y: auto;
@ -274,25 +344,48 @@ export default {
.highlight {
/* Add any specific styles for the highlighted state */
padding: 8px;border: 1px solid green;width: 50%;text-align: center;height: 50px;font-size: 14px;margin-top: 2px;border-radius: 5px;
padding: 8px;
border: 1px solid green;
width: 50%;
text-align: center;
height: 50px;
font-size: 14px;
margin-top: 2px;
border-radius: 5px;
background: #35c50c;
}
.currentLight {
/* Add any specific styles for the highlighted state */
padding: 8px;border: 1px solid green;width: 50%;text-align: center;height: 50px;font-size: 14px;margin-top: 2px;border-radius: 5px;
padding: 8px;
border: 1px solid green;
width: 50%;
text-align: center;
height: 50px;
font-size: 14px;
margin-top: 2px;
border-radius: 5px;
background: #e6f511;
}
.normal {
/* Add any specific styles for the normal state */
padding: 8px;border: 1px solid black;width: 50%;text-align: center;height: 50px;font-size: 14px;margin-top: 2px;border-radius: 5px;
padding: 8px;
border: 1px solid black;
width: 50%;
text-align: center;
height: 50px;
font-size: 14px;
margin-top: 2px;
border-radius: 5px;
}
.content1 {
/* Add any specific styles for the highlighted state */
width: 70%;overflow-y: auto;height: 700px
width: 70%;
overflow-y: auto;
height: 700px;
}
.content2 {
/* Add any specific styles for the highlighted state */
width: 100%;overflow-y: auto;
width: 100%;
overflow-y: auto;
}
</style>

View File

@ -1,35 +1,55 @@
<template>
<div class="app-container">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"
:label-position="labelPosition"
<el-form
ref="elForm"
:model="formData"
:rules="rules"
size="medium"
label-width="100px"
:label-position="labelPosition"
>
<h2 style="color: #409EFF;background: #e8e8e8;padding: 15px;border-radius: 10px">基本信息 </h2>
<div style="padding:0 0 0 10px ">
<h2 style="color: #409eff; background: #e8e8e8; padding: 15px; border-radius: 10px">基本信息</h2>
<div style="padding: 0 0 0 10px">
<el-row>
<el-col :span="6">
<el-form-item label-width="120px" label="审批流名称" prop="examineName">
<el-input v-model="formData.examineName" placeholder="请输入审批流名称" :maxlength="60" show-word-limit
clearable v-no-whitespace
:style="{width: '86.5%'}"
@blur="checkIsExistFlowName"
:disabled="edit || (paramsData.type === 'view')"
<el-input
v-model="formData.examineName"
placeholder="请输入审批流名称"
:maxlength="60"
show-word-limit
clearable
v-no-whitespace
:style="{ width: '86.5%' }"
@blur="checkIsExistFlowName"
:disabled="edit || paramsData.type === 'view'"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="120px" label="审批流编号" prop="definitionKey">
<el-input v-model="formData.definitionKey" placeholder="自动生成" :maxlength="60" show-word-limit
clearable v-no-whitespace
:style="{width: '86.5%'}"
:disabled="true || (paramsData.type === 'view')"
<el-input
v-model="formData.definitionKey"
placeholder="自动生成"
:maxlength="60"
show-word-limit
clearable
v-no-whitespace
:style="{ width: '86.5%' }"
:disabled="true || paramsData.type === 'view'"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="120px" label="审批流类型" prop="examineType">
<el-select v-model="formData.examineType" placeholder="请选择审批流" clearable :style="{width: '86.5%'}"
@change="change" @clear="clearPro"
:disabled="edit || (paramsData.type === 'view')"
<el-select
v-model="formData.examineType"
placeholder="请选择审批流"
clearable
:style="{ width: '86.5%' }"
@change="change"
@clear="clearPro"
:disabled="edit || paramsData.type === 'view'"
>
<el-option label="专用审批流" value="1" />
<el-option label="通用审批流" value="2" />
@ -47,34 +67,34 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工程" prop="proId"
v-if="formData.examineType === '1' || formData.examineType === '专用审批流'"
<el-form-item
label="工程"
prop="proId"
v-if="formData.examineType === '1' || formData.examineType === '专用审批流'"
>
<el-select v-model="formData.proId" placeholder="请选择工程" clearable style="width: 86.5%;"
@change="changeType" @clear="clearBusiness"
:disabled="edit || (paramsData.type === 'view')"
<el-select
v-model="formData.proId"
placeholder="请选择工程"
clearable
style="width: 86.5%"
@change="changeType"
@clear="clearBusiness"
:disabled="edit || paramsData.type === 'view'"
>
<el-option
v-for="item in proOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item in proOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="120px" label="审批业务类型" prop="businessType">
<el-select v-model="formData.businessType" placeholder="请选择审批业务类型" clearable
:style="{width: '86.5%'}"
:disabled="edit || (paramsData.type === 'view')"
<el-select
v-model="formData.businessType"
placeholder="请选择审批业务类型"
clearable
:style="{ width: '86.5%' }"
:disabled="edit || paramsData.type === 'view'"
>
<el-option
v-for="item in flowOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item in flowOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
@ -82,71 +102,95 @@
<el-row>
<el-col :span="18">
<el-form-item label="审批流说明" prop="examineMark">
<el-input type="textarea" v-model="formData.examineMark" maxlength="200"
:disabled="paramsData.type === 'view'" v-no-whitespace
show-word-limit :style="{width: '96%'}"
<el-input
type="textarea"
v-model="formData.examineMark"
maxlength="200"
:disabled="paramsData.type === 'view'"
v-no-whitespace
show-word-limit
:style="{ width: '96%' }"
></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<h2 style="color: #409EFF;background: #e8e8e8;padding: 15px;border-radius: 10px">审批流程设置</h2>
<h2 style="color: #409eff; background: #e8e8e8; padding: 15px; border-radius: 10px">审批流程设置</h2>
<el-container>
<el-main>
<el-row v-for="(item, index) in formData.processSetupItems" :key="index">
<div style="padding:0 0 30px 10px ">
<div style="padding: 0 0 30px 10px">
<el-row>
<el-button type="primary"
@click="addAddressOption"
v-if="(paramsData.type !== 'view')"
>添加节点
<el-button type="primary" @click="addAddressOption" v-if="paramsData.type !== 'view'">
添加节点
</el-button>
<el-button type="danger" v-if="index !== 0 && (paramsData.type !== 'view')"
@click="removeLastItem(index)"
>删除节点
<el-button
type="danger"
v-if="index !== 0 && paramsData.type !== 'view'"
@click="removeLastItem(index)"
>
删除节点
</el-button>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item :label="'审批节点 ' + (index + 1)"
:prop="'processSetupItems.' + index + '.nodeName'"
:rules="{required: true, message: '请选择审批节点', trigger: 'blur'}"
<el-form-item
:label="'审批节点 ' + (index + 1)"
:prop="'processSetupItems.' + index + '.nodeName'"
:rules="{ required: true, message: '请选择审批节点', trigger: 'blur' }"
>
<el-input v-model="item.nodeName" placeholder="请输入审批节点" :maxlength="60" show-word-limit
clearable v-no-whitespace
:disabled="paramsData.type === 'view'"
:style="{width: '86.5%'}"
<el-input
v-model="item.nodeName"
placeholder="请输入审批节点"
:maxlength="60"
show-word-limit
clearable
v-no-whitespace
:disabled="paramsData.type === 'view'"
:style="{ width: '86.5%' }"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审批部门"
:prop="'processSetupItems.' + index + '.deptId'"
:rules="{required: true, message: '请选择审批部门', trigger: 'blur'}"
<el-form-item
label="审批部门"
:prop="'processSetupItems.' + index + '.deptId'"
:rules="{ required: true, message: '请选择审批部门', trigger: 'blur' }"
>
<Treeselect v-model="item.deptId" :options="deptOptions" :show-count="true"
placeholder="请选择归属部门" :style="{width: '86.5%'}"
class="treeselectMain"
:disabled="paramsData.type === 'view'"
:noResultsText="'未找到相关部门!'"
@select="UserType"
<Treeselect
v-model="item.deptId"
:options="deptOptions"
:show-count="true"
placeholder="请选择归属部门"
:style="{ width: '86.5%' }"
class="treeselectMain"
:disabled="paramsData.type === 'view'"
:noResultsText="'未找到相关部门!'"
@select="UserType"
:append-to-body="true"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="选择成员"
:prop="'processSetupItems.' + index + '.checkPerson'"
:rules="{required: true, message: '请选择选择成员', trigger: 'blur'}"
<el-form-item
label="选择成员"
:prop="'processSetupItems.' + index + '.checkPerson'"
:rules="{ required: true, message: '请选择选择成员', trigger: 'blur' }"
>
<el-select v-model="item.checkPerson" placeholder="请选择选择成员" multiple filterable
:disabled="item.deptId === undefined || paramsData.type === 'view'"
@change="changeUser($event, index)"
:style="{width: '86.5%'}"
<el-select
v-model="item.checkPerson"
placeholder="请选择选择成员"
multiple
filterable
:disabled="item.deptId === undefined || paramsData.type === 'view'"
@change="changeUser($event, index)"
:style="{ width: '86.5%' }"
>
<el-option v-for="dict in userOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
<el-option
v-for="dict in userOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
@ -154,44 +198,56 @@
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="审批方式"
:prop="'processSetupItems.' + index + '.examineTypes'"
:rules="{required: true, message: '请选择审批方式', trigger: 'blur'}"
<el-form-item
label="审批方式"
:prop="'processSetupItems.' + index + '.examineTypes'"
:rules="{ required: true, message: '请选择审批方式', trigger: 'blur' }"
>
<el-radio-group v-model="item.examineTypes" style="display: flex; flex-direction: column;"
:disabled="paramsData.type === 'view'"
<el-radio-group
v-model="item.examineTypes"
style="display: flex; flex-direction: column"
:disabled="paramsData.type === 'view'"
>
<el-radio :label="'0'" :value="0" style="margin-bottom: 20px;">
<el-radio :label="'0'" :value="0" style="margin-bottom: 20px">
依次审批按先后顺序一人审批完成后流转到下一人
</el-radio>
<el-radio :label="'1'" :value="1" style="margin-bottom: 20px;">会签审批需所有人同意</el-radio>
<el-radio :label="'2'" :value="2" style="margin-bottom: 20px;">或签审批一人同意即可</el-radio>
<el-radio :label="'1'" :value="1" style="margin-bottom: 20px">会签审批需所有人同意</el-radio>
<el-radio :label="'2'" :value="2" style="margin-bottom: 20px">或签审批一人同意即可</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8"
>
<el-col :span="8">
<el-form-item label="抄送人员" v-if="index === formData.processSetupItems.length - 1">
<!-- :prop="'ccPerson'"-->
<!-- :rules="{required: true, message: '请选择抄送成员', trigger: 'blur'}"-->
<el-select v-model="formData.ccPerson" placeholder="请选择选择成员" clearable multiple filterable
:disabled="paramsData.type === 'view'"
:style="{width: '86.5%'}"
<el-select
v-model="formData.ccPerson"
placeholder="请选择选择成员"
clearable
multiple
filterable
:disabled="paramsData.type === 'view'"
:style="{ width: '86.5%' }"
>
<el-option v-for="dict in ccPersonOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
<el-option
v-for="dict in ccPersonOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否支持终审"
v-if="index !== formData.processSetupItems.length - 1"
:prop="'processSetupItems.' + index + '.finalJudgment'"
:rules="{required: true, message: '请选择是否支持终审', trigger: 'blur'}"
<el-form-item
label="是否支持终审"
v-if="index !== formData.processSetupItems.length - 1"
:prop="'processSetupItems.' + index + '.finalJudgment'"
:rules="{ required: true, message: '请选择是否支持终审', trigger: 'blur' }"
>
<el-select v-model="item.finalJudgment" placeholder="请选择是否支持终审" :style="{width: '86.5%'}"
:disabled="paramsData.type === 'view'"
<el-select
v-model="item.finalJudgment"
placeholder="请选择是否支持终审"
:style="{ width: '86.5%' }"
:disabled="paramsData.type === 'view'"
>
<el-option label="是" value="1" />
<el-option label="否" value="0" />
@ -207,10 +263,17 @@
</el-button>
</el-footer>
</el-main>
<el-aside width="25%" style="background: transparent;margin-top: 2%;">
<div style="display: flex;flex-direction: column;align-items: center">
<el-aside width="25%" style="background: transparent; margin-top: 2%">
<div style="display: flex; flex-direction: column; align-items: center">
<div
style="border-radius: 10px;padding: 15px;border: 1.5px solid black;width: 50%;text-align: center;font-weight: bold"
style="
border-radius: 10px;
padding: 15px;
border: 1.5px solid black;
width: 50%;
text-align: center;
font-weight: bold;
"
>
开始
</div>
@ -219,11 +282,21 @@
<div class="arrow-down"></div>
</div>
<div v-for="(item,index) in formData.processSetupItems" :key="index"
style="width: 100%;display: flex;flex-direction: column;align-items: center;"
<div
v-for="(item, index) in formData.processSetupItems"
:key="index"
style="width: 100%; display: flex; flex-direction: column; align-items: center"
>
<div
style="padding: 8px;border: 1px solid black;width: 50%;text-align: center;height: 50px;font-size: 14px;margin-top: 2px;"
style="
padding: 8px;
border: 1px solid black;
width: 50%;
text-align: center;
height: 50px;
font-size: 14px;
margin-top: 2px;
"
>
{{ item.nodeName.length > 7 ? item.nodeName.substring(0, 7) + '...' : item.nodeName }}
</div>
@ -233,22 +306,24 @@
</div>
</div>
<div
style="border-radius: 10px;padding: 15px;border: 1.5px solid black;width: 50%;text-align: center;font-weight: bold"
style="
border-radius: 10px;
padding: 15px;
border: 1.5px solid black;
width: 50%;
text-align: center;
font-weight: bold;
"
>
结束
</div>
</div>
</el-aside>
</el-container>
</el-form>
</div>
</template>
<script>
import { getProName, personnelDropDownBox, queryTheApprovalServiceType } from '@/api/tool/select'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -281,7 +356,6 @@ export default {
checkPerson: [],
examineTypes: '',
finalJudgment: '0',
},
],
},
@ -292,18 +366,10 @@ export default {
userOptions: [],
ccPersonOptions: [],
rules: {
examineName: [
{ required: true, message: '请输入审批流名称', trigger: 'blur' },
],
examineType: [
{ required: true, message: '请选择审批流类型', trigger: 'change' },
],
businessType: [
{ required: true, message: '请选择审批业务类型', trigger: 'change' },
],
proId: [
{ required: true, message: '请选择工程', trigger: 'change' },
],
examineName: [{ required: true, message: '请输入审批流名称', trigger: 'blur' }],
examineType: [{ required: true, message: '请选择审批流类型', trigger: 'change' }],
businessType: [{ required: true, message: '请选择审批业务类型', trigger: 'change' }],
proId: [{ required: true, message: '请选择工程', trigger: 'change' }],
// ccPerson: [
// {required: true, message: '', trigger: 'change'}
// ]
@ -322,7 +388,6 @@ export default {
this.paramsData = JSON.parse(decryptCBC(params))
if (this.paramsData.type === 'view') {
//
}
let id = this.paramsData.id
let version = this.paramsData.version
@ -337,8 +402,8 @@ export default {
if (this.isChangingUser) return
this.isChangingUser = true
// Check if the selected value exists in any of the checkPerson arrays
const isDuplicate = this.formData.processSetupItems.some((item, idx) =>
idx !== index && item.checkPerson.includes(e[e.length - 1]),
const isDuplicate = this.formData.processSetupItems.some(
(item, idx) => idx !== index && item.checkPerson.includes(e[e.length - 1])
)
if (isDuplicate) {
@ -470,24 +535,31 @@ export default {
},
//
async submitConsForm() {
let text = '<span style="font-size: 14px;font-weight: bold">是否提交审批流程配置?</span>' +
let text =
'<span style="font-size: 14px;font-weight: bold">是否提交审批流程配置?</span>' +
'<br/><span style="font-size: 12px">提交完成,会重置当前审核流!!!</span>'
if (!this.edit) {
text = '<span style="font-size: 14px;font-weight: bold">是否提交审批流程配置?</span>'
}
this.$modal.confirm(text).then(function() {
return true
}).then(() => {
this.submitForm()
}).catch(() => {
this.loading = false
})
this.$modal
.confirm(text)
.then(function () {
return true
})
.then(() => {
this.submitForm()
})
.catch(() => {
this.loading = false
})
},
submitForm() {
console.log('formData:', JSON.stringify(this.formData.processSetupItems[0].checkPerson))
//processSetupItemscheckPerson null
this.formData.processSetupItems.forEach(item => {
item.checkPerson = item.checkPerson.filter(person => person !== null && person !== undefined && person !== 'null')
item.checkPerson = item.checkPerson.filter(
person => person !== null && person !== undefined && person !== 'null'
)
})
console.log('formData:', JSON.stringify(this.formData.processSetupItems[0].checkPerson))
// return
@ -509,27 +581,29 @@ export default {
if (id !== '0') {
// TODO
this.formData.examineId = id
updateExamine(this.formData).then(response => {
this.$modal.msgSuccess('修改成功')
this.$tab.closePage()
}).catch(error => {
this.$modal.msgError('修改失败')
})
updateExamine(this.formData)
.then(response => {
this.$modal.msgSuccess('修改成功')
this.$tab.closePage()
})
.catch(error => {
this.$modal.msgError('修改失败')
})
} else {
// TODO
addExamine(this.formData).then(response => {
if (response.msg === '该审核流已存在') {
this.$modal.msgError('该审核流已存在')
return
}
this.$modal.msgSuccess('新增成功')
this.$tab.closePage()
}).catch(error => {
this.$modal.msgError('新增失败')
})
addExamine(this.formData)
.then(response => {
if (response.msg === '该审核流已存在') {
this.$modal.msgError('该审核流已存在')
return
}
this.$modal.msgSuccess('新增成功')
this.$tab.closePage()
})
.catch(error => {
this.$modal.msgError('新增失败')
})
}
}
})
},
@ -576,12 +650,11 @@ export default {
border-right: 5px solid transparent;
border-top: 10px solid black;
}
.treeselectMain .vue-treeselect__menu{
max-height: 200px!important;
z-index: 9999!important;
.treeselectMain .vue-treeselect__menu {
// max-height: 200px !important;
z-index: 2147483690 !important;
}
::v-deep .vue-treeselect__menu{
max-height: 200px!important;
::v-deep .vue-treeselect__menu {
// max-height: 200px !important;
}
</style>

View File

@ -38,8 +38,8 @@ module.exports = {
// target: `http://localhost:18080`,
// target: 'http://192.168.0.176:18080',
// target: 'http://192.168.0.58:19090', // 杰
// target: 'http://192.168.0.14:18080', // 测试
target: 'http://218.21.27.6:1999/prod-api', // 测试
target: 'http://192.168.0.14:18080', // 测试环境
// target: 'http://218.21.27.6:1999/prod-api', // 生产环境
// target: 'http://192.168.0.38:18080', // 郝
changeOrigin: true,
pathRewrite: {