配置、字典
This commit is contained in:
parent
0b06f4ca58
commit
5a12e91bc8
@ -1,19 +1,16 @@
|
||||
<template>
|
||||
<PageWrapper>
|
||||
<n-grid x-gap="12" cols="1 s:1 m:1 l:3 xl:3 2xl:3" responsive="screen">
|
||||
<n-grid-item span="1">
|
||||
<n-grid x-gap="12" cols="1 s:1 m:1 l:24 xl:24 2xl:24" responsive="screen">
|
||||
<n-grid-item span="7">
|
||||
<n-card shadow="hover" class="border-0">
|
||||
<template #header>
|
||||
<n-grid cols="24">
|
||||
<n-gi span="18">
|
||||
<n-space>
|
||||
<n-input
|
||||
type="text"
|
||||
v-model:value="params.name"
|
||||
placeholder="请输入配置名称"
|
||||
clearable
|
||||
/>
|
||||
</n-gi>
|
||||
<n-gi span="6" style="text-align: right">
|
||||
<n-button
|
||||
type="primary"
|
||||
@click="
|
||||
@ -27,8 +24,7 @@
|
||||
</n-icon> </template
|
||||
>查询
|
||||
</n-button>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
</n-space>
|
||||
<div style="margin-top: 15px">
|
||||
<n-space>
|
||||
<n-button type="primary" @click="handleAdd" v-perm="['sys:config:add']">
|
||||
@ -79,7 +75,7 @@
|
||||
</template>
|
||||
</n-card>
|
||||
</n-grid-item>
|
||||
<n-grid-item span="2">
|
||||
<n-grid-item span="17">
|
||||
<n-card shadow="hover" class="mb-4 border-0 proCard">
|
||||
<configItem :configId="configId" v-if="configItemShow" />
|
||||
</n-card>
|
||||
|
@ -1,19 +1,16 @@
|
||||
<template>
|
||||
<PageWrapper>
|
||||
<n-grid x-gap="12" cols="1 s:1 m:1 l:3 xl:3 2xl:3" responsive="screen">
|
||||
<n-grid-item span="1">
|
||||
<n-card shadow="hover" class="border-0">
|
||||
<n-grid x-gap="12" cols="1 s:1 m:1 l:24 xl:24 2xl:24" responsive="screen">
|
||||
<n-grid-item span="7">
|
||||
<n-card shadow="hover" class="border-0" size="small">
|
||||
<template #header>
|
||||
<n-grid cols="24">
|
||||
<n-gi span="18">
|
||||
<n-space :size="4">
|
||||
<n-input
|
||||
type="text"
|
||||
v-model:value="params.name"
|
||||
placeholder="请输入字典名称"
|
||||
clearable
|
||||
/>
|
||||
</n-gi>
|
||||
<n-gi span="6" style="text-align: right; margin-left: 5px">
|
||||
<n-button
|
||||
type="primary"
|
||||
@click="
|
||||
@ -27,8 +24,10 @@
|
||||
</n-icon> </template
|
||||
>查询
|
||||
</n-button>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-button type="primary" @click="dictRefresh" v-perm="['sys:dict:cache']">
|
||||
<template #icon> <RedoOutlined /> </template>刷新缓存</n-button
|
||||
>
|
||||
</n-space>
|
||||
<div style="margin-top: 15px">
|
||||
<n-space>
|
||||
<n-button type="primary" @click="handleAdd" v-perm="['sys:dict:add']">
|
||||
@ -79,8 +78,8 @@
|
||||
</template>
|
||||
</n-card>
|
||||
</n-grid-item>
|
||||
<n-grid-item span="2">
|
||||
<n-card shadow="hover" class="mb-4 border-0 proCard">
|
||||
<n-grid-item span="17">
|
||||
<n-card shadow="hover" class="border-0 proCard" size="small">
|
||||
<dictItem :dictId="dictId" v-if="dictItemShow" />
|
||||
</n-card>
|
||||
</n-grid-item>
|
||||
@ -97,8 +96,14 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineAsyncComponent, onMounted } from 'vue';
|
||||
import { getDictList, dictDelete } from '@/api/data/dictionary';
|
||||
import { PlusOutlined, FormOutlined, DeleteOutlined, SearchOutlined } from '@vicons/antd';
|
||||
import { getDictList, refreshCache, dictDelete } from '@/api/data/dictionary';
|
||||
import {
|
||||
PlusOutlined,
|
||||
FormOutlined,
|
||||
DeleteOutlined,
|
||||
SearchOutlined,
|
||||
RedoOutlined,
|
||||
} from '@vicons/antd';
|
||||
import editDialog from './edit.vue';
|
||||
import dictItem from './dictItem.vue';
|
||||
import { useMessage, useDialog } from 'naive-ui';
|
||||
@ -149,6 +154,13 @@
|
||||
await nextTick();
|
||||
createModalRef.value.openModal();
|
||||
};
|
||||
/**
|
||||
* 刷新缓存
|
||||
*/
|
||||
async function dictRefresh() {
|
||||
await refreshCache();
|
||||
message.success('刷新成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据行选中事件
|
||||
|
Loading…
Reference in New Issue
Block a user