From b8e3e1829e302acbe13266dd2846d225e3b800bb Mon Sep 17 00:00:00 2001 From: lancer <1905818361@qq.com> Date: Mon, 13 Dec 2021 17:08:53 +0800 Subject: [PATCH] init --- src/page/check/chose.vue | 8 +++--- src/page/check/index.vue | 24 +++++++++++++--- src/page/login/userlogin.vue | 12 ++++++++ src/views/Equipment/equipmentDetailList.vue | 31 +++++++++++++++++++-- src/views/Equipment/state.vue | 8 +++--- 5 files changed, 69 insertions(+), 14 deletions(-) diff --git a/src/page/check/chose.vue b/src/page/check/chose.vue index 268d01f..856ff8b 100644 --- a/src/page/check/chose.vue +++ b/src/page/check/chose.vue @@ -358,10 +358,10 @@ export default { this.$message.warning('您已经被禁用') return } - if(item.residueTime<=0){ - this.$message.warning('您已过期') - return - } + // if(item.residueTime<=0){ + // this.$message.warning('您已过期') + // return + // } if (this.flag == 1) { localStorage.setItem("agentId", item.id); localStorage.setItem("orgCode", ''); diff --git a/src/page/check/index.vue b/src/page/check/index.vue index 995b527..bff3327 100644 --- a/src/page/check/index.vue +++ b/src/page/check/index.vue @@ -87,7 +87,7 @@ export default { // 对此进行判断,获取this.$route的参数,如果没有则退出登陆,有的话就返回之前的页面 if (this.backFlag) { this.$router.back(); - localStorage.setItem('allClose',false) + localStorage.setItem("allClose", false); } else { this.$confirm("是否退出系统, 是否继续?", "提示", { confirmButtonText: "确定", @@ -118,6 +118,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 1 } }); } else { + if (res.data.records[0].lockFlag != 0) { + this.$message.warning("您已经被禁用"); + return; + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].agentName); localStorage.setItem("agentId", res.data.records[0].id); @@ -145,6 +149,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 2 } }); } else { + if (res.data.records[0].lockFlag != 0) { + this.$message.warning("您已经被禁用"); + return; + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].name); localStorage.setItem("orgCode", res.data.records[0].orgCode); @@ -183,6 +191,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 3 } }); } else { + if (res.data.records[0].lockFlag != 0) { + this.$message.warning("您已经被禁用"); + return; + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].propertyName); localStorage.setItem("orgCode", res.data.records[0].orgCode); @@ -208,6 +220,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 3 } }); } else { + if (res.data.records[0].lockFlag != 0) { + this.$message.warning("您已经被禁用"); + return; + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].propertyName); localStorage.setItem("orgCode", res.data.records[0].orgCode); @@ -221,8 +237,8 @@ export default { localStorage.setItem("orgType", idx); if (idx == 0) { localStorage.setItem("topName", ""); - localStorage.setItem("orgCode", ''); - localStorage.setItem("houseId", ''); + localStorage.setItem("orgCode", ""); + localStorage.setItem("houseId", ""); localStorage.setItem("agentId", ""); // 质控管家后台 this.$router.push({ path: "/wel" }); @@ -241,7 +257,7 @@ export default { // 楼盘后台 // this.$router.push({ path: "/chose", query: { flag: 3 } }); } - localStorage.setItem('allClose',true) + localStorage.setItem("allClose", true); // this.$router.push({ path: "/chose" }); }, }, diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue index e9160e7..293ebe9 100644 --- a/src/page/login/userlogin.vue +++ b/src/page/login/userlogin.vue @@ -215,6 +215,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 2 } }); } else { + if(res.data.records[0].lockFlag!=0){ + this.$message.warning("您已经被禁用"); + return + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].name); localStorage.setItem("orgCode", res.data.records[0].orgCode); @@ -253,6 +257,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 3 } }); } else { + if(res.data.records[0].lockFlag!=0){ + this.$message.warning("您已经被禁用"); + return + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].propertyName); localStorage.setItem("orgCode", res.data.records[0].orgCode); @@ -278,6 +286,10 @@ export default { // 公司后台 this.$router.push({ path: "/chose", query: { flag: 3 } }); } else { + if(res.data.records[0].lockFlag!=0){ + this.$message.warning("您已经被禁用"); + return + } this.$router.push({ path: "/wel" }); localStorage.setItem("topName", res.data.records[0].propertyName); localStorage.setItem("orgCode", res.data.records[0].orgCode); diff --git a/src/views/Equipment/equipmentDetailList.vue b/src/views/Equipment/equipmentDetailList.vue index 8dbe70c..b0efcc7 100644 --- a/src/views/Equipment/equipmentDetailList.vue +++ b/src/views/Equipment/equipmentDetailList.vue @@ -813,6 +813,31 @@ export default { // this.getTableList() }, methods: { + // 没有对比时的折线图 + getNoCompare(){ + this.compareFlag = 0; + let obj = { + // current: this.pageNum, + // pageSize: this.pageNum, + startDate: this.page.openTime, + endDate: this.page.closeTime, + houseId: this.houseId, + timeType: this.timeType, + contrastStartDate: this.selectTime, + contrastEndDate: this.selectTime1, + orgType: localStorage.getItem("orgType"), + }; + obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); + obj.timeType == -1 ? (obj.timeType = "") : (obj.timeType = obj.timeType); + axios({ + url: `autoSR/zk/equipment/detail/usageTrendContrast`, + method: "get", + params: obj, + }) + .then(res=>{ + console.log(res); + }) + }, radioChange() { this.selectTime = ""; this.selectTime1 = ""; @@ -832,7 +857,7 @@ export default { }); }, compareChange(idx) { - if (!this.selectTime1) return; + // if (!this.selectTime1) return; this.compareFlag = idx; this.tabChange(idx); }, @@ -928,6 +953,7 @@ export default { this.$set(this, "time", null); this.getTableList(); this.getdetail(); + this.getcompare() }, screening() { this.page.pageNum = 1; @@ -961,6 +987,7 @@ export default { this.page.closeTime = this.customtime[1]; this.getTableList(); this.getdetail(); + this.getcompare() }, //获取楼盘数据 getHouseList() { @@ -1026,7 +1053,7 @@ export default { params: obj, }) .then((res) => { - // console.log(res) + console.log(res,'获取数据') this.allCompare = res; this.total = res.data.first.totalRecord; // 数据处理 diff --git a/src/views/Equipment/state.vue b/src/views/Equipment/state.vue index 26b58ec..db2c931 100644 --- a/src/views/Equipment/state.vue +++ b/src/views/Equipment/state.vue @@ -919,9 +919,9 @@ export default { // orgCode: localStorage.getItem("orgCode"), // agentId: localStorage.getItem("agentId"), // houseId: localStorage.getItem("houseId"), - agentId: this.selValue == 0 ? this.choicValue : null, - orgCode: this.selValue == 1 ? this.choicValue : null, - houseId: this.selValue == 2 ? this.choicValue : null, + agentId: this.selValue == 0 ? this.choicValue : 'null', + orgCode: this.selValue == 1 ? this.choicValue : 'null', + houseId: this.selValue == 2 ? this.choicValue : 'null', orgType: localStorage.getItem("orgType"), ...this.searchForm, }) @@ -1299,7 +1299,7 @@ export default { this.searchForm.orgName = ""; this.searchForm.houseName = ""; this.searchForm.userName='' - if (!e) retun; + if (!e) return; if (this.selflag == 1) { // 设备编号 this.searchForm.imei = e;