|
@@ -12,7 +12,7 @@ import {
|
|
getTranslate
|
|
getTranslate
|
|
} from '@/api'
|
|
} from '@/api'
|
|
|
|
|
|
-import { metadata, metadataType } from '@/utils/dataGovernance'
|
|
|
|
|
|
+import { metadata } from '@/utils/dataGovernance'
|
|
import { api } from '@/api/dataGovernance'
|
|
import { api } from '@/api/dataGovernance'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -82,18 +82,23 @@ export default {
|
|
label: '请输入制作单位'
|
|
label: '请输入制作单位'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- type: 'autocomplete',
|
|
|
|
|
|
+ type: 'text',
|
|
key: 'data_type',
|
|
key: 'data_type',
|
|
label: '请选择数据类型 *',
|
|
label: '请选择数据类型 *',
|
|
col: 6,
|
|
col: 6,
|
|
- noAttach: true,
|
|
|
|
- rules: [v => !!v || '请选择数据类型'],
|
|
|
|
- items: [...metadataType]
|
|
|
|
|
|
+ rules: [v => !!v || '请选择输入类型']
|
|
|
|
+
|
|
|
|
+ // type: 'autocomplete',
|
|
|
|
+ // key: 'data_type',
|
|
|
|
+ // label: '请选择数据类型 *',
|
|
|
|
+ // col: 6,
|
|
|
|
+ // noAttach: true,
|
|
|
|
+ // rules: [v => !!v || '请选择数据类型'],
|
|
|
|
+ // items: [...metadataType]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'tag',
|
|
key: 'tag',
|
|
- value: null,
|
|
|
|
label: '请选择标签',
|
|
label: '请选择标签',
|
|
col: 6,
|
|
col: 6,
|
|
noAttach: true,
|
|
noAttach: true,
|
|
@@ -109,7 +114,6 @@ export default {
|
|
{
|
|
{
|
|
type: 'ifRadio',
|
|
type: 'ifRadio',
|
|
key: 'status',
|
|
key: 'status',
|
|
- value: 1,
|
|
|
|
label: '启用',
|
|
label: '启用',
|
|
width: 120,
|
|
width: 120,
|
|
items: [{ label: '是', value: 1 }, { label: '否', value: 0 }]
|
|
items: [{ label: '是', value: 1 }, { label: '否', value: 0 }]
|
|
@@ -119,11 +123,11 @@ export default {
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
this.init()
|
|
this.init()
|
|
- if (!this.itemData.id) {
|
|
|
|
|
|
+ if (!Object.keys(this.itemData).length) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.formValues = this.formItems.reduce((acc, cur) => {
|
|
this.formValues = this.formItems.reduce((acc, cur) => {
|
|
- acc[cur.key] = this.itemData[cur.key]
|
|
|
|
|
|
+ acc[cur.key] = this.itemData[cur.key] ?? this.formValues[cur.key]
|
|
return acc
|
|
return acc
|
|
}, {})
|
|
}, {})
|
|
},
|
|
},
|