浏览代码

修复 若干 bug

weiximei 6 年前
父节点
当前提交
6cfd654238

+ 4
- 4
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java 查看文件

@@ -156,7 +156,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
156 156
         boolean phoneBool = false;
157 157
 
158 158
         // 校验楼栋信息表
159
-        TpBuildingOwnerInfo selectBuild = getBuildingInfo(tpBuildingOwnerInfo, tpBuildingOwnerInfo.getCommunityId());
159
+        TpBuildingOwnerInfo selectBuild = getBuildingInfo(tpBuildingOwnerInfo, oldTpBuildingOwnerInfo.getCommunityId());
160 160
         // 如果数据查询到了, 并且手机号和传上来的手机号是一样的是, 代表就是原数据, 直接返回操作成功
161 161
         if (null != selectBuild && selectBuild.getOwnerTel().equals(tpBuildingOwnerInfo.getOwnerTel())) {
162 162
             tpBuildingOwnerInfoMapper.updateById(tpBuildingOwnerInfo);
@@ -169,10 +169,10 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
169 169
             // 校验楼栋信息表里面的业主手机号
170 170
             QueryWrapper<TpBuildingOwnerInfo> queryWrapperPhone = new QueryWrapper<>();
171 171
             queryWrapperPhone.eq("owner_tel", tpBuildingOwnerInfo.getOwnerTel());
172
-            TpBuildingOwnerInfo selectBuildPhone = getBuildingInfo(tpBuildingOwnerInfo, tpBuildingOwnerInfo.getCommunityId());
172
+            TpBuildingOwnerInfo selectBuildPhone = tpBuildingOwnerInfoMapper.selectOne(queryWrapperPhone);
173 173
 
174
-            // 如果 通过手机号查询出来的楼栋信息数据的 id 和 传上来的 楼栋,单元,楼层,单元,户号 查询出来的数据的id 匹配, 那么就表示这个手机号已经绑定了其他的楼栋信息
175
-            if (selectBuildPhone.getId().intValue() != selectBuild.getId().intValue()){
174
+            // 如果 通过手机号查询出来的楼栋信息数据的 id 和 传上来的 楼栋,单元,楼层,单元,户号 查询出来的数据的id 匹配, 那么就表示这个手机号已经绑定了其他的楼栋信息
175
+            if (null != selectBuildPhone && selectBuildPhone.getId().intValue() != selectBuild.getId().intValue()){
176 176
                 responseBean.addError("该手机号已存在!");
177 177
                 return responseBean;
178 178
             }

+ 3
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java 查看文件

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONArray;
3 4
 import com.alibaba.fastjson.JSONObject;
4 5
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 6
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -102,7 +103,8 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
102 103
         ResponseBean responseBean = new ResponseBean();
103 104
         JSONObject jsonObject = JSONObject.parseObject(parameter);
104 105
         // 活动配图
105
-        String [] contentImgArray = (String[]) jsonObject.get("contentImg");
106
+        JSONArray jsonArray = jsonObject.getJSONArray("contentImg");
107
+        String [] contentImgArray = jsonArray.toArray(new String[]{});
106 108
         TpActivity tpActivity = jsonObject.toJavaObject(TpActivity.class);
107 109
         tpActivity.setCommunityId(userElement.getCommunityId());
108 110
         tpActivity.setUpdateDate(LocalDateTime.now());

+ 11
- 11
VUECODE/smart-property-manage/src/components/chart/chart3.vue 查看文件

@@ -38,17 +38,17 @@ export default {
38 38
     })
39 39
   },
40 40
   created() {
41
-    this.GetHardData().then(() => {
42
-      console.log(this.hardData)
43
-      this.hardData.forEach(item => {
44
-        if (item.message === '小区开门次数') {
45
-          this.arr[0].num = item.count + '次'
46
-        } else if (item.message === '单元门开门次数') {
47
-          this.arr[1].num = item.count + '次'
48
-        }
49
-      })
50
-      this.arr = JSON.parse(JSON.stringify(this.arr))
51
-    })
41
+    // this.GetHardData().then(() => {
42
+    //   console.log(this.hardData)
43
+    //   this.hardData.forEach(item => {
44
+    //     if (item.message === '小区开门次数') {
45
+    //       this.arr[0].num = item.count + '次'
46
+    //     } else if (item.message === '单元门开门次数') {
47
+    //       this.arr[1].num = item.count + '次'
48
+    //     }
49
+    //   })
50
+    //   this.arr = JSON.parse(JSON.stringify(this.arr))
51
+    // })
52 52
   },
53 53
   methods: {
54 54
     ...mapActions('trunkIndex', [

+ 3
- 3
VUECODE/smart-property-manage/src/components/chart/chart5.vue 查看文件

@@ -13,9 +13,9 @@ export default {
13 13
     })
14 14
   },
15 15
   mounted() {
16
-    this.GetSignUser().then(() => {
17
-      this.rander()
18
-    })
16
+    // this.GetSignUser().then(() => {
17
+    //   this.rander()
18
+    // })
19 19
   },
20 20
   methods: {
21 21
     ...mapActions('trunkIndex', [

+ 42
- 22
VUECODE/smart-property-manage/src/utils/request.js 查看文件

@@ -31,30 +31,50 @@ service.interceptors.response.use(
31 31
     /**
32 32
      * code为非0是抛错
33 33
      */
34
-    const res = response.data
35
-    if (res.code !== '0') {
36
-      Message({
37
-        message: res.message,
38
-        type: 'error',
39
-        duration: 5 * 1000
40
-      })
34
+    // const res = response.data
35
+    // if (res.code !== '0') {
36
+    //   Message({
37
+    //     message: res.message,
38
+    //     type: 'error',
39
+    //     duration: 5 * 1000
40
+    //   })
41
+    //   // 802:Token 身份凭证不存在; 50012:其他客户端登录了;  803:Token 过期了;
42
+    //   if (res.code === '802' || res.code === '50012' || res.code === '803') {
43
+    //     MessageBox.confirm(
44
+    //       '你已被登出,可以取消继续留在该页面,或者重新登录',
45
+    //       '确定登出',
46
+    //       {
47
+    //         confirmButtonText: '重新登录',
48
+    //         cancelButtonText: '取消',
49
+    //         type: 'warning'
50
+    //       }
51
+    //     ).then(() => {
52
+    //       store.dispatch('FedLogOut').then(() => {
53
+    //         location.reload() // 为了重新实例化vue-router对象 避免bug
54
+    //       })
55
+    //     })
56
+    //   }
57
+    //   return Promise.reject('error')
58
+    // } else {
59
+    //   return response.data
60
+    // }
41 61
 
42
-      // 802:Token 身份凭证不存在; 50012:其他客户端登录了;  803:Token 过期了;
43
-      if (res.code === '802' || res.code === '50012' || res.code === '803') {
44
-        MessageBox.confirm(
45
-          '你已被登出,可以取消继续留在该页面,或者重新登录',
46
-          '确定登出',
47
-          {
48
-            confirmButtonText: '重新登录',
49
-            cancelButtonText: '取消',
50
-            type: 'warning'
51
-          }
52
-        ).then(() => {
53
-          store.dispatch('FedLogOut').then(() => {
54
-            location.reload() // 为了重新实例化vue-router对象 避免bug
55
-          })
62
+    const res = response.data
63
+    // 802:Token 身份凭证不存在; 50012:其他客户端登录了;  803:Token 过期了;
64
+    if (res.code === '802' || res.code === '50012' || res.code === '803') {
65
+      MessageBox.confirm(
66
+        '你已被登出,可以取消继续留在该页面,或者重新登录',
67
+        '确定登出',
68
+        {
69
+          confirmButtonText: '重新登录',
70
+          cancelButtonText: '取消',
71
+          type: 'warning'
72
+        }
73
+      ).then(() => {
74
+        store.dispatch('FedLogOut').then(() => {
75
+          location.reload() // 为了重新实例化vue-router对象 避免bug
56 76
         })
57
-      }
77
+      })
58 78
       return Promise.reject('error')
59 79
     } else {
60 80
       return response.data

+ 1
- 1
VUECODE/smart-property-manage/src/views/building/edi/index.vue 查看文件

@@ -23,7 +23,7 @@
23 23
         <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
24 24
       </el-form-item>
25 25
       <el-form-item>
26
-        <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
26
+        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
27 27
         <el-button @click="backIndex">返回</el-button>
28 28
       </el-form-item>
29 29
     </el-form>

+ 21
- 12
VUECODE/smart-property-manage/src/views/social/activity/add/index.vue 查看文件

@@ -33,19 +33,28 @@
33 33
           <img :src="dialogImageUrl" width="100%" alt="">
34 34
         </el-dialog>
35 35
       </el-form-item>
36
-      <el-form-item label="报名人数上限" prop="signUpMax">
37
-        <el-input v-model="ruleForm.signUpMax" placeholder="填写0则不限制报名人数"/>
36
+      <el-form-item prop="signUpMax">
37
+        <div style="display: flex;">
38
+          <span style="width: 140px;">报名人数上限</span>
39
+          <el-input v-model="ruleForm.signUpMax" placeholder="填写0则不限制报名人数"/>
40
+        </div>
38 41
       </el-form-item>
39
-      <el-form-item label="报名截止时间" prop="registrationEndTime">
40
-        <el-date-picker
41
-          v-model="ruleForm.registrationEndTime"
42
-          type="date"
43
-          placeholder="选择日期"/>
42
+      <el-form-item prop="registrationEndTime">
43
+        <div style="display: flex;">
44
+          <span style="width: 120px;">报名截止时间</span>
45
+          <el-date-picker
46
+            v-model="ruleForm.registrationEndTime"
47
+            type="date"
48
+            placeholder="选择日期"/>
49
+        </div>
44 50
       </el-form-item>
45
-      <el-form-item label="权重值" prop="sort">
46
-        <el-input-number v-model="ruleForm.sort" :min="1" :max="10" label="权重值" @change="sortHandleChange"/>
51
+      <el-form-item prop="sort">
52
+        <div style="display: flex; justify-content: flex-start;">
53
+          <span style="width: 120px;">权重值</span>
54
+          <el-input-number v-model="ruleForm.sort" :min="1" :max="10" label="权重值" @change="sortHandleChange"/>
55
+        </div>
47 56
       </el-form-item>
48
-      <el-form-item>
57
+      <el-form-item style="display: flex; justify-content: center;">
49 58
         <el-button @click="resetForm('ruleForm')">存为草稿</el-button>
50 59
         <el-button type="primary" @click="submitForm('ruleForm')">发布</el-button>
51 60
       </el-form-item>
@@ -116,16 +125,16 @@ export default {
116 125
               return
117 126
             }
118 127
             this.$message.error(res.message)
119
-            loading.close()
120 128
           }).catch(() => {
121 129
             console.log('error AddActivity')
122 130
           })
123 131
         } else {
124 132
           console.log('error submit!!')
125
-          loading.close()
126 133
           return false
127 134
         }
128 135
       })
136
+      // 关闭加载框
137
+      loading.close()
129 138
     },
130 139
     resetForm(formName) {
131 140
       this.$refs[formName].resetFields()