From 9af2ff5536505b75224f1547954d7fd8711fc556 Mon Sep 17 00:00:00 2001 From: hui <770260999@qq.com> Date: Mon, 22 Jan 2024 17:00:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=83=85=E6=8A=A5=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- ruoyi-ui/src/common/getBoardBaseData.js | 38 +++++++++---------- ruoyi-ui/src/main.js | 3 -- .../components/infoBoard/BoardInfoEditor.vue | 36 ++++++++++-------- .../components/infoBoard/BoardPreview.vue | 2 +- .../components/infoBoard/BoardTplPreview.vue | 22 +---------- ruoyi-ui/src/views/JiHeExpressway/index.vue | 12 +++++- .../pages/Home/components/InfoBoard/index.vue | 1 + .../pages/service/board/index.vue | 13 +++++-- .../views/JiHeExpressway/utils/infoBoard.js | 23 +++++------ ruoyi-ui/vue.config.js | 3 +- 11 files changed, 75 insertions(+), 81 deletions(-) diff --git a/.gitignore b/.gitignore index 955b7572..88cff102 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,5 @@ nbdist/ /data node_modules package-lock.json -dist.zip \ No newline at end of file +dist.zip +ruoyi-ui/dist.zip diff --git a/ruoyi-ui/src/common/getBoardBaseData.js b/ruoyi-ui/src/common/getBoardBaseData.js index 6343b03e..221d4b83 100644 --- a/ruoyi-ui/src/common/getBoardBaseData.js +++ b/ruoyi-ui/src/common/getBoardBaseData.js @@ -1,27 +1,25 @@ import Vue from "vue"; import { getDicts } from "@/api/system/dict/data"; export default function(){ - getDicts('iot_device_font_type').then(res => { - let dic = {}; - res.data.forEach(item=>{ - dic[item.dictValue] = item.cssClass; - }); - Vue.prototype.fontTypeDic = dic; - Vue.prototype.fontTypeList = res.data; - // console.log(fontTypeList, "字体类型"); - }) - getDicts('iot_devices_font_color').then(res => { - - }) - getDicts('iot_device_font_inScreen_mode').then(res => { - - }) - getDicts('iot_template_category').then(res => { + - }) - getDicts('iot_device_font_size').then(res => { - - }) + return Promise.all([ + getDicts('iot_device_font_type'), + // getDicts('iot_devices_font_color'), + // getDicts('iot_device_font_inScreen_mode'), + // getDicts('iot_template_category'), + // getDicts('iot_device_font_size'), + ]).then(resArr=>{ + initFontType(resArr[0]); + function initFontType(res){ + let dic = {}; + res.data.forEach(item => { + dic[item.dictValue] = item.cssClass; + }); + Vue.prototype.fontTypeDic = dic; + Vue.prototype.fontTypeList = res.data; + } + }); } \ No newline at end of file diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 9455facc..e7b808be 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -94,9 +94,6 @@ Vue.prototype.handleTree = handleTree Vue.prototype.socket = Socket Vue.prototype.numberMul = numberMul -import getBoardBaseData from '@/common/getBoardBaseData' -Vue.prototype.getBoardBaseData = getBoardBaseData; - // gis Vue.prototype.$GlobalConfig = config.GlobalConfig diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue index 499281df..baddeea8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue @@ -1,5 +1,5 @@