diff --git a/src/assets/css/index.css b/src/assets/css/index.css index a2a46b0..e273fcb 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -29,6 +29,9 @@ --elmenuitem: rgb(58, 58, 60); /* 侧边栏默认背景色,,改成白色 */ + --elmentitemtwo: webkit-linear-gradient(transparent); + /* 侧边栏二级菜单默认渐变色 */ + --lineargradient: -webkit-linear-gradient(transparent); /* 侧边栏标签默认渐变色,默认为透明色,改变后为-webkit-linear-gradient(0deg, #065cfd, #bbd1f6 80%) */ diff --git a/src/assets/css/index.css b/src/assets/css/index.css index a2a46b0..e273fcb 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -29,6 +29,9 @@ --elmenuitem: rgb(58, 58, 60); /* 侧边栏默认背景色,,改成白色 */ + --elmentitemtwo: webkit-linear-gradient(transparent); + /* 侧边栏二级菜单默认渐变色 */ + --lineargradient: -webkit-linear-gradient(transparent); /* 侧边栏标签默认渐变色,默认为透明色,改变后为-webkit-linear-gradient(0deg, #065cfd, #bbd1f6 80%) */ diff --git a/src/components/configure/RtuConfig.vue b/src/components/configure/RtuConfig.vue index 59b43d5..d52244a 100644 --- a/src/components/configure/RtuConfig.vue +++ b/src/components/configure/RtuConfig.vue @@ -401,12 +401,27 @@ export default { data() { return { - querySite:'', - rtuCode:'', - querySiteList:[], - siteNameList:['遥测站设置','中心站设置','传感器型号选择','气象传感通信设置','工业相机设置','水文传感通信','从机设置', - '数据滤波','水位计','雨量计','流量计','蒸发皿','土壤沉降仪','4-20mA设置','其他设置'], - formAll:[], + querySite: "", + rtuCode: "", + querySiteList: [], + siteNameList: [ + "遥测站设置", + "中心站设置", + "传感器型号选择", + "气象传感通信设置", + "工业相机设置", + "水文传感通信", + "从机设置", + "数据滤波", + "水位计", + "雨量计", + "流量计", + "蒸发皿", + "土壤沉降仪", + "4-20mA设置", + "其他设置" + ], + formAll: [], // siteNameList:[], formAllBody: [], activeIndex: "0", @@ -424,11 +439,11 @@ }, temStorageEcho() { // this.activeIndex = '0' - if(localStorage.getItem(name)){ + if (localStorage.getItem(name)) { this.formAll = JSON.parse(localStorage.getItem(name)); - this.$message({ message: '暂存回显成功', type: "success" }); - } else{ - this.$message({ message: '无暂存内容', type: "warning" }); + this.$message({ message: "暂存回显成功", type: "success" }); + } else { + this.$message({ message: "无暂存内容", type: "warning" }); } // console.log(JSON.parse(sessionStorage.getItem(name)),111) }, @@ -852,12 +867,12 @@ }); } }, - created(){ - this.getSiteList().then(res=>{ + created() { + this.getSiteList().then(res => { this.initPage(this.querySiteList[0]); }); this.formControl(); - }, + } // beforeRouteLeave (to, from, next) { // // 导航离开该组件的对应路由时调用 // // 可以访问组件实例 `this` @@ -870,152 +885,148 @@ }; diff --git a/src/assets/css/index.css b/src/assets/css/index.css index a2a46b0..e273fcb 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -29,6 +29,9 @@ --elmenuitem: rgb(58, 58, 60); /* 侧边栏默认背景色,,改成白色 */ + --elmentitemtwo: webkit-linear-gradient(transparent); + /* 侧边栏二级菜单默认渐变色 */ + --lineargradient: -webkit-linear-gradient(transparent); /* 侧边栏标签默认渐变色,默认为透明色,改变后为-webkit-linear-gradient(0deg, #065cfd, #bbd1f6 80%) */ diff --git a/src/components/configure/RtuConfig.vue b/src/components/configure/RtuConfig.vue index 59b43d5..d52244a 100644 --- a/src/components/configure/RtuConfig.vue +++ b/src/components/configure/RtuConfig.vue @@ -401,12 +401,27 @@ export default { data() { return { - querySite:'', - rtuCode:'', - querySiteList:[], - siteNameList:['遥测站设置','中心站设置','传感器型号选择','气象传感通信设置','工业相机设置','水文传感通信','从机设置', - '数据滤波','水位计','雨量计','流量计','蒸发皿','土壤沉降仪','4-20mA设置','其他设置'], - formAll:[], + querySite: "", + rtuCode: "", + querySiteList: [], + siteNameList: [ + "遥测站设置", + "中心站设置", + "传感器型号选择", + "气象传感通信设置", + "工业相机设置", + "水文传感通信", + "从机设置", + "数据滤波", + "水位计", + "雨量计", + "流量计", + "蒸发皿", + "土壤沉降仪", + "4-20mA设置", + "其他设置" + ], + formAll: [], // siteNameList:[], formAllBody: [], activeIndex: "0", @@ -424,11 +439,11 @@ }, temStorageEcho() { // this.activeIndex = '0' - if(localStorage.getItem(name)){ + if (localStorage.getItem(name)) { this.formAll = JSON.parse(localStorage.getItem(name)); - this.$message({ message: '暂存回显成功', type: "success" }); - } else{ - this.$message({ message: '无暂存内容', type: "warning" }); + this.$message({ message: "暂存回显成功", type: "success" }); + } else { + this.$message({ message: "无暂存内容", type: "warning" }); } // console.log(JSON.parse(sessionStorage.getItem(name)),111) }, @@ -852,12 +867,12 @@ }); } }, - created(){ - this.getSiteList().then(res=>{ + created() { + this.getSiteList().then(res => { this.initPage(this.querySiteList[0]); }); this.formControl(); - }, + } // beforeRouteLeave (to, from, next) { // // 导航离开该组件的对应路由时调用 // // 可以访问组件实例 `this` @@ -870,152 +885,148 @@ }; diff --git a/src/components/index.vue b/src/components/index.vue index cbd7b9e..cad5f90 100644 --- a/src/components/index.vue +++ b/src/components/index.vue @@ -238,6 +238,10 @@ "--lineargradient", "-webkit-linear-gradient(0deg, #065cfd, #bbd1f6 80%)" ); + root.style.setProperty( + "--elmentitemtwo", + "-webkit-linear-gradient(0deg, #5779b8, #a7c0ea 80%)" + ); root.style.setProperty("--elicon", "rgb(255,255,255)"); root.style.setProperty("--preSiteTitle", "rgb(207, 223, 255)"); root.style.setProperty("--preSiteCentent", "rgb(193, 213, 248)"); @@ -274,6 +278,10 @@ "--lineargradient", "-webkit-linear-gradient(transparent)" ); + root.style.setProperty( + "--elmentitemtwo", + "-webkit-linear-gradient(transparent)" + ); root.style.setProperty("--elicon", ""); root.style.setProperty("--preSiteTitle", "rgba(25, 26, 28)"); root.style.setProperty("--preSiteCentent", "transparent"); @@ -474,7 +482,7 @@ .el-menu-item { background-color: var(--elmenuitem) !important; - background-image: var(--lineargradient) !important; + background-image: var(--elmentitemtwo) !important; border-bottom: 2px solid var(--black); /* color: var(--white) !important; */ text-align: left;