refactor: 重构仪表盘模块初始化逻辑并优化登录页背景样式

将仪表盘模块的echarts和dataV初始化逻辑提取到独立模块
修复仓库页面表单字段默认值问题
优化登录页背景图片显示方式为拉伸不重复
This commit is contained in:
砂糖
2025-10-30 18:01:19 +08:00
parent 265ad2fda6
commit 86c10ae1a4
4 changed files with 22 additions and 8 deletions

View File

@@ -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()
/**

View File

@@ -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);
}
}

View File

@@ -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 {

View File

@@ -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,