lmc 2 år sedan
förälder
incheckning
8e19c1622c

+ 2 - 0
package.json

@@ -13,6 +13,8 @@
     "axios-retry": "^3.3.1",
     "core-js": "^3.6.5",
     "countup.js": "^2.3.2",
+    "js-base64": "^3.7.3",
+    "js-cookie": "^3.0.1",
     "lossless-json": "^2.0.4",
     "node-sass": "^6.0.1",
     "sass-loader": "^10.0.1",

+ 30 - 19
src/App.vue

@@ -1,19 +1,25 @@
 <template>
-  <router-view v-if="loading"> </router-view>
+  <transition name="el-fade-in-linear">
+    <router-view v-if="loading"> </router-view>
+  </transition>
   <!-- 开启底部安全区适配 -->
   <van-number-keyboard safe-area-inset-bottom />
 </template>
 <script>
+import Cookies from "js-cookie";
+import { Base64 } from "js-base64";
 import Api from "./utils/api";
+import { getUrlKey } from "./utils/index";
 export default {
   data() {
     return {
       loading: false,
     };
   },
+
   created() {
-    const username = this.getUrlKey("username");
-    const password = this.getUrlKey("password");
+    const username = getUrlKey("username");
+    const password = getUrlKey("password");
     this.getDictAll();
     if (localStorage.getItem("token")) {
       this.getUserInfo(password);
@@ -22,39 +28,38 @@ export default {
         this.login(username, password);
       } else {
         this.loading = true;
+        window.location.href = "/#/login";
       }
     }
   },
+
   methods: {
-    getUrlKey(name) {
-      return (
-        decodeURIComponent(
-          (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
-            location.href
-          ) || [, ""])[1].replace(/\+/g, "%20")
-        ) || null
-      );
-    },
     // 获取字典列表, 添加并全局变量保存
     getDictAll() {
       Api.getDictList().then((res) => {
         window.SITE_CONFIG["dictList"] = res.data;
       });
     },
+
     login(username, password) {
+      this.$toast.loading({
+        message: "登录中...",
+        forbidClick: true,
+      });
       Api.loginByPwd({
         username: username,
         password: password,
       }).then((res) => {
+        this.$toast.clear();
         if (res.code == 0) {
-          this.$toast.clear();
+          Cookies.set("userName", Base64.encode(username), { expires: 30 });
+          Cookies.set("passWord", Base64.encode(password), { expires: 30 });
           window.localStorage.setItem("token", res.data.token);
           this.getUserInfo(password);
-        } else {
-          this.$notify({ type: "danger", message: res.msg });
         }
       });
     },
+
     getUserInfo(password) {
       Api.getUserInfo().then((res) => {
         if (res.code == 0) {
@@ -77,8 +82,6 @@ export default {
             tenantName:
               res.data.roleCodes[0] == "Tenant" ? res.data.tenantName : "",
           });
-        } else {
-          this.$notify({ type: "danger", message: res.msg });
         }
       });
     },
@@ -135,9 +138,18 @@ body {
     margin-top: 10px !important;
   }
 }
+.drop_down {
+  --van-gray-4: #999999;
+  --van-dropdown-menu-title-text-color: #0c1935;
+}
+.van-dropdown-menu__bar {
+  --van-dropdown-menu-box-shadow: 0;
+}
+.van-divider{
+  border-color: #d8d8d8;
+}
 :root {
   --van-gray-5: #999999;
-  --van-gray-6: #999999;
   --van-gray-7: #666666;
   --van-gray-8: #0c1935;
   --van-font-weight-bold: 600;
@@ -145,7 +157,6 @@ body {
   --van-font-size-md: 16px;
   --van-font-size-lg: 16px;
   --van-border-radius-sm: 4px;
-  --van-border-width-base: 0;
   --van-tabs-bottom-bar-height: 4px !important;
 }
 </style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 26
src/assets/16pt/首页备份 (2).svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/Account.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/AliPay.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/WeChat.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/add.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/hidden.svg


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/hs_bank.svg


BIN
src/assets/pay.png


BIN
src/assets/unPay.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/assets/zs_bank.svg


+ 0 - 1
src/main.js

@@ -13,6 +13,5 @@ import 'vant/es/image-preview/style';
 if (process.env.NODE_ENV !== "production") {
     new VConsole({ theme: 'dark' });
 }
-console.log(Vant)
 const app = createApp(App)
 app.use(Vant).use(store).use(router).mount('#app')

+ 60 - 6
src/router/index.js

@@ -22,12 +22,34 @@ const routes = [
     },
   },
   {
-    name: 'userInfo',
-    path: '/userInfo',
-    component: () => import('../views/userInfo'),
-    meta: {
-      title: '账号中心',
-    },
+    path: '/user',
+    component: () => import('../views/user/index.vue'),
+    children: [
+      {
+        name: 'userAccount',
+        path: 'account',
+        component: () => import('../views/user/account.vue'),
+        meta: {
+          title: '账号中心',
+        },
+      },
+      {
+        name: 'userPassWord',
+        path: 'password',
+        component: () => import('../views/user/password.vue'),
+        meta: {
+          title: '更改密码',
+        },
+      },
+      {
+        name: 'userMobile',
+        path: 'mobile',
+        component: () => import('../views/user/mobile.vue'),
+        meta: {
+          title: '手机号',
+        },
+      },
+    ]
   },
   {
     path: '/repair',
@@ -147,6 +169,38 @@ const routes = [
       title: '远程管控',
     },
   },
+  {
+    name: 'WeChat',
+    path: '/WeChat',
+    component: () => import('../views/bill/WeChat'),
+    meta: {
+      title: '微信支付',
+    },
+  },
+  {
+    name: 'Alipay',
+    path: '/Alipay',
+    component: () => import('../views/bill/Alipay'),
+    meta: {
+      title: '支付宝支付',
+    },
+  },
+  {
+    name: 'payFinished',
+    path: '/payFinished',
+    component: () => import('../views/bill/payFinished'),
+    meta: {
+      title: '支付完成',
+    },
+  },
+  {
+    name: 'AliPayFinished',
+    path: '/AliPayFinished',
+    component: () => import('../views/bill/AliPayFinished'),
+    meta: {
+      title: '支付完成',
+    },
+  },
   {
     title: '扫码页面',
     name: 'scanCode',

+ 28 - 28
src/utils/api.js

@@ -7,11 +7,20 @@ export default {
     //用户信息
     getUserInfo: (params) => service.get("/app/user/userInfo", { params: params }),
 
+    //修改密码
+    updatePwd: (params) => service.put("/app/user/password", params),
+
     //数据字典
     getDictList: (params) => service.get("/app/all", { params: params }),
 
     //首页信息
-    homedata: (params) => service.get("/app/home/homedata", params),
+    homeData: (params) => service.get("/app/home/homedata", params),
+
+    // 获取空间树
+    getBuildInfo: (params) => service.get("/app/control/getOrgStructureTree", { params: params }),
+
+    //上传图片
+    uploadFile: (params) => service.post("/app/uploadFile", params, { header: { "Content-Type": "multipart/form-data" } }),
 
     //空调设备控制分页
     airconditioner: (params) => service.get("/app/airconditioner/page", { params: params }),
@@ -22,47 +31,38 @@ export default {
     //一键开闸关闸
     elecControl: (params) => service.post("/app/relay/control/command", params),
 
-    //获取用户信息
-    getUserInfo: (params) => service.get("/app/user/userInfo", { params: params }),
-
-    // 获取空间树
-    getBuildInfo: (params) => service.get("/app/control/getOrgStructureTree", { params: params }),
-
-    // 首页信息
-    homedata: (params) => service.get("/app/home/homedata", params),
-
-    //上传图片
-    uploadFile: (params) => service.post("/app/uploadFile", params, { header: { "Content-Type": "multipart/form-data" } }),
+    //空调下发指令
+    setControl: (params) => service.post("/app/airconditioner/command", params),
 
-    //工单维修--保存
-    repairInfoSave: (params) => service.post("/app/repairorder", params),
+    //继电器下发指令
+    setControlElec: (params) => service.post("/app/relay/control/command", params),
 
-    //工单维修--分页查询
-    repairInfoQuery: (params) => service.get("/app/repairorder/page", { params: params }),
+    //工单维修--列表
+    repairList: (params) => service.get("/app/repairorder/page", { params: params }),
 
     //工单维修--详情
-    repairInfoDetail: (id) => service.get(`/app/repairorder/${id}`),
+    repairDetail: (id) => service.get(`/app/repairorder/${id}`),
 
-    //工单维修--联系人列表
-    repairInfoUser: (params) => service.get('/app/page', { params: params }),
+    //工单维修--保存
+    repairSave: (params) => service.post("/app/repairorder", params),
 
     //工单维修--指派
-    repairInfoDispatch: (params) => service.put('/app/repairorder', params),
+    repairDispatch: (params) => service.put('/app/repairorder', params),
 
-    // 设备异常列表
-    deviceAlarmInfoQuery: (params) => service.get("/app/home/actualAlertList", { params: params }),
+    //工单维修--完成
+    repairFinish: (id) => service.post(`/app/repairorder/finish/${id}`),
 
-    //空调下发指令
-    setControl: (params) => service.post("/app/airconditioner/command", params),
+    //工单维修--联系人列表
+    repairUserList: (params) => service.get('/app/user/list', { params: params }),
 
-    //继电器下发指令
-    setControlElec: (params) => service.post("/app/relay/control/command", params),
+    // 设备异常--列表
+    deviceAlarmList: (params) => service.get("/app/home/actualAlertList", { params: params }),
 
     // 欠费待收--列表
-    lackFeeInfoQuery: (params) => service.get("/app/expeditrecord/apppage", { params: params }),
+    lackFeeList: (params) => service.get("/app/expeditrecord/apppage", { params: params }),
 
     // 欠费待收--催费
-    lackFeeInfoPay: (params) => service.post("/app/expeditrecord/charge", params),
+    lackFeePay: (params) => service.post("/app/expeditrecord/charge", params),
 
     //扣缴记录
     reduceRecordList: (params) => service.get("/app/payrecord/page", { params: params }),

+ 10 - 0
src/utils/index.js

@@ -63,3 +63,13 @@ export function getCurrentTime() {
         ":" +
         seconds);
 }
+
+export function getUrlKey(name) {
+    return (
+      decodeURIComponent(
+        (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
+          location.href
+        ) || [, ""])[1].replace(/\+/g, "%20")
+      ) || null
+    );
+  }

+ 47 - 0
src/views/bill/AliPayFinished.vue

@@ -0,0 +1,47 @@
+<template>
+  <van-nav-bar
+    title="缴费结果"
+    right-text="完成"
+    @click-right="onClickRight"
+    safe-area-inset-top
+  >
+  </van-nav-bar>
+  <van-cell-group>
+    <van-row align="center" justify="center" style="padding-top: 10px">
+      <van-icon
+        :name="require('@/assets/AliPay.svg')"
+        size="100"
+        color="#5A9EF7"
+      ></van-icon>
+    </van-row>
+    <van-row justify="center">
+      <van-col style="color: #5a9ef7; font-size: 20px"> 支付成功 </van-col>
+    </van-row>
+    <van-row justify="center" style="padding-bottom: 16px">
+      <van-col style="font-size: 22px; margin-top: 6px">
+        {{ (parseInt(amount * 100) / 100).toFixed(2) }}元
+      </van-col>
+    </van-row>
+  </van-cell-group>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      amount: 0,
+    };
+  },
+  created() {
+    this.amount = this.$route.query.amount;
+  },
+  methods: {
+    onClickRight() {
+      this.$router.push({ path: "/bill/detail" });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.card_info {
+}
+</style>

+ 360 - 0
src/views/bill/Alipay.vue

@@ -0,0 +1,360 @@
+<template>
+  <van-nav-bar :border="false" safe-area-inset-top> </van-nav-bar>
+  <div class="pay_info">
+    <van-row align="center" justify="center">
+      <div style="border: 2px solid #b0b1b4">
+        <van-image
+          width="32"
+          height="32"
+          src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
+        />
+      </div>
+      <van-col style="font-weight: 600; margin-left: 8px; color: #b0b1b4"
+        >934***@qq.com</van-col
+      >
+    </van-row>
+    <van-popup
+      v-model:show="showPayPopup"
+      position="bottom"
+      closeable
+      close-icon-position="top-left"
+      :close-icon="showKeyboard ? 'arrow-left' : 'cross'"
+      :safe-area-inset-bottom="true"
+      :overlay-style="{ background: 'unset' }"
+      :close-on-click-overlay="false"
+      :before-close="beforeClose"
+      class="popup_info"
+    >
+      <!-- 立即支付begin -->
+      <van-row justify="center" style="margin: 40px 0 8px 0">
+        <van-col> xx物业 </van-col>
+      </van-row>
+      <van-row justify="center" class="pay_amount">
+        <van-col> ¥ </van-col>
+        <van-col style="font-size: 24px">
+          {{ (parseInt(payInfo.amount * 100) / 100).toFixed(2) }}
+        </van-col>
+      </van-row>
+      <van-row align="center" justify="space-between" class="pay_type">
+        <van-col style="color: #999999">账号</van-col>
+        <van-col>934***@qq.com</van-col>
+      </van-row>
+      <van-divider style="margin: 0" />
+      <van-row align="center" justify="space-between" class="pay_type">
+        <van-col style="color: #999999">付款方式</van-col>
+        <van-row align="center">
+          <van-icon
+            name="gold-coin"
+            color="#5A9EF7"
+            size="18"
+            style="margin-right: 6px"
+          ></van-icon>
+          <van-col>账户余额</van-col>
+          <van-icon
+            name="arrow-down"
+            size="16"
+            color="#999999"
+            style="margin-left: 6px"
+            v-if="showKeyboard"
+          ></van-icon>
+        </van-row>
+      </van-row>
+      <template v-if="!showKeyboard">
+        <div class="pay_list">
+          <van-row
+            justify="left"
+            style="
+              padding: 8px 16px;
+              color: #576d8a;
+              background-color: #e8edf3;
+              border-radius: 8px 8px 0 0;
+            "
+          >
+            <van-col>支付工具</van-col>
+          </van-row>
+          <van-row
+            justify="center"
+            style="
+              padding: 12px 16px;
+              flex-direction: column;
+              position: relative;
+            "
+          >
+            <van-row>
+              <van-icon
+                name="gold-coin"
+                size="16"
+                color="#5A9EF7"
+                style="margin-right: 6px"
+              ></van-icon>
+              <van-col style="font-size: 14px">账户余额</van-col>
+            </van-row>
+            <van-row>
+              <van-col
+                style="margin-left: 20px; font-size: 12px; color: #999999"
+                >可用:¥52.29</van-col
+              >
+            </van-row>
+            <van-icon
+              name="success"
+              color="#5A9EF7"
+              class="checked_icon"
+            ></van-icon>
+          </van-row>
+          <van-divider style="margin: 0" />
+          <van-row
+            align="center"
+            justify="space-between"
+            style="padding: 12px 16px; position: relative"
+          >
+            <van-row>
+              <van-icon
+                :name="require('@/assets/zs_bank.svg')"
+                size="20"
+                style="margin-right: 6px"
+              ></van-icon>
+              <van-col style="font-size: 14px">招商银行信用卡(0082)</van-col>
+            </van-row>
+            <van-icon
+              name="success"
+              color="#5A9EF7"
+              class="checked_icon"
+            ></van-icon>
+          </van-row>
+          <van-divider style="margin: 0" />
+          <van-row
+            align="center"
+            justify="space-between"
+            style="padding: 12px 16px; position: relative"
+          >
+            <van-row>
+              <van-icon
+                :name="require('@/assets/hs_bank.svg')"
+                size="20"
+                style="margin-right: 6px"
+              ></van-icon>
+              <van-col style="font-size: 14px">徽商银行储蓄卡(6683)</van-col>
+            </van-row>
+            <van-icon
+              name="success"
+              color="#5A9EF7"
+              class="checked_icon"
+            ></van-icon>
+          </van-row>
+          <van-divider style="margin: 0" />
+          <van-row align="center" justify="center" style="padding: 12px 16px">
+            <van-col style="color: #999999; font-size: 12px">查看全部</van-col>
+            <van-icon name="arrow-down" size="16" color="#999999"></van-icon>
+          </van-row>
+        </div>
+        <van-row justify="center" align="center">
+          <van-col style="font-size: 12px">【支付有礼】付款成功得 </van-col>
+          <van-col style="font-size: 12px; color: #d0854f">2积分</van-col>
+        </van-row>
+        <div class="save_btn">
+          <van-button type="primary" block @click="showKeyboard = true">
+            确认付款
+          </van-button>
+        </div>
+        <van-row justify="center">
+          <van-col style="font-size: 12px; color: #999999"
+            >本服务由支付宝(杭州)信息技术有限公司提供</van-col
+          >
+        </van-row>
+      </template>
+
+      <van-row justify="center" v-if="showKeyboard">
+        <van-col style="color: #999999; font-size: 12px; margin: 32px 0 20px 0"
+          >请输入支付密码</van-col
+        >
+      </van-row>
+      <van-password-input :value="password" :gutter="10" v-if="showKeyboard" />
+      <van-number-keyboard
+        v-model="password"
+        :show="showKeyboard"
+        :hide-on-click-outside="false"
+        @blur="showKeyboard = false"
+      />
+      <!-- 立即支付end -->
+    </van-popup>
+  </div>
+</template>
+<script>
+import Api from "@/utils/api";
+import { PasswordInput } from "vant";
+export default {
+  comments: {
+    "van-password-input": PasswordInput,
+  },
+  data() {
+    return {
+      showPayPopup: true,
+      showKeyboard: false,
+      password: "",
+      payInfo: {
+        amount: 0,
+      },
+    };
+  },
+  watch: {
+    password(newval, oldval) {
+      if (newval.length == 6) {
+        this.payMoney();
+      }
+    },
+  },
+  mounted() {
+    this.type = this.$route.query.type;
+    this.payInfo = JSON.parse(this.$route.query.payInfo);
+  },
+  methods: {
+    payMoney() {
+      this.$toast.loading({
+        duration: 0,
+        message: "支付中...",
+        forbidClick: true,
+      });
+      if (this.type == "pay") {
+        Api.billPay({
+          tenantId: this.payInfo.tenantId,
+          amount: this.payInfo.amount,
+          billIds: this.payInfo.billIds,
+          payType: "Alipay",
+        }).then((res) => {
+          this.$toast.clear();
+          if (res.code == 0) {
+            this.$toast.success("支付成功");
+            this.$router.push({
+              path: "/AliPayFinished",
+              query: {
+                amount: this.payInfo.amount,
+              },
+            });
+          } else {
+            this.$toast.fail("支付失败");
+          }
+        });
+      }
+      if (this.type == "fee") {
+        Api.tenantPay({
+          id: this.payInfo.id,
+          tenantId: this.payInfo.tenantId,
+          amount: this.payInfo.amount,
+          type: this.payInfo.payType,
+        }).then((res) => {
+          this.$toast.clear();
+          if (res.code == 0) {
+            this.$toast.success("支付成功");
+            this.$router.push({
+              path: "/AliPayFinished",
+              query: {
+                amount: this.payInfo.amount,
+              },
+            });
+          } else {
+            this.$toast.fail("支付失败");
+          }
+        });
+      }
+    },
+    beforeClose() {
+      if (this.showKeyboard) {
+        this.showKeyboard = false;
+      }
+      return false;
+    },
+    onInput() {},
+    onDelete() {},
+    backPath() {
+      this.$router.back();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.van-nav-bar {
+  background: #252a3d;
+}
+.pay_info {
+  height: 10%;
+  background-color: #252a3d;
+  padding-top: 12px;
+  .save_btn {
+    margin: 10px 0;
+    padding: 0 16px;
+  }
+  .pay_list {
+    background: #f7f8fa;
+    border-radius: 8px;
+    margin-bottom: 12px;
+    .van-col {
+      line-height: 20px;
+    }
+    .van-icon {
+      display: flex;
+      align-items: center;
+    }
+    .van-divider {
+      border-color: #d8d8d8;
+    }
+    .checked_icon {
+      position: absolute;
+      right: 16px;
+      top: 14px;
+    }
+  }
+
+  /deep/ {
+    .popup_info {
+      height: 86%;
+      padding: 16px;
+      box-shadow: 0px -10px 20px 0px rgba(27, 32, 38, 0.1);
+      border-radius: 20px 20px 0px 0px;
+      box-sizing: border-box;
+      .popup_title {
+        margin-top: 8px;
+        .van-col {
+          font-weight: 600;
+        }
+      }
+      .pay_type {
+        margin: 12px 0;
+        .van-col {
+          line-height: 20px;
+        }
+        .van-icon {
+          display: flex;
+          align-items: center;
+        }
+      }
+      .pay_amount {
+        margin-bottom: 40px;
+        .van-col {
+          font-weight: 600;
+          font-size: 18px;
+        }
+      }
+      .van-popup__close-icon {
+        top: 24px;
+      }
+      .van-password-input__security {
+        height: 44px;
+        .van-password-input__item {
+          background: #f7f7f7;
+          border-radius: 4px;
+        }
+      }
+      .van-cell-group {
+        background: gray;
+        .van-cell {
+          padding: 10px 0;
+        }
+      }
+      .van-cell-group__title {
+        padding: 16px 0 8px 0;
+        text-align: left;
+      }
+    }
+  }
+}
+</style>

+ 207 - 0
src/views/bill/WeChat.vue

@@ -0,0 +1,207 @@
+<template>
+  <van-nav-bar title="支付" :border="false" safe-area-inset-top>
+    <template #left>
+      <van-icon
+        :name="require('@/assets/close.svg')"
+        size="24"
+        @click="backPath"
+      />
+    </template>
+  </van-nav-bar>
+  <div class="pay_info">
+    <van-row justify="center" style="margin: 12px 0">
+      <van-col style="font-weight: 600"
+        >租户账单订单:P672972688816487401</van-col
+      >
+    </van-row>
+    <van-row justify="center">
+      <van-col style="font-size: 18px; font-weight: 600"> ¥ </van-col>
+      <van-col style="font-size: 24px; font-weight: 600">
+        {{ (parseInt(payInfo.amount * 100) / 100).toFixed(2) }}
+      </van-col>
+    </van-row>
+    <van-cell-group style="margin: 20px 0 32px 0">
+      <van-cell title="收款方" value="xx物业" />
+    </van-cell-group>
+    <div class="save_btn">
+      <van-button type="success" block @click="showPayPopup = true">
+        立即支付
+      </van-button>
+    </div>
+    <van-popup
+      v-model:show="showPayPopup"
+      position="bottom"
+      closeable
+      close-icon-position="top-left"
+      :safe-area-inset-bottom="true"
+      :overlay-style="{ background: 'unset' }"
+      class="popup_info"
+    >
+      <!-- 立即支付begin -->
+      <van-row justify="center" class="popup_title">
+        <van-col> 请输入支付密码 </van-col>
+      </van-row>
+      <van-row justify="center" style="margin: 20px 0 8px 0">
+        <van-col> xx物业 </van-col>
+      </van-row>
+      <van-row justify="center" class="pay_amount">
+        <van-col> ¥ </van-col>
+        <van-col style="font-size: 24px">
+          {{ (parseInt(payInfo.amount * 100) / 100).toFixed(2) }}
+        </van-col>
+      </van-row>
+      <van-divider style="margin: 0" />
+      <van-row align="center" justify="space-between" class="pay_type">
+        <van-col>支付方式</van-col>
+        <van-row align="center">
+          <van-icon
+            :name="require('@/assets/hs_bank.svg')"
+            size="20"
+          ></van-icon>
+          <van-col>徽商银行储蓄卡(1859)</van-col>
+          <van-icon name="arrow" size="12" color="#999999"></van-icon>
+        </van-row>
+      </van-row>
+      <van-password-input :value="password" :gutter="10" />
+      <van-number-keyboard
+        v-model="password"
+        :show="showKeyboard"
+        :hide-on-click-outside="false"
+        @blur="showKeyboard = false"
+      />
+      <!-- 立即支付end -->
+    </van-popup>
+  </div>
+</template>
+<script>
+import Api from "@/utils/api";
+import { PasswordInput } from "vant";
+export default {
+  comments: {
+    "van-password-input": PasswordInput,
+  },
+  data() {
+    return {
+      showPayPopup: false,
+      showKeyboard: true,
+      password: "",
+      payInfo: {
+        amount: 0,
+      },
+    };
+  },
+  watch: {
+    password(newval, oldval) {
+      if (newval.length == 6) {
+        this.payMoney();
+      }
+    },
+  },
+  mounted() {
+    this.type = this.$route.query.type;
+    this.payInfo = JSON.parse(this.$route.query.payInfo);
+  },
+  methods: {
+    payMoney() {
+      this.$toast.loading({
+        duration: 0,
+        message: "支付中...",
+        forbidClick: true,
+      });
+      if (this.type == "pay") {
+        Api.billPay({
+          tenantId: this.payInfo.tenantId,
+          amount: this.payInfo.amount,
+          billIds: this.payInfo.billIds,
+          payType: "WeChat",
+        }).then((res) => {
+          this.$toast.clear();
+          if (res.code == 0) {
+            this.$toast.success("支付成功");
+            this.$router.push({
+              path: "/payFinished",
+              query: {
+                amount: this.payInfo.amount,
+              },
+            });
+          } else {
+            this.$toast.fail("支付失败");
+          }
+        });
+      }
+      if (this.type == "fee") {
+        Api.tenantPay({
+          id: this.payInfo.id,
+          tenantId: this.payInfo.tenantId,
+          amount: this.payInfo.amount,
+          type: this.payInfo.payType,
+        }).then((res) => {
+          this.$toast.clear();
+          if (res.code == 0) {
+            this.$toast.success("支付成功");
+            this.$router.push({
+              path: "/payFinished",
+              query: {
+                amount: this.payInfo.amount,
+              },
+            });
+          } else {
+            this.$toast.fail("支付失败");
+          }
+        });
+      }
+    },
+    onInput() {},
+    onDelete() {},
+    backPath() {
+      this.$router.back();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.pay_info {
+  .save_btn {
+    padding: 0 16px;
+    background-color: unset;
+  }
+  /deep/ {
+    .popup_info {
+      height: 76%;
+      padding: 16px;
+      box-shadow: 0px -10px 20px 0px rgba(27, 32, 38, 0.1);
+      border-radius: 20px 20px 0px 0px;
+      box-sizing: border-box;
+      .popup_title {
+        margin-top: 8px;
+        .van-col {
+          font-weight: 600;
+        }
+      }
+      .pay_type {
+        margin: 16px 0 24px 0;
+        .van-col {
+          line-height: 20px;
+        }
+      }
+      .pay_amount {
+        margin-bottom: 16px;
+        .van-col {
+          font-weight: 600;
+          font-size: 18px;
+        }
+      }
+      .van-popup__close-icon {
+        top: 24px;
+      }
+      .van-password-input__security {
+        height: 44px;
+        .van-password-input__item {
+          background: #f7f7f7;
+          border-radius: 4px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 144 - 97
src/views/bill/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <van-nav-bar :title="title" safe-area-inset-top>
+  <van-nav-bar :title="title" :border="false" safe-area-inset-top>
     <template #left>
       <van-icon
         :name="require('@/assets/arrow-left.svg')"
@@ -19,46 +19,30 @@
         >
           <van-tab name="bill" title="账单明细">
             <van-dropdown-menu active-color="#2E69EB">
-              <!-- <van-dropdown-item
-                v-model="dataForm.costCycle"
-                @change="handelChange('costCycle', costCycle)"
-                :title="costCycleTitle"
-                :options="costCycleList"
-              /> -->
               <van-dropdown-item
-                v-model="dataForm.costType"
-                @change="handelChange('costType', dataForm.costType)"
-                :title="costTypeTitle"
-                :options="payTypeList"
-              />
-              <!-- <van-dropdown-item
-                v-model="dataForm.status"
-                @change="handelChange('status', dataForm.status)"
-                :title="statusTitle"
-                :options="payStatusList"
-              /> -->
+                :title="
+                  dataForm.costCycle == '' ? '计费周期' : dataForm.costCycle
+                "
+                ref="item"
+              >
+                <van-datetime-picker
+                  v-model="currentDate"
+                  type="year-month"
+                  @confirm="checkTime"
+                  @cancel="$refs.item.toggle()"
+                  :max-date="maxDate"
+                />
+              </van-dropdown-item>
             </van-dropdown-menu>
           </van-tab>
-          <van-tab name="record" title="缴记录">
+          <van-tab name="record" title="缴记录">
             <van-dropdown-menu active-color="#2E69EB">
-              <van-dropdown-item
-                v-model="dataForm.reduceDate"
-                @change="handelChange('reduceDate', dataForm.reduceDate)"
-                :title="reduceDateTitle"
-                :options="reduceDateList"
-              />
               <van-dropdown-item
                 v-model="dataForm.type"
                 @change="handelChange('type', dataForm.type)"
                 :title="typeTitle"
                 :options="payTypeList"
               />
-              <van-dropdown-item
-                v-model="dataForm.operator"
-                @change="handelChange('operator', dataForm.operator)"
-                :title="operatorTitle"
-                :options="operatorList"
-              />
             </van-dropdown-menu>
           </van-tab>
         </van-tabs>
@@ -66,7 +50,7 @@
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           :options="{ separator: ',' }"
         />
@@ -119,11 +103,25 @@
                             }`
                           }}:</van-col
                         >
-                        <van-col style="font-weight: 600; color: #fa5555"
+                        <van-col style="font-weight: 600; color: #fa5555;position:relative;"
                           >¥{{
                             (parseInt(item.amount * 100) / 100).toFixed(2)
-                          }}</van-col
-                        >
+                          }}
+                          <van-col
+                            class="pay_status"
+                            :class="{
+                              pay: item.status != 1 && item.status != 2,
+                              unPay: item.status == 1 || item.status == 2,
+                            }"
+                            >{{
+                              `${
+                                dict_filter(item.status, "payStatusList")[
+                                  "dictLabel"
+                                ]
+                              }`
+                            }}</van-col
+                          >
+                        </van-col>
                       </van-row>
                     </template>
                     <div class="collapse_info">
@@ -260,17 +258,35 @@
   <van-popup
     v-model:show="showPayPopup"
     position="bottom"
+    closeable
+    close-icon-position="top-left"
     :safe-area-inset-bottom="true"
     :overlay-style="{ background: 'unset' }"
     class="popup_info"
   >
     <component
-      :is="currComponent"
+      :is="currPayComponent"
       :pay-info="payInfo"
-      @close="close"
+      @close="closePay"
       v-if="showPayPopup"
     ></component>
   </van-popup>
+  <van-popup
+    v-model:show="showFeePopup"
+    position="bottom"
+    closeable
+    close-icon-position="top-left"
+    :safe-area-inset-bottom="true"
+    :overlay-style="{ background: 'unset' }"
+    class="popup_info"
+  >
+    <component
+      :is="currFeeComponent"
+      :fee-info="feeInfo"
+      @close="closeFee"
+      v-if="showFeePopup"
+    ></component>
+  </van-popup>
 </template>
 <script>
 import Api from "@/utils/api";
@@ -286,9 +302,14 @@ export default {
   },
   data() {
     return {
+      currentDate: new Date(),
+      maxDate: new Date(),
       showPayPopup: false,
+      showFeePopup: false,
       payInfo: {},
-      currComponent: "",
+      feeInfo: {},
+      currPayComponent: "pay-bill",
+      currFeeComponent: "pay-fee",
       role: "",
       title: "",
       disabledAll: false,
@@ -301,35 +322,24 @@ export default {
       activeTab: "",
       activeTabBar: 0,
       activeCollapse: "",
-      costCycleTitle: "计费周期",
-      costTypeTitle: "缴费类型",
-      statusTitle: "支付状态",
-      reduceDateTitle: "扣缴时间",
       typeTitle: "扣缴类型",
-      operatorTitle: "操作人",
-      costCycleList: [],
       payStatusList: [],
-      reduceDateList: [],
       payTypeList: [],
-      operatorList: [],
-      propertyList: [],
       dataForm: {
         tenantId: "",
-        costCycle: "2022-08",
-        costType: "",
-        status: "",
+        costCycle: "",
         type: "",
-        reduceDate: "",
-        operator: "",
         page: 1,
         limit: 10,
       },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
       finished: false,
     };
   },
+
   watch: {
     checkedCollapse: {
       handler(newval, oldval) {
@@ -347,6 +357,7 @@ export default {
       },
       deep: true,
     },
+
     checkedAll: {
       handler(newval, oldval) {
         if (newval) {
@@ -362,42 +373,62 @@ export default {
       },
       deep: true,
     },
+
+    "dataForm.costCycle"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
+      }
+    },
   },
+
   created() {
     this.role = localStorage.getItem("role");
     this.title = this.$route.query.tenantName;
     this.dataForm.tenantId = this.$route.query.tenantId;
-    this.dataForm.costCycle =
-      this.$route.query.costCycle || this.dataForm.costCycle;
+    this.dataForm.costCycle = this.$route.query.costCycle || "";
     this.activeTab = this.$route.query.activeTab;
-    this.getPayStatusList();
     this.getPayTypeList();
+    this.getPayStatusList();
     this.getPropertyTypeList();
   },
+
   methods: {
+    checkTime(val) {
+      let year = new Date(val).getFullYear();
+      let m = new Date(val).getMonth() + 1;
+      m = m > 9 ? m : "0" + m;
+      this.dataForm.costCycle = year + "-" + m;
+      this.$refs.item.toggle();
+    },
+
     getPayStatusList() {
       this.payStatusList = getDictDataList("PayStatus");
-      this.payStatusList.forEach((item) => {
-        item.text = item.dictLabel;
-        item.value = item.dictValue;
-      });
     },
+
     getPayTypeList() {
-      this.payTypeList = getDictDataList("PayType");
-      this.payTypeList.forEach((item) => {
-        item.text = item.dictLabel;
-        item.value = item.dictValue;
-      });
+      if (this.activeTab == "bill") {
+        this.payTypeList = getDictDataList("PayType");
+      }
+      if (this.activeTab == "record") {
+        this.payTypeList = getDictDataList("PayType"); //暂时改成这个,后台有数据为物业水电费用的,影响会报错
+        this.payTypeList.forEach((item) => {
+          item.text = item.dictLabel;
+          item.value = item.dictValue == "all" ? "" : item.dictValue;
+        });
+      }
     },
+
     getPropertyTypeList() {
       this.propertyTypeList = getDictDataList("PropertyType");
     },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return "";
       }
       return this[list].find((item) => item.dictValue == val);
     },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -408,6 +439,7 @@ export default {
         this.dataForm.page++; // 分页数加一
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.checkedAll = false;
@@ -418,10 +450,12 @@ export default {
       this.dataList = [];
       // 重新加载数据
       // 将 loading 设置为 true,表示处于加载状态
+      this.total = 0;
       this.loading = true;
       this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     getDataList() {
       if (this.activeTab == "bill") {
@@ -431,6 +465,7 @@ export default {
         this.getReduceRecordList();
       }
     },
+
     getRentBillList() {
       Api.rentBillDetail(this.dataForm).then((res) => {
         if (res.code == 0) {
@@ -447,6 +482,7 @@ export default {
             this.dataList.push(...res.data); // 将数据放入list中
             this.loading = false; // 加载状态结束
             this.disabledAll = this.dataList.every((item) => item.status == 1);
+            this.total = res.data.length;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.length) {
               this.finished = true; // 结束加载状态
@@ -462,6 +498,7 @@ export default {
         }
       });
     },
+
     getReduceRecordList() {
       Api.reduceRecordList(this.dataForm).then((res) => {
         if (res.code == 0) {
@@ -474,7 +511,7 @@ export default {
             // 若数据条数不等于0
             this.dataList.push(...res.data.list); // 将数据放入list中
             this.loading = false; // 加载状态结束
-
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
@@ -490,30 +527,22 @@ export default {
         }
       });
     },
+
     handelChange(type, val) {
-      if (type == "costType") {
-        // 这里打印出来的值就是我们想要的text
-        this.costTypeTitle = this.payTypeList.filter(
-          (item) => item.value === val
-        )[0].text;
-      }
       if (type == "type") {
         // 这里打印出来的值就是我们想要的text
         this.typeTitle = this.payTypeList.filter(
           (item) => item.value === val
         )[0].text;
       }
-      if (type == "status") {
-        // 这里打印出来的值就是我们想要的text
-        this.typeTitle = this.payStatusList.filter(
-          (item) => item.value === val
-        )[0].text;
-      }
       this.onRefresh();
     },
+
     handleChangeTab() {
+      this.getPayTypeList();
       this.onRefresh();
     },
+
     handleChangeTabBar(val) {
       let popupTitle = "";
       let payType = "";
@@ -529,22 +558,24 @@ export default {
         popupTitle = "退费";
         payType = "Refund";
       }
-      this.currComponent = "pay-fee";
-      this.payInfo = {
+      this.feeInfo = {
+        type: "fee",
         payType: payType,
         tenantId: this.dataForm.tenantId,
         popupTitle: popupTitle,
       };
-      this.showPayPopup = true;
+      this.showFeePopup = true;
     },
+
     handleClick(type) {
       if (type == "fee") {
-        this.currComponent = "pay-fee";
-        this.payInfo = {
+        this.feeInfo = {
+          type: "fee",
           payType: "PreStorage",
           tenantId: this.dataForm.tenantId,
           popupTitle: "预存",
         };
+        this.showFeePopup = true;
       }
       if (type == "bill") {
         let billIds = [];
@@ -557,17 +588,26 @@ export default {
         });
         this.currComponent = "pay-bill";
         this.payInfo = {
+          type: "pay",
           tenantId: this.dataForm.tenantId,
           amount: this.amount,
           billIds: billIds,
         };
+        this.showPayPopup = true;
       }
-      this.showPayPopup = true;
     },
-    close() {
-      this.payInfo = {};
+
+    closePay() {
       this.showPayPopup = false;
+      this.showFeePopup = false;
+      this.onRefresh();
     },
+
+    closeFee(val) {
+      this.payInfo = JSON.parse(JSON.stringify(val));
+      this.showPayPopup = true;
+    },
+
     backPath() {
       this.$router.back();
     },
@@ -583,18 +623,6 @@ export default {
       .van-tabs__line {
         --van-tabs-bottom-bar-color: #2e69eb;
       }
-      .van-dropdown-menu__bar {
-        --van-gray-4: #999999;
-        --van-dropdown-menu-title-font-size: 15px;
-        --van-dropdown-menu-title-text-color: #0c1935;
-        --van-dropdown-menu-box-shadow: 0;
-      }
-      .van-dropdown-item__option {
-        .van-cell__title,
-        .van-cell__value {
-          font-size: 14px;
-        }
-      }
     }
   }
   .list_total {
@@ -648,6 +676,25 @@ export default {
           font-weight: 500;
           color: #666666;
         }
+        .pay_status {
+          position: absolute;
+          top: -8px;
+          left: 50px;
+          color: #ffffff;
+          font-size: 12px;
+          width: 54px;
+          height: 28px;
+          text-align: center;
+          margin-left: 10px;
+          background-repeat: no-repeat;
+          background-size: 100% 100%;
+        }
+        .pay {
+          background-image: url(../../assets/pay.png);
+        }
+        .unPay {
+          background-image: url(../../assets/unPay.png);
+        }
       }
       .collapse_info {
         .info_item {

+ 6 - 28
src/views/bill/fee.vue

@@ -1,9 +1,9 @@
 <template>
   <van-row align="center" justify="center" class="popup_title">
-    <van-col>{{ payInfo.popupTitle }}</van-col>
+    <van-col>{{ feeInfo.popupTitle }}</van-col>
   </van-row>
   <van-divider
-    style="border-color: #d8d8d8; border-bottom-width: 1px; margin: 0"
+    style="border-color: #d8d8d8; margin: 0"
   />
   <van-form
     ref="dataForm"
@@ -35,10 +35,9 @@
   </van-form>
 </template>
 <script>
-import Api from "@/utils/api";
 export default {
   props: {
-    payInfo: {
+    feeInfo: {
       type: Object,
       default: function () {
         return {};
@@ -48,42 +47,21 @@ export default {
   data() {
     return {
       dataForm: {
-        id: "",
-        tenantId: "",
         amount: "",
-        type: "",
       },
     };
   },
 
   mounted() {
-    this.dataForm.tenantId = this.dataForm.tenantId;
-    this.dataForm.type = this.payInfo.type;
-    this.getTenantAccount();
     this.$nextTick(() => {
       this.$refs.dataForm.resetValidation();
     });
   },
+
   methods: {
-    getTenantAccount() {
-      Api.getTenantAccount(this.dataForm.tenantId).then((res) => {
-        if (res.code == 0) {
-          this.dataForm.id = res.data.id;
-        }
-      });
-    },
     onSubmit() {
-      this.$toast.loading({
-        message: "正在缴费...",
-        forbidClick: true,
-      });
-      Api.tenantPay(this.dataForm).then((res) => {
-        if (res.code == 0) {
-          this.$toast.success("缴费成功");
-        } else {
-          this.$toast.fail("缴费失败");
-        }
-      });
+      this.feeInfo.amount = this.dataForm.amount;
+      this.$emit("close",this.feeInfo);
     },
   },
 };

+ 3 - 1
src/views/bill/index.vue

@@ -1,3 +1,5 @@
 <template >
-  <router-view></router-view>
+  <keep-alive>
+    <router-view></router-view>
+  </keep-alive>
 </template>

+ 88 - 50
src/views/bill/list.vue

@@ -22,13 +22,9 @@
             fit="contain"
           />
         </van-col>
-        <van-col
-          @click="
-            $route.push({ path: '/userInfo', query: { type: 'account' } })
-          "
-        >
+        <van-col>
           <van-image
-            :src="require('@/assets/user.svg')"
+            :src="require('@/assets/search.svg')"
             width="16"
             height="16"
             fit="contain"
@@ -38,7 +34,7 @@
       <div class="drop_down">
         <van-dropdown-menu active-color="#1989fa">
           <van-dropdown-item
-            :title="dataForm.cycle == '' ? '选择周期' : dataForm.cycle"
+            :title="dataForm.cycle == '' ? '计费周期' : dataForm.cycle"
             ref="item"
           >
             <van-datetime-picker
@@ -47,7 +43,6 @@
               @confirm="checkTime"
               @cancel="$refs.item.toggle()"
               confirm-button-text=""
-              :min-date="minDate"
               :max-date="maxDate"
             />
           </van-dropdown-item>
@@ -62,7 +57,7 @@
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           options="{ separator: ',' }"
         />
@@ -134,7 +129,7 @@
     </div>
     <van-popup v-model:show="showRepairPositionPicker" round position="bottom">
       <van-picker
-        title="标题"
+        title="请选择"
         :columns="positionList"
         :columns-field-names="fieldNames"
         @cancel="showRepairPositionPicker = false"
@@ -142,10 +137,49 @@
       />
     </van-popup>
   </van-pull-refresh>
+  <!-- 底部tabbar -->
+  <template v-if="role == 'admin'">
+    <van-tabbar
+      v-model="activeTabBar"
+      active-color="#2E69EB"
+      inactive-color="#0c1935"
+    >
+      <van-tabbar-item
+        name="home"
+        :icon="
+          activeTabBar == 'home'
+            ? require('@/assets/home-active.svg')
+            : require('@/assets/home.svg')
+        "
+        to="/home"
+        >首页</van-tabbar-item
+      >
+      <van-tabbar-item
+        name="rentBill"
+        :icon="
+          activeTabBar == 'rentBill'
+            ? require('@/assets/rent-bill-active.svg')
+            : require('@/assets/rent-bill.svg')
+        "
+        to="/bill/list?activeTabBar=rentBill"
+        >租户账单</van-tabbar-item
+      >
+      <van-tabbar-item
+        name="remoteControl"
+        :icon="
+          activeTabBar == 'remoteControl'
+            ? require('@/assets/remote-control-active.svg')
+            : require('@/assets/remote-control.svg')
+        "
+        to="/remoteControl?activeTabBar=remoteControl"
+        >远程管控</van-tabbar-item
+      >
+    </van-tabbar>
+  </template>
 </template>
 <script>
 import Api from "@/utils/api";
-import { isEmpty, getDictDataList } from "@/utils/index";
+import { isEmpty, getDictDataList, getUrlKey } from "@/utils/index";
 import VCountUp from "../CountUp";
 export default {
   components: {
@@ -153,62 +187,67 @@ export default {
   },
   data() {
     return {
+      role: "",
+      activeTabBar: "",
       currentDate: new Date(),
-      minDate: new Date(2020, 0, 1),
-      maxDate: new Date(2025, 10, 1),
-      showRepairPositionPicker: false,
+      maxDate: new Date(),
+      name: "",
+      projectName: "",
       positionList: [],
       fieldNames: {
         text: "orgName",
         value: "orgId",
         children: "childrenList",
       },
-      name: "电商园四期",
-      cycleTitle: "计费周期",
+      showRepairPositionPicker: false,
       statusTitle: "是否结清",
       isFinishedList: [],
-      cycleList: [],
       dataForm: {
         projectId: "",
+        buildingId: "",
+        storeyId: "",
         cycle: "",
         status: "",
         page: 1,
         limit: 10,
-        buildingId: "",
-        storeyId: "",
       },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
       finished: false,
     };
   },
-  created() {
-    this.getBuildList();
-    this.getIsFinishedList();
-  },
+
   watch: {
-    // "dataForm.projectId"(newval,oldval){
-    //   if(newval&&newval!=oldval){
-    //     this.getDataList();
-    //   }
-    // },
     "dataForm.cycle"(newval, oldval) {
       if (newval && newval != oldval) {
-        this.getDataList();
+        this.onRefresh();
       }
     },
     "dataForm.buildingId"(newval, oldval) {
       if (newval && newval != oldval) {
-        this.getDataList();
+        this.onRefresh();
       }
     },
     "dataForm.storeyId"(newval, oldval) {
       if (newval && newval != oldval) {
-        this.getDataList();
+        this.onRefresh();
       }
     },
   },
+
+  created() {
+    let year = new Date().getFullYear();
+    let m = new Date().getMonth() + 1;
+    m = m > 9 ? m : "0" + m;
+    this.dataForm.cycle = year + "-" + m;
+    this.role = localStorage.getItem("role");
+    this.activeTabBar = getUrlKey("activeTabBar");
+    this.getBuildList();
+    this.getIsFinishedList();
+  },
+
   methods: {
     checkTime(val) {
       let year = new Date(val).getFullYear();
@@ -217,10 +256,12 @@ export default {
       this.dataForm.cycle = year + "-" + m;
       this.$refs.item.toggle();
     },
+
     //获取楼栋
     getBuildList() {
       Api.getBuildInfo().then((res) => {
         if (res.code == 0) {
+          this.name = this.projectName = res.data[0].orgName;
           this.positionList = res.data[0].childrenList;
           this.dataForm.projectId = res.data[0].orgId;
           if (this.positionList) {
@@ -237,16 +278,16 @@ export default {
         }
       });
     },
+
     //定位完成
     confirmPosition(val) {
-      this.page = 1;
-      this.dataList = [];
       this.dataForm.buildingId = val[0].orgId;
       this.dataForm.storeyId = val[1].orgId;
       let storeyName = val[1].orgName == "全部" ? "" : val[1].orgName;
-      this.name = "电商园四期-" + val[0].orgName + storeyName;
+      this.name = this.projectName + "-" + val[0].orgName + storeyName;
       this.showRepairPositionPicker = false;
     },
+
     getIsFinishedList() {
       this.isFinishedList = getDictDataList("isFinished");
       this.isFinishedList.forEach((item) => {
@@ -254,12 +295,14 @@ export default {
         item.value = item.dictValue;
       });
     },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
       }
       return this[list].find((item) => item.dictValue == val);
     },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -267,19 +310,22 @@ export default {
           this.refreshing = false;
         }
         await this.getDataList();
-        //this.dataForm.page++; // 分页数加一
+        this.dataForm.page++; // 分页数加一
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
       // 重新加载数据
       this.dataList = [];
       // 将 loading 设置为 true,表示处于加载状态
+      this.total = 0;
       this.loading = true;
       this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     getDataList() {
       Api.rentBillList(this.dataForm).then((res) => {
@@ -292,9 +338,8 @@ export default {
             }
             // 若数据条数不等于0
             this.dataList.push(...res.data.list); // 将数据放入list中
-            this.page++;
             this.loading = false; // 加载状态结束
-
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
@@ -310,12 +355,14 @@ export default {
         }
       });
     },
+
     handleClick(ids) {
       this.$toast.loading({
         message: "正在催费...",
         forbidClick: true,
       });
-      Api.lackFeeInfoPay(ids).then((res) => {
+      Api.lackFeePay(ids).then((res) => {
+        this.$toast.clear();
         if (res.code == 0) {
           this.$toast.success("催费成功");
           this.onRefresh();
@@ -324,14 +371,9 @@ export default {
         }
       });
     },
+
     // change事件可以拿到的是value
     handelChange(type, val) {
-      if (type == "cycle") {
-        // 这里打印出来的值就是我们想要的text
-        this.cycleTitle = this.cycleList.filter(
-          (item) => item.value === val
-        )[0].text;
-      }
       if (type == "status") {
         // 这里打印出来的值就是我们想要的text
         this.statusTitle = this.isFinishedList.filter(
@@ -340,6 +382,7 @@ export default {
       }
       this.onRefresh();
     },
+
     toPath(path, val) {
       this.$router.push({
         path: path,
@@ -351,6 +394,7 @@ export default {
         },
       });
     },
+
     backPath() {
       this.$router.back();
     },
@@ -379,12 +423,6 @@ export default {
       letter-spacing: 2px;
     }
   }
-  .drop_down {
-    /deep/ {
-      --van-gray-4: #999999;
-      --van-dropdown-menu-title-text-color: #0c1935;
-    }
-  }
   .list_total {
     padding: 0 16px;
     margin: 8px 0;

+ 120 - 33
src/views/bill/pay.vue

@@ -6,9 +6,7 @@
       {{ (parseInt(dataForm.amount * 100) / 100).toFixed(2) }}
     </van-col>
   </van-row>
-  <van-divider
-    style="border-color: #d8d8d8; border-bottom-width: 1px; margin: 0"
-  />
+  <van-divider style="border-color: #d8d8d8; margin: 0" />
   <div class="info_list">
     <van-row
       align="center"
@@ -23,33 +21,39 @@
         <van-icon
           :name="item.icon"
           size="20"
-          color="#2e69eb"
+          :color="item.disabled ? '#999999' : item.color"
           style="margin-right: 8px"
         ></van-icon>
-        <van-col>
+        <van-col :style="{ color: item.disabled ? '#999999' : '' }">
           {{ item.text }}
           <template v-if="item.value == 'Account'">
             ({{ "可用¥" + (parseInt(amount * 100) / 100).toFixed(2) }})
           </template>
         </van-col>
       </van-row>
-      <template v-if="dataForm.payType == item.value">
+      <template
+        v-if="dataForm.payType == item.value && item.value != 'UnionPay'"
+      >
         <van-col>
-          <van-icon
-            name="checked"
-            size="20"
-            :style="{
-              color: dataForm.payType == item.value ? '#2e69eb' : '',
-            }"
-          ></van-icon>
+          <template v-if="item.value != 'UnionPay'">
+            <van-icon name="checked" size="20"></van-icon>
+          </template>
         </van-col>
       </template>
       <template v-else>
         <van-col>
-          <van-icon name="circle" size="20"></van-icon>
+          <template v-if="item.value != 'UnionPay'">
+            <template v-if="!item.disabled">
+              <van-icon name="circle" size="20"></van-icon>
+            </template>
+          </template>
+          <template v-else>
+            <van-icon name="arrow" size="20" color="#999999"></van-icon>
+          </template>
         </van-col>
       </template>
     </van-row>
+
     <template v-if="showPayTypeMore">
       <van-row
         align="center"
@@ -63,7 +67,7 @@
     </template>
 
     <div style="margin-top: 50px">
-      <van-button block type="primary"> 确认支付 </van-button>
+      <van-button block type="primary" @click="payMoney"> 确认支付 </van-button>
     </div>
   </div>
   <!-- 立即支付end -->
@@ -86,29 +90,30 @@ export default {
       showPayTypeMore: true,
       payTypeList: [],
       dataForm: {
-        tenantId: "",
         amount: "",
-        billIds: [],
         payType: "",
       },
     };
   },
 
   mounted() {
-    this.dataForm.tenantId = this.payInfo.tenantId;
     this.dataForm.amount = this.payInfo.amount;
-    this.dataForm.billIds = this.payInfo.billIds;
     this.getTenantAccount();
   },
+
   methods: {
     getTenantAccount() {
-      Api.getTenantAccount(this.dataForm.tenantId).then((res) => {
+      Api.getTenantAccount(this.payInfo.tenantId).then((res) => {
         if (res.code == 0) {
           this.amount = res.data.amount;
+          if (this.payInfo.type == "fee") {
+            this.payInfo.id = res.data.id;
+          }
         }
         this.getPayTypeList();
       });
     },
+
     getPayTypeList() {
       this.payTypeList = [];
       let tempArr = [];
@@ -116,17 +121,19 @@ export default {
       tempArr = getDictDataList("PayMode");
       tempArr.forEach((item) => {
         if (item.dictValue == "Account") {
-          if (this.amount) {
+          if (this.amount && this.amount >= this.dataForm.amount) {
             this.payTypeList.unshift({
               text: item.dictLabel,
               value: item.dictValue,
               icon: item.icon,
+              color: item.color,
             });
           } else {
             obj = {
               text: item.dictLabel,
               value: item.dictValue,
               icon: item.icon,
+              color: item.color,
               disabled: true,
             };
           }
@@ -134,6 +141,7 @@ export default {
           this.payTypeList.push({
             text: item.dictLabel,
             value: item.dictValue,
+            color: item.color,
             icon: item.icon,
           });
         }
@@ -141,27 +149,98 @@ export default {
       if (obj) {
         this.payTypeList.push(obj);
       }
-      if (this.amount) {
+      if (this.amount && this.amount >= this.dataForm.amount) {
         this.dataForm.payType = "Account";
       } else {
         this.dataForm.payType = this.payTypeList[0].value;
       }
     },
+
     handleClick(val) {
-      this.dataForm.payType = val;
+      if (!val.disabled) {
+        this.dataForm.payType = val;
+      }
     },
+
     payMoney() {
-      this.$toast.loading({
-        message: "正在支付...",
-        forbidClick: true,
-      });
-      Api.billPay(this.dataForm).then((res) => {
-        if (res.code == 0) {
-          this.$toast.success("付款成功");
-        } else {
-          this.$toast.fail("付款失败");
+      let msg = "";
+      let icon = "";
+      if (this.dataForm.payType == "WeChat") {
+        msg = "微信支付";
+        icon = "wechat-pay";
+        this.$toast.loading({
+          message: msg,
+          icon: icon,
+          duration: 3000,
+          forbidClick: true,
+        });
+        setTimeout(() => {
+          this.$router.push({
+            path: "/WeChat",
+            query: {
+              type: this.payInfo.type,
+              payInfo: JSON.stringify(this.payInfo),
+            },
+          });
+        }, 3000);
+      }
+      if (this.dataForm.payType == "Alipay") {
+        msg = "支付";
+        icon = "alipay";
+        this.$toast.loading({
+          message: msg,
+          icon: icon,
+          duration: 3000,
+          forbidClick: true,
+        });
+        setTimeout(() => {
+          this.$router.push({
+            path: "/Alipay",
+            query: {
+              type: this.payInfo.type,
+              payInfo: JSON.stringify(this.payInfo),
+            },
+          });
+        }, 3000);
+      }
+      if (this.dataForm.payType == "Account") {
+        this.$toast.loading({
+          message: "支付中...",
+          forbidClick: true,
+        });
+        if (this.payInfo.type == "pay") {
+          Api.billPay({
+            tenantId: this.payInfo.tenantId,
+            amount: this.payInfo.amount,
+            billIds: this.payInfo.billIds,
+            payType: this.dataForm.payType,
+          }).then((res) => {
+            this.$toast.clear();
+            if (res.code == 0) {
+              this.$toast.success("支付成功");
+              this.$emit("close");
+            } else {
+              this.$toast.fail("支付失败");
+            }
+          });
         }
-      });
+        if (this.payInfo.type == "fee") {
+          Api.tenantPay({
+            id: this.payInfo.id,
+            tenantId: this.payInfo.tenantId,
+            amount: this.payInfo.amount,
+            type: this.payInfo.payType,
+          }).then((res) => {
+            this.$toast.clear();
+            if (res.code == 0) {
+              this.$toast.success("支付成功");
+              this.$emit("close");
+            } else {
+              this.$toast.fail("支付失败");
+            }
+          });
+        }
+      }
     },
   },
 };
@@ -177,9 +256,13 @@ export default {
   padding: 10px 16px;
   .list_item {
     line-height: 44px;
+    border-bottom: 1px solid #ebedf0;
     .van-col {
       font-size: 16px;
     }
+    &:nth-last-child(1) {
+      border-bottom: 1px solid #ffffff;
+    }
   }
   .type_more {
     margin-top: 10px;
@@ -195,4 +278,8 @@ export default {
   color: #0c1935;
   --van-cell-font-size: 24px;
 }
+</style>
+<style lang="scss">
+.van-toast__text {
+}
 </style>

+ 59 - 0
src/views/bill/payFinished.vue

@@ -0,0 +1,59 @@
+<template>
+  <van-nav-bar :border="false" safe-area-inset-top> </van-nav-bar>
+  <van-row align="center" justify="center">
+    <van-icon
+      name="wechat-pay"
+      size="20"
+      color="#09BB07"
+      style="margin-right: 8px"
+    ></van-icon>
+    <van-col style="color: #09bb07; font-weight: 600"> 支付成功 </van-col>
+  </van-row>
+  <van-row justify="center" style="margin: 60px 0 10px 0">
+    <van-col>支付金额</van-col>
+  </van-row>
+  <van-row justify="center">
+    <van-col style="font-size: 18px; font-weight: 600"> ¥ </van-col>
+    <van-col style="font-size: 24px; font-weight: 600">
+      {{ (parseInt(amount * 100) / 100).toFixed(2) }}
+    </van-col>
+  </van-row>
+  <div class="pay_btn">
+    <van-button @click="toPath">完成</van-button>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      amount: 0,
+    };
+  },
+  created() {
+    this.amount = this.$route.query.amount;
+  },
+  methods: {
+    toPath(){
+        this.$router.push({path:'/bill/detail'})
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.van-nav-bar {
+  background: unset;
+}
+.pay_btn {
+  position: absolute;
+  bottom: 100px;
+  left: 50%;
+  transform: translate(-50%,-50%);
+  .van-button {
+    width: 160px;
+    border-radius: 4px;
+    font-size: 16px;
+    color: #09bb07;
+    background: #ebedf0;
+  }
+}
+</style>

+ 106 - 43
src/views/device/list.vue

@@ -10,21 +10,23 @@
   </van-nav-bar>
   <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
     <div class="page_info">
-      <!-- <van-row align="center" class="position_pannel">
-        <van-col>
-          <van-image
-            :src="require('@/assets/position.svg')"
-            width="16"
-            height="16"
-            fit="contain"
-          />
-          <van-col>{{ name }}</van-col>
-          <van-image
-            :src="require('@/assets/arrow-right.svg')"
-            width="24"
-            height="24"
-            fit="contain"
-          />
+      <van-row align="center" class="position_pannel">
+        <van-col @click="showRepairPositionPicker = true">
+          <van-col>
+            <van-image
+              :src="require('@/assets/position.svg')"
+              width="16"
+              height="16"
+              fit="contain"
+            />
+            <van-col>{{ name }}</van-col>
+            <van-image
+              :src="require('@/assets/arrow-right.svg')"
+              width="24"
+              height="24"
+              fit="contain"
+            />
+          </van-col>
         </van-col>
         <van-col>
           <van-image
@@ -34,27 +36,11 @@
             fit="contain"
           />
         </van-col>
-      </van-row> -->
-      <!-- <div class="drop_down">
-      <van-dropdown-menu active-color="#1989fa">
-        <van-dropdown-item
-          v-model="checkType"
-          @change="handelChange('checkType', checkType)"
-          :title="checkTypeTitle"
-          :options="checkTypeList"
-        />
-        <van-dropdown-item
-          v-model="checkPerson"
-          @change="handelChange('checkPerson', checkPerson)"
-          :title="checkPersonTitle"
-          :options="checkPersonList"
-        />
-      </van-dropdown-menu>
-    </div> -->
+      </van-row>
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           options="{ separator: ',' }"
         />
@@ -95,6 +81,15 @@
         </van-list>
       </div>
     </div>
+    <van-popup v-model:show="showRepairPositionPicker" round position="bottom">
+      <van-picker
+        title="请选择"
+        :columns="positionList"
+        :columns-field-names="fieldNames"
+        @cancel="showRepairPositionPicker = false"
+        @confirm="confirmPosition"
+      />
+    </van-popup>
   </van-pull-refresh>
 </template>
 <script>
@@ -106,9 +101,23 @@ export default {
   },
   data() {
     return {
-      name: "电商园四期-B座",
-      page: 1,
-      limit: 10,
+      name: "",
+      projectName: "",
+      positionList: [],
+      fieldNames: {
+        text: "orgName",
+        value: "orgId",
+        children: "childrenList",
+      },
+      showRepairPositionPicker: false,
+      dataForm: {
+        projectId: "",
+        buildingId: "",
+        storeyId: "",
+        page: 1,
+        limit: 10,
+      },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
@@ -116,7 +125,55 @@ export default {
     };
   },
 
+  watch: {
+    "dataForm.buildingId"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
+      }
+    },
+    "dataForm.storeyId"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
+      }
+    },
+  },
+
+  created() {
+    this.getBuildList();
+  },
+
   methods: {
+    //获取楼栋
+    getBuildList() {
+      Api.getBuildInfo().then((res) => {
+        if (res.code == 0) {
+         this.name = this.projectName = res.data[0].orgName;
+          this.positionList = res.data[0].childrenList;
+          this.dataForm.projectId = res.data[0].orgId;
+          if (this.positionList) {
+            let json = {
+              category: "s",
+              childrenList: null,
+              orgId: "",
+              orgName: "全部",
+            };
+            for (let i = 0; i < this.positionList.length; i++) {
+              this.positionList[i].childrenList.unshift(json);
+            }
+          }
+        }
+      });
+    },
+
+    //定位完成
+    confirmPosition(val) {
+      this.dataForm.buildingId = val[0].orgId;
+      this.dataForm.storeyId = val[1].orgId;
+      let storeyName = val[1].orgName == "全部" ? "" : val[1].orgName;
+      this.name = this.projectName + "-" + val[0].orgName + storeyName;
+      this.showRepairPositionPicker = false;
+    },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -124,21 +181,25 @@ export default {
           this.refreshing = false;
         }
         await this.getDataList();
-        this.page++; // 分页数加一
+        this.dataForm.page++; // 分页数加一
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
+      this.dataList = [];
       // 重新加载数据
       // 将 loading 设置为 true,表示处于加载状态
       this.loading = true;
-      this.page = 1; // 分页数赋值为1
+      this.total = 0;
+      this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     getDataList() {
-      Api.deviceAlarmInfoQuery({
+      Api.deviceAlarmList({
         buildingId: "",
         storeyId: "",
         page: this.page,
@@ -146,12 +207,12 @@ export default {
       }).then((res) => {
         if (res.code == 0) {
           if (res.data) {
-            if (res.data.length == 0) {
+            if (res.data.list.length == 0) {
               // 判断获取数据条数若等于0
               this.dataList = []; // 清空数组
               this.finished = true; // 停止加载
             }
-            res.data.forEach((item) => {
+            res.data.list.forEach((item) => {
               if (item.visualData) {
                 let temp = JSON.parse(item.visualData).pname.toString();
                 item.positionInfo = temp
@@ -161,11 +222,12 @@ export default {
               }
             });
             // 若数据条数不等于0
-            this.dataList.push(...res.data); // 将数据放入list中
+            this.dataList.push(...res.data.list); // 将数据放入list中
             this.loading = false; // 加载状态结束
 
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
-            if (this.dataList.length >= res.data.length) {
+            if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
             }
           } else {
@@ -179,6 +241,7 @@ export default {
         }
       });
     },
+
     backPath() {
       this.$router.back();
     },

+ 15 - 8
src/views/home.vue

@@ -40,7 +40,7 @@
         <van-col
           @click="
             () => {
-              $router.push({ path: '/userInfo', query: { type: 'password' } });
+              $router.push({ path: '/user/account' });
             }
           "
         >
@@ -320,17 +320,17 @@
             ? require('@/assets/home-active.svg')
             : require('@/assets/home.svg')
         "
-        to="/home"
+        to="/home?activeTabBar=home"
         >首页</van-tabbar-item
       >
       <van-tabbar-item
         name="rentBill"
         :icon="
-          activeTabBar == 'bill'
+          activeTabBar == 'rentBill'
             ? require('@/assets/rent-bill-active.svg')
             : require('@/assets/rent-bill.svg')
         "
-        to="/bill/list"
+        to="/bill/list?activeTabBar=rentBill"
         >租户账单</van-tabbar-item
       >
       <van-tabbar-item
@@ -340,7 +340,7 @@
             ? require('@/assets/remote-control-active.svg')
             : require('@/assets/remote-control.svg')
         "
-        to="/remoteControl"
+        to="/remoteControl?activeTabBar=remoteControl"
         >远程管控</van-tabbar-item
       >
     </van-tabbar>
@@ -358,7 +358,7 @@ export default {
   data() {
     return {
       role: "",
-      name: "电商园四期-B座",
+      name: "跨境电商大厦",
       activeTabBar: "home",
       functionList: [
         {
@@ -405,9 +405,11 @@ export default {
       loading: true,
     };
   },
-   computed: {
+
+  computed: {
     ...mapGetters({ userInfo: "getUserInfo" }),
   },
+
   async mounted() {
     this.role = localStorage.getItem("role");
     await this.getPayTypeList();
@@ -415,16 +417,20 @@ export default {
     await this.getReviewList();
     this.getHomeData();
   },
+
   methods: {
     getPayTypeList() {
       this.payTypeList = getDictDataList("PayType");
     },
+
     getDeviceAlarmList() {
       this.deviceAlarmList = getDictDataList("DeviceAlarm");
     },
+
     getReviewList() {
       this.reviewList = getDictDataList("Review");
     },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
@@ -433,7 +439,7 @@ export default {
     },
 
     getHomeData() {
-      api.homedata().then((res) => {
+      api.homeData().then((res) => {
         if (res.code == 0) {
           //工单代办数据
           for (let k in res.data.workOrder) {
@@ -479,6 +485,7 @@ export default {
         this.loading = false;
       });
     },
+
     toPath(path, val) {
       let params = {};
       if (this.role == "Tenant" && val) {

+ 10 - 6
src/views/login.vue

@@ -59,8 +59,6 @@
             block
             type="primary"
             color="#5C8FFF"
-            :loading="loading"
-            loading-text="登陆中。。。"
             native-type="submit"
           >
             登录
@@ -72,21 +70,27 @@
 </template>
 
 <script>
+import Cookies from "js-cookie";
+import { Base64 } from "js-base64";
 export default {
   data() {
     return {
-      loading: false,
       tel: "",
       password: "",
     };
   },
   mounted() {
-    window.localStorage.setItem("token", "");
-    window.localStorage.setItem("role", "");
+    let username = Cookies.get("userName");
+    let password = Cookies.get("passWord");
+    if (username && password) {
+      this.tel = Base64.decode(username);
+      this.password = Base64.decode(password);
+    }
   },
   methods: {
     onSubmit() {
-       window.location.href = "/?username=" + this.tel + "&&password=" + this.password;
+      window.location.href =
+        "/?username=" + this.tel + "&&password=" + this.password;
     },
   },
 };

+ 48 - 77
src/views/pay/fee.vue

@@ -1,5 +1,5 @@
 <template>
-  <van-nav-bar title="欠费待收" safe-area-inset-top>
+  <van-nav-bar title="欠费待收" :border="false" safe-area-inset-top>
     <template #left>
       <van-icon
         :name="require('@/assets/arrow-left.svg')"
@@ -10,35 +10,10 @@
   </van-nav-bar>
   <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
     <div class="page_info">
-      <!-- <van-row align="center" class="position_pannel">
-        <van-col >
-          <van-image
-            :src="require('@/assets/position.svg')"
-            width="16"
-            height="16"
-            fit="contain"
-          />
-          <van-col>{{ name }}</van-col>
-          <van-image
-            :src="require('@/assets/arrow-right.svg')"
-            width="24"
-            height="24"
-            fit="contain"
-          />
-        </van-col>
-        <van-col>
-          <van-image
-            :src="require('@/assets/search.svg')"
-            width="16"
-            height="16"
-            fit="contain"
-          />
-        </van-col>
-      </van-row> -->
       <div class="drop_down">
         <van-dropdown-menu active-color="#1989fa">
-           <van-dropdown-item
-            :title="dataForm.cycle == '' ? '选择周期' : dataForm.cycle"
+          <van-dropdown-item
+            :title="dataForm.cycle == '' ? '计费周期' : dataForm.cycle"
             ref="item"
           >
             <van-datetime-picker
@@ -46,34 +21,27 @@
               type="year-month"
               @confirm="checkTime"
               @cancel="$refs.item.toggle()"
-              :min-date="minDate"
               :max-date="maxDate"
             />
           </van-dropdown-item>
-          <!-- <van-dropdown-item
+          <van-dropdown-item
             v-model="dataForm.billType"
             @change="handelChange('billType', dataForm.billType)"
             :title="billTypeTitle"
             :options="billTypeList"
-          /> -->
+          />
           <van-dropdown-item
             v-model="dataForm.arrearDay"
             @change="handelChange('arrearDay', dataForm.arrearDay)"
             :title="arrearDayTitle"
             :options="arrearDayList"
           />
-          <van-dropdown-item
-            v-model="dataForm.isExpedit"
-            @change="handelChange('isExpedit', dataForm.isExpedit)"
-            :title="isExpeditTitle"
-            :options="isExpeditList"
-          />
         </van-dropdown-menu>
       </div>
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           options="{ separator: ',' }"
         />
@@ -92,21 +60,19 @@
             <div
               class="reduce_type"
               :style="{
-                'background-color': `${
-                  dict_filter(item.isExpedit, 'isExpeditList')['color']
-                }`,
+                'background-color': item.isExpedit == 1 ? '#09C700' : '#FA5555',
               }"
             >
-              <span>{{
-                `${dict_filter(item.isExpedit, "isExpeditList")["dictLabel"]}`
-              }}</span>
+              <span>{{ item.isExpedit == 1 ? "已催费" : "未催费" }}</span>
             </div>
             <van-row class="header">
               <van-col>{{ item.tenantName }}</van-col>
             </van-row>
             <van-row>
               <van-col>欠费金额:</van-col>
-              <van-col style="color: #fa5555">¥{{ item.amount }}</van-col>
+              <van-col style="color: #fa5555"
+                >¥{{ (parseInt(item.amount * 100) / 100).toFixed(2) }}</van-col
+              >
             </van-row>
             <van-col>计费周期:{{ item.costCycle }}</van-col>
             <van-row>
@@ -115,7 +81,7 @@
             </van-row>
             <van-col
               >欠费类型:{{
-                `${dict_filter(dataForm.billType, "billTypeList")["dictLabel"]}`
+                `${dict_filter(item.billType, "billTypeList")["dictLabel"]}`
               }}</van-col
             >
             <van-col>联系电话:{{ item.phone }}</van-col>
@@ -147,43 +113,42 @@ export default {
   data() {
     return {
       currentDate: new Date(),
-      minDate: new Date(2020, 0, 1),
-      maxDate: new Date(2025, 10, 1),
-      name: "电商园四期-B座",
-      isExpeditTitle: "是否催费",
-      cycleTitle: "计费周期",
-      //billTypeTitle: "欠费类型",
+      maxDate: new Date(),
+      billTypeTitle: "欠费类型",
       arrearDayTitle: "欠费天数",
       billTypeList: [],
       arrearDayList: [],
-      cycleList: [],
       isExpeditList: [],
       dataForm: {
         cycle: "",
-        //billType: "",
+        billType: "",
         arrearDay: "",
         isExpedit: "",
         page: 1,
         limit: 10,
       },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
       finished: false,
     };
   },
+
+  watch: {
+    "dataForm.cycle"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
+      }
+    },
+  },
+
   created() {
     this.getArrearDayList();
     this.getBillTypeList();
     this.getIsExpeditList();
   },
-  watch:{
-     "dataForm.cycle"(newval, oldval) {
-      if (newval && newval != oldval) {
-        this.getDataList();
-      }
-    },
-  },
+
   methods: {
     checkTime(val) {
       let year = new Date(val).getFullYear();
@@ -192,6 +157,7 @@ export default {
       this.dataForm.cycle = year + "-" + m;
       this.$refs.item.toggle();
     },
+
     getArrearDayList() {
       this.arrearDayList = getDictDataList("ArrearageDay");
       this.arrearDayList.forEach((item) => {
@@ -199,6 +165,7 @@ export default {
         item.value = item.dictValue;
       });
     },
+
     getBillTypeList() {
       this.billTypeList = getDictDataList("PayType");
       this.billTypeList.forEach((item) => {
@@ -206,6 +173,7 @@ export default {
         item.value = item.dictValue;
       });
     },
+
     getIsExpeditList() {
       this.isExpeditList = getDictDataList("isExpedit");
       this.isExpeditList.forEach((item) => {
@@ -213,12 +181,14 @@ export default {
         item.value = item.dictValue;
       });
     },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
       }
       return this[list].find((item) => item.dictValue == val);
     },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -226,21 +196,24 @@ export default {
           this.refreshing = false;
         }
         await this.getDataList();
-        
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
+      this.dataList = [];
       // 重新加载数据
       // 将 loading 设置为 true,表示处于加载状态
       this.loading = true;
+      this.total = 0;
       this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     getDataList() {
-      Api.lackFeeInfoQuery(this.dataForm).then((res) => {
+      Api.lackFeeList(this.dataForm).then((res) => {
         if (res.code == 0) {
           if (res.data) {
             if (res.data.list.length == 0) {
@@ -251,9 +224,10 @@ export default {
             // 若数据条数不等于0
             this.dataList.push(...res.data.list); // 将数据放入list中
             this.loading = false; // 加载状态结束
-            if(res.data.list.length>9){
+            if (res.data.list.length > 9) {
               this.dataForm.page++; // 分页数加一
             }
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
@@ -269,8 +243,14 @@ export default {
         }
       });
     },
+
     handleClick(ids) {
-      Api.lackFeeInfoPay(ids).then((res) => {
+      this.$toast.loading({
+        message: "催费中...",
+        forbidClick: true,
+      });
+      Api.lackFeePay(ids).then((res) => {
+        this.$toast.clear();
         if (res.code == 0) {
           this.$toast.success("催费成功");
           this.onRefresh();
@@ -279,14 +259,9 @@ export default {
         }
       });
     },
+
     // change事件可以拿到的是value
     handelChange(type, val) {
-      if (type == "cycle") {
-        // 这里打印出来的值就是我们想要的text
-        this.cycleTitle = this.cycleList.filter(
-          (item) => item.value === val
-        )[0].text;
-      }
       if (type == "billType") {
         // 这里打印出来的值就是我们想要的text
         this.billTypeTitle = this.billTypeList.filter(
@@ -301,6 +276,7 @@ export default {
       }
       this.onRefresh();
     },
+
     backPath() {
       this.$router.back();
     },
@@ -329,12 +305,7 @@ export default {
       letter-spacing: 2px;
     }
   }
-  .drop_down {
-    /deep/ {
-      --van-gray-4: #999999;
-      --van-dropdown-menu-title-text-color: #0c1935;
-    }
-  }
+
   .list_total {
     padding: 0 16px;
     margin: 8px 0;

+ 38 - 51
src/views/pay/record.vue

@@ -37,30 +37,18 @@
       </van-row>
       <div class="drop_down">
         <van-dropdown-menu active-color="#1989fa">
-          <!-- <van-dropdown-item
-            v-model="feeDate"
-            @change="handelChange('feeDate', dataFrom.feeDate)"
-            :title="feeDateTitle"
-            :options="feeDateList"
-          /> -->
           <van-dropdown-item
             v-model="dataForm.type"
             @change="handelChange('type', dataForm.type)"
             :title="typeTitle"
             :options="payTypeList"
           />
-          <!-- <van-dropdown-item
-            v-model="operator"
-            @change="handelChange('operator', dataForm.operator)"
-            :title="operatorTitle"
-            :options="operatorList"
-          /> -->
         </van-dropdown-menu>
       </div>
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           options="{ separator: ',' }"
         />
@@ -120,9 +108,9 @@
         </van-list>
       </div>
     </div>
-     <van-popup v-model:show="showRepairPositionPicker" round position="bottom">
+    <van-popup v-model:show="showRepairPositionPicker" round position="bottom">
       <van-picker
-        title="标题"
+        title="请选择"
         :columns="positionList"
         :columns-field-names="fieldNames"
         @cancel="showRepairPositionPicker = false"
@@ -141,63 +129,60 @@ export default {
   },
   data() {
     return {
-      showRepairPositionPicker: false,
+      name: "",
+      projectName: "",
       positionList: [],
-      fieldNames:{
+      fieldNames: {
         text: "orgName",
         value: "orgId",
         children: "childrenList",
       },
-      name: "电商园四期",
-      feeDateTitle: "扣缴时间",
+      showRepairPositionPicker: false,
       typeTitle: "扣缴类型",
-      operatorTitle: "操作人",
       payTypeList: [],
-      operatorList: [],
-      feeDateList: [],
       dataForm: {
         projectId: "",
         buildingId: "",
         storeyId: "",
-        //feeDate: "",
-        //operator: "",
         type: "",
         tenantId: "",
         page: 1,
         limit: 10,
       },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
       finished: false,
     };
   },
-  created() {
-    this.getBuildList();
-    this.dataForm.tenantId = localStorage.getItem("tenantId");
-    this.getPayTypeList();
-  },
-  watch:{
-    "dataForm.buildingId"(newval,oldval){
-      if(newval&&newval!=oldval){
-        this.page=1;
-        this.getDataList();
+
+  watch: {
+    "dataForm.buildingId"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
       }
     },
-     "dataForm.storeyId"(newval,oldval){
-      if(newval&&newval!=oldval){
-        this.page=1;
-        this.getDataList();
+    "dataForm.storeyId"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
       }
     },
   },
+
+  created() {
+    this.getBuildList();
+    this.getPayTypeList();
+  },
+
   methods: {
-     //获取楼栋
+    //获取楼栋
     getBuildList() {
       Api.getBuildInfo().then((res) => {
         if (res.code == 0) {
+          this.name = this.projectName = res.data[0].orgName;
           this.positionList = res.data[0].childrenList;
-          this.dataForm.projectId=res.data[0].orgId;
+          this.dataForm.projectId = res.data[0].orgId;
           if (this.positionList) {
             let json = {
               category: "s",
@@ -212,29 +197,31 @@ export default {
         }
       });
     },
+
     //定位完成
     confirmPosition(val) {
-      this.page=1;
-      this.dataList=[];
       this.dataForm.buildingId = val[0].orgId;
       this.dataForm.storeyId = val[1].orgId;
       let storeyName = val[1].orgName == "全部" ? "" : val[1].orgName;
-      this.name = "电商园四期-" + val[0].orgName + storeyName;
+      this.name = this.projectName + "-" + val[0].orgName + storeyName;
       this.showRepairPositionPicker = false;
     },
+
     getPayTypeList() {
-      this.payTypeList = getDictDataList("PayType2");
+      this.payTypeList = getDictDataList("PayType");
       this.payTypeList.forEach((item) => {
         item.text = item.dictLabel;
-        item.value = item.dictValue=='all'?'':item.dictValue;
+        item.value = item.dictValue == "all" ? "" : item.dictValue;
       });
     },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
       }
       return this[list].find((item) => item.dictValue == val);
     },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -245,6 +232,7 @@ export default {
         this.dataForm.page++; // 分页数加一
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
@@ -252,9 +240,11 @@ export default {
       // 重新加载数据
       // 将 loading 设置为 true,表示处于加载状态
       this.loading = true;
+      this.total = 0;
       this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     getDataList() {
       Api.reduceRecordList(this.dataForm).then((res) => {
@@ -269,6 +259,7 @@ export default {
             this.dataList.push(...res.data.list); // 将数据放入list中
             this.loading = false; // 加载状态结束
 
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
@@ -284,6 +275,7 @@ export default {
         }
       });
     },
+
     // change事件可以拿到的是value
     handelChange(type, val) {
       if (type == "type") {
@@ -294,6 +286,7 @@ export default {
       }
       this.onRefresh();
     },
+
     backPath() {
       this.$router.back();
     },
@@ -322,12 +315,6 @@ export default {
       letter-spacing: 2px;
     }
   }
-  .drop_down {
-    /deep/ {
-      --van-gray-4: #999999;
-      --van-dropdown-menu-title-text-color: #0c1935;
-    }
-  }
   .list_total {
     padding: 0 16px;
     margin: 8px 0;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 528 - 602
src/views/remoteControl.vue


+ 15 - 1
src/views/repair/create.vue

@@ -191,18 +191,23 @@ export default {
       },
     };
   },
+  
   created() {
     this.getBuildList();
     this.getRepairTypeList();
     this.getRepairRegionList();
   },
+
   methods: {
+
     getRepairTypeList() {
       this.repairTypeList = getDictDataList("RepairType");
     },
+
     getRepairRegionList() {
       this.repairRegionList = getDictDataList("RepairRegion");
     },
+
     //获取楼栋
     getBuildList() {
       Api.getBuildInfo().then((res) => {
@@ -211,6 +216,7 @@ export default {
         }
       });
     },
+
     onFinish(val) {
       this.dataForm.buildingId = val.selectedOptions[0].orgId;
       this.dataForm.storeyId = val.selectedOptions[1].orgId;
@@ -223,9 +229,11 @@ export default {
         val.selectedOptions[2].orgName;
       this.showRepairPositionPicker = false;
     },
+
     onOversize() {
       this.$toast("单个文件大小不能超过 500kb");
     },
+
     beforeRead(file) {
       if (file instanceof Array) {
         const obj = file.find(
@@ -251,6 +259,7 @@ export default {
       }
       return true;
     },
+
     beforeDelete(file) {
       this.tempFileList = this.tempFileList.filter(
         (item) => item.name != file.file.name
@@ -259,6 +268,7 @@ export default {
         (item) => item.file.name != file.file.name
       );
     },
+
     afterRead(file) {
       if (file instanceof Array) {
         file.forEach((file) => {
@@ -276,6 +286,7 @@ export default {
         }, 1000);
       }
     },
+
     uploadFile(file) {
       //  这时候我们创建一个formData对象实例
       const formData = new FormData();
@@ -295,6 +306,7 @@ export default {
         }
       });
     },
+
     onSubmit() {
       let tempArr = [];
       this.tempFileList.forEach((item) => {
@@ -305,7 +317,8 @@ export default {
         message: "保存中...",
         forbidClick: true,
       });
-      Api.repairInfoSave(this.dataForm).then((res) => {
+      Api.repairSave(this.dataForm).then((res) => {
+        this.$toast.clear();
         if (res.code == 0) {
           this.$toast.success("保存成功");
         } else {
@@ -313,6 +326,7 @@ export default {
         }
       });
     },
+
     backPath() {
       this.$router.back();
     },

+ 41 - 17
src/views/repair/detail.vue

@@ -16,7 +16,8 @@
           title-style="color: #0c1935"
           :icon="require('@/assets/line.svg')"
           v-if="
-            role == 'admin' && (dataForm.status == 2 || dataForm.status == 3)
+            (role == 'admin' || role == 'Maintenance') &&
+            (dataForm.status == 2 || dataForm.status == 3)
           "
         />
         <van-cell title="报修时间" :value="dataForm.createDate" />
@@ -49,7 +50,10 @@
         </van-cell>
       </van-cell-group>
       <van-cell-group
-        v-if="role == 'admin' && (dataForm.status == 2 || dataForm.status == 3)"
+        v-if="
+          (role == 'admin' || role == 'Maintenance') &&
+          (dataForm.status == 2 || dataForm.status == 3)
+        "
       >
         <van-cell
           title="维修信息"
@@ -72,7 +76,7 @@
       </van-cell-group>
     </div>
   </div>
-  <template v-if="dataForm.status == 2 && role == 'repair'">
+  <template v-if="dataForm.status == 2 && role == 'Maintenance'">
     <van-submit-bar class="save_btn">
       <template #button>
         <van-button block type="primary" @click="handleClick('finish')">
@@ -134,7 +138,7 @@
             @confirm="
               (value) => {
                 dataForm.repairPersonId = value.id;
-                dataForm.repairPersonName = value.name;
+                dataForm.repairPersonName = value.realName;
                 showRepairPersonPicker = false;
               }
             "
@@ -196,8 +200,8 @@ export default {
         value: "dictValue",
       },
       userFieldNames: {
-        text: "name",
-        value: "mobile",
+        text: "realName",
+        value: "id",
       },
       repairTypeList: [],
       repairRegionList: [],
@@ -222,6 +226,7 @@ export default {
       },
     };
   },
+
   async mounted() {
     this.role = localStorage.getItem("role");
     this.getRepairTypeList();
@@ -230,18 +235,20 @@ export default {
     await this.getUserList();
     this.getDataList();
   },
+
   methods: {
     //获取维修人员
     getUserList() {
-      Api.repairInfoUser({
+      Api.repairUserList({
         page: 1,
         limit: 100,
       }).then((res) => {
         if (res.code == 0) {
-          this.repairPersonList = res.data.list;
+          this.repairPersonList = res.data;
         }
       });
     },
+
     getRepairRegionList() {
       this.repairRegionList = getDictDataList("RepairRegion");
     },
@@ -253,6 +260,7 @@ export default {
     getUrgencyTypeList() {
       this.urgencyTypeList = getDictDataList("UrgencyType");
     },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
@@ -261,22 +269,23 @@ export default {
     },
 
     getDataList() {
-      Api.repairInfoDetail(this.$route.query.id).then((res) => {
+      Api.repairDetail(this.$route.query.id).then((res) => {
         if (res.code == 0) {
           this.dataForm = res.data;
           this.imagesList = this.dataForm.faultPics.split(",");
           if (this.dataForm.repairPersonId) {
             this.dataForm.repairPersonName = this.repairPersonList.find(
-              (item) => (item.id == this.dataForm.repairPersonId)
-            ).name;
+              (item) => item.id == this.dataForm.repairPersonId
+            ).realName;
             this.dataForm.repairPersonMobile = this.repairPersonList.find(
-              (item) => (item.id == this.dataForm.repairPersonId)
+              (item) => item.id == this.dataForm.repairPersonId
             ).mobile;
           }
         } else {
         }
       });
     },
+
     handleClick(type) {
       if (type == "finish") {
         this.$dialog
@@ -284,7 +293,19 @@ export default {
             message: "请确认是否维修完成",
           })
           .then(() => {
-            // on confirm
+            this.$toast.loading({
+              message: "保存中...",
+              forbidClick: true,
+            });
+            Api.repairFinish(this.$route.query.id).then((res) => {
+              this.$toast.clear();
+              if (res.code == 0) {
+                this.$toast.success("保存成功");
+                this.getDataList();
+              } else {
+                this.$toast.fail("保存失败");
+              }
+            });
           })
           .catch(() => {
             // on cancel
@@ -297,25 +318,28 @@ export default {
         });
       }
     },
+
     onSubmit() {
       this.$toast.loading({
-        message: "保存中...",
+        message: "指派中...",
         forbidClick: true,
       });
-      Api.repairInfoDispatch({
+      Api.repairDispatch({
         id: this.dataForm.id,
         repairPersonId: this.dataForm.repairPersonId,
         urgency: this.dataForm.urgency,
       }).then((res) => {
+        this.$toast.clear();
         if (res.code == 0) {
-          this.$toast.success("保存成功");
+          this.$toast.success("指派成功");
           this.showPopup = false;
           this.getDataList();
         } else {
-          this.$toast.fail("保存失败");
+          this.$toast.fail("指派失败");
         }
       });
     },
+    
     backPath() {
       this.$router.back();
     },

+ 12 - 9
src/views/repair/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <van-nav-bar :title="title" safe-area-inset-top>
+  <van-nav-bar :title="title" :border="false" safe-area-inset-top>
     <template #left>
       <van-icon
         :name="require('@/assets/arrow-left.svg')"
@@ -33,7 +33,7 @@
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           options="{ separator: ',' }"
         />
@@ -100,7 +100,6 @@ export default {
   },
   data() {
     return {
-      time: null,
       role: "",
       title: "",
       repairStatusList: [],
@@ -111,12 +110,14 @@ export default {
         page: 1,
         limit: 10,
       },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
       finished: false,
     };
   },
+
   watch: {
     "dataForm.status": {
       handler(newval, oldval) {
@@ -125,10 +126,8 @@ export default {
       deep: true,
     },
   },
+
   created() {
-    this.time = setInterval(() => {
-      console.log(1);
-    }, 1000);
     this.role = localStorage.getItem("role");
     if (this.role == "admin") {
       this.title = "工单待办";
@@ -169,6 +168,7 @@ export default {
       }
       return this[list].find((item) => item.dictValue == val);
     },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -179,19 +179,22 @@ export default {
         this.dataForm.page++; // 分页数加一
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
       this.dataList = [];
       // 重新加载数据
       // 将 loading 设置为 true,表示处于加载状态
+      this.total = 0;
       this.loading = true;
       this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     async getDataList() {
-      Api.repairInfoQuery(this.dataForm).then((res) => {
+      Api.repairList(this.dataForm).then((res) => {
         if (res.code == 0) {
           if (res.data) {
             if (res.data.list.length == 0) {
@@ -202,7 +205,7 @@ export default {
             // 若数据条数不等于0
             this.dataList.push(...res.data.list); // 将数据放入list中
             this.loading = false; // 加载状态结束
-
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
@@ -227,8 +230,8 @@ export default {
         },
       });
     },
+    
     backPath() {
-      clearInterval(this.time);
       this.$router.back();
     },
   },

+ 94 - 23
src/views/review/list.vue

@@ -11,20 +11,22 @@
   <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
     <div class="page_info">
       <van-row align="center" class="position_pannel">
-        <van-col>
-          <van-image
-            :src="require('@/assets/position.svg')"
-            width="16"
-            height="16"
-            fit="contain"
-          />
-          <van-col>{{ name }}</van-col>
-          <van-image
-            :src="require('@/assets/arrow-right.svg')"
-            width="24"
-            height="24"
-            fit="contain"
-          />
+        <van-col @click="showRepairPositionPicker = true">
+          <van-col>
+            <van-image
+              :src="require('@/assets/position.svg')"
+              width="16"
+              height="16"
+              fit="contain"
+            />
+            <van-col>{{ name }}</van-col>
+            <van-image
+              :src="require('@/assets/arrow-right.svg')"
+              width="24"
+              height="24"
+              fit="contain"
+            />
+          </van-col>
         </van-col>
         <van-col>
           <van-image
@@ -54,7 +56,7 @@
       <van-row align="center" class="list_total">
         <van-col>共有</van-col>
         <v-count-up
-          :end-val="dataList.length"
+          :end-val="total"
           class="count_up"
           options="{ separator: ',' }"
         />
@@ -95,6 +97,15 @@
         </van-list>
       </div>
     </div>
+    <van-popup v-model:show="showRepairPositionPicker" round position="bottom">
+      <van-picker
+        title="请选择"
+        :columns="positionList"
+        :columns-field-names="fieldNames"
+        @cancel="showRepairPositionPicker = false"
+        @confirm="confirmPosition"
+      />
+    </van-popup>
   </van-pull-refresh>
 </template>
 <script>
@@ -107,7 +118,15 @@ export default {
   },
   data() {
     return {
-      name: "电商园四期-B座",
+      name: "",
+      projectName: "",
+      positionList: [],
+      fieldNames: {
+        text: "orgName",
+        value: "orgId",
+        children: "childrenList",
+      },
+      showRepairPositionPicker: false,
       checkPerson: "",
       reviewTypeTitle: "巡检类型",
       checkPersonTitle: "巡检人员",
@@ -117,19 +136,39 @@ export default {
         { text: "李四", value: 2 },
       ],
       dataForm: {
+        projectId: "",
+        buildingId: "",
+        storeyId: "",
         circuitType: "",
         page: 1,
         limit: 10,
       },
+      total: 0,
       dataList: [],
       loading: false,
       refreshing: false,
       finished: false,
     };
   },
+
+  watch: {
+    "dataForm.buildingId"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
+      }
+    },
+    "dataForm.storeyId"(newval, oldval) {
+      if (newval && newval != oldval) {
+        this.onRefresh();
+      }
+    },
+  },
+
   created() {
+    this.getBuildList();
     this.getReviewTypeList();
   },
+
   methods: {
     getReviewTypeList() {
       this.reviewTypeList = getDictDataList("ReviewType");
@@ -138,12 +177,45 @@ export default {
         item.value = item.dictValue;
       });
     },
+
+    //获取楼栋
+    getBuildList() {
+      Api.getBuildInfo().then((res) => {
+        if (res.code == 0) {
+          this.name = this.projectName = res.data[0].orgName;
+          this.positionList = res.data[0].childrenList;
+          this.dataForm.projectId = res.data[0].orgId;
+          if (this.positionList) {
+            let json = {
+              category: "s",
+              childrenList: null,
+              orgId: "",
+              orgName: "全部",
+            };
+            for (let i = 0; i < this.positionList.length; i++) {
+              this.positionList[i].childrenList.unshift(json);
+            }
+          }
+        }
+      });
+    },
+
+    //定位完成
+    confirmPosition(val) {
+      this.dataForm.buildingId = val[0].orgId;
+      this.dataForm.storeyId = val[1].orgId;
+      let storeyName = val[1].orgName == "全部" ? "" : val[1].orgName;
+      this.name = this.projectName + "-" + val[0].orgName + storeyName;
+      this.showRepairPositionPicker = false;
+    },
+
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
       }
       return this[list].find((item) => item.dictValue == val);
     },
+
     onLoad() {
       setTimeout(async () => {
         if (this.refreshing) {
@@ -154,16 +226,19 @@ export default {
         this.dataForm.page++; // 分页数加一
       }, 100);
     },
+
     onRefresh() {
       // 清空列表数据
       this.finished = false;
       // 重新加载数据
       this.dataList = [];
       // 将 loading 设置为 true,表示处于加载状态
+      this.total = 0;
       this.loading = true;
       this.dataForm.page = 1; // 分页数赋值为1
       this.onLoad();
     },
+
     // 获取列表数据方法
     getDataList() {
       Api.reviewList(this.dataForm).then((res) => {
@@ -177,7 +252,7 @@ export default {
             // 若数据条数不等于0
             this.dataList.push(...res.data.list); // 将数据放入list中
             this.loading = false; // 加载状态结束
-
+            this.total = res.data.total;
             // 如果list长度大于等于总数据条数,数据全部加载完成
             if (this.dataList.length >= res.data.total) {
               this.finished = true; // 结束加载状态
@@ -193,6 +268,7 @@ export default {
         }
       });
     },
+
     // change事件可以拿到的是value
     handelChange(type, val) {
       if (type == "reviewType") {
@@ -209,6 +285,7 @@ export default {
       }
       this.onRefresh();
     },
+
     backPath() {
       this.$router.back();
     },
@@ -237,12 +314,6 @@ export default {
       letter-spacing: 2px;
     }
   }
-  .drop_down {
-    /deep/ {
-      --van-gray-4: #999999;
-      --van-dropdown-menu-title-text-color: #0c1935;
-    }
-  }
   .list_total {
     padding: 0 16px;
     margin: 8px 0;

+ 7 - 4
src/views/scanCode.vue

@@ -21,7 +21,7 @@ import { BrowserMultiFormatReader } from "@zxing/library";
 import Api from "@/utils/api";
 import { mapGetters } from "vuex";
 import { getCurrentTime } from "@/utils/index";
-const LosslessJSON = require('lossless-json')
+const LosslessJSON = require("lossless-json");
 export default {
   data() {
     return {
@@ -42,13 +42,16 @@ export default {
       },
     };
   },
+
   computed: {
     ...mapGetters({ userInfo: "getUserInfo" }),
   },
+
   created() {
     this.codeReader = new BrowserMultiFormatReader();
     this.openScan();
   },
+
   methods: {
     async openScan() {
       this.codeReader
@@ -74,9 +77,9 @@ export default {
         })
         .catch((err) => {
           this.tipShow = false;
-          console.error(err);
         });
     },
+
     decodeFromInputVideoFunc(firstDeviceId) {
       this.codeReader.reset(); // 重置
       this.scanText = "";
@@ -88,7 +91,6 @@ export default {
           this.scanText = "";
           if (result) {
             this.scanText = LosslessJSON.parse(result.text);
-            console.log(this.scanText);
             if (this.scanText) {
               this.tipShow = false;
               this.onSubmit();
@@ -99,11 +101,11 @@ export default {
             setTimeout(() => {
               this.tipShow = false;
             }, 2000);
-            console.error(err);
           }
         }
       );
     },
+
     onSubmit() {
       this.dataForm.buildingId = this.scanText.buildingId.value;
       this.dataForm.storeyId = this.scanText.storeyId.value;
@@ -119,6 +121,7 @@ export default {
         }
       });
     },
+
     backPath() {
       this.codeReader.reset();
       // 返回上一页

+ 121 - 0
src/views/user/account.vue

@@ -0,0 +1,121 @@
+<template>
+  <van-nav-bar title="账号中心">
+    <template #left>
+      <van-icon
+        :name="require('@/assets/arrow-left.svg')"
+        size="24"
+        @click="backPath"
+      />
+    </template>
+  </van-nav-bar>
+  <div class="page_info">
+    <van-cell-group>
+      <van-cell title="账号名称" :value="dataForm.username" />
+      <van-cell
+        title="手机号码"
+        :value="dataForm.tel"
+        is-link
+        @click="
+          () => {
+            $router.push({ path: '/user/mobile' });
+          }
+        "
+      />
+      <van-cell
+        title="账号密码"
+        :value="dataForm.password"
+        is-link
+        @click="
+          () => {
+            $router.push({ path: '/user/password' });
+          }
+        "
+      />
+    </van-cell-group>
+    <div style="margin-top: 40px">
+      <van-button
+        style="border-radius: 0"
+        block
+        color="#2E69EB"
+        plain
+        @click="loginOut"
+      >
+        注销登录
+      </van-button>
+    </div>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      dataForm: {
+        username: "",
+        tel: "",
+        password: "",
+      },
+    };
+  },
+  
+  computed: {
+    ...mapGetters({ userInfo: "getUserInfo" }),
+  },
+
+  created() {
+    this.dataForm.username = this.userInfo.userName;
+    this.dataForm.tel = this.userInfo.mobile
+      ? this.plusXing(this.userInfo.mobile, 3, 2, "*")
+      : "";
+    this.dataForm.password = this.userInfo.passWord
+      ? this.plusXing(this.userInfo.passWord, 0, 0, "*")
+      : "";
+  },
+
+  methods: {
+    /* 部分隐藏处理
+     ** str 需要处理的字符串
+     ** frontLen 保留的前几位
+     ** endLen 保留的后几位
+     ** cha 替换的字符串
+     */
+    plusXing(str, frontLen, endLen, cha) {
+      let len = str.length - frontLen - endLen;
+      let xing = "";
+      for (let i = 0; i < len; i++) {
+        xing += cha;
+      }
+      return (
+        str.substring(0, frontLen) + xing + str.substring(str.length - endLen)
+      );
+    },
+
+    loginOut() {
+      localStorage.clear();
+      window.location.href = "/#/login";
+    },
+
+    backPath() {
+      this.$router.back();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.page_info {
+  padding-top: 12px;
+  .msg_tip {
+    padding: 0 16px;
+    .van-icon {
+      font-size: 16px;
+      color: #999999;
+    }
+    .van-col {
+      color: #999999;
+      font-size: 14px;
+      line-height: 24px;
+      text-indent: 4px;
+    }
+  }
+}
+</style>

+ 3 - 0
src/views/user/index.vue

@@ -0,0 +1,3 @@
+<template >
+  <router-view></router-view>
+</template>

+ 110 - 0
src/views/user/mobile.vue

@@ -0,0 +1,110 @@
+<template>
+  <van-nav-bar title="手机号">
+    <template #left>
+      <van-icon
+        :name="require('@/assets/arrow-left.svg')"
+        size="24"
+        @click="backPath"
+      />
+    </template>
+  </van-nav-bar>
+  <div class="page_info">
+    <van-cell-group>
+      <!-- <van-row justify="center">
+        <van-col>当前绑定手机号</van-col>
+      </van-row> -->
+      <van-row align="center" justify="center">
+        <van-col>当前绑定手机号:</van-col>
+        <van-col style="margin-right: 8px">{{ tel }}</van-col>
+        <van-icon
+          v-if="showPwd"
+          :name="require('@/assets/view.svg')"
+          @click="viewPwd"
+        ></van-icon>
+        <van-icon
+          v-if="!showPwd"
+          :name="require('@/assets/hidden.svg')"
+          @click="viewPwd"
+        ></van-icon>
+      </van-row>
+      <van-button
+        plain
+        size="small"
+        style="padding: 0 16px; margin-top: 16px"
+        >更换</van-button
+      >
+    </van-cell-group>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      tel: "",
+      showPwd: true,
+    };
+  },
+
+  computed: {
+    ...mapGetters({ userInfo: "getUserInfo" }),
+  },
+
+  created() {
+    this.tel = this.userInfo.mobile
+      ? this.plusXing(this.userInfo.mobile, 3, 2, "*")
+      : "";
+  },
+
+  methods: {
+    /* 部分隐藏处理
+     ** str 需要处理的字符串
+     ** frontLen 保留的前几位
+     ** endLen 保留的后几位
+     ** cha 替换的字符串
+     */
+    plusXing(str, frontLen, endLen, cha) {
+      let len = str.length - frontLen - endLen;
+      let xing = "";
+      for (let i = 0; i < len; i++) {
+        xing += cha;
+      }
+      return (
+        str.substring(0, frontLen) + xing + str.substring(str.length - endLen)
+      );
+    },
+
+    viewPwd() {
+      if (this.showPwd) {
+        this.tel = this.userInfo.mobile;
+      } else {
+        this.tel = this.userInfo.mobile
+          ? this.plusXing(this.userInfo.mobile, 3, 2, "*")
+          : "";
+      }
+      this.showPwd = !this.showPwd;
+    },
+    
+    backPath() {
+      this.$router.back();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.page_info {
+  .van-cell-group {
+    margin: 12px 16px;
+    padding: 16px;
+    box-shadow: 0px 0px 10px 0px rgba(153, 153, 153, 0.15);
+    border-radius: 4px;
+    .van-col {
+      font-weight: 600;
+      font-size: 14px;
+    }
+    .van-button {
+      border-width: 1px;
+    }
+  }
+}
+</style>

+ 281 - 0
src/views/user/password.vue

@@ -0,0 +1,281 @@
+<template>
+  <van-nav-bar title="更改密码">
+    <template #left>
+      <van-icon
+        :name="require('@/assets/arrow-left.svg')"
+        size="24"
+        @click="backPath"
+      />
+    </template>
+  </van-nav-bar>
+  <div class="page_info">
+    <van-form
+      input-align="right"
+      error-message-align="right"
+      @submit="onSubmit"
+    >
+      <van-cell-group style="padding-bottom: 4px">
+        <van-field
+          v-model="dataForm.password"
+          :type="showType"
+          label="原密码"
+          required
+        >
+          <template #right-icon>
+            <van-icon
+              v-if="showPwd"
+              :name="require('@/assets/view.svg')"
+              @click="viewPwd"
+            ></van-icon>
+            <van-icon
+              v-if="!showPwd"
+              :name="require('@/assets/hidden.svg')"
+              @click="viewPwd"
+            ></van-icon>
+          </template>
+        </van-field>
+        <van-field
+          v-model="dataForm.newPassword"
+          type="password"
+          label="新密码"
+          required
+          placeholder="请输入新密码"
+          clearable
+          :rules="[{ required: true, message: '请输入新密码' }]"
+          @update:model-value="validatePwd(dataForm.newPassword)"
+          @blur="validatorContinue(dataForm.newPassword)"
+          @focus="isContinue = false"
+        >
+        </van-field>
+        <van-field
+          v-model="dataForm.confirmPassword"
+          type="password"
+          label="确认密码"
+          required
+          placeholder="请再次输入新密码"
+          clearable
+          :rules="[{ required: true, message: '请再次输入新密码' }]"
+          @update:model-value="isEqual = false"
+        />
+        <van-row align="center" class="msg_tip" style="margin-top: 12px">
+          <van-icon name="checked" :color="color_length_pass"></van-icon>
+          <van-col>密码由8~16位数字、字母或符号组成</van-col>
+        </van-row>
+        <van-row align="center" class="msg_tip">
+          <van-icon name="checked" :color="color_type_pass"></van-icon>
+          <van-col>至少含两种以上字符</van-col>
+        </van-row>
+        <template v-if="isSpace">
+          <van-row align="center" class="msg_tip">
+            <van-icon name="warning" color="#F56C6C"></van-icon>
+            <van-col style="color: #f56c6c">不能包含空格</van-col>
+          </van-row>
+        </template>
+        <template v-if="isContinue">
+          <van-row align="center" class="msg_tip">
+            <van-icon name="warning" color="#F56C6C"></van-icon>
+            <van-col style="color: #f56c6c">不能包含连续字符</van-col>
+          </van-row>
+        </template>
+        <template v-if="isEqual">
+          <van-row align="center" class="msg_tip">
+            <van-icon name="warning" color="#F56C6C"></van-icon>
+            <van-col style="color: #f56c6c">两次输入的密码不一致</van-col>
+          </van-row>
+        </template>
+      </van-cell-group>
+
+      <div class="save_btn">
+        <van-button
+          type="primary"
+          :disabled="
+            !(
+              !isContinue_copy &&
+              !isContinue &&
+              !isSpace &&
+              color_length_pass &&
+              color_type_pass &&
+              dataForm.confirmPassword
+            )
+          "
+          block
+          native-type="submit"
+        >
+          确定
+        </van-button>
+      </div>
+      <van-row class="msg_tip" style="margin-top: 4px">
+        <van-col style="color: #666666">
+          安全提示:新密码请勿与旧密码过于相似
+        </van-col>
+      </van-row>
+    </van-form>
+  </div>
+</template>
+<script>
+import Cookies from "js-cookie";
+import Api from "@/utils/api";
+import { mapGetters } from "vuex";
+export default {
+  data() {
+    return {
+      isSpace: false,
+      isContinue_copy: false,
+      isContinue: false,
+      isEqual: false,
+      showPwd: true,
+      showType: "password",
+      color_length_pass: "",
+      color_type_pass: "",
+      dataForm: {
+        password: "",
+        newPassword: "",
+        confirmPassword: "",
+      },
+    };
+  },
+
+  computed: {
+    ...mapGetters({ userInfo: "getUserInfo" }),
+  },
+
+  created() {
+    this.dataForm.password = this.userInfo.passWord;
+  },
+
+  methods: {
+    viewPwd() {
+      this.showPwd = !this.showPwd;
+      if (this.showPwd) {
+        this.showType = "password";
+      } else {
+        this.showType = "text";
+      }
+    },
+
+    validatePwd(val) {
+      const pattern = /^[A-Za-z\d\s$@_$!%*#?&]{8,16}$/;
+      if (pattern.test(val)) {
+        this.color_length_pass = "#2E69EB";
+      } else {
+        this.color_length_pass = "";
+      }
+
+      //校验字符种类
+      var pwdCount = 0; //统计密码包含了几种字符
+      var pwdRegex1 = new RegExp("(?=.*[0-9])."); //纯数字
+      var pwdRegex2 = new RegExp("(?=.*[a-z])."); //小写字母
+      var pwdRegex3 = new RegExp("(?=.*[A-Z])."); //大写字母
+      var pwdRegex4 = new RegExp("(?=.*[^a-zA-Z0-9])."); //特殊字符
+
+      if (pwdRegex1.test(val)) {
+        pwdCount = pwdCount + 1;
+      }
+
+      if (pwdRegex2.test(val)) {
+        pwdCount = pwdCount + 1;
+      }
+
+      if (pwdRegex3.test(val)) {
+        pwdCount = pwdCount + 1;
+      }
+
+      if (pwdRegex4.test(val)) {
+        pwdCount = pwdCount + 1;
+      }
+
+      if (pwdCount < 2) {
+        this.color_type_pass = "";
+      } else {
+        this.color_type_pass = "#2E69EB";
+      }
+
+      //校验空格
+      if (/\s/.test(val)) {
+        this.isSpace = true;
+      } else {
+        this.isSpace = false;
+      }
+    },
+
+    validatorContinue(val) {
+      var arr = val.split("");
+      var flag = true;
+      for (var i = 1; i < arr.length - 3; i++) {
+        var firstIndex = arr[i - 1].charCodeAt();
+        var secondIndex = arr[i].charCodeAt();
+        var thirdIndex = arr[i + 1].charCodeAt();
+        var fourthIndex = arr[i + 2].charCodeAt();
+        var fifthIndex = arr[i + 3].charCodeAt();
+        if (
+          fifthIndex - fourthIndex == 1 &&
+          fourthIndex - thirdIndex == 1 &&
+          thirdIndex - secondIndex == 1 &&
+          secondIndex - firstIndex == 1
+        ) {
+          flag = false;
+        }
+      }
+      if (!flag) {
+        this.isContinue = true;
+        this.isContinue_copy = true;
+      } else {
+        this.isContinue = false;
+        this.isContinue_copy = false;
+      }
+    },
+
+    onSubmit() {
+      if (this.dataForm.newPassword != this.dataForm.confirmPassword) {
+        this.isEqual = true;
+        return;
+      }
+      this.$toast.loading({
+        message: "保存中...",
+        forbidClick: true,
+      });
+      Api.updatePwd(this.dataForm).then((res) => {
+        this.$toast.clear();
+        if (res.code == 0) {
+          this.$toast.success("修改成功,请重新登录");
+          Cookies.remove("userName");
+          Cookies.remove("passWord");
+          localStorage.clear();
+          window.location.href = "/#/login";
+        } else {
+          this.$toast.fail("修改失败");
+        }
+      });
+    },
+
+    backPath() {
+      this.$router.back();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.page_info {
+  padding-top: 12px;
+  .save_btn {
+    height: 60px;
+    display: flex;
+    align-items: center;
+    padding: 0 16px;
+    margin-top: 40px;
+  }
+  .msg_tip {
+    padding: 0 16px;
+    .van-icon {
+      font-size: 16px;
+      color: #999999;
+    }
+    .van-col {
+      color: #999999;
+      font-size: 14px;
+      line-height: 24px;
+      text-indent: 4px;
+    }
+  }
+}
+</style>

+ 0 - 222
src/views/userInfo.vue

@@ -1,222 +0,0 @@
-<template>
-  <van-nav-bar :title="title">
-    <template #left>
-      <van-icon
-        :name="require('@/assets/arrow-left.svg')"
-        size="24"
-        @click="backPath"
-      />
-    </template>
-  </van-nav-bar>
-  <div class="page_info">
-    <div class="info_user">
-      <template v-if="type == 'account'">
-        <van-cell-group>
-          <van-cell title="账号名称" :value="dataForm.username" />
-          <van-cell title="手机号码" :value="dataForm.tel" />
-          <van-cell title="账号密码" :value="dataForm.password" />
-        </van-cell-group>
-      </template>
-      <template v-if="type == 'password'">
-        <van-form
-          input-align="right"
-          error-message-align="right"
-          @submit="onSubmit"
-        >
-          <van-cell-group>
-            <van-field
-              v-model="dataForm.password"
-              :type="showType"
-              label="原密码"
-              required
-            >
-              <template #right-icon v-if="dataForm.password">
-                <van-icon
-                  :name="require('@/assets/view.svg')"
-                  @click="showPwd"
-                ></van-icon>
-              </template>
-            </van-field>
-            <van-field
-              v-model="dataForm.newpassword"
-              type="password"
-              label="新密码"
-              required
-              placeholder="请输入新密码"
-              clearable
-              :rules="[{ required: true, message: '请输入新密码' }]"
-            >
-            </van-field>
-            <van-field
-              v-model="dataForm.confirmpassword"
-              type="password"
-              label="确认密码"
-              required
-              placeholder="请再次输入新密码"
-              clearable
-              :rules="[{ required: true, message: '请再次输入新密码' }]"
-              @blur="handleBlur"
-            />
-            <van-row align="center" class="msg_tip" style="margin-top: 16px">
-              <van-icon name="checked"></van-icon>
-              <van-col>密码由8~16位数字、字母或符号组成</van-col>
-            </van-row>
-            <van-row align="center" class="msg_tip">
-              <van-icon name="checked"></van-icon>
-              <van-col>至少含两种以上字符</van-col>
-            </van-row>
-            <van-row align="center" class="msg_tip">
-              <van-icon name="warning"></van-icon>
-              <van-col>不能包含连续字符</van-col>
-            </van-row>
-            <van-row align="center" class="msg_tip">
-              <van-icon name="warning"></van-icon>
-              <van-col>两次输入的密码不一致</van-col>
-            </van-row>
-          </van-cell-group>
-
-          <van-submit-bar class="save_btn">
-            <template #button>
-              <van-button
-                block
-                type="primary"
-                :loading="loading"
-                loading-type="spinner"
-                loading-text="提交"
-                native-type="submit"
-              >
-                提交
-              </van-button>
-            </template>
-          </van-submit-bar>
-        </van-form>
-      </template>
-    </div>
-    <template v-if="type == 'account'">
-      <van-button
-        style="margin-top: 40px; border-radius: 0"
-        block
-        color="#2E69EB"
-        plain
-        @click="loginOut"
-      >
-        注销登录
-      </van-button>
-    </template>
-  </div>
-</template>
-<script>
-import { mapGetters } from "vuex";
-export default {
-  data() {
-    return {
-      type: "",
-      title: "",
-      loading: false,
-      showType: "password",
-      dataForm: {
-        username: "",
-        tel: "",
-        password: "123456",
-        newpassword: "",
-        confirmpassword: "",
-      },
-    };
-  },
-  computed: {
-    ...mapGetters({ userInfo: "getUserInfo" }),
-  },
-  created() {
-    console.log(this.userInfo);
-    this.typeOfNum("ling1234.,/?。,");
-    this.type = this.$route.query.type;
-    this.title =
-      (this.type && (this.type == "account" ? "账号中心" : "更改密码")) || "";
-    this.dataForm.username = this.userInfo.userName;
-    this.dataForm.tel = this.userInfo.mobile;
-    this.dataForm.password = this.userInfo.passWord
-      ? this.plusXing(this.userInfo.passWord, 0, 0, "*")
-      : "";
-  },
-  methods: {
-    /* 部分隐藏处理
-     ** str 需要处理的字符串
-     ** frontLen 保留的前几位
-     ** endLen 保留的后几位
-     ** cha 替换的字符串
-     */
-    plusXing(str, frontLen, endLen, cha) {
-      let len = str.length - frontLen - endLen;
-      let xing = "";
-      for (let i = 0; i < len; i++) {
-        xing += cha;
-      }
-      return (
-        str.substring(0, frontLen) + xing + str.substring(str.length - endLen)
-      );
-    },
-    showPwd() {
-      this.showType = "text";
-      this.dataForm.password = this.userInfo.passWord;
-      console.log(this.dataForm.password);
-    },
-    //修改后的密码和原来不能相同
-    handleBlur() {},
-    typeOfNum(val) {
-      let chsCount = 0;
-      let engCount = 0;
-      let numCount = 0;
-      let otherCount = 0;
-      for (let i = 0; i < val.length; i++) {
-        let num = val.charCodeAt(i); //转unicode码比较
-        if (num >= 19968 && num <= 40869) {
-          //汉字
-          chsCount++;
-        } else if ((num >= 65 && num <= 90) || (num >= 97 && num <= 122)) {
-          //字母
-          engCount++;
-        } else if (num >= 48 && num <= 57) {
-          //数字
-          numCount++;
-        } else {
-          otherCount++; //其他字符
-        }
-      }
-      console.log(chsCount, engCount, numCount, otherCount);
-    },
-    onSubmit() {
-      this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-        this.$router.push("/");
-      }, 2000);
-    },
-    loginOut() {
-      localStorage.clear();
-    },
-    backPath() {
-      this.$router.back();
-    },
-  },
-};
-</script>
-<style lang="scss" scoped>
-.page_info {
-  .info_user {
-    margin: 12px 0 40px 0;
-  }
-  .msg_tip {
-    padding: 0 16px;
-    .van-icon {
-      font-size: 16px;
-      color: #999999;
-    }
-    .van-col {
-      color: #999999;
-      font-size: 14px;
-      line-height: 24px;
-      text-indent: 4px;
-    }
-  }
-}
-</style>