Browse Source

bug修复

ming 3 năm trước cách đây
mục cha
commit
be767e2d7e

+ 3 - 100
src/assets/css/index.scss

@@ -59,7 +59,7 @@ div:focus {
 }
 
 ul li {
-    padding: 0;
+    // padding: 0;
     margin: 0;
     list-style: none
 }
@@ -145,11 +145,9 @@ ul li {
     -ms-flex-pack: justify;
     justify-content: space-between;
     vertical-align: middle;
-
     .el-button+.el-button {
         margin-left: 30px !important;
     }
-
     .filter-item {
         margin-right: 30px;
         display: inline-block;
@@ -194,7 +192,6 @@ ul li {
     padding: 10px 20px 30px 20px;
     text-align: center;
     position: relative;
-
     .goBack {
         position: absolute;
         left: 0;
@@ -270,7 +267,6 @@ ul li {
 }
 
 .planOutage {
-
     .el-date-editor.el-input,
     .el-date-editor.el-input__inner {
         width: 100%;
@@ -324,11 +320,9 @@ ul li {
     .el-form-item__content {
         width: 270px
     }
-
     .el-form-item__label {
         width: 150px !important
     }
-
     .el-form-item__content {
         // margin-left: 150px!important
     }
@@ -343,7 +337,6 @@ ul li {
     .el-button+.el-button {
         margin-left: 20px !important;
     }
-
     .el-input {
         margin: 0 20px 0 0;
     }
@@ -397,20 +390,17 @@ ul li {
     .el-form-item:not(.user-layout .el-form-item) {
         margin-bottom: 0
     }
-
     .deviceTit {
         font-size: 16px;
         color: #409EFF;
         padding: 20px 0
     }
-
     .basicTit {
         color: #4074e7;
         line-height: 49px;
         height: 49px;
         font-size: 16px
     }
-
     .basicTit:before {
         content: "";
         width: 3px;
@@ -421,11 +411,9 @@ ul li {
         display: inline-block;
         background: #4074e7;
     }
-
     .topInfo {
         position: relative;
         overflow: hidden;
-
         .lubo {
             // position: absolute;
             // right: 0px;
@@ -433,7 +421,6 @@ ul li {
             float: right;
             margin-bottom: 20px;
         }
-
         .handleStatus {
             position: absolute;
             right: 0px;
@@ -497,7 +484,6 @@ ul li {
     display: flex;
     justify-content: space-between;
     vertical-align: middle;
-
     span {
         display: inline-block
     }
@@ -509,21 +495,17 @@ ul li {
         text-align: center;
         font-weight: bold
     }
-
     .assNum {
         font-size: 18px;
         color: #2EAEFF;
         margin-bottom: 10px;
     }
-
     .greenRate {
         color: #04A522
     }
-
     .assTxt {
         font-size: 14px
     }
-
     .assSmallbox {
         padding: 10px 0;
         text-align: center;
@@ -564,7 +546,6 @@ ul li {
 
 .assCard {
     min-height: 356px !important;
-
     .noDataImg {
         width: 40%;
         margin-top: 40px;
@@ -575,25 +556,21 @@ ul li {
     text-align: left;
     margin: 0;
     padding: 15px 20px 0;
-
     li:not(:last-child) {
         border-bottom: 1px solid #F0F0F0;
     }
-
     li {
         line-height: 40px;
         display: flex;
         justify-content: space-between;
         vertical-align: middle;
         font-size: 14px;
-
         div {
             display: inline-block;
             white-space: nowrap;
             overflow: hidden;
             text-overflow: ellipsis;
         }
-
         span {
             color: #04A522;
             background: #F4F4F4;
@@ -605,7 +582,6 @@ ul li {
             width: 58px;
             margin-top: 10px;
         }
-
         span.overLimit {
             color: #F80000
         }
@@ -616,7 +592,6 @@ ul li {
     font-weight: bold;
     text-align: center;
     margin: 30px;
-
     .el-button {
         font-size: 16px;
         margin-left: 10px;
@@ -650,14 +625,12 @@ ul li {
 .loopHarmonicPanel {
     height: 591px;
     overflow: hidden;
-
     .el-row {
         margin-bottom: 0 !important;
     }
 }
 
 .loopUnbanlanceCard {
-
     // height: calc(100% - 100px);
     ul {
         padding: 0;
@@ -665,15 +638,12 @@ ul li {
         font-size: 14px;
         margin-top: 20px
     }
-
     li {
         display: flex;
-
         >div {
             margin: 2px 4px;
             line-height: 14px;
         }
-
         >div:first-child {
             // min-width: 64px;
         }
@@ -698,30 +668,25 @@ ul li {
 }
 
 .voltagePanel {
-
     .el-table--small th,
     .el-table--small td {
         padding: 15px 0
     }
-
     .uList p {
         margin-right: 10px;
         padding: 8px 0
     }
-
     .shangXian {
         padding: 20px 0 0;
         display: flex;
         width: 300px;
         margin-left: 40px;
         text-align: center;
-
         div {
             width: 50%;
             text-align: center;
             position: relative
         }
-
         div:first-child:after {
             position: absolute;
             top: 0;
@@ -736,7 +701,6 @@ ul li {
             background-color: rgba(0, 0, 0, 0);
             opacity: .2;
         }
-
         div:last-child:before {
             position: absolute;
             top: 0;
@@ -755,16 +719,13 @@ ul li {
 
 .frequencyPanel {
     text-align: center;
-
     .frequencyTit {
         color: #F80000;
         font-weight: bold
     }
-
     .frequencyTit2 {
         font-weight: bold;
         margin: 10px auto;
-
         span {
             color: #fff;
             background: #21c393;
@@ -777,17 +738,14 @@ ul li {
             width: 58px;
         }
     }
-
     .frequencyBox .grid-content {
         min-height: 50px !important;
         border-radius: 0;
         background: #f0f0f0;
         border: none;
     }
-
     .rightSplitRed {
         position: relative;
-
         i {
             position: absolute;
             position: absolute;
@@ -795,12 +753,10 @@ ul li {
             bottom: -11px;
             color: #f1673d
         }
-
         i:after {
             display: none
         }
     }
-
     .greenShadow {
         position: absolute;
         width: 118px;
@@ -815,7 +771,6 @@ ul li {
         background-image: gradient(linear, 0 0, 100% 100%, color-stop(.25, hsla(0, 0%, 100%, .2)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, hsla(0, 0%, 100%, .2)), color-stop(.75, hsla(0, 0%, 100%, .2)), color-stop(.75, transparent), to(transparent));
         background-size: 8px 8px
     }
-
     .rightSplitRed .grid-content:after {
         position: absolute;
         bottom: -3px;
@@ -827,11 +782,9 @@ ul li {
         content: "";
         background-color: rgba(0, 0, 0, 0);
     }
-
     .frequencyBox .grid-content {
         border-right: 1px dashed #aaa
     }
-
     .frequencyBox .el-col:last-child .grid-content {
         border-right: none
     }
@@ -844,12 +797,10 @@ ul li {
 }
 
 .powerPanel {
-
     .el-table--small th,
     .el-table--small td {
         padding: 15px 0
     }
-
     .uList p {
         margin-right: 10px;
         padding: 8px 0
@@ -867,11 +818,9 @@ ul li {
         margin-left: 0 !important;
         padding: 10px 20px;
     }
-
     .el-checkbox {
         margin-left: 20px
     }
-
     img.jianxiu {
         width: 18px;
         position: relative;
@@ -910,58 +859,48 @@ ul li {
 // 工单详情
 .handleDetailPage {
     padding: 20px 0;
-
     .basicTit {
         color: #4074e7;
         line-height: 49px;
         height: 49px;
         font-size: 16px;
-
         >span {
             display: inline-block;
             margin-right: 10px
         }
     }
-
     .handleTestBlock {
         padding: 0 20px 20px 20px;
         border-bottom: 3px solid #1890ff;
     }
-
     .jianxiuSec {
         >div {
             display: table-cell;
             vertical-align: top;
         }
-
         .left-img img {
             width: 115px;
             height: 115px;
             margin-right: 20px
         }
-
         .right-des {
             position: relative;
-
             .tit {
                 font-weight: bold;
                 margin: 10px 0
             }
-
             .bottomStatus {
                 position: absolute;
                 bottom: 0;
             }
         }
     }
-
     .desSec {
         span {
             display: inline-block;
             margin-right: 20px
         }
     }
-
     .siteBlock,
     .companyBlock {
         display: inline-block;
@@ -972,7 +911,6 @@ ul li {
         margin-left: 10px;
         text-align: center;
         position: relative;
-
         /*自己的50% */
         >div {
             width: 140px;
@@ -982,27 +920,22 @@ ul li {
             /* 定位父级的50% */
             top: 50%;
             transform: translate(-50%, -50%);
-
             p:last-child {
                 font-size: 18px;
                 margin-top: 30px
             }
         }
     }
-
     .handlerBlock {
         padding: 20px;
         border-bottom: 1px solid #E5E5E5;
         ;
-
         div {
             margin-bottom: 10px;
         }
-
         i {
             font-size: 16px;
         }
-
         .record {
             span {
                 color: cornflowerblue;
@@ -1011,18 +944,15 @@ ul li {
                 cursor: pointer
             }
         }
-
         b {
             margin: 0 5px;
             display: inline-block;
         }
-
         .imgSquare {
             border: 1px solid #ddd;
             width: 100px;
             height: 100px;
             margin-left: 40px;
-
             img {
                 width: 80%;
                 margin-left: 10%;
@@ -1047,54 +977,43 @@ ul li {
 // 运维统计
 .operStatisticsPage {
     padding: 0;
-
     .el-tabs__content {
         overflow: hidden;
         position: absolute;
         top: -10px;
         left: 614px;
     }
-
     .customBlock {
         position: relative;
-
         .customPicker {
             position: absolute;
             right: 0;
             bottom: 0
         }
     }
-
     .operStatisticsInner {
         padding: 20px;
-
         .bg-purple {
             // background: #d3dce6;
             border: 1px solid #e5e5e5;
         }
-
         .staitcDataSec {
             .staitcDataItem {
                 // text-align: center;
                 padding: 20px 10px;
                 height: 110px;
-
                 .imgBlock {
                     text-align: right;
-
                     img {
                         // max-width: 90%
                     }
                 }
-
                 .staticBlock {
                     // text-align: center
                 }
-
                 p {
                     margin-bottom: 0
                 }
-
                 .num {
                     font-size: 26px;
                     color: #49B8F6;
@@ -1103,7 +1022,6 @@ ul li {
                 }
             }
         }
-
         .panelTit {
             padding: 10px 14px;
             margin-bottom: 10px;
@@ -1111,23 +1029,18 @@ ul li {
             background: #FAFAFA;
             font-weight: bold;
         }
-
         .workPanel {
             height: 311px;
-
             .workPanelChart {
                 height: calc(100% - 60px)
             }
         }
-
         .siteWorkPanel {
             height: 311px;
-
             .siteWorkChart {
                 height: calc(100% - 60px)
             }
         }
-
         .staticPanel {
             height: 365px;
         }
@@ -1142,26 +1055,21 @@ ul li {
         justify-content: space-around;
         line-height: 36px
     }
-
     .el-radio-button {
         width: 100%
     }
-
     .el-radio-button__inner {
         width: 100%;
         // line-height: 40px;
         padding: 13px 15px
     }
-
     .el-radio-button__inner {
         border-left: 1px solid #dcdfe6;
         text-align: left;
         position: relative; // border-bottom: none;
-
         img {
             margin-right: 5px
         }
-
         i {
             position: absolute;
             right: 10px;
@@ -1170,21 +1078,17 @@ ul li {
             opacity: 0
         }
     }
-
     .el-radio-button__inner:hover {
         color: #444;
         background: #f1f7fc;
-
         // border-color: #f1f7fc;
         i {
             opacity: 1;
         }
     }
-
     .el-radio-button:last-child .el-radio-button__inner {
         // border-bottom: 1px solid #dcdfe6;
     }
-
     .el-radio-button__original-radio:checked+.el-radio-button__inner {
         background: #BDE5FF;
         border-color: #BDE5FF;
@@ -1195,7 +1099,6 @@ ul li {
 
 // 用户管理弹框
 .userManageDialog {
-
     .el-date-editor.el-input,
     .el-date-editor.el-input__inner {
         width: 240px !important;
@@ -1207,8 +1110,6 @@ ul li {
     text-decoration: underline;
 }
 
-
-
 ::-webkit-scrollbar {
     /* 滚动条整体样式 */
     width: 5px;
@@ -1233,7 +1134,9 @@ body {
     overflow: overlay;
 }
 
+
 /* 需要滚动的地方加上这个class */
+
 body::-webkit-scrollbar {
     /* 组件内滚动条不显示 */
     display: none;

+ 28 - 28
src/store/index.js

@@ -21,7 +21,7 @@ export default createStore({
         query: null,
         middleList: [],
         auth: 0,
-        siteId: 1, //公共api请求参数->siteId
+        siteId: '', //公共api请求参数->siteId
         siteList: [], //公共api站点下拉列表存储->siteId
         deviceList: [], //公共站点下拉列表
         monthList: [], //公共每月最后一天信息存储
@@ -34,7 +34,7 @@ export default createStore({
         homeStyle: '#016ddb',
         homeLogo: '',
         homeTitle: '永天智慧电力平台',
-        
+
         largeScreenUrl: '',
         middleStatus: 1,
         homePageUrl: '',
@@ -104,19 +104,19 @@ export default createStore({
                             requset.data.map((val) => {
                                 // if (val.children.length > 0) {
                                 state.deviceList.push({
-                                    deviceCode: val.deviceCode,
-                                    deviceName: val.deviceName,
-                                    id: val.id,
-                                    children: val.children.length > 0 ?
-                                        val.children.map((val) => {
-                                            return {
-                                                deviceCode: val.variableCoding,
-                                                deviceName: val.variableName,
-                                                id: val.id,
-                                            }
-                                        }) : val.children,
-                                })
-                                // }
+                                        deviceCode: val.deviceCode,
+                                        deviceName: val.deviceName,
+                                        id: val.id,
+                                        children: val.children.length > 0 ?
+                                            val.children.map((val) => {
+                                                return {
+                                                    deviceCode: val.variableCoding,
+                                                    deviceName: val.variableName,
+                                                    id: val.id,
+                                                }
+                                            }) : val.children,
+                                    })
+                                    // }
                             })
                         } else {
                             ElMessage.error(requset.msg)
@@ -140,10 +140,10 @@ export default createStore({
                     if (requset.status === 'SUCCESS') {
                         state.authorities = []
                         var menuObj = requset.data;
-                        menuObj.forEach(function (item) {
-                            state.authorities.push(item.menuName)
-                        })
-                        // console.log(state.authorities)
+                        menuObj.forEach(function(item) {
+                                state.authorities.push(item.menuName)
+                            })
+                            // console.log(state.authorities)
                     } else {
                         ElMessage.error(requset.msg)
                     }
@@ -198,7 +198,7 @@ export default createStore({
                 var HH = time[i].getHours() < 10 ? '0' + time[i].getHours() : time[i].getHours()
                 var MM = time[i].getMinutes() < 10 ? '0' + time[i].getMinutes() : time[i].getMinutes()
                 var SS = time[i].getSeconds() < 10 ? '0' + time[i].getSeconds() : time[i].getSeconds()
-                // console.log(Y + '-' + M + '-' + D + ' ' + HH + ':' + MM + ':' + SS)
+                    // console.log(Y + '-' + M + '-' + D + ' ' + HH + ':' + MM + ':' + SS)
                 state.Time_Data.push(Y + '-' + M + '-' + D + ' ' + HH + ':' + MM + ':' + SS)
             }
         },
@@ -222,8 +222,8 @@ export default createStore({
                 k = k + 24 * 60 * 60 * 1000;
             }
             state.timearr = arrTime
-            // return arrTime;
-            // 时间格式处理
+                // return arrTime;
+                // 时间格式处理
             function datetimeparse(timestamp, format, prefix) {
                 if (typeof timestamp == "string") {
                     timestamp = Number(timestamp);
@@ -255,20 +255,20 @@ export default createStore({
                 let YYYY = dateobj.getFullYear();
                 let MM =
                     dateobj.getMonth() > 8 ?
-                        dateobj.getMonth() + 1 :
-                        "0" + (dateobj.getMonth() + 1);
+                    dateobj.getMonth() + 1 :
+                    "0" + (dateobj.getMonth() + 1);
                 let DD =
                     dateobj.getDate() > 9 ? dateobj.getDate() : "0" + dateobj.getDate();
                 let HH =
                     dateobj.getHours() > 9 ? dateobj.getHours() : "0" + dateobj.getHours();
                 let mm =
                     dateobj.getMinutes() > 9 ?
-                        dateobj.getMinutes() :
-                        "0" + dateobj.getMinutes();
+                    dateobj.getMinutes() :
+                    "0" + dateobj.getMinutes();
                 let ss =
                     dateobj.getSeconds() > 9 ?
-                        dateobj.getSeconds() :
-                        "0" + dateobj.getSeconds();
+                    dateobj.getSeconds() :
+                    "0" + dateobj.getSeconds();
                 let output = "";
                 let separator = "/";
                 if (format) {

+ 3 - 3
src/views/perCenter/index.vue

@@ -190,7 +190,7 @@ export default defineComponent({
           form.value.systemName = requset.data[0].systemName
 
           form.value.userName = requset.data[0].userName
-          form.value.password = requset.data[0].password
+          // form.value.password = requset.data[0].password
         } else {
           alert(requset.msg)
         }
@@ -313,7 +313,7 @@ export default defineComponent({
 
         userName: [{ required: true, message: '请输入账号', trigger: 'blur' }],
         password: [
-          { required: false, message: '请输入原密码', trigger: 'blur' },
+          { required: true, message: '请输入原密码', trigger: 'blur' },
           { validator: validatePass, trigger: 'blur' },
         ],
         newPass: [
@@ -321,7 +321,7 @@ export default defineComponent({
           { validator: validatePass, trigger: 'blur' },
         ],
         passAgain: [
-          { required: false, message: '请再次输入密码', trigger: 'blur' },
+          { required: true, message: '请再次输入密码', trigger: 'blur' },
           { validator: validatePass2, trigger: 'blur', required: true },
         ],
       },

+ 12 - 6
src/views/siteManage/basicInfo/index.vue

@@ -86,7 +86,7 @@
               </el-input>
             </el-form-item>
             <el-form-item label="" prop="latitude">
-              <el-input v-model="ruleForm.latitude" placeholder="请输入度">
+              <el-input v-model="ruleForm.latitude" placeholder="请输入度">
                 <i
                   :default-slot="suffix"
                   class="el-input__icon el-icon-location-outline"
@@ -586,9 +586,12 @@ export default defineComponent({
           resetForm()
         
 
-          
+          if(props.siteId ){
+             getSite()
+
+          }
 
-          getSite()
+         
           dynamicPropertiesDroplist(2)
           dynamicPropertiesDroplist(1)
 
@@ -605,7 +608,10 @@ export default defineComponent({
 
           resetForm()
 
-          getSite()
+          if(props.siteId ){
+             getSite()
+
+          }
           dynamicPropertiesDroplist(2)
           dynamicPropertiesDroplist(1)
         }
@@ -729,14 +735,14 @@ export default defineComponent({
           { required: true, message: '请输入经度', trigger: 'blur' },
           {
             validator: isLongitude,
-            message: '请输入正确经度',
+            message: '请输入正确经度(-180~180,且1到5位小数)',
             trigger: 'blur',
           },
           ],
         latitude: [{ required: true, message: '请输入纬度', trigger: 'blur' },
          {
             validator: isLatitude,
-            message: '请输入正确维度',
+            message: '请输入正确纬度(-90~90,且1到5位小数)',
             trigger: 'blur',
           },],
         demolitionStandardCoal1: [

+ 9 - 2
src/views/siteManage/powerScore/index.vue

@@ -170,7 +170,11 @@ export default defineComponent({
         ruleForm.value.siteId = newVal
         if (props.activeName == 'six') {
           resetForm()
-          powerQualityList()
+          if(props.siteId ){
+             powerQualityList()
+
+          }
+         
         }
       }
     )
@@ -179,7 +183,10 @@ export default defineComponent({
       (newVal) => {
         if (newVal == 'six') {
           resetForm()
-          powerQualityList()
+          if(props.siteId ){
+             powerQualityList()
+
+          }
         }
       }
     )