秀山需求变更
This commit is contained in:
@@ -170,7 +170,6 @@ export default {
|
||||
this.titleType = '编辑审批步骤';
|
||||
item.nodeType = item.nodeType * 1;
|
||||
item.candidateApproverType = item.candidateApproverType * 1;
|
||||
item.scopeCandidates = item.scopeCandidates * 1;
|
||||
this.nodeObj = JSON.parse(JSON.stringify(item));
|
||||
} else {
|
||||
this.titleType = '添加审批步骤';
|
||||
@@ -183,7 +182,7 @@ export default {
|
||||
saveAddProgress(formName) {
|
||||
this.$refs[formName].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)));
|
||||
} else {
|
||||
|
||||
@@ -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="detailObj.id">
|
||||
<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,7 @@ export default {
|
||||
},
|
||||
processAnnexDefs: [],
|
||||
detailObj: {},
|
||||
refresh: true
|
||||
activeStep: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -66,7 +64,7 @@ export default {
|
||||
},
|
||||
detailTitle() {
|
||||
return this.detailObj?.id ? "编辑事项" : "添加事项"
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -103,9 +101,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 +113,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,7 +136,6 @@ export default {
|
||||
this.instance.post(`/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
||||
if (res?.data) {
|
||||
this.detailObj = res.data
|
||||
this.refreshDetail()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -148,19 +144,13 @@ export default {
|
||||
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)"
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件图片">
|
||||
<el-checkbox v-model="nodeObj.annexEnable" label="1">附件</el-checkbox>
|
||||
<el-checkbox v-model="nodeObj.pictureEnable" label="1">图片</el-checkbox>
|
||||
<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>
|
||||
@@ -117,14 +117,7 @@ export default {
|
||||
isSelectImg: false,
|
||||
isSelectUnit: false,
|
||||
isSelectPerson: false,
|
||||
nodeObj: {
|
||||
candidateApproverType: '1',
|
||||
candidateList: [],
|
||||
nodeIndex: '',
|
||||
nodeName: '',
|
||||
nodeType: '',
|
||||
scopeCandidates: ''
|
||||
},
|
||||
nodeObj: {},
|
||||
indexType: '',
|
||||
titleType: '',
|
||||
bomIndex: '',
|
||||
@@ -176,9 +169,7 @@ 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 = this.$copy(item)
|
||||
} else {
|
||||
this.titleType = '添加审批步骤';
|
||||
@@ -191,7 +182,7 @@ 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(this.$copy(this.nodeObj));
|
||||
} else {
|
||||
@@ -209,7 +200,10 @@ export default {
|
||||
nodeIndex: '',
|
||||
nodeName: '',
|
||||
nodeType: '',
|
||||
scopeCandidates: '1'
|
||||
scopeCandidates: '1',
|
||||
annexEnable: null,
|
||||
pictureEnable: null,
|
||||
areaFilter: null
|
||||
};
|
||||
this.$refs.addForm?.resetFields();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user