秀山需求变更
This commit is contained in:
@@ -170,7 +170,6 @@ export default {
|
|||||||
this.titleType = '编辑审批步骤';
|
this.titleType = '编辑审批步骤';
|
||||||
item.nodeType = item.nodeType * 1;
|
item.nodeType = item.nodeType * 1;
|
||||||
item.candidateApproverType = item.candidateApproverType * 1;
|
item.candidateApproverType = item.candidateApproverType * 1;
|
||||||
item.scopeCandidates = item.scopeCandidates * 1;
|
|
||||||
this.nodeObj = JSON.parse(JSON.stringify(item));
|
this.nodeObj = JSON.parse(JSON.stringify(item));
|
||||||
} else {
|
} else {
|
||||||
this.titleType = '添加审批步骤';
|
this.titleType = '添加审批步骤';
|
||||||
@@ -183,7 +182,7 @@ export default {
|
|||||||
saveAddProgress(formName) {
|
saveAddProgress(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.nodeObj.scopeCandidates == 0) this.nodeObj.candidateList = [];
|
if (this.nodeObj.scopeCandidates == '0') this.nodeObj.candidateList = [];
|
||||||
if (this.indexType == 1) {
|
if (this.indexType == 1) {
|
||||||
this.form.processNodeList.push(JSON.parse(JSON.stringify(this.nodeObj)));
|
this.form.processNodeList.push(JSON.parse(JSON.stringify(this.nodeObj)));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</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>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -35,7 +35,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
currIndex: "0",
|
currIndex: "0",
|
||||||
row: {},
|
row: {},
|
||||||
currentComp: "",
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -49,22 +48,18 @@ export default {
|
|||||||
return this.tabs?.[this.currIndex] || {}
|
return this.tabs?.[this.currIndex] || {}
|
||||||
},
|
},
|
||||||
showDetail() {
|
showDetail() {
|
||||||
return !!this.$route.query?.id || !!this.$route.query?.processType
|
return this.$route.hash == "#add" || !!this.$route.query?.processType
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goPage(params) {
|
goPage(params) {
|
||||||
this.row = params.row
|
this.$router.push({query: {id: params.row.id}, hash: "#add"})
|
||||||
this.currentComp = params.comp
|
|
||||||
this.$router.push({query: {processType: this.currentTab.value}})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({query: {}})
|
this.$router.push({query: {}})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$router.push({query: {}});
|
|
||||||
this.$dict.load("hbDepartment", 'sex', 'nation', 'marital', 'native_place', 'education', 'candidateApproverType', 'scopeCandidates', 'nodeType')
|
this.$dict.load("hbDepartment", 'sex', 'nation', 'marital', 'native_place', 'education', 'candidateApproverType', 'scopeCandidates', 'nodeType')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #content v-if="refresh">
|
<template #content v-if="detailObj.id">
|
||||||
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-if="activeStep==0"/>
|
||||||
<applyForm ref="applyForm" :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-if="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-if="activeStep==3"/>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button class="btn" v-if="activeStep==0" @click="handleBack">取消</el-button>
|
<el-button class="btn" v-if="activeStep==0" @click="handleBack">取消</el-button>
|
||||||
@@ -39,12 +39,10 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
row: Object
|
|
||||||
},
|
},
|
||||||
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeStep: 0,
|
|
||||||
baseInfo: {},
|
baseInfo: {},
|
||||||
applyForm: {
|
applyForm: {
|
||||||
tableId: "",
|
tableId: "",
|
||||||
@@ -52,7 +50,7 @@ export default {
|
|||||||
},
|
},
|
||||||
processAnnexDefs: [],
|
processAnnexDefs: [],
|
||||||
detailObj: {},
|
detailObj: {},
|
||||||
refresh: true
|
activeStep: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -66,7 +64,7 @@ export default {
|
|||||||
},
|
},
|
||||||
detailTitle() {
|
detailTitle() {
|
||||||
return this.detailObj?.id ? "编辑事项" : "添加事项"
|
return this.detailObj?.id ? "编辑事项" : "添加事项"
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
@@ -103,9 +101,9 @@ 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++
|
||||||
}
|
}
|
||||||
@@ -115,18 +113,17 @@ export default {
|
|||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
save() {
|
save() {
|
||||||
this.$refs['processApproval'].handleProcessApproval().then(res => {
|
this.$refs.processApproval?.handleProcessApproval().then(res => {
|
||||||
this.instance.post(`/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),
|
||||||
tableId: this.applyForm.tableId,
|
tableId: this.applyForm.tableId,
|
||||||
processType: 0,
|
|
||||||
tableType: 2,
|
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
|
processNodeList: res.processNodeList
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success("保存成功")
|
this.$message.success("保存成功")
|
||||||
this.$emit("back")
|
this.$emit("back")
|
||||||
}
|
}
|
||||||
@@ -139,7 +136,6 @@ export default {
|
|||||||
this.instance.post(`/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.refreshDetail()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -148,19 +144,13 @@ export default {
|
|||||||
else if (this.activeStep == rowIndex) return "iconfont iconSteps_In_Progress"
|
else if (this.activeStep == rowIndex) return "iconfont iconSteps_In_Progress"
|
||||||
return ""
|
return ""
|
||||||
},
|
},
|
||||||
refreshDetail() {
|
|
||||||
this.refresh = false
|
|
||||||
this.$nextTick(() => this.refresh = true)
|
|
||||||
},
|
|
||||||
handleBack() {
|
handleBack() {
|
||||||
this.detailObj?.id && this.$router.push({query: {}})
|
this.detailObj?.id && this.$router.push({query: {}})
|
||||||
this.$emit('back')
|
this.$emit('back')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.row.id) {
|
this.getDetail(this.$route.query.id)
|
||||||
this.getDetail(this.row.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -29,15 +29,7 @@
|
|||||||
<el-checkbox :label="p.dictName" v-for="(p,i) in dict.getDict(e.dictionaryCode)"
|
<el-checkbox :label="p.dictName" v-for="(p,i) in dict.getDict(e.dictionaryCode)"
|
||||||
:key="Math.random()"></el-checkbox>
|
:key="Math.random()"></el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
<ai-select v-if="e.fieldDataType==9" disabled/>
|
||||||
<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>
|
|
||||||
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.picker"
|
v-model="form.picker"
|
||||||
v-if="['2','3','7','8'].includes(e.fieldDataType)"
|
v-if="['2','3','7','8'].includes(e.fieldDataType)"
|
||||||
|
|||||||
@@ -84,8 +84,8 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件图片">
|
<el-form-item label="附件图片">
|
||||||
<el-checkbox v-model="nodeObj.annexEnable" label="1">附件</el-checkbox>
|
<el-checkbox v-model="nodeObj.annexEnable" true-label="1" false-label="0">附件</el-checkbox>
|
||||||
<el-checkbox v-model="nodeObj.pictureEnable" label="1">图片</el-checkbox>
|
<el-checkbox v-model="nodeObj.pictureEnable" true-label="1" false-label="0">图片</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -117,14 +117,7 @@ export default {
|
|||||||
isSelectImg: false,
|
isSelectImg: false,
|
||||||
isSelectUnit: false,
|
isSelectUnit: false,
|
||||||
isSelectPerson: false,
|
isSelectPerson: false,
|
||||||
nodeObj: {
|
nodeObj: {},
|
||||||
candidateApproverType: '1',
|
|
||||||
candidateList: [],
|
|
||||||
nodeIndex: '',
|
|
||||||
nodeName: '',
|
|
||||||
nodeType: '',
|
|
||||||
scopeCandidates: ''
|
|
||||||
},
|
|
||||||
indexType: '',
|
indexType: '',
|
||||||
titleType: '',
|
titleType: '',
|
||||||
bomIndex: '',
|
bomIndex: '',
|
||||||
@@ -176,9 +169,7 @@ export default {
|
|||||||
if (index == 2) {
|
if (index == 2) {
|
||||||
this.titleType = '编辑审批步骤';
|
this.titleType = '编辑审批步骤';
|
||||||
item.nodeType = item.nodeType * 1;
|
item.nodeType = item.nodeType * 1;
|
||||||
item.areaFilter = item.areaFilter * 1;
|
|
||||||
item.candidateApproverType = item.candidateApproverType * 1;
|
item.candidateApproverType = item.candidateApproverType * 1;
|
||||||
item.scopeCandidates = item.scopeCandidates * 1;
|
|
||||||
this.nodeObj = this.$copy(item)
|
this.nodeObj = this.$copy(item)
|
||||||
} else {
|
} else {
|
||||||
this.titleType = '添加审批步骤';
|
this.titleType = '添加审批步骤';
|
||||||
@@ -191,7 +182,7 @@ export default {
|
|||||||
saveAddProgress() {
|
saveAddProgress() {
|
||||||
this.$refs.addForm.validate((valid) => {
|
this.$refs.addForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.nodeObj.scopeCandidates == 0) this.nodeObj.candidateList = [];
|
if (this.nodeObj.scopeCandidates == '0') this.nodeObj.candidateList = [];
|
||||||
if (this.indexType == 1) {
|
if (this.indexType == 1) {
|
||||||
this.form.processNodeList.push(this.$copy(this.nodeObj));
|
this.form.processNodeList.push(this.$copy(this.nodeObj));
|
||||||
} else {
|
} else {
|
||||||
@@ -209,7 +200,10 @@ export default {
|
|||||||
nodeIndex: '',
|
nodeIndex: '',
|
||||||
nodeName: '',
|
nodeName: '',
|
||||||
nodeType: '',
|
nodeType: '',
|
||||||
scopeCandidates: '1'
|
scopeCandidates: '1',
|
||||||
|
annexEnable: null,
|
||||||
|
pictureEnable: null,
|
||||||
|
areaFilter: null
|
||||||
};
|
};
|
||||||
this.$refs.addForm?.resetFields();
|
this.$refs.addForm?.resetFields();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user