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
<template>
  <div class='wish_detail'>
    <v-header
      title="心愿详情"
      bold
      :tag="+detail.status===4?'已驳回':''"
    ></v-header>
    <v-tool-scroll
      ids="wish-detail-scroll"
      class="content"
    >
      <div class="fm w_row clearfix">
        <div class="list-conetnt">
          <p><span>发起人:</span>{{detail.sponsorName}}</p>
          <p><span>联系电话:</span>{{detail.sponsorPhone}}</p>
          <p><span>发起时间:</span>{{detail.createAt}}</p>
        </div>
        <!-- <p class="w_col_8">序号:{{detail.id}}</p>
        <p class="w_col_8">集星数:{{detail.starNum}}</p>
        <p class="w_col_8"></p>
        <p class="w_col_8">发起人:{{detail.sponsorName}}</p>
        <p class="w_col_8">发起时间:{{detail.createAt}}</p>
        <p class="w_col_8"></p>
        <p class="w_col_8">联系电话:{{detail.sponsorPhone}}</p>
        <p class="w_col_8">状态:{{is_level(detail.status)}}</p>
        <p class="w_col_8"></p>
        <p class="w_col_24">心愿名称:{{detail.wishName}}</p>-->
        <p class="w_col_24"><span class="custom-span">心愿详情:</span>{{detail.detail}}     
          <section class="w_col_24 image" v-if="detail.photoPathList"><img
            :src="i"
            alt=""
            v-for="(i,j) in (detail.photoPathList || '').split(',').filter(k=>{return k!==''})"
            :key="j+'-image'"
            @click="onScaleImage(j,'photoPathList')"
          ></section>
        </p>
         <p class="w_col_24" v-if="detail.status !== 1 || detail.status !== 4"><span class="custom-span">集心数:</span>{{detail.starNum}}   
         </p>
  
         <div class="w_col_24"><span class="custom-span float-l">心愿进度:</span>
            <div class="appointment-content float-l">
              <div class="appointment-lie">
                <div class="top-status title">
                  <span class="title-text f-color" v-if="detail.status == 7">用户集心中...</span>
                  <span class="title-text f-color" v-if="detail.status == 2">等待社区分配...</span>
                  <span class="title-text f-color" v-if="detail.status == 3">等待实现...</span>
                  <span class="title-text f-color" v-if="detail.status == 1">等待社区审核…</span>
                  <span class="title-text f-color" v-if="detail.status == 5&&!detail.evaluateAt">
                    <span> {{surplusDay}}天{{surplusHours}}小时{{surplusMinute}}小时{{surplusSecond}}秒后自动确认</span>
                    <!-- <span v-else>已自动确认</span> -->
                    </span>
                  <!-- <span class="title-text f-color" v-if="detail.evaluateAt && detail.status == 6">用户已确认</span> -->
                </div>
                <div class="top-status-startNum" v-if="detail.status == 7">
                    <span>目标:{{detail.aimNum}}</span><span>当前:{{detail.starNum}}</span>
                    <span v-if="detail.aimNum !== 0">进度:{{Math.round(detail.starNum/detail.aimNum)}}%</span>
                    <span v-else>0%</span>
                  </div>
 
                <div class="details-lie" v-for="(item,index) in detail.operationRecordVOList" :key="index">
                <div class="title">
                  <span class="title-text" v-if="detail.status == 3">
                    <span v-if="item.type == 5 ">心愿由{{detail.responsibleName}}负责</span>           
                  </span>
                  <span class="title-text" v-if="detail.status == 6 ">
                    <span v-if="item.type == 5 ">心愿由{{detail.responsibleName}}负责</span>           
                  </span>
                  <span class="title-text" v-if="detail.status == 5 ">
                    <span v-if="item.type == 5 ">心愿由{{detail.responsibleName}}负责</span>           
                  </span>
                  <span class="title-text" v-if="item.type !== 5 ">{{item.remark}}</span>
                </div>
                <div class="list-conetnt-wish">
                  <div class="content" v-if="detail.status == 4 && item.type === 3" >{{item.content}}</div>
                   <!-- 已完成 反馈 -->
                  <div class="kui-conetnt" v-if="detail.status == 6">
                    <div class="details" v-if="detail.status == 6 && item.type == 6 || item.type == 7">{{item.content}}</div>
                    <div v-if="detail.evaluateAt&& item.type == 6" class="two-lie">
                        <div>
                          <el-rate
                            v-model="detail.score"
                            disabled
                            show-score
                            text-color="#ff9900"
                            >
                          </el-rate>
                        </div>
                    </div>
                    <div class="img-fk">
                      <span v-for="(url,index) in item.imgList" :key="index">
                      <img  @click="onScaleImage1(url,text.imgList)"  :src="url" alt="">
                      </span>
                    </div>
                  </div>
                  <!-- 进行中 反馈 -->
                  <div class="kui-conetnt" v-if="detail.status == 3">
                    <div class="details" v-if="item.type == 7">{{item.content}}</div>
                    <div class="img-fk">
                      <span v-for="(url,index) in item.imgList" :key="index">
                      <img  @click="onScaleImage1(url,text.imgList)"  :src="url" alt="">
                      </span>
                    </div>
                  </div>
                  <!--待确认 反馈  -->
                  <div class="kui-conetnt" v-if="detail.status == 5">
                    <div class="details" v-if="item.type == 7">{{item.content}}</div>
                    <div class="img-fk">
                      <span v-for="(url,index) in item.imgList" :key="index">
                      <img  @click="onScaleImage1(url,text.imgList)"  :src="url" alt="">
                      </span>
                    </div>
                  </div>
                  <div class="time-text">
                    <span v-if="item.type == 1">提交时间:</span>
                    <span v-if="item.type == 2">审核时间:</span>
                    <span v-if="item.type == 3">驳回时间:</span>
                    <span v-if="item.type == 4 || item.type == 6">完成时间:</span>
                    <span v-if="item.type == 5">分配时间:</span>
                    <span v-if="item.type == 7">反馈时间:</span>
                    <span v-if="item.type == 8">确认时间:</span>
                    <span>{{item.createTime}}</span>
                    <span >{{item.name}}</span>
                  </div>
                </div>
                </div>
              </div>
            </div>
         </div>
      </div>
    </v-tool-scroll>
    <div class="foot">
      <el-button type="primary" @click="$router.go(-1)">返 回</el-button>
    </div>
  </div>
</template>
 
<script>
export default {
  props: {},
  components: {},
  data() {
    return {
      value: 0,
      id: "",
      detail: {},
      score: "",
      endDate: "2019-09-10 08:20:00",
      day: "",
      hours: "",
      timer: null,
      surplusDay: 0,
      surplusHours: 0,
      surplusMinute: 0,
      surplusSecond: 0,
    };
  },
  destroyed() {
    if (this.timer) clearInterval(this.timer);
  },
  watch: {},
  computed: {},
 
  methods: {
    is_time(v) {
      return demo.timeout(new Date(v).getTime(), "alls", "-");
    },
    // 形式
    is_form(id) {
      // 1分配人员 2发起活动
      return ["", "分配人员", "发起活动"][id] || "";
    },
    // 状态
    is_level(id) {
      // 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成
      let status = [
        "待审核",
        "待分配 ",
        "进行中",
        "已驳回",
        "待确认",
        "已完成",
      ].map((k, v) => {
        return {
          value: v + 1,
          label: k,
        };
      });
      if (id < 0) {
        return status;
      }
      let vs = status.filter((k) => {
        return k.value === id;
      });
      return vs.length ? vs[0].label : id;
    },
    onScaleImage(j, v) {
      let list = (this.detail[v] || "").split(",").filter((k) => {
        return k !== "";
      });
      this.$store.dispatch("setImage", {
        time: Date.now(),
        pic: list[j],
        list,
        tool: true,
      });
    },
    onScaleImage1(j, v) {
      this.$store.dispatch("setImage", {
        time: Date.now(),
        pic: j,
        v,
        tool: true,
      });
    },
    comfirmTimerHandle() {
      const finishTimeStamp = new Date(this.detail.finishAt).getTime(); // 完成时间的时间戳
      const threeDataAfterTimeStamp = 1000 * 60 * 60 * 24 * 3 + finishTimeStamp; // 3天后的时间戳
      this.timer = setInterval(() => {
        const nowTimeStamp = new Date().getTime(); // 现在的时间戳
        const countDownTimeStamp = threeDataAfterTimeStamp - nowTimeStamp; // 倒计时的时间戳
        if (countDownTimeStamp < 0) return clearInterval(this.timer);
        this.surplusDay = Math.floor(countDownTimeStamp / 1000 / 60 / 60 / 24);
        this.surplusHours = Math.floor(
          (countDownTimeStamp / 1000 / 60 / 60) % 24
        );
        this.surplusMinute = Math.floor((countDownTimeStamp / 1000 / 60) % 60);
        this.surplusSecond = Math.floor((countDownTimeStamp / 1000) % 60);
        if (
          !this.surplusDay &&
          !this.surplusHours &&
          !this.surplusMinute &&
          !this.surplusSecond
        ) {
          clearInterval(this.timer);
        }
      }, 1000);
    },
    init() {
      if (!this.id) {
        demo.toast("无效心愿");
        return 0;
      }
      this.$api.get(
        "communityactivity/detailmicrowish",
        { id: this.id },
        (e) => {
          this.detail = e;
          if (e.status === 5 && !e.evaluateAt) {
            this.comfirmTimerHandle();
          }
          this.score = e.score;
          this.detail.operationRecordVOList.map((item) => {
            item.imgList = item.imgUrl ? item.imgUrl.split(",") : [];
          });
        }
      );
    },
  },
  mounted() {
    this.id = this.$route.params.id;
    this.init();
  },
};
</script>
<style lang='less' scoped>
.wish_detail {
  .content {
    height: calc(~"100% - 120px");
  }
  .list-conetnt {
    padding-top: 10px;
    p {
      width: 500px;
      line-height: 25px;
      padding-bottom: 10px;
      span {
        display: inline-block;
        padding-right: 5px;
        color: #333;
        width: 72px;
        text-align: right;
      }
    }
  }
  .appointment-content {
    padding-left: 15px;
    font-size: 14px;
    color: #333;
    position: relative;
    .details-lie {
      margin-bottom: 15px;
    }
    .appointment-lie {
      padding-bottom: 25px;
      .two-lie {
        padding-top: 20px;
      }
      .f-color {
        color: #f56c6c;
      }
      .top-status {
        line-height: 25px;
        margin-bottom: 10px;
      }
      .top-status-startNum {
        margin-bottom: 20px;
      }
      .title-text {
        position: relative;
      }
      .title-text::before {
        position: absolute;
        content: "";
        width: 10px;
        height: 10px;
        border-radius: 50%;
        left: -14px;
        top: 4px;
        background-color: #409eff;
      }
    }
    .list-conetnt-wish {
      .content {
        font-size: 14px;
        color: #333;
        line-height: 20px;
        padding-top: 10px;
      }
      .time-text {
        padding-top: 10px;
        font-size: 14px;
        color: #606266;
        span {
          padding-right: 5px;
        }
      }
    }
    .kui-conetnt {
      .details {
        line-height: 20px;
      }
      .img-fk {
        display: flex;
        flex-wrap: wrap;
        span {
          width: 50px;
          height: 50px;
          display: inline-block;
          overflow: hidden;
          margin-right: 10px;
          img {
            width: 100%;
          }
        }
      }
    }
    .no-fk {
      line-height: 25px;
      color: #888;
    }
  }
  .float-l {
    float: left;
  }
  .custom-span {
    display: inline-block;
    padding-right: 5px;
    color: #333;
    width: 72px;
    text-align: right;
    font-size: 14px;
  }
  .foot {
    margin-top: 5px;
  }
  .el-rate {
    display: inline-block;
  }
  .fm {
    p {
      font-size: 14px;
      line-height: 22px;
      color: #000;
      padding: 8px 0;
      min-height: 38px;
    }
    section {
      padding: 8px 0;
      display: flex;
      flex-wrap: wrap;
      img {
        width: 175px;
        object-fit: cover;
        margin: 5px;
        background-color: #eee;
        display: block;
        border-radius: 3px;
      }
    }
    .image {
      height: 97px;
      overflow: hidden;
    }
  }
}
</style>