feat: 保存字典值.
This commit is contained in:
@@ -101,7 +101,6 @@
|
||||
import { definedExtraKeys, innerKeys, ExtraParamType } from '../types/const';
|
||||
import { ValueTypeEnum } from '../types/enum.types';
|
||||
import { toOptions } from '@/utils/enum';
|
||||
import { FieldData } from '@arco-design/web-vue/es/form/interface';
|
||||
|
||||
const { visible, setVisible } = useVisible();
|
||||
const { loading, setLoading } = useLoading();
|
||||
@@ -113,7 +112,7 @@
|
||||
return {
|
||||
id: undefined,
|
||||
keyName: undefined,
|
||||
valueType: undefined,
|
||||
valueType: ValueTypeEnum.STRING.value,
|
||||
extraSchema: undefined,
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
@@ -77,6 +77,12 @@
|
||||
<!-- 操作 -->
|
||||
<template #handle="{ record }">
|
||||
<div class="table-handle-wrapper">
|
||||
<!-- 查看 -->
|
||||
<a-button type="text"
|
||||
size="mini"
|
||||
@click="viewDictKey(record.keyName)">
|
||||
查看
|
||||
</a-button>
|
||||
<!-- 修改 -->
|
||||
<a-button type="text"
|
||||
size="mini"
|
||||
@@ -117,13 +123,15 @@
|
||||
import { usePagination } from '@/types/table';
|
||||
import {} from '../types/const';
|
||||
import { ValueTypeEnum } from '../types/enum.types';
|
||||
import { toOptions, getEnumValue } from '@/utils/enum';
|
||||
import { MenuStatusEnum } from '@/views/system/menu/types/enum.types';
|
||||
import { getEnumValue } from '@/utils/enum';
|
||||
import { getDictValueEnum } from '@/api/system/dict-value';
|
||||
import useCopy from '@/hooks/copy';
|
||||
|
||||
const tableRenderData = ref<DictKeyQueryResponse[]>([]);
|
||||
const { loading, setLoading } = useLoading();
|
||||
const emits = defineEmits(['openAdd', 'openUpdate']);
|
||||
|
||||
const { copy } = useCopy();
|
||||
const pagination = usePagination();
|
||||
|
||||
const formModel = reactive<DictKeyQueryRequest>({
|
||||
@@ -163,6 +171,13 @@
|
||||
addedCallback, updatedCallback
|
||||
});
|
||||
|
||||
// 查看
|
||||
const viewDictKey = async (keyName: string) => {
|
||||
const { data } = await getDictValueEnum(keyName);
|
||||
// fixme 后续改为 jsonView
|
||||
await copy(JSON.stringify(data), '复制成功');
|
||||
};
|
||||
|
||||
// 加载数据
|
||||
const doFetchTableData = async (request: DictKeyQueryRequest) => {
|
||||
try {
|
||||
|
||||
@@ -36,7 +36,7 @@ const columns = [
|
||||
}, {
|
||||
title: '操作',
|
||||
slotName: 'handle',
|
||||
width: 130,
|
||||
width: 170,
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user