[update] 修改企标制修订自动发起的回显
This commit is contained in:
@@ -188,7 +188,8 @@
|
||||
<script>
|
||||
import {
|
||||
getEnterpriseStandardAddForm,
|
||||
getStandardGradeClassification
|
||||
getStandardGradeClassification,
|
||||
getEnterpriseStandardPlanInfoById
|
||||
} from '@/api/enterpriseStandardLibraryApi'
|
||||
import { StandardSource, FieldType, ApplicationCategory, IsTrial, StandardGradeClassify } from '@/enums/commonEnums'
|
||||
import { getAction } from '@/api/manage'
|
||||
@@ -235,8 +236,6 @@ export default {
|
||||
}
|
||||
} else if (val === StandardGradeClassify.ONE_LEVEL.value) {
|
||||
// 选的是1级
|
||||
// // 带出3级的部门:起草部门
|
||||
// this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds
|
||||
// 带出主起草单位
|
||||
this.formInline.auth_dept = this.formInline.main_drafting_unit
|
||||
// 设置可选择项
|
||||
@@ -375,11 +374,51 @@ export default {
|
||||
methods: {
|
||||
initData (data) {
|
||||
this.isEditSetData = true
|
||||
this.formInline = JSON.parse(data.businessJson)
|
||||
this.formInline.standard_system = this.formInline.standard_system ? this.formInline.standard_system.split(',').map(item => {
|
||||
return { value: item }
|
||||
}) : []
|
||||
this.isEditSetData = false
|
||||
if (this.flowInitType === 'auto' && !data.businessJson) {
|
||||
// 说明是刚刚自动发起的流程
|
||||
getEnterpriseStandardPlanInfoById({ id: data.espId }).then(res => {
|
||||
const formInline = {}
|
||||
// 制修订类型
|
||||
formInline.typeOfRevision = res.result.applicationCategory
|
||||
// 企标编号
|
||||
formInline.standard_number = res.result.newEnStandardNo
|
||||
// 企标名称
|
||||
formInline.standard_name = res.result.newEnStandardName
|
||||
// 标准英文名称
|
||||
formInline.standard_english_name = res.result.enStandardEnglishName
|
||||
// 标准体系
|
||||
formInline.standard_system = res.result.enStandardSystem ? res.result.enStandardSystem.split(',').map(item => {
|
||||
return { value: item }
|
||||
}) : []
|
||||
// 标准等级分类
|
||||
formInline.grade_classification = res.result.enStandardClassification
|
||||
// 授权部门??
|
||||
// formInline.auth_dept = res.result.applicationCategory
|
||||
// 发布日期??
|
||||
// formInline.release_date = res.result.applicationCategory
|
||||
// 实施日期??
|
||||
// formInline.implementation_date = res.result.applicationCategory
|
||||
// 编制说明
|
||||
formInline.comp_illustration = res.result.compilationDescription
|
||||
// 是否试行??
|
||||
// formInline.try_flag = res.result.applicationCategory
|
||||
// 试行周期??
|
||||
// formInline.trial_period = res.result.applicationCategory
|
||||
// 代替标准号
|
||||
// formInline.standard_number = res.result.applicationCategory
|
||||
// 主起草单位,初始化是因为标准等级分类需要带出
|
||||
formInline.main_drafting_unit = res.result.mainDraftingUnit
|
||||
this.formInline = Object.assign({}, formInline)
|
||||
}).finally(() => {
|
||||
this.isEditSetData = false
|
||||
})
|
||||
} else {
|
||||
this.formInline = JSON.parse(data.businessJson)
|
||||
this.formInline.standard_system = this.formInline.standard_system ? this.formInline.standard_system.split(',').map(item => {
|
||||
return { value: item }
|
||||
}) : []
|
||||
this.isEditSetData = false
|
||||
}
|
||||
},
|
||||
getData () {
|
||||
const formInline = Object.assign({}, this.formInline)
|
||||
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
this.dataSource = data.otherDraftUserVOS
|
||||
this.dataSource = data.otherDraftUserVOS || []
|
||||
// 给表单赋值
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.otherDraftUserVOS = this.dataSource
|
||||
data.otherDraftUserVOS = this.dataSource || []
|
||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
||||
return data
|
||||
},
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
if (formData) {
|
||||
// 有数据可以抛出
|
||||
const data = {}
|
||||
data.otherDraftUserVOS = this.dataSource
|
||||
data.otherDraftUserVOS = this.dataSource || []
|
||||
data.formInline = formData.formInline
|
||||
return data
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user