fix
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<component v-else :is="currentComp" :instance="instance" :dict="dict" :processType="currentTab.value" :row="row" @back="back"/>
|
||||
<component v-else :is="currentTab.detail" :instance="instance" :dict="dict" :processType="currentTab.value" :row="row" @back="back"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -35,7 +35,6 @@ export default {
|
||||
return {
|
||||
currIndex: "0",
|
||||
row: {},
|
||||
currentComp: "",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -49,22 +48,18 @@ export default {
|
||||
return this.tabs?.[this.currIndex] || {}
|
||||
},
|
||||
showDetail() {
|
||||
return !!this.$route.query?.id || !!this.$route.query?.processType
|
||||
return this.$route.hash == "#add" || !!this.$route.query?.processType
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goPage(params) {
|
||||
this.row = params.row
|
||||
this.currentComp = params.comp
|
||||
this.$router.push({query: {processType: this.currentTab.value}})
|
||||
this.$router.push({query: {id: params.row.id}, hash: "#add"})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({query: {}})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$router.push({query: {}});
|
||||
this.$dict.load("hbDepartment", 'sex', 'nation', 'marital', 'native_place', 'education', 'candidateApproverType', 'scopeCandidates', 'nodeType')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
</el-steps>
|
||||
</div>
|
||||
</template>
|
||||
<template #content v-if="refresh">
|
||||
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
||||
<template #content v-if="loaded">
|
||||
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-if="activeStep==0"/>
|
||||
<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-if="activeStep==2"/>
|
||||
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
||||
:dict="dict" v-show="activeStep==3"/>
|
||||
:dict="dict" v-if="activeStep==3"/>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button class="btn" v-if="activeStep==0" @click="handleBack">取消</el-button>
|
||||
@@ -39,12 +39,10 @@ export default {
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
row: Object
|
||||
},
|
||||
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
||||
data() {
|
||||
return {
|
||||
activeStep: 0,
|
||||
baseInfo: {},
|
||||
applyForm: {
|
||||
tableId: "",
|
||||
@@ -52,7 +50,8 @@ export default {
|
||||
},
|
||||
processAnnexDefs: [],
|
||||
detailObj: {},
|
||||
refresh: true
|
||||
activeStep: 0,
|
||||
loaded: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -66,7 +65,7 @@ export default {
|
||||
},
|
||||
detailTitle() {
|
||||
return this.detailObj?.id ? "编辑事项" : "添加事项"
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -103,9 +102,9 @@ export default {
|
||||
}
|
||||
},
|
||||
handleBaseInfo() {
|
||||
this.$refs['baseInfo'].banseInfoForm().then(res => {
|
||||
this.$refs.baseInfo.banseInfoForm().then(res => {
|
||||
if (res) {
|
||||
this.$refs['applyForm'].getFormList()
|
||||
this.$refs.applyForm?.getFormList()
|
||||
this.baseInfo = res
|
||||
this.activeStep++
|
||||
}
|
||||
@@ -115,18 +114,17 @@ export default {
|
||||
* 保存
|
||||
*/
|
||||
save() {
|
||||
this.$refs['processApproval'].handleProcessApproval().then(res => {
|
||||
this.$refs.processApproval?.handleProcessApproval().then(res => {
|
||||
this.instance.post(`/approval-process-def/add-update`, {
|
||||
...this.detailObj,
|
||||
...this.baseInfo,
|
||||
processDefStatus: Number(this.baseInfo.processDefStatus),
|
||||
tableId: this.applyForm.tableId,
|
||||
processType: 0,
|
||||
tableType: 2,
|
||||
processAnnexDefs: this.annexs.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
||||
processAnnexDefs: this.annexs?.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
||||
processNodeList: res.processNodeList
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("保存成功")
|
||||
this.$emit("back")
|
||||
}
|
||||
@@ -139,28 +137,21 @@ export default {
|
||||
this.instance.post(`/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
||||
if (res?.data) {
|
||||
this.detailObj = res.data
|
||||
this.refreshDetail()
|
||||
}
|
||||
})
|
||||
}).finally(() => this.loaded = true)
|
||||
},
|
||||
getStepIcon(rowIndex) {
|
||||
if (rowIndex < this.activeStep) return "iconfont iconSteps_Finished"
|
||||
else if (this.activeStep == rowIndex) return "iconfont iconSteps_In_Progress"
|
||||
return ""
|
||||
},
|
||||
refreshDetail() {
|
||||
this.refresh = false
|
||||
this.$nextTick(() => this.refresh = true)
|
||||
},
|
||||
handleBack() {
|
||||
this.detailObj?.id && this.$router.push({query: {}})
|
||||
this.$emit('back')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.row.id) {
|
||||
this.getDetail(this.row.id)
|
||||
}
|
||||
this.getDetail(this.$route.query.id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -29,15 +29,7 @@
|
||||
<el-checkbox :label="p.dictName" v-for="(p,i) in dict.getDict(e.dictionaryCode)"
|
||||
:key="Math.random()"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<el-select placeholder="请选择" disabled size="small" clearable style="width: 100%;" v-if="e.fieldDataType==9">
|
||||
<el-option
|
||||
v-for="(item,i) in dict.getDict(e.fieldDbName)" :key="i"
|
||||
:label="item.dictName"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<ai-select v-if="e.fieldDataType==9" disabled/>
|
||||
<el-date-picker
|
||||
v-model="form.picker"
|
||||
v-if="['2','3','7','8'].includes(e.fieldDataType)"
|
||||
|
||||
@@ -44,25 +44,8 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <ai-wechat-selecter slot="append" :instance="instance" :props="{id:'wxUserId',label:'name'}"
|
||||
v-model="item.candidateList" v-if="item.candidateApproverType==1">
|
||||
<el-button size="mini" type="primary">选择指定人员</el-button>
|
||||
</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)">
|
||||
<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>
|
||||
@@ -73,63 +56,40 @@
|
||||
</el-steps>
|
||||
</template>
|
||||
</ai-card>
|
||||
<el-dialog :title="titleType" class="editStyle" :visible.sync="isAddStep" width="575px" height="380px"
|
||||
:close-on-click-modal="false">
|
||||
<el-form size="small" :model="nodeObj" label-width="120px" ref="addForm" :rules="addRules">
|
||||
<el-form-item label="审批步骤名称" prop="nodeName">
|
||||
<el-input v-model="nodeObj.nodeName" placeholder="如:部门主管审批(限10个字)" :maxLength="10"
|
||||
clearable/>
|
||||
<ai-dialog :title="titleType" class="editStyle" :visible.sync="isAddStep" width="575px" height="380px"
|
||||
:close-on-click-modal="false" @onConfirm="saveAddProgress">
|
||||
<el-form size="small" :model="nodeObj" label-width="100px" ref="addForm" :rules="addRules">
|
||||
<el-form-item label="审批步骤" prop="nodeName">
|
||||
<el-input v-model="nodeObj.nodeName" placeholder="如:部门主管审批(限10个字)" :maxLength="10" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批方式" prop="nodeType">
|
||||
<el-radio-group v-model="nodeObj.nodeType">
|
||||
<el-radio :label="2">或签
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
width="200"
|
||||
trigger="click"
|
||||
content="或签是指该节点指定多名负责人审批时,其中任何一人完成审批即可。适合一个事项只需要某个岗位任何一人审批即可的业务场景。">
|
||||
<el-button class="el-icon-warning" slot="reference"
|
||||
style="padding:0;height:14px;border:0;"></el-button>
|
||||
</el-popover>
|
||||
</el-radio>
|
||||
<el-radio :label="3">抄送
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
width="200"
|
||||
trigger="click"
|
||||
content="抄送是指一个事项审批完成后,抄送给需要知晓的单位或个人,被抄送的对象可以查阅该事项内容,无需审批。适合一个事项无需对方审批,但审批完成后需要通知对方知晓的业务场景。">
|
||||
<el-button class="el-icon-warning" slot="reference"
|
||||
style="padding:0;height:14px;border:0;"></el-button>
|
||||
</el-popover>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据权限" prop="areaFilter">
|
||||
<el-radio-group v-model="nodeObj.areaFilter">
|
||||
<el-radio :label="0">不限
|
||||
<el-popover placement="top-start" width="200" trigger="click" content="审批人员可查看全部申报事项">
|
||||
<el-button class="el-icon-warning" slot="reference" style="padding:0;height:14px;border:0;"/>
|
||||
</el-popover>
|
||||
</el-radio>
|
||||
<el-radio :label="1">村社区
|
||||
<el-popover placement="top-start" width="200" trigger="click" content="审批人员可查看本村申报事项">
|
||||
<el-button class="el-icon-warning" slot="reference" style="padding:0;height:14px;border:0;"/>
|
||||
</el-popover>
|
||||
</el-radio>
|
||||
<el-radio :label="2">镇街
|
||||
<el-popover placement="top-start" width="200" trigger="click" content="审批人员可查看本镇申报事项">
|
||||
<el-button class="el-icon-warning" slot="reference" style="padding:0;height:14px;border:0;"/>
|
||||
<el-radio-group v-model="nodeObj.nodeType" @change="nodeObj.areaFilter='',nodeObj.annexEnable='',nodeObj.pictureEnable=''">
|
||||
<el-radio v-for="op in approvalWays" :key="op.value" :label="op.value">
|
||||
<span v-text="op.label"/>
|
||||
<el-popover placement="top-start" width="200" trigger="click" :content="op.tips">
|
||||
<el-button type="text" slot="reference" icon="el-icon-warning" class="color-666"/>
|
||||
</el-popover>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<template v-if="nodeObj.nodeType==2">
|
||||
<el-form-item label="数据权限" prop="areaFilter">
|
||||
<el-radio-group v-model="nodeObj.areaFilter">
|
||||
<el-radio v-for="op in dict.getDict('processNodeAreaFilter')" :key="op.dictValue" :label="op.dictValue">
|
||||
<span v-text="op.dictName"/>
|
||||
<el-popover placement="top-start" width="200" trigger="click" :content="dict.getLabel('processNodeAreaFilterTips',op.dictValue)">
|
||||
<el-button type="text" slot="reference" icon="el-icon-warning" class="color-666"/>
|
||||
</el-popover>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件图片">
|
||||
<el-checkbox v-model="nodeObj.annexEnable" true-label="1" false-label="0">附件</el-checkbox>
|
||||
<el-checkbox v-model="nodeObj.pictureEnable" true-label="1" false-label="0">图片</el-checkbox>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
<div slot="footer" style="text-align: center;">
|
||||
<el-button style="width: 92px;" size="small" @click="isAddStep = false">取消</el-button>
|
||||
<el-button style="width: 92px;" size="small" type="primary" @click="saveAddProgress">确认
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -149,19 +109,15 @@ export default {
|
||||
form: {
|
||||
processNodeList: [],
|
||||
},
|
||||
areaId: "",
|
||||
approvalWays: [
|
||||
{value: 2, label: '或签', tips: '或签是指该节点指定多名负责人审批时,其中任何一人完成审批即可。适合一个事项只需要某个岗位任何一人审批即可的业务场景。'},
|
||||
{value: 3, label: '抄送', tips: '抄送是指一个事项审批完成后,抄送给需要知晓的单位或个人,被抄送的对象可以查阅该事项内容,无需审批。适合一个事项无需对方审批,但审批完成后需要通知对方知晓的业务场景。'},
|
||||
],
|
||||
isAddStep: false,
|
||||
isSelectImg: false,
|
||||
isSelectUnit: false,
|
||||
isSelectPerson: false,
|
||||
nodeObj: {
|
||||
candidateApproverType: '1',
|
||||
candidateList: [],
|
||||
nodeIndex: '',
|
||||
nodeName: '',
|
||||
nodeType: '',
|
||||
scopeCandidates: ''
|
||||
},
|
||||
nodeObj: {areaFilter: [], annexEnable: null, pictureEnable: null},
|
||||
indexType: '',
|
||||
titleType: '',
|
||||
bomIndex: '',
|
||||
@@ -190,15 +146,11 @@ export default {
|
||||
handleProcessApproval() {
|
||||
return Promise.resolve(this.form)
|
||||
},
|
||||
/**
|
||||
*删除
|
||||
* */
|
||||
deleteInfo(index) {
|
||||
this.$confirm("是否删除").then(() => {
|
||||
this.form.processNodeList.splice(index, 1)
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
|
||||
changeCharge(e, i) {
|
||||
this.$set(this.form.processNodeList[i], 'candidateList', e.map(v => {
|
||||
return {
|
||||
@@ -209,9 +161,6 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 添加流程
|
||||
* @param index
|
||||
* @param item
|
||||
* @param i
|
||||
*/
|
||||
addAppStep(index, item, i) {
|
||||
this.isAddStep = true;
|
||||
@@ -220,10 +169,8 @@ export default {
|
||||
if (index == 2) {
|
||||
this.titleType = '编辑审批步骤';
|
||||
item.nodeType = item.nodeType * 1;
|
||||
item.areaFilter = item.areaFilter * 1;
|
||||
item.candidateApproverType = item.candidateApproverType * 1;
|
||||
item.scopeCandidates = item.scopeCandidates * 1;
|
||||
this.nodeObj = JSON.parse(JSON.stringify(item));
|
||||
this.nodeObj = this.$copy(item)
|
||||
} else {
|
||||
this.titleType = '添加审批步骤';
|
||||
if (this.form.processNodeList.length > 0) {
|
||||
@@ -235,11 +182,11 @@ export default {
|
||||
saveAddProgress() {
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.nodeObj.scopeCandidates == 0) this.nodeObj.candidateList = [];
|
||||
if (this.nodeObj.scopeCandidates == '0') this.nodeObj.candidateList = [];
|
||||
if (this.indexType == 1) {
|
||||
this.form.processNodeList.push(JSON.parse(JSON.stringify(this.nodeObj)));
|
||||
this.form.processNodeList.push(this.$copy(this.nodeObj));
|
||||
} else {
|
||||
this.form.processNodeList.splice(this.bomIndex, 1, JSON.parse(JSON.stringify(this.nodeObj)));
|
||||
this.form.processNodeList.splice(this.bomIndex, 1, this.$copy(this.nodeObj));
|
||||
}
|
||||
this.$refs.addForm.resetFields();
|
||||
this.isAddStep = false;
|
||||
@@ -253,13 +200,16 @@ export default {
|
||||
nodeIndex: '',
|
||||
nodeName: '',
|
||||
nodeType: '',
|
||||
scopeCandidates: ''
|
||||
scopeCandidates: '1',
|
||||
annexEnable: null,
|
||||
pictureEnable: null,
|
||||
areaFilter: null
|
||||
};
|
||||
this.$refs.addForm?.resetFields();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.areaId = this.user.info.areaId.substring(0, 6) + '000000'
|
||||
this.dict.load("processNodeAreaFilter", 'processNodeAreaFilterTips')
|
||||
if (this.config.detailObj?.id) {
|
||||
Object.keys(this.form).map(e => this.form[e] = this.config.detailObj[e])
|
||||
}
|
||||
@@ -442,6 +392,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.color-666 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.dia_per_content {
|
||||
width: 640px;
|
||||
height: 400px;
|
||||
@@ -511,7 +465,7 @@ export default {
|
||||
.peraoBtn {
|
||||
.el-button--text {
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user