From 9a02598c00c0af120b38cfd09229abe17b10c4b7 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 25 十月 2024 11:13:13 +0800 Subject: [PATCH] !151 发布 vue 版本 5.2.3 与 cloud 版本 2.2.2 Merge pull request !151 from 疯狂的狮子Li/dev --- src/views/system/dict/index.vue | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index c87cf46..4ad70d0 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -3,12 +3,12 @@ <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <div v-show="showSearch" class="mb-[10px]"> <el-card shadow="hover"> - <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="68px"> + <el-form ref="queryFormRef" :model="queryParams" :inline="true"> <el-form-item label="瀛楀吀鍚嶇О" prop="dictName"> - <el-input v-model="queryParams.dictName" placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" clearable style="width: 240px" @keyup.enter="handleQuery" /> + <el-input v-model="queryParams.dictName" placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" clearable @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="瀛楀吀绫诲瀷" prop="dictType"> - <el-input v-model="queryParams.dictType" placeholder="璇疯緭鍏ュ瓧鍏哥被鍨�" clearable style="width: 240px" @keyup.enter="handleQuery" /> + <el-input v-model="queryParams.dictType" placeholder="璇疯緭鍏ュ瓧鍏哥被鍨�" clearable @keyup.enter="handleQuery" /> </el-form-item> <el-form-item label="鍒涘缓鏃堕棿" style="width: 308px"> <el-date-picker @@ -48,6 +48,9 @@ </el-col> <el-col :span="1.5"> <el-button v-hasPermi="['system:dict:remove']" type="danger" plain icon="Refresh" @click="handleRefreshCache">鍒锋柊缂撳瓨</el-button> + </el-col> + <el-col :span="1.5"> + <el-button v-if="userId === 1" type="success" plain icon="Refresh" @click="handleSyncTenantDict">鍚屾绉熸埛瀛楀吀</el-button> </el-col> <right-toolbar v-model:showSearch="showSearch" @query-table="getList"></right-toolbar> </el-row> @@ -109,11 +112,15 @@ <script setup name="Dict" lang="ts"> import useDictStore from '@/store/modules/dict'; +import useUserStore from "@/store/modules/user"; import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'; import { DictTypeForm, DictTypeQuery, DictTypeVO } from '@/api/system/dict/type/types'; +import { syncTenantDict } from "@/api/system/tenant"; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const userStore = useUserStore(); +const userId = ref(userStore.userId); const typeList = ref<DictTypeVO[]>([]); const loading = ref(true); const showSearch = ref(true); @@ -239,6 +246,12 @@ proxy?.$modal.msgSuccess('鍒锋柊鎴愬姛'); useDictStore().cleanDict(); }; +/**鍚屾绉熸埛瀛楀吀*/ +const handleSyncTenantDict = async () => { + await proxy?.$modal.confirm('纭瑕佸悓姝ユ墍鏈夌鎴峰瓧鍏稿悧锛�'); + let res = await syncTenantDict(); + proxy?.$modal.msgSuccess(res.msg); +}; onMounted(() => { getList(); -- Gitblit v1.9.3