hejianhao
2025-04-16 dab2d210ca06c1faa514c6388fbd5de1ab355360
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
<template>
  <div class="clap_examine">
    <div class="w_row clearfix">
      <p class="w_col_24"><span>发起人:</span>{{ detail.sponsorName }}</p>
      <p class="w_col_24"><span>联系电话:</span>{{ detail.phone }}</p>
      <p class="w_col_24"><span>发起时间:</span></p>
      <p class="w_col_24">
        <span>发起地点:</span>{{ detail.happenAddr }}
        {{ detail.addrRemark ? detail.addrRemark : "" }}
      </p>
      <p class="w_col_24"><span>事件类型:</span></p>
      <p class="w_col_24"><span>事件详情:</span>{{ detail.detail }}</p>
      <p class="w_col_24">
        <span>公示:</span>
        <el-radio-group size="medium">
          <el-radio-button label="1">是</el-radio-button>
          <el-radio-button label="2">否</el-radio-button>
        </el-radio-group>
      </p>
      <p class="w_col_24">
        <span>内容质量:</span>
        <el-radio-group size="medium">
          <el-radio-button label="1">优秀</el-radio-button>
          <el-radio-button label="2">良好</el-radio-button>
          <el-radio-button label="3">普通</el-radio-button>
          <el-radio-button label="4">合格</el-radio-button>
          <el-radio-button label="5">无</el-radio-button>
        </el-radio-group>
        <span>奖励 <b>0</b> 元</span>
      </p>
      <p class="w_col_24">
        <span>移交城管:</span>
        <el-radio-group size="medium">
          <el-radio-button label="1">是</el-radio-button>
          <el-radio-button label="2">否</el-radio-button>
        </el-radio-group>
      </p>
 
      <!-- <section class="w_col_24 image">
        <template v-if="(detail.photoPathList||'').indexOf('.mp4')!==-1">
          <video
            :controls="true"
            style="width: 300px;height: 150px"
            :autoplay="false"
            :src="detail.photoPathList"
          >您的浏览器不支持 video 标签。</video>
        </template>
        <template v-else>
          <img
            :src="i"
            v-for="(i,j) in (detail.photoPathList || '').split(',').filter(k=>{return k!==''})"
            :key="j+'-image'"
            @click="onScaleImage(j)"
            alt=""
          >
        </template>
      </section> -->
      <!-- <p class="w_col_24">事件发生地:{{detail.happenAddr}} {{detail.addrRemark?detail.addrRemark:''}}</p> -->
    </div>
    <!-- <section>
      <p class="label">审核状态:</p>
      <article>
        <el-radio
          v-model="a1"
          label="1"
        >审核通过</el-radio>
        <el-radio
          v-model="a1"
          label="2"
        >驳回</el-radio>
      </article>
    </section> -->
    <!---->
    <section v-if="a1 === '2'">
      <p class="label">驳回原因:</p>
      <article>
        <el-input
          type="textarea"
          cols="15"
          rows="3"
          class="m_inp input-text"
          v-model="text"
          maxlength="200"
          placeholder="请输入驳回内容,不超过200个字"
          show-word-limit
        ></el-input>
      </article>
    </section>
    <!---->
    <section v-if="a1 === '1'">
      <p class="label">内容质量:</p>
      <article>
        <el-radio v-model="a3" label="1">优秀</el-radio>
        <el-radio v-model="a3" label="2">良好</el-radio>
        <el-radio v-model="a3" label="3">普通</el-radio>
        <el-radio v-model="a3" label="4">合格</el-radio>
      </article>
    </section>
 
    <section v-if="a1 === '1'">
      <p class="label">奖励金额:</p>
      <article>
        <el-input
          size="small"
          class="i-width"
          disabled=""
          v-model="rewardNum"
          placeholder=""
        ></el-input>
      </article>
    </section>
 
    <section v-if="a1 === '1'">
      <p class="label">反馈内容:</p>
      <article>
        <el-input
          type="textarea"
          cols="15"
          rows="3"
          class="m_inp input-text"
          v-model="feedback"
          maxlength="200"
          placeholder="请输入反馈内容,不超过200个字"
          show-word-limit
        ></el-input>
        <span class="col_primary f-size" @click="add" v-if="!show"
          >上传图片</span
        >
      </article>
    </section>
 
    <!-- <section
      class="image"
      v-if="show && a1==='1'"
    >
      <div
        class="img"
        v-for="(i,j) in images"
        :key="j+'--image'"
      >
        <img
          :src="i.pic"
          alt=""
          @click="onScaleUploadImage(j)"
        >
        <span
          class="del el-icon-close"
          @click="del(i)"
        ></span>
      </div>
      <div class="img">
        <v-u
          slots
          @path="onImage"
        ><span
            class="el-icon-plus"
            style="font-size:24px"
          ></span></v-u>
      </div>
    </section> -->
 
    <section class="bottom-line" v-if="a1 === '1'">
      <p class="label">是否完成治理:</p>
      <el-radio-group v-model="government" size="mini">
        <el-radio label="4" border>是</el-radio>
        <el-radio label="1" border>否</el-radio>
      </el-radio-group>
      <span class="tishi">温馨提示:选择完成治理后,将不能继续反馈</span>
    </section>
  </div>
</template>
 
<script>
import vU from "com/upload/upload1";
export default {
  props: {
    item: {
      type: Object,
      default: () => {
        return {};
      }
    },
    door: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  components: { vU },
  data() {
    return {
      detail: {},
      text: "",
      a1: "1",
      a2: "1",
      a3: "5", //内容治质量
      rewardNum: "",
      feedback: "",
      government: "1",
      show: false,
      images: [],
      addType: "1"
    };
  },
  watch: {
    a3: {
      //切换内容质量
      handler(v) {
        console.log(v);
        this.setRewardNum(v);
      },
      deep: true
    },
    item: {
      handler() {
        this.setItem();
      },
      deep: true
    },
    door: {
      handler(n) {
        if (n.r) {
          this.sub(n.t);
        }
      },
      deep: true
    },
    images: {
      handler(n) {
        if (!n.length) {
          this.show = false;
        }
      },
      deep: true
    }
  },
  methods: {
    setRewardNum(v) {
      if (this.detail.easyPhotoActivityVO) {
        let obj = {
          "1": this.detail.easyPhotoActivityVO.goodReward || 0,
          "2": this.detail.easyPhotoActivityVO.excellentReward || 0,
          "3": this.detail.easyPhotoActivityVO.ordinaryReward || 0,
          "4": this.detail.easyPhotoActivityVO.commonlyReward || 0
        };
        this.rewardNum = obj[v];
      }
    },
 
    del(i) {
      this.images = this.images.filter(k => {
        return k.pic !== i.pic && k.id !== i.id;
      });
    },
 
    onImage(v) {
      this.images.push({ pic: v, id: Date.now() });
    },
 
    add() {
      this.show = true;
    },
    // 查看大图
    onScaleImage(j) {
      let list = (this.detail.photoPathList || "").split(",").filter(k => {
        return k !== "";
      });
      this.$store.dispatch("setImage", {
        time: Date.now(),
        pic: list[j],
        list,
        tool: true
      });
    },
 
    sub(type) {
      /**
       * 选择审核通过
       * 完成治理 Type 传4
       * 未完成治理 type 传 1
       */
      let checktype = "";
      if (this.a1 == "1") {
        checktype = this.government;
      } else {
        checktype = this.a1;
      }
 
      if (this.a1 == "2") {
        this.a3 = "";
        this.feedback = "";
        this.images = "";
      }
 
      if (this.images.length > 9) {
        demo.toast("上传图片不能超过9张");
        return 0;
      }
 
      let o = {
        id: this.detail.id,
        isNeedFeedBack: this.a2,
        type: checktype,
        sponsorId: this.detail.sponsorId,
        sponsorName: this.detail.sponsorName,
        communityId: this.detail.communityId,
        addType:this.addType,
        activityType: this.a3,
        handleResult: this.feedback, //反馈内容
        handlePhotoList:
          this.images &&
          this.images
            .map(l => {
              return l.pic;
            })
            .join(",") //反馈照片
      };
 
      if (+this.a1 === 2) {
        if (!this.text) {
          demo.toast("请输入驳回原因");
          return 0;
        }
        o.rejectReason = this.text;
      }
      console.log(o);
      this.$api.put("communityactivity/puteasyphoto", o, () => {
        if (o.type == "1") {
          demo.toast("审核成功");
        } else {
          demo.toast("驳回成功");
        }
 
        this.$nextTick(() => {
          this.$store.dispatch("setFixed", {
            event: "del",
            type: type,
            time: Date.now()
          });
          this.$store.dispatch("setPageReset", "/act_clap");
        });
      });
    },
 
    setItem() {
      if (this.item.id) {
        this.$api.get(
          "communityactivity/easyphoto",
          { id: this.item.id },
          e => {
            this.detail = e;
            this.setRewardNum(this.a3);
          }
        );
      } else {
        demo.toast("错误活动");
      }
    }
  },
  mounted() {
    this.setItem();
  }
};
</script>
<style lang="less" scoped>
.titles {
  font-size: 14px;
  color: #409eff;
  padding-left: 20px;
}
.clap_examine {
  .i-width {
    width: 336px;
  }
  p {
    font-size: 14px;
    line-height: 22px;
    color: #222;
    margin-bottom: 10px;
    padding-left: 10px;
  }
  .tishi {
    font-size: 13px;
    color: #888;
    line-height: 30px;
    padding-left: 15px;
  }
  .f-size {
    font-size: 13px;
    cursor: pointer;
  }
  .bottom-line {
    padding-top: 20px;
  }
  .el-radio {
    // width: 100px;
  }
  textarea.m_inp {
    resize: none;
    margin-bottom: 5px;
  }
  .input-text {
    width: 340px !important;
    height: auto;
  }
  section {
    display: flex;
    margin-bottom: 5px;
    .label {
      width: 100px;
    }
    article {
      width: calc(~"100% - 100px");
    }
  }
  .image {
    flex-wrap: wrap;
    box-sizing: border-box;
    padding: 0 15px;
    img {
      display: block;
      width: 78px;
      height: 66px;
      margin: 0 8px 8px 0;
      background-color: #eee;
    }
  }
}
.image {
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 0 15px;
  .img {
    display: block;
    width: 78px;
    height: 66px;
    line-height: 66px;
    text-align: center;
    margin: 2px 12px 12px 0;
    background-color: #eee;
    border-radius: 5px;
    position: relative;
    color: #999;
    img {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 5px;
      cursor: pointer;
    }
    .del {
      position: absolute;
      right: -8px;
      top: -8px;
      width: 16px;
      height: 16px;
      color: #fff;
      background-color: tomato;
      border-radius: 50%;
      cursor: pointer;
    }
    .add {
      display: block;
      height: 100%;
      cursor: pointer;
      line-height: 66px;
      font-size: 25px;
      color: #999;
    }
  }
}
</style>