|
@@ -1,7 +1,7 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { isString } from "@pureadmin/utils";
|
|
import { isString } from "@pureadmin/utils";
|
|
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
|
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
|
|
-import { useRouter, useRoute } from "vue-router";
|
|
|
|
|
|
|
+import { useRouter } from "vue-router";
|
|
|
import {
|
|
import {
|
|
|
type PlusColumn,
|
|
type PlusColumn,
|
|
|
PlusDialogForm,
|
|
PlusDialogForm,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
deleteSystemDictType,
|
|
deleteSystemDictType,
|
|
|
getSystemDictById,
|
|
getSystemDictById,
|
|
|
getSystemDictList,
|
|
getSystemDictList,
|
|
|
|
|
+ refreshDictCache,
|
|
|
updateSystemDictType
|
|
updateSystemDictType
|
|
|
} from "@/api/system/dict";
|
|
} from "@/api/system/dict";
|
|
|
import { computed, reactive, ref, toRefs } from "vue";
|
|
import { computed, reactive, ref, toRefs } from "vue";
|
|
@@ -41,6 +42,20 @@ const refresh = () => {
|
|
|
plusPageInstance.value?.getList();
|
|
plusPageInstance.value?.getList();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const handleRefresh = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ let res = await refreshDictCache();
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ ElMessage.success("刷新缓存成功");
|
|
|
|
|
+ refresh();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage.error(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ ElMessage.error("刷新缓存失败");
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const dialogTitle = computed(() => (state.isCreate ? "新增" : "编辑"));
|
|
const dialogTitle = computed(() => (state.isCreate ? "新增" : "编辑"));
|
|
|
|
|
|
|
|
const tableConfig: PlusColumn[] = [
|
|
const tableConfig: PlusColumn[] = [
|
|
@@ -303,6 +318,9 @@ const { form, confirmLoading, rules, dialogVisible } = toRefs(state);
|
|
|
<el-button size="default" type="success" @click="handleCreate">
|
|
<el-button size="default" type="success" @click="handleCreate">
|
|
|
新增
|
|
新增
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button size="default" type="default" @click="handleRefresh">
|
|
|
|
|
+ 刷新缓存
|
|
|
|
|
+ </el-button>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
|
</PlusPage>
|
|
</PlusPage>
|