[update] 修改企标制修订流程

This commit is contained in:
lideqin
2023-12-22 14:11:41 +08:00
parent 525a36341d
commit be10e66144
9 changed files with 335 additions and 190 deletions
@@ -1,6 +1,6 @@
<template>
<div>
<base-info-form ref="baseInfoForm" v-bind="$attrs" :disabled="disabled"></base-info-form>
<base-info-form ref="baseInfoForm" v-bind="$attrs" :disabled="disabled" @processNameChange="processNameChange"></base-info-form>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -73,28 +73,28 @@ export default {
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center',
width: 180,
dataIndex: 'draftingUnit_dictText',
dataIndex: 'dept_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center',
width: 180,
dataIndex: 'drafter_dictText',
dataIndex: 'user_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center',
width: 180,
dataIndex: 'draftingScope',
dataIndex: 'scope',
scopedSlots: { customRender: 'text' }
},
{ // 截止日期
title: this.$t('expirationDate'),
align: 'center',
width: 180,
dataIndex: 'expirationDate',
dataIndex: 'deadline',
scopedSlots: { customRender: 'text' }
},
{ // 操作
@@ -114,11 +114,11 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
this.dataSource = data.otherDraftUserVOS
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
@@ -129,19 +129,22 @@ export default {
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
const formData = this.$refs.baseInfoForm.getDataValidate()
if (formData && this.dataSource && this.dataSource.length > 0) {
async getDataValidate () {
const formData = await this.$refs.baseInfoForm.getDataValidate()
console.log(formData)
if (formData) {
// 有数据可以抛出
const data = {}
data.dataSource = this.dataSource
data.formInline = formData.formInline
return data
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
return false
}
},
processNameChange (value) {
this.$emit('processNameChange', value)
},
handleAdd () {
this.modalType = 'add'
this.$refs.addEditDrafterDrawer.add()