Browse Source

1、登录时增加loading和密码框enter登录
2、台账管理 /数据质量报告 导出excel前的下拉框去掉:设备已交付静态信息点、设备已交付iot信息点、系统已交付静态信息点、系统已交付iot信息点

niuheng 3 years ago
parent
commit
36367dbe61

+ 0 - 3
src/components/ledger/lib/equipCascader.vue

@@ -107,10 +107,7 @@ export default {
                 }
                 params.filters = params.filters.slice(1);
             }
-            console.log(params, "params");
-            debugger;
             getEquipLkSys(params, (res) => {
-                debugger;
                 if (res.content) {
                     this.options = res.content;
                 } else {

+ 16 - 16
src/components/ledger/report/dataexport.vue

@@ -43,22 +43,22 @@ export default {
                     value: "header5",
                     label: "设备实例交付",
                 },
-                {
-                    value: "header6",
-                    label: "设备已交付静态信息点",
-                },
-                {
-                    value: "header7",
-                    label: "设备已交付iot信息点",
-                },
-                {
-                    value: "header8",
-                    label: "系统已交付静态信息点",
-                },
-                {
-                    value: "header9",
-                    label: "系统已交付iot信息点",
-                },
+                // {
+                //     value: "header6",
+                //     label: "设备已交付静态信息点",
+                // },
+                // {
+                //     value: "header7",
+                //     label: "设备已交付iot信息点",
+                // },
+                // {
+                //     value: "header8",
+                //     label: "系统已交付静态信息点",
+                // },
+                // {
+                //     value: "header9",
+                //     label: "系统已交付iot信息点",
+                // },
             ],
             header1: [
                 {

+ 14 - 5
src/views/login/index.vue

@@ -16,6 +16,8 @@
               type="password"
               placeholder="请输入密码"
               v-model="userpass"
+              @keyup.stop="passTxtKeyUp($event)"
+              v-loading.fullscreen.lock="fullscreenLoading"
             />
           </div>
         </div>
@@ -38,6 +40,7 @@ export default {
       backUrl: require("@/assets/image/login_bg.png"),
       username: "",
       userpass: "",
+      fullscreenLoading: false,
     };
   },
   computed: {},
@@ -46,6 +49,7 @@ export default {
     startLogin: function () {
       if (!this.username) return Message.warning("请填写用户名");
       if (!this.userpass) return Message.warning("请填写密码");
+      this.fullscreenLoading = true;
       var _dataStr = JSON.stringify({
         loginName: this.username,
         password: this.userpass,
@@ -65,15 +69,15 @@ export default {
           //   console.log("登录返回:", res.data);
           var resObj = res.data || {};
           if (resObj.result != "success")
-            return Message.error("登录失败,原因:" + reason);
+            return this.fullscreenLoading = false,Message.error("登录失败,原因:" + reason);
 
-        var _userInfo= resObj.content[0] || {};
-          var userId =_userInfo.userId;
-          if (!userId) return Message.error("登录失败,原因:无效的用户ID");
+          var _userInfo = resObj.content[0] || {};
+          var userId = _userInfo.userId;
+          if (!userId) return this.fullscreenLoading = false,Message.error("登录失败,原因:无效的用户ID");
           this.$store.commit("setSsoToken", userId);
           lStorage.set("ssoToken", userId);
           lStorage.set("ssoPd", _userInfo.pd);
-          lStorage.set('group_code', _userInfo.groupCode);
+          lStorage.set("group_code", _userInfo.groupCode);
 
           /**
            * 根据Token(用户ID)获取项目、菜单、用户信息
@@ -91,10 +95,15 @@ export default {
           });
         })
         .catch((err) => {
+          this.fullscreenLoading = false;
           console.error("登录失败:", err);
           Message.error("登录失败");
         });
     },
+    //密码框键盘起来事件
+    passTxtKeyUp: function (event) {
+      if (event.keyCode == 13) this.startLogin();
+    },
   },
   created() {},
   mounted() {},