diff --git a/src/views/dataset/RepStoreMapping/RepStoreMapping.vue b/src/views/dataset/RepStoreMapping/RepStoreMapping.vue index 7c4beaf..c50c90f 100644 --- a/src/views/dataset/RepStoreMapping/RepStoreMapping.vue +++ b/src/views/dataset/RepStoreMapping/RepStoreMapping.vue @@ -22,6 +22,7 @@ import { Dialog } from '@/components/Dialog' import { getWidth } from '@/utils'; import Detail from './components/Detail.vue' import { Upload } from '@/components/Upload' +import { WHETHER_UUID_LIST,WHETHER_UNITEDKEY_LIST } from './constants' const { t } = useI18n() @@ -93,7 +94,12 @@ const tableColumns = reactive([ }, { field: 'primarykey', - label: '组成联合主键' + label: '组成联合主键', + slots:{ + default:(data:any)=>{ + return {WHETHER_UNITEDKEY_LIST[data.row.primarykey]?.label} + } + } }, { field: 'primaryKeyNum', @@ -101,7 +107,12 @@ const tableColumns = reactive([ }, { field: 'uuid', - label: '标识是否为uuid' + label: '标识是否为uuid', + slots:{ + default:(data:any)=>{ + return {WHETHER_UUID_LIST[data.row.uuid]?.label} + } + } }, { field: 'action', diff --git a/src/views/dataset/RepStoreMapping/components/Write.vue b/src/views/dataset/RepStoreMapping/components/Write.vue index 433e10c..e881857 100644 --- a/src/views/dataset/RepStoreMapping/components/Write.vue +++ b/src/views/dataset/RepStoreMapping/components/Write.vue @@ -2,7 +2,10 @@ import { Form, FormSchema } from '@/components/Form' import { useForm } from '@/hooks/web/useForm' import { PropType, reactive, watch } from 'vue' +import { WHETHER_UUID_LIST,WHETHER_UNITEDKEY_LIST } from '../constants' import { useValidator } from '@/hooks/web/useValidator' +import { ElButton, ElMessage, ElMessageBox } from 'element-plus'; + const { required } = useValidator() @@ -55,7 +58,7 @@ const formSchema = reactive([ }, { field: 'mappingName', - label: '映射目标列名称)', + label: '映射目标列名称', component: 'Input', componentProps: { @@ -96,10 +99,14 @@ const formSchema = reactive([ { field: 'primarykey', label: '组成联合主键', - component: 'Input', + component: 'Select', componentProps: { - + options:WHETHER_UNITEDKEY_LIST }, + value:'0', + formItemProps: { + rules: [required()], + } }, { field: 'primaryKeyNum', @@ -112,10 +119,14 @@ const formSchema = reactive([ { field: 'uuid', label: '标识是否为uuid', - component: 'Input', + component: 'Select', componentProps: { - + options:WHETHER_UUID_LIST }, + value:'0', + formItemProps: { + rules: [required()], + } } ]) diff --git a/src/views/dataset/RepStoreMapping/constants.ts b/src/views/dataset/RepStoreMapping/constants.ts index e69de29..5b6e744 100644 --- a/src/views/dataset/RepStoreMapping/constants.ts +++ b/src/views/dataset/RepStoreMapping/constants.ts @@ -0,0 +1,21 @@ +export const WHETHER_UUID_LIST = [//标识是否是uuid,0不是,1是 + { + value:"0", + label:"不是" + }, + { + value:"1", + label:"是" + } +] + +export const WHETHER_UNITEDKEY_LIST = [//组成联合主键 0:否 1:是 + { + value:"0", + label:"否" + }, + { + value:"1", + label:"是" + } +] \ No newline at end of file