Ver Fonte

老人账号功能报错修正

XhuiCoder há 1 ano atrás
pai
commit
04fb6c2ee0
5 ficheiros alterados com 32 adições e 15 exclusões
  1. 8 4
      pages/index/index.vue
  2. 9 7
      pages/info/add-files.vue
  3. 2 2
      pages/login/index.vue
  4. 5 0
      pages/lr/info.vue
  5. 8 2
      pages/lr/list.vue

+ 8 - 4
pages/index/index.vue

@@ -14,11 +14,11 @@
 
     <view class="btnBox">
       <image class="btnImg" src="../../static/images/lrzc.png" @click="btnClick(0)" />
-      <image class="btnImg img2" src="../../static/images/jsjz.png" @click="btnClick(1)" />
+      <image v-if="userType !== '07'" class="btnImg img2" src="../../static/images/jsjz.png" @click="btnClick(1)" />
     </view>
 
     <view>
-      <uni-card class="daiban">
+      <uni-card v-if="userType !== '07'" class="daiban">
         <uni-section type="line" title="待办事项">
           <template v-slot:right>
             <text @click="toList">更多 ></text>
@@ -75,10 +75,14 @@
         total: 0,
       }
     },
-    onShow() {
-      // 老人07、员工04、监管06
+    onLoad() {
+      // 老人07、员工04、监管00
       this.userInfo = getUser()
       this.userType = this.userInfo.userType
+      console.log(this.userInfo);
+    },
+    onShow() {
+
       if (this.userType == '07') {
         this.info(this.userInfo.userId)
       } else {

+ 9 - 7
pages/info/add-files.vue

@@ -323,13 +323,15 @@
       this.userInfo = getUser()
       this.baseFormData.lrHjdz = this.userInfo.dept.locationCode
       this.groupId = this.userInfo.dept.locationCode.substring(0, 6)
-      if (this.userInfo.userType == '07') {
+      console.log(this.userInfo);
+      if (this.userInfo.userType === '07') {
         this.updateFlag = true
-        let info = JSON.parse(o.info)
-        this.baseFormData.lrHjdz = info.lrHjdz
-        this.groupId = info.lrHjdz.substring(0, 6)
-        this.baseFormData = info
-        this.src = config.baseUrl + info.lrTx
+        this.baseFormData.lrHjdz = this.userInfo.dept.locationCode.substring(0, 6) + '000000'
+        // let info = JSON.parse(o.info)
+        // this.baseFormData.lrHjdz = info.lrHjdz
+        // this.groupId = info.lrHjdz.substring(0, 6)
+        // this.baseFormData = info
+        // this.src = config.baseUrl + info.lrTx
       }
       //  查询街道和社区
       this.getAddressList(this.baseFormData.lrHjdz)
@@ -618,7 +620,7 @@
           url: '/pages/info/card'
         })
       },
-      onchange(e) { },
+      onchange(e) {},
       onnodeclick(node) {
         this.groupId = node.code.substring(0, 6)
         this.baseFormData.lrHjdz = this.groupId + '000000'

+ 2 - 2
pages/login/index.vue

@@ -99,8 +99,8 @@
         formData: {
           username: '',
           password: '',
-          // username: '220122197601247014',
-          // password: '247014',
+          // username: '152326197904090050',
+          // password: '090050',
           // username: '15578179876',
           // username: '15114481023',
           // password: 'sckj12356',

+ 5 - 0
pages/lr/info.vue

@@ -208,6 +208,7 @@
         showSrc: "",
         // 人员信息
         userInfo: {},
+        userType: '',
         // 组
         groupId: '',
         // 身份证号加密
@@ -296,6 +297,7 @@
     },
     onLoad(o) {
       this.userInfo = getUser()
+      this.userType = this.userInfo.userType
       //  查询街道和社区
       this.getAddressList(this.userInfo.dept.locationCode)
 
@@ -379,6 +381,9 @@
         this.zczmList = e
       },
       getAddressList(code) {
+        if (this.userType === '07') {
+          code = code.substring(0, 6) + '000000'
+        }
         GetChildListByCode({
           code: code
         }).then(res => {

+ 8 - 2
pages/lr/list.vue

@@ -77,12 +77,14 @@
     onLoad: function(options) {
       if (options.id) {
         this.form.pageNum = 1
-        this.form.pageSize = 10
+        this.form.pageSize = 8
         this.form.id = options.id
       }
       this.userInfo = getUser()
       if (this.userInfo.userType != '07') {
         this.form.createUserId = this.userInfo.userId
+      } else {
+        this.form.id = this.userInfo.userId
       }
       this.getList()
     },
@@ -90,7 +92,11 @@
       this.dataList = []
       this.form.pageNum = 1
       this.form.pageSize = 10
-      this.form.id = null
+      if (this.userInfo.userType != '07') {
+        this.form.id = null
+      } else {
+        this.form.id = this.userInfo.userId
+      }
       this.getList()
     },
     onReachBottom() {