zhanghua
7 天以前 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
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
<template>
  <div class="view">
    <div class="view-data">
      <el-form
        :model="baseCase"
        label-position="right"
        ref="viewForm"
        :rules="Rules"
        label-width="100px"
      >
        <div class="data-item">
          <el-form-item label="问题来源:">
            <span class="data-detail">{{
              baseCase.eventSource === 2 ? "网格巡查" : "视频巡查"
            }}</span>
          </el-form-item>
          <el-form-item label="登记人员:">
            <span class="data-detail">{{ baseCase.createUser }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="问题类型:">
            <span class="data-detail">{{
              baseCase.category === 1 ? "违规" : "违建"
            }}</span>
          </el-form-item>
          <el-form-item label="事件等级:">
            <span class="data-detail">{{ baseCase.violationsVO.gradeText }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="大类名称:">
            <span class="data-detail">{{
              baseCase.violationsVO.categoryText
            }}</span>
          </el-form-item>
          <el-form-item label="小类名称:">
            <span class="data-detail">{{
              baseCase.violationsVO.categoryText
            }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="所属区县:">
            <span class="data-detail"></span>
          </el-form-item>
          <el-form-item label="所属街道:">
            <span class="data-detail">{{ baseCase.streetText }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="所属社区:">
            <span class="data-detail">{{ baseCase.communityText }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="事发地点:">
            <span class="data-detail">{{ baseCase.site }}</span>
          </el-form-item>
          <el-form-item label="车牌号:">
            <span class="data-detail">{{ baseCase.violationsVO.carNumber }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="关联商铺名称:">
            <span class="data-detail">{{ baseCase.violationsVO.shopName }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="问题描述:">
            <span class="data-detail">{{
              baseCase.violationsVO.description
            }}</span>
          </el-form-item>
        </div>
        <div class="data-item">
          <el-form-item label="反映人:">
            <span class="data-detail">{{ baseCase.violationsVO.informant }}</span>
          </el-form-item>
          <el-form-item label="联系方式:">
            <span class="data-detail">{{
              baseCase.violationsVO.informantPhoneCode
            }}</span>
          </el-form-item>
        </div>
        <el-form-item label="审核意见" prop="auditOpinion">
          <span class="data-detail">{{ baseCase.auditOpinion }}</span>
        </el-form-item>
      </el-form>
    </div>
    <div class="view-process">
      <div class="process-header">
        <div
          class="process-title-item"
          v-for="item in titleList"
          :key="item.title"
          @click="changeComponent(item.index)"
        >
          <div
            :class="[
              'process-title',
              activeIndex === item.index ? 'title-active' : '',
            ]"
          >
            {{ item.title }}
          </div>
          <div
            :class="[
              'under-line',
              activeIndex === item.index ? 'line-active' : '',
            ]"
          ></div>
        </div>
      </div>
      <div class="show-item">
        <div class="show-wrap">
          <div class="closure-info" v-if="activeIndex === 0">
            <el-form
              :model="baseCase"
              label-position="right"
              ref="opinionForm"
              :rules="Rules"
              label-width="100px"
            >
              <el-form-item
                label="审核意见"
                class="op-item"
                prop="auditOpinion"
              >
                <el-input
                  type="textarea"
                  placeholder="请输入审核意见"
                  v-model="baseCase.auditOpinion"
                  disabled
                >
                </el-input>
              </el-form-item>
              <el-form-item
                label="结案意见"
                class="op-item"
                prop="finalOpinion"
              >
                <el-input
                  type="textarea"
                  placeholder="请输入结案意见"
                  v-model="baseCase.finalOpinion"
                >
                </el-input>
              </el-form-item>
            </el-form>
            <div class="form-footer">
              <el-button type="primary" @click.native.prevent="handleSubmit"
                >结案</el-button
              >
              <el-button @click.native.prevent="handleBack">返回</el-button>
            </div>
          </div>
          <MyProcess
            v-else-if="activeIndex === 1"
            :handlePassVo="handlePassVo"
            :baseCase="baseCase"
          ></MyProcess>
          <MyFilePicture
            v-else-if="activeIndex === 2"
            :baseCase="baseCase"
            :filesPictureVo="filesPictureVo"
          ></MyFilePicture>
          <MySovleProblem
            v-else-if="activeIndex === 3"
            :handlePassVo="handlePassVo"
            :baseCase="baseCase"
          ></MySovleProblem>
          <MyScene
            v-else
            :baseCase="baseCase"
            :currentSitVo="currentSitVo"
          ></MyScene>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import MyProcess from "@/components/process";
import MyFilePicture from "@/components/filePictrue";
import MySovleProblem from "@/components/solveProblem";
import MyScene from "@/components/scene";
export default {
  components: {
    MyProcess,
    MyFilePicture,
    MySovleProblem,
    MyScene,
  },
  data() {
    const checkOpinion = (rule, value, callback) => {
      if (value) {
        callback();
      } else {
        callback();
      }
    };
    const checkFinal = (rule, value, callback) => {
      if (value) {
        callback();
      } else {
        callback(new Error("结案意见不能为空"));
      }
    };
    return {
      myInfo: {},
      activeIndex: 0,
      titleList: [
        {
          title: "结案信息",
          index: 0,
        },
        {
          title: "办理经过",
          index: 1,
        },
        {
          title: "案卷图片",
          index: 2,
        },
        {
          title: "问题处理",
          index: 3,
        },
        {
          title: "现场情况",
          index: 4,
        },
      ],
      Rules: {
        auditOpinion: [{ trigger: "blur", validator: checkOpinion }],
        finalOpinion: [
          {
            trigger: "blur",
            validator: checkFinal,
          },
        ],
      },
      baseCase: {},
      handlePassVo: {},
      currentSitVo: {},
      problemProVo: {},
      filesPictureVo: {},
    };
  },
  created() {
    const { info } = this;
    this.baseCase = info.baseCase;
    this.handlePassVo = info.handlePassVo;
    this.currentSitVo = info.currentSitVo;
    this.problemProVo = info.problemProVo;
    this.filesPictureVo = info.filesPictureVo;
  },
  methods: {
    changeComponent(index) {
      this.activeIndex = index;
    },
    handleBack() {
      this.$emit("closeDialog", { flag: false });
    },
    // 提交审核意见
    handleSubmit() {
      const { baseCase } = this;
      this.$refs.opinionForm.validate((valid) => {
        if (valid) {
          this.$axios({
            method: "put",
            url:
              "sccg/base_case/end_case?caseId=" +
              baseCase.id +
              "&opinion=" +
              baseCase.finalOpinion +
              "&result=" +
              "结案成功",
          })
            .then((res) => {
              if (res.code === 200) {
                this.$message({
                  type: "success",
                  message: "结案成功",
                });
                this.$emit("closeDialog", { flag: false });
              } else {
                this.$message({
                  type: "error",
                  message: "结案失败",
                });
              }
            })
            .catch((err) => {
            });
        } else {
          return false;
        }
      });
    },
  },
  props: ["info", "closeDialog"],
};
</script>
<style lang="scss" scoped>
.view {
  display: flex;
  padding: 20px;
 
  .view-data {
    color: #4b9bb7;
    flex: 4;
    padding: 20px;
 
    .data-item {
      display: flex;
      justify-content: space-between;
      line-height: 40px;
    }
 
    // :deep(.el-form-item__label) {
    //   color: #4b9bb7;
    // }
 
    // :deep(.el-textarea__inner) {
    //   background-color: #17324c;
    //   color: #4b9bb7;
    // }
 
    .el-form-footer {
      display: flex;
      justify-content: flex-end;
    }
 
    // border: 1px solid #17324c;
  }
  // :deep(.el-textarea__inner) {
  //   background-color: #17324c;
  //   color: #4b9bb7;
  // }
  .closure-info {
    padding: 20px;
    .op-item {
      padding-top: 20px;
    }
    .form-footer {
      display: flex;
      margin-top: 50px;
      justify-content: flex-end;
    }
  }
  .view-process {
    flex: 6;
    margin-left: 20px;
 
    .process-header {
      display: flex;
      line-height: 40px;
 
      .process-title-item {
        width: 120px;
        text-align: center;
 
        .under-line {
          height: 2px;
          width: 100%;
        }
 
        .title-active {
          color: #4b9bb7;
        }
 
        .line-active {
          background-color: #4b9bb7;
          border-radius: 20px;
        }
      }
    }
 
    .show-item {
      overflow: hidden;
      height: 600px;
      position: relative;
 
      .show-wrap {
        overflow: auto;
        height: 600px;
      }
    }
  }
}
</style>