dingxin 6 years ago
parent
commit
7e11cd6359

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TpAnnouncementMapper.xml View File

15
       tp_announcement
15
       tp_announcement
16
       <where>
16
       <where>
17
         <if test="record.id != null and record.id != ''" >
17
         <if test="record.id != null and record.id != ''" >
18
-          AND id =  #{record.id,jdbcType=INTEGER}
18
+          AND id like concat('%',#{record.id,jdbcType=INTEGER},'%')
19
         </if>
19
         </if>
20
         <if test="record.announcementTitle != null and record.announcementTitle != ''" >
20
         <if test="record.announcementTitle != null and record.announcementTitle != ''" >
21
           AND announcement_title like concat('%',#{record.announcementTitle,jdbcType=VARCHAR},'%')
21
           AND announcement_title like concat('%',#{record.announcementTitle,jdbcType=VARCHAR},'%')

+ 5
- 0
VUECODE/smart-property-manage/src/views/social/activity/add/index.vue View File

167
         spinner: 'el-icon-loading',
167
         spinner: 'el-icon-loading',
168
         background: 'rgba(0, 0, 0, 0.7)'
168
         background: 'rgba(0, 0, 0, 0.7)'
169
       })
169
       })
170
+      if(this.ruleForm.activityCarouselImg<=0){
171
+            this.$message.error('轮播图未上传')
172
+            loading.close()
173
+            return    
174
+          }
170
       if (this.ruleForm.activityContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
175
       if (this.ruleForm.activityContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
171
         this.$message.error('活动内容描述 和 活动配图至少要存在一个!')
176
         this.$message.error('活动内容描述 和 活动配图至少要存在一个!')
172
         loading.close()
177
         loading.close()

+ 4
- 0
VUECODE/smart-property-manage/src/views/social/announcement/add.vue View File

86
       })
86
       })
87
       this.$refs[formName].validate((valid) => {
87
       this.$refs[formName].validate((valid) => {
88
         if (valid) {
88
         if (valid) {
89
+          if(this.ruleForm.announcementCarouselImg<=0){
90
+            this.$message.error('轮播图未上传')
91
+            return    
92
+          }
89
           if (this.ruleForm.announcementContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
93
           if (this.ruleForm.announcementContent.length <= 0 && this.ruleForm.contentImg.length <= 0) {
90
             this.$message.error('公告内容描述 和 公告配图至少要存在一个!')
94
             this.$message.error('公告内容描述 和 公告配图至少要存在一个!')
91
             return 
95
             return 

+ 1
- 1
VUECODE/smart-property-manage/src/views/social/announcement/edit.vue View File

158
       this.ruleForm.sort = value
158
       this.ruleForm.sort = value
159
       console.log(value)
159
       console.log(value)
160
     },
160
     },
161
-    getById(id) { // 页面初始化后调用此方法根据ID获取活动信息
161
+    getById(id) { // 页面初始化后调用此方法根据ID获取公告信息
162
       this.ruleForm.id=this.$route.params.id
162
       this.ruleForm.id=this.$route.params.id
163
       this.$store.dispatch('AnnouncementById', this.ruleForm).then((res) => {
163
       this.$store.dispatch('AnnouncementById', this.ruleForm).then((res) => {
164
       const resData = res.data
164
       const resData = res.data