bug
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
<component v-else :is="currentComp" :instance="instance" :dict="dict"
|
<component v-else :is="currentComp" :instance="instance" :dict="dict"
|
||||||
:processType="currentTab.value" :row="row"></component>
|
:processType="currentTab.value" :row="row" @back="back" ></component>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -59,6 +59,10 @@ export default {
|
|||||||
this.row = params.row
|
this.row = params.row
|
||||||
this.currentComp = params.comp
|
this.currentComp = params.comp
|
||||||
this.$router.push({query: {processType: this.currentTab.value}})
|
this.$router.push({query: {processType: this.currentTab.value}})
|
||||||
|
},
|
||||||
|
|
||||||
|
back () {
|
||||||
|
this.$router.push({query: {}})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="add-config" :class="[activeStep == 1 ? 'formLayout' : '']">
|
<div class="add-config">
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<ai-title slot="title" :title="detailTitle" isShowBack isShowBottomBorder @onBackClick="handleBack"/>
|
<ai-title slot="title" :title="detailTitle" isShowBack isShowBottomBorder @onBackClick="handleBack"/>
|
||||||
<template slot="step">
|
<template slot="step">
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #content v-if="refresh">
|
<template #content v-if="refresh">
|
||||||
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
||||||
<applyForm ref="applyForm" :value="filedList" :instance="instance" :dict="dict" v-show="activeStep==1"/>
|
<applyForm ref="applyForm" :instance="instance" :dict="dict" v-show="activeStep==1"/>
|
||||||
<attachmentMaterial ref="attachmentMaterial" :instance="instance" v-show="activeStep==2"/>
|
<attachmentMaterial ref="attachmentMaterial" :instance="instance" v-show="activeStep==2"/>
|
||||||
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
||||||
:dict="dict" v-show="activeStep==3"/>
|
:dict="dict" v-show="activeStep==3"/>
|
||||||
@@ -39,8 +39,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
row: Object,
|
row: Object
|
||||||
processType: String
|
|
||||||
},
|
},
|
||||||
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
||||||
data() {
|
data() {
|
||||||
@@ -52,12 +51,8 @@ export default {
|
|||||||
approvalSteps: "",
|
approvalSteps: "",
|
||||||
},
|
},
|
||||||
processAnnexDefs: [],
|
processAnnexDefs: [],
|
||||||
detailObj: {
|
detailObj: {},
|
||||||
tableInfo: {}
|
refresh: true
|
||||||
},
|
|
||||||
refresh: true,
|
|
||||||
filedList: [],
|
|
||||||
tableFieldInfos: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -89,12 +84,12 @@ export default {
|
|||||||
this.handleBaseInfo()
|
this.handleBaseInfo()
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
this.$refs['applyForm'].onConfirm().then(res => {
|
this.$refs['applyForm'].handleApplyForm().then(ret => {
|
||||||
if (!res.length) {
|
this.applyForm.tableId = ret.id
|
||||||
return this.$message.error('表单配置不能为空')
|
this.applyForm.approvalSteps = ret.approvalSteps.toString()
|
||||||
}
|
|
||||||
this.tableFieldInfos = res
|
|
||||||
this.activeStep++
|
this.activeStep++
|
||||||
|
}).catch(err => {
|
||||||
|
console.error(err);
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
@@ -110,7 +105,7 @@ export default {
|
|||||||
handleBaseInfo() {
|
handleBaseInfo() {
|
||||||
this.$refs['baseInfo'].banseInfoForm().then(res => {
|
this.$refs['baseInfo'].banseInfoForm().then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
// this.$refs['applyForm'].getFormList()
|
this.$refs['applyForm'].getFormList()
|
||||||
this.baseInfo = res
|
this.baseInfo = res
|
||||||
this.activeStep++
|
this.activeStep++
|
||||||
}
|
}
|
||||||
@@ -121,22 +116,19 @@ export default {
|
|||||||
*/
|
*/
|
||||||
save() {
|
save() {
|
||||||
this.$refs['processApproval'].handleProcessApproval().then(res => {
|
this.$refs['processApproval'].handleProcessApproval().then(res => {
|
||||||
this.instance.post(`/app/approval-process-def/add-update`, {
|
this.instance.post(`/approval-process-def/add-update`, {
|
||||||
...this.detailObj,
|
...this.detailObj,
|
||||||
...this.baseInfo,
|
...this.baseInfo,
|
||||||
processDefStatus: Number(this.baseInfo.processDefStatus),
|
processDefStatus: Number(this.baseInfo.processDefStatus),
|
||||||
tableInfo: {
|
tableId: this.applyForm.tableId,
|
||||||
...this.detailObj.tableInfo,
|
processType: 0,
|
||||||
tableFieldInfos: this.tableFieldInfos
|
tableType: 2,
|
||||||
},
|
|
||||||
tableType: 0,
|
|
||||||
processAnnexDefs: this.annexs.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
processAnnexDefs: this.annexs.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
||||||
processNodeList: res.processNodeList,
|
processNodeList: res.processNodeList
|
||||||
processType: this.processType
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success("保存成功")
|
this.$message.success("保存成功")
|
||||||
this.$router.push({query:{}})
|
this.$emit("back")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -144,10 +136,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDetail(id) {
|
getDetail(id) {
|
||||||
this.instance.post(`/app/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
this.instance.post(`/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.detailObj = res.data
|
this.detailObj = res.data
|
||||||
this.filedList = res.data.tableInfo.tableFieldInfos
|
|
||||||
this.refreshDetail()
|
this.refreshDetail()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -162,12 +153,13 @@ export default {
|
|||||||
this.$nextTick(() => this.refresh = true)
|
this.$nextTick(() => this.refresh = true)
|
||||||
},
|
},
|
||||||
handleBack() {
|
handleBack() {
|
||||||
this.$router.push({query: {}})
|
this.detailObj?.id && this.$router.push({query: {}})
|
||||||
|
this.$emit('back')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.row?.id) {
|
if (this.$route.query?.id) {
|
||||||
this.getDetail(this.row?.id)
|
this.getDetail(this.$route.query?.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,13 +169,8 @@ export default {
|
|||||||
.add-config {
|
.add-config {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
&.formLayout {
|
::v-deep .step .el-steps {
|
||||||
::v-deep .ai-detail__content--wrapper {
|
height: 72px;
|
||||||
max-width: 100%;
|
|
||||||
height: calc(100%)!important;
|
|
||||||
padding: 0!important;
|
|
||||||
overflow: hidden!important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.step {
|
.step {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="attachment-material">
|
<div class="attachment-material">
|
||||||
<ai-card title="附件材料">
|
<ai-title title="附件材料">
|
||||||
<template #right>
|
<template slot="rightBtn">
|
||||||
<span class="iconfont iconAdd rightBtn"></span>
|
<span class="iconfont iconAdd rightBtn"></span>
|
||||||
<span class="rightBtn" style="margin-left: 8px;" @click="dialog=true">新增行数</span>
|
<span class="rightBtn" style="margin-left: 8px;" @click="dialog=true">新增行数</span>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
</ai-title>
|
||||||
<el-table
|
<el-table
|
||||||
:data="materialList"
|
:data="materialList"
|
||||||
stripe
|
stripe
|
||||||
@@ -39,9 +39,9 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.mustFill"
|
v-model="scope.row.mustFill"
|
||||||
active-value="1" inactive-value="0"
|
active-value="0" inactive-value="1"
|
||||||
active-color="#5088FF"
|
active-color="#D0D4DC"
|
||||||
inactive-color="#D0D4DC">
|
inactive-color="#5088FF">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -52,8 +52,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
|
||||||
</ai-card>
|
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
title="添加附件材料"
|
title="添加附件材料"
|
||||||
:visible.sync="dialog"
|
:visible.sync="dialog"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="base-info">
|
<section class="base-info">
|
||||||
<ai-card title="基本信息">
|
<ai-title title="基本信息"/>
|
||||||
<template #content>
|
|
||||||
<el-form :model="form" :rules="rules" ref="baseInfoForm" label-suffix=":" label-width="100px">
|
<el-form :model="form" :rules="rules" ref="baseInfoForm" label-suffix=":" label-width="100px">
|
||||||
<el-form-item label="事项名称" prop="processName">
|
<el-form-item label="事项名称" prop="processName">
|
||||||
<el-input v-model.trim="form.processName" size="small" clearable placeholder="请输入事项名称" :maxlength="30"
|
<el-input v-model.trim="form.processName" size="small" clearable placeholder="请输入事项名称" :maxlength="30"
|
||||||
@@ -21,8 +20,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属分类" prop="classificationId">
|
<el-form-item label="所属分类" prop="classificationId">
|
||||||
<el-select placeholder="请选择" size="small" v-model="form.classificationId" clearable
|
<el-select placeholder="请选择" size="small" v-model="form.classificationId" clearable style="width: 100%;">
|
||||||
style="width: 100%;">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,i) in classList" :key="i"
|
v-for="(item,i) in classList" :key="i"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
@@ -37,24 +35,22 @@
|
|||||||
placeholder="请输入天数" style="width: 270px;"/>
|
placeholder="请输入天数" style="width: 270px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="办理须知" prop="needToKnow">
|
<el-form-item label="办理须知" prop="needToKnow">
|
||||||
<ai-editor v-model="form.needToKnow" :instance="instance" @validate="v=>valid=!v"/>
|
<ai-editor v-model.trim="form.needToKnow" :instance="instance"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用" prop="processDefStatus">
|
<el-form-item label="是否启用" prop="processDefStatus">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="form.processDefStatus"
|
v-model="form.processDefStatus"
|
||||||
active-color="#5088FF"
|
active-color="#D0D4DC"
|
||||||
inactive-color="#D0D4DC" active-value="1" inactive-value="0">
|
inactive-color="#5088FF" active-value="0" inactive-value="1">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
|
||||||
</ai-card>
|
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "baseInfo",
|
name: "baseInfo",
|
||||||
inject: ['config'],
|
inject: ['config'],
|
||||||
props: {
|
props: {
|
||||||
@@ -62,11 +58,11 @@
|
|||||||
dict: Object,
|
dict: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const validTimeLimit = (rule, value, callback) => {
|
const validTimeLimit = (rule, value, callback) =>{
|
||||||
if (!value) {
|
if(!value){
|
||||||
return callback(new Error('请输入办结时限'));
|
return callback(new Error('请输入办结时限'));
|
||||||
} else {
|
}else {
|
||||||
if (+value <= 0) {
|
if(+value<=0){
|
||||||
return callback(new Error('最小值为1'));
|
return callback(new Error('最小值为1'));
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
@@ -79,27 +75,15 @@
|
|||||||
classificationId: "",
|
classificationId: "",
|
||||||
timeLimit: "",
|
timeLimit: "",
|
||||||
needToKnow: "",
|
needToKnow: "",
|
||||||
processDefStatus: "1",
|
processDefStatus: false,
|
||||||
},
|
},
|
||||||
valid:true,
|
|
||||||
classList: [],
|
classList: [],
|
||||||
rules: {
|
rules:{
|
||||||
processName: [{required: true, message: '请输入事项名称', trigger: 'blur'}],
|
processName: [{required: true, message: '请输入事项名称', trigger: 'blur'}],
|
||||||
department: [{required: true, message: '请选择所属部门', trigger: 'change'}],
|
department: [{required: true, message: '请选择所属部门', trigger: 'change'}],
|
||||||
classificationId: [{required: true, message: '请选择所属分类', trigger: 'change'}],
|
classificationId: [{required: true, message: '请选择所属分类', trigger: 'change'}],
|
||||||
timeLimit: [{required: true, validator: validTimeLimit, trigger: 'blur'}],
|
timeLimit: [{required: true,validator:validTimeLimit ,trigger: 'blur'}],
|
||||||
needToKnow: [
|
needToKnow: [{required: true, message: '请输入办理须知', trigger: 'blur'}],
|
||||||
{required: true, message: '请输入办理须知', trigger: 'blur'},
|
|
||||||
{
|
|
||||||
validator: (r, v, cb) => {
|
|
||||||
if (this.valid) {
|
|
||||||
cb()
|
|
||||||
} else {
|
|
||||||
cb('字数超过限制')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
processDefStatus: [{required: true, message: '请选择是否启用', trigger: 'change'}],
|
processDefStatus: [{required: true, message: '请选择是否启用', trigger: 'change'}],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,12 +104,9 @@
|
|||||||
* 获取分类
|
* 获取分类
|
||||||
*/
|
*/
|
||||||
getClassification() {
|
getClassification() {
|
||||||
this.instance.post(`/app/zwspapprovalclassification/list`, null, {
|
this.instance.post(`/zwspapprovalclassification/list`, null, {
|
||||||
params: {
|
|
||||||
current: 1,
|
current: 1,
|
||||||
status: 1,
|
|
||||||
size: 9999
|
size: 9999
|
||||||
}
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.classList = res.data.records
|
this.classList = res.data.records
|
||||||
@@ -136,19 +117,17 @@
|
|||||||
created() {
|
created() {
|
||||||
this.getClassification()
|
this.getClassification()
|
||||||
if (this.config.detailObj?.id) {
|
if (this.config.detailObj?.id) {
|
||||||
this.$nextTick(_=>{
|
|
||||||
Object.keys(this.form).map(e => this.form[e] = this.config.detailObj[e])
|
Object.keys(this.form).map(e => this.form[e] = this.config.detailObj[e])
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.base-info {
|
.base-info {
|
||||||
.iconAudit {
|
.iconAudit {
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
color: #3D94FB;
|
color: #3D94FB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,10 +44,30 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ai-wechat-selecter slot="append" :instance="instance" :props="{id:'wxUserId',label:'name'}"
|
<!-- <ai-wechat-selecter slot="append" :instance="instance" :props="{id:'wxUserId',label:'name'}"
|
||||||
v-model="item.candidateList" v-if="item.candidateApproverType==1">
|
v-model="item.candidateList" v-if="item.candidateApproverType==1">
|
||||||
<el-button size="mini" type="primary">选择指定人员</el-button>
|
<el-button size="mini" type="primary">选择指定人员</el-button>
|
||||||
</ai-wechat-selecter>
|
</ai-wechat-selecter> -->
|
||||||
|
<!-- <ai-user-picker :instance="instance" v-model="item.candidateList" v-if="item.candidateApproverType==1"/> -->
|
||||||
|
<!-- <ai-people :showAiArea="false" customCliker :instance="instance"
|
||||||
|
unitUrl="/admin/sysunit/getAll2"
|
||||||
|
:meta="[]" v-model="item.candidateList"
|
||||||
|
v-if="item.candidateApproverType==1">
|
||||||
|
<el-button size="mini" type="primary">选择指定人员</el-button>
|
||||||
|
</ai-people> -->
|
||||||
|
|
||||||
|
<!-- <ai-user-picker :instance="instance" v-model="form.portalUserId"/> -->
|
||||||
|
<ai-person-select
|
||||||
|
:chooseUserList="item.candidateList"
|
||||||
|
v-if="item.candidateApproverType==1"
|
||||||
|
:instance="instance" customRightText url="/user/page"
|
||||||
|
headerTitle="人员列表" dialogTitle="选择" :isMultiple="true"
|
||||||
|
@selectPerson="e => changeCharge(e, index)">
|
||||||
|
<template v-slot:option="{ item }">
|
||||||
|
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||||
|
<span>{{ item.phone }}</span>
|
||||||
|
</template>
|
||||||
|
</ai-person-select>
|
||||||
</div>
|
</div>
|
||||||
</el-step>
|
</el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
@@ -130,6 +150,7 @@ export default {
|
|||||||
bomIndex: '',
|
bomIndex: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
addRules() {
|
addRules() {
|
||||||
return {
|
return {
|
||||||
@@ -161,6 +182,10 @@ export default {
|
|||||||
this.form.processNodeList.splice(index, 1)
|
this.form.processNodeList.splice(index, 1)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
changeCharge (e, i) {
|
||||||
|
this.$set(this.form.processNodeList[i], 'candidateList', e)
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 添加流程
|
* 添加流程
|
||||||
* @param index
|
* @param index
|
||||||
|
|||||||
Reference in New Issue
Block a user