|
|
@@ -1,7 +1,7 @@
|
|
|
<script setup lang="tsx">
|
|
|
import { ref } from 'vue';
|
|
|
import { useRoute } from 'vue-router';
|
|
|
-import { NEllipsis, NTooltip, type TreeOption } from 'naive-ui';
|
|
|
+import { NTooltip, type TreeOption } from 'naive-ui';
|
|
|
import {
|
|
|
fetchBatchDeleteDictData,
|
|
|
fetchBatchDeleteDictType,
|
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
fetchUpdateDictType
|
|
|
} from '@/service/api/config/dict';
|
|
|
import { useDict } from '@/hooks/business/dict';
|
|
|
-import { copyTextToClipboard } from '@/utils/zt';
|
|
|
import { useTable } from '@/components/zt/Table/hooks/useTable';
|
|
|
import { $t } from '@/locales';
|
|
|
import ButtonIcon from '@/components/custom/button-icon.vue';
|
|
|
@@ -23,8 +22,8 @@ const [registerTable, { refresh, getTableLoding, setTableConfig, setFieldsValue,
|
|
|
searchFormConfig: {
|
|
|
schemas: [
|
|
|
{
|
|
|
- label: '字典名称',
|
|
|
- field: 'dictName',
|
|
|
+ label: '字典标签',
|
|
|
+ field: 'dictLabel',
|
|
|
component: 'NInput'
|
|
|
},
|
|
|
{
|
|
|
@@ -45,7 +44,8 @@ const [registerTable, { refresh, getTableLoding, setTableConfig, setFieldsValue,
|
|
|
},
|
|
|
tableConfig: {
|
|
|
keyField: 'dictCode',
|
|
|
- title: '字典列表'
|
|
|
+ title: '字典列表',
|
|
|
+ showAddButton: false
|
|
|
}
|
|
|
});
|
|
|
const [
|
|
|
@@ -115,16 +115,7 @@ async function handleClickTree(keys: string[]) {
|
|
|
const dictDataType = dictData.value.find(item => item.dictType === dictType);
|
|
|
|
|
|
setTableConfig({
|
|
|
- title: dictDataType
|
|
|
- ? () => (
|
|
|
- <NEllipsis lineClamp={2} class="flex">
|
|
|
- <span>{dictDataType.dictName}</span>
|
|
|
- <span class="cursor-copy" onClick={async () => await copyTextToClipboard(dictDataType.dictType)}>
|
|
|
- {` (${dictDataType.dictType} )`}
|
|
|
- </span>
|
|
|
- </NEllipsis>
|
|
|
- )
|
|
|
- : '字典列表',
|
|
|
+ title: dictDataType ? `${dictDataType.dictName}(${dictDataType.dictType} )` : '字典列表',
|
|
|
keyField: 'dictCode',
|
|
|
showAddButton: Boolean(dictDataType)
|
|
|
});
|