From 86c10ae1a498c066e549514297f6274200b9a35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Thu, 30 Oct 2025 18:01:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E6=A8=A1=E5=9D=97=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=B9=B6=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E8=83=8C=E6=99=AF=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将仪表盘模块的echarts和dataV初始化逻辑提取到独立模块 修复仓库页面表单字段默认值问题 优化登录页背景图片显示方式为拉伸不重复 --- klp-ui/src/main.js | 10 ++++------ klp-ui/src/modules/dashboardBig/init.js | 12 ++++++++++++ klp-ui/src/views/login.vue | 4 ++++ klp-ui/src/views/wms/warehouse/index.vue | 4 ++-- 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 klp-ui/src/modules/dashboardBig/init.js diff --git a/klp-ui/src/main.js b/klp-ui/src/main.js index 7934c796..8e6cf71c 100644 --- a/klp-ui/src/main.js +++ b/klp-ui/src/main.js @@ -3,13 +3,12 @@ import Vue from 'vue' import Cookies from 'js-cookie' import VueKonva from 'vue-konva'; -import * as echarts from 'echarts' -import dataV from '@jiaminghi/data-view'; - import Element from 'element-ui' -import '@/modules/dashboardBig/assets/scss/style.scss'; + import './assets/styles/element-variables.scss' +import dashboardBigPlugin from '@/modules/dashboardBig/init.js' + import vueFlvPlayer from 'vue-flv-player' import '@/assets/styles/index.scss' // global css @@ -58,7 +57,6 @@ Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download Vue.prototype.handleTree = handleTree -Vue.prototype.$echarts = echarts // 全局组件挂载 @@ -75,8 +73,8 @@ Vue.use(vueFlvPlayer) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) -Vue.use(dataV); Vue.use(VueKonva); +Vue.use(dashboardBigPlugin) DictData.install() /** diff --git a/klp-ui/src/modules/dashboardBig/init.js b/klp-ui/src/modules/dashboardBig/init.js new file mode 100644 index 00000000..840888f1 --- /dev/null +++ b/klp-ui/src/modules/dashboardBig/init.js @@ -0,0 +1,12 @@ +import * as echarts from 'echarts' +import dataV from '@jiaminghi/data-view'; +import '@/modules/dashboardBig/assets/scss/style.scss'; + +// 导出包含 install 方法的对象,供 Vue.use() 调用 +export default { + install(Vue) { + // 原逻辑放入 install 方法中,接收 Vue 构造函数作为参数 + Vue.prototype.$echarts = echarts; + Vue.use(dataV); + } +} \ No newline at end of file diff --git a/klp-ui/src/views/login.vue b/klp-ui/src/views/login.vue index 0b932b08..107a2458 100644 --- a/klp-ui/src/views/login.vue +++ b/klp-ui/src/views/login.vue @@ -179,6 +179,10 @@ $--metal-gradient-light: linear-gradient(145deg, #f5f5f550, #ffffff50); justify-content: center; align-items: center; background: url('../assets/images/login.jpg'); // 金属渐变背景 + // 拉伸且不重复 + background-size: cover; + background-position: center; + background-repeat: no-repeat; } .login-box { diff --git a/klp-ui/src/views/wms/warehouse/index.vue b/klp-ui/src/views/wms/warehouse/index.vue index 6732e262..319b0e80 100644 --- a/klp-ui/src/views/wms/warehouse/index.vue +++ b/klp-ui/src/views/wms/warehouse/index.vue @@ -190,7 +190,7 @@ export default { parentId: undefined, warehouseCode: undefined, warehouseName: undefined, - warehouseType: 1, + warehouseType: undefined, sortNo: undefined, isEnabled: undefined, }, @@ -265,7 +265,7 @@ export default { parentId: null, warehouseCode: null, warehouseName: null, - warehouseType: null, + warehouseType: 1, sortNo: null, isEnabled: null, delFlag: null,