diff --git a/snowy-admin-web/src/utils/request.js b/snowy-admin-web/src/utils/request.js
index 7671d0a5..ddf7603a 100644
--- a/snowy-admin-web/src/utils/request.js
+++ b/snowy-admin-web/src/utils/request.js
@@ -127,7 +127,8 @@ service.interceptors.response.use(
'turn',
'adjust',
'reject',
- 'saveDraft'
+ 'saveDraft',
+ 'setDefault'
]
apiNameArray.forEach((apiName) => {
// 上面去掉接口路径后,方法内包含内置的进行统一提示成功
diff --git a/snowy-admin-web/src/utils/tool.js b/snowy-admin-web/src/utils/tool.js
index efb97d1b..2536d8d8 100644
--- a/snowy-admin-web/src/utils/tool.js
+++ b/snowy-admin-web/src/utils/tool.js
@@ -106,6 +106,24 @@ tool.dictTypeData = (dictValue, value) => {
return dict ? dict.dictLabel : ''
}
+// 字典颜色翻译方法,界面插槽使用方法 {{ $TOOL.dictTypeColor('AI_CHANNEL_STATUS', record.status) }}
+tool.dictTypeColor = (dictValue, value) => {
+ const dictTypeTree = tool.dictDataAll()
+ if (!dictTypeTree) {
+ return 'default'
+ }
+ const tree = dictTypeTree.find((item) => item.dictValue === dictValue)
+ if (!tree) {
+ return 'default'
+ }
+ const children = tree.children
+ if (!tree.children) {
+ return 'default'
+ }
+ const dict = children.find((item) => item.dictValue === value)
+ return dict ? dict.dictColor : 'default'
+}
+
// 获取某个code下字典的列表,多用于字典下拉框
tool.dictTypeList = (dictValue) => {
const dictTypeTree = tool.dictDataAll()
diff --git a/snowy-admin-web/src/views/auth/monitor/tokenInfoList.vue b/snowy-admin-web/src/views/auth/monitor/tokenInfoList.vue
index 7b537aad..aee93950 100644
--- a/snowy-admin-web/src/views/auth/monitor/tokenInfoList.vue
+++ b/snowy-admin-web/src/views/auth/monitor/tokenInfoList.vue
@@ -18,13 +18,7 @@
>
-
- {{ $TOOL.dictTypeData('AUTH_DEVICE_TYPE', record.tokenDevice) }}
-
-
- {{ $TOOL.dictTypeData('AUTH_DEVICE_TYPE', record.tokenDevice) }}
-
-
+
{{ $TOOL.dictTypeData('AUTH_DEVICE_TYPE', record.tokenDevice) }}
diff --git a/snowy-admin-web/src/views/biz/notice/detail.vue b/snowy-admin-web/src/views/biz/notice/detail.vue
index 874c7a62..7cbda1aa 100644
--- a/snowy-admin-web/src/views/biz/notice/detail.vue
+++ b/snowy-admin-web/src/views/biz/notice/detail.vue
@@ -3,13 +3,7 @@
{{ formData.title }}
-
- {{ $TOOL.dictTypeData('BIZ_NOTICE_TYPE', formData.type) }}
-
-
- {{ $TOOL.dictTypeData('BIZ_NOTICE_TYPE', formData.type) }}
-
-
+
{{ $TOOL.dictTypeData('BIZ_NOTICE_TYPE', formData.type) }}
@@ -31,7 +25,7 @@
>
-
+
{{ $TOOL.dictTypeData('BIZ_NOTICE_PLACE', textValue) }}
diff --git a/snowy-admin-web/src/views/biz/notice/index.vue b/snowy-admin-web/src/views/biz/notice/index.vue
index 18bc204d..9d8dc36d 100644
--- a/snowy-admin-web/src/views/biz/notice/index.vue
+++ b/snowy-admin-web/src/views/biz/notice/index.vue
@@ -86,19 +86,12 @@
未上传
-
+
{{ $TOOL.dictTypeData('BIZ_NOTICE_TYPE', record.type) }}
-
- {{ $TOOL.dictTypeData('BIZ_NOTICE_TYPE', record.type) }}
-
-
- {{ $TOOL.dictTypeData('BIZ_NOTICE_TYPE', record.type) }}
-
- 无
-
+
{{ $TOOL.dictTypeData('BIZ_NOTICE_PLACE', textValue) }}
diff --git a/snowy-admin-web/src/views/dev/slideshow/index.vue b/snowy-admin-web/src/views/dev/slideshow/index.vue
index 316bfcc5..39caa9c7 100644
--- a/snowy-admin-web/src/views/dev/slideshow/index.vue
+++ b/snowy-admin-web/src/views/dev/slideshow/index.vue
@@ -62,10 +62,7 @@
>
-
- {{ $TOOL.dictTypeData('WHETHER_TO_CLICK', record.whetherToClick) }}
-
-
+
{{ $TOOL.dictTypeData('WHETHER_TO_CLICK', record.whetherToClick) }}
@@ -92,7 +89,7 @@
- {{
+ {{
$TOOL.dictTypeData('DEV_SLIDESHOW_PLACE', textValue)
}}
diff --git a/snowy-admin-web/src/views/sys/resource/menu/index.vue b/snowy-admin-web/src/views/sys/resource/menu/index.vue
index 36688932..ba6c7462 100644
--- a/snowy-admin-web/src/views/sys/resource/menu/index.vue
+++ b/snowy-admin-web/src/views/sys/resource/menu/index.vue
@@ -79,29 +79,14 @@
-
-
- {{ $TOOL.dictTypeData('MENU_TYPE', record.menuType) }}
-
-
- {{ $TOOL.dictTypeData('MENU_TYPE', record.menuType) }}
-
-
- {{ $TOOL.dictTypeData('MENU_TYPE', record.menuType) }}
-
-
+
{{ $TOOL.dictTypeData('MENU_TYPE', record.menuType) }}
-
+
{{ $TOOL.dictTypeData('MENU_VISIBLE', record.visible) }}
-
-
- {{ $TOOL.dictTypeData('MENU_VISIBLE', record.visible) }}
-
- 显示
-
diff --git a/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/index.vue.btl b/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/index.vue.btl
index a56ea1d5..acc7f7e2 100644
--- a/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/index.vue.btl
+++ b/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/index.vue.btl
@@ -130,7 +130,7 @@
<% } else if (configList[i].effectType == 'checkbox') { %>
- {{ $TOOL.dictTypeData('${configList[i].dictTypeCode}', textValue) }}
+ {{ $TOOL.dictTypeData('${configList[i].dictTypeCode}', textValue) }}
<% } else if (configList[i].effectType == 'imageUpload') { %>