rk
2025-09-22 cf2391a86bdea88196d49cd33949570f74c0985d
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
 
<template>
  <GlobalWindow
    :title="title"
    :visible.sync="visible"
    :confirm-working="isWorking"
    @confirm="confirm"
  >
    <div class="serviceList">
      <div
        v-for="(item, index) in serviceList"
        :key="index"
      >
        <div class="arrow" :class="index==tempService&&'arrow-select'" @click="selectServe(item,index)">
          <div v-if="index" class="arrow-foot"></div>
          <div class="arrow-body">{{ index==0 ? '首次服务数据' : index==serviceList.length-1 ? '完成服务' : `第${index+1}次服务数据` }}</div>
          <div v-if="index != serviceList.length-1" class="arrow-header"></div>
        </div>
      </div>
    </div>
    1
    <el-form v-if="tempService == serviceList.length-1" ref="completeForm" :model="tempServiceObj" label-width="130px" label-suffix=":" inline>
      <div>
        <el-form-item label="服务时间" prop="diagnoseDate">
          {{ tempServiceObj.diagnoseDate }}
        </el-form-item>
      </div>
      <div>
        <el-form-item label="企业评分" prop="diagnoseScore">
          {{ tempServiceObj.diagnoseScore }}
        </el-form-item>
      </div>
      <div>
        <el-form-item label="企业评分表" prop="fileScoreList">
          <div v-for="(item, index) in tempServiceObj.fileScoreList" :key="index" class="data-item">
            {{ item }}
            <div class="like-link" @click="showFile(item.url)">{{ item.name }}</div>
            <i class="el-icon-download" @click="deleteFileScore(item, index)"></i>
          </div>
        </el-form-item>
      </div>
      <div>
        <el-form-item label="诊断报告" prop="fileDiagnosisList">
          
          <div v-for="(item, index) in tempServiceObj.fileDiagnosisList" :key="index" class="data-item">
            <div>{{ item.name }}</div>
            <i class="el-icon-download" @click="deleteFileDiagnosis(item, index)"></i>
          </div>
        </el-form-item>
      </div>
      <div class="rich-text">
        <el-form-item label="报告详情" prop="declareDiagnoseList">
          <div v-for="(item, index) in tempServiceObj.declareDiagnoseList" class="diagnose" style="margin-bottom: 10px; width: 100%;" :key="index">
            {{ `${item.name}` }}
            <div style="width:100px" v-html="item.content"></div>
            <!-- <quill-editor
              v-model="item.content"
              :options="editorOption"
            /> -->
          </div>
        </el-form-item>
      </div>
    </el-form>
    <el-form v-else ref="form2" :model="tempServiceObj" label-width="130px" label-suffix=":" inline>
      <div>
        <el-form-item label="服务时间" prop="createDate">
          {{ tempServiceObj.createDate }}
        </el-form-item>
      </div>
      <div>
        <el-form-item label="上传用户" prop="creator">
          {{ tempServiceObj.creator }}
        </el-form-item>
      </div>
      <div>
        <el-form-item label="服务说明" prop="content">
          {{ tempServiceObj.content }}
        </el-form-item>
      </div>
      <div>
        <el-form-item label="服务资料" prop="fileList">
          <div v-for="(item, index) in tempServiceObj.fileList" :key="index">
            <a :href="item.fileurl">{{ item.name }}</a>
          </div>
        </el-form-item>
      </div>
    </el-form>
    <div slot="footer">
      <el-button @click="visible = false" type="primary">确定</el-button>
    </div>
  </GlobalWindow>
</template>
 
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { fetchList, finishServeInfo } from '@/api/business/declareService'
import { fileType } from '../../../utils/util'
export default {
  name: 'ServeDetailData',
  extends: BaseOpera,
  components: { GlobalWindow },
  data () {
    
    return {
      declareId: null,
      serviceList: [],
      tempService: 0,
      tempServiceObj: {},
    }
  },
  created () {
    this.config({
      api: '/business/declareService',
      'field.id': 'id'
    })
  },
  methods: {
    open (title, target) {
      // debugger
      this.title = title
      this.visible = true
      this.$nextTick(() => {
        this.declareId = target.id
        this.initServe()
      })
    },
    
    initServe() {
      Promise.all([
        fetchList({ capacity: 9999, model: { declareId: this.declareId, type: 0 }}),
        finishServeInfo({ declareId: this.declareId })
      ])
        .then(res => {
          this.serviceList = [...res[0].records, res[1]]
          this.tempService = this.serviceList.length - 1
          this.tempServiceObj = this.serviceList[this.tempService]
        })
        .catch(e => {
          this.$message.error(e)
        })
    },
    selectServe(item, index) {
      this.tempServiceObj = item
      this.tempService = index
    },
    confirm() {
      this.visible = false
    }
  }
}
</script>
 
 
<style lang="scss" scoped>
.serviceList {
  display: flex;
  margin-bottom: 20px;
}
.action-style {
  display:flex;
  margin-left: 120px;
  margin-bottom: 20px;
}
.arrow {
  background-color: #DFE2E8;
  color: #333333;
  height: 40px;
  line-height: 40px;
  display: flex;
  cursor: pointer;
  // margin-left: -5px;
  // margin-right: -5px;
  .arrow-foot {
    // background-color: #fff;
    border-left: 20px solid rgba($color: #fff, $alpha: 1);
    border-top: 20px solid rgba($color: #fff, $alpha: 0);
    border-bottom: 20px solid rgba($color: #fff, $alpha: 0);
  }
  
  .arrow-body {
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    font-size: 16px;
  }
  .arrow-header {
    // background-color: #DFE2E8;
    border-left: 20px solid rgba($color: #fff, $alpha: 0);
      border-top: 20px solid rgba($color: #fff, $alpha: 1);
      border-bottom: 20px solid rgba($color: #fff, $alpha: 1);
  }
}
.arrow-select {
  background-color: #216EEE;
  color: #fff;
}
 
.data-list {
  margin-top: 20px;
}
 
.data-item {
    border-radius: 2px;
    padding: 10px 0;
    // background-color: #F5F6F8;
    height: 36px;
    display: flex;
    // padding: 11px 20px;
    box-sizing: border-box;
    font-size: 13px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #216EEE;
    line-height: 13px;
    margin-right: 16px;
    i {
      box-sizing: border-box;
      margin-left: 10px;
      width: 16px;
      height: 16px;
      // background-color: #BFC3CB;
      color: #216EEE;
      border-radius: 50%;
      // padding: 1.5px;
      cursor: pointer;
      &:hover {
        color: #ff0000;
      }
    }
  }
 
.diagnose {
  height: 200px;
  width: 850px;
  overflow: scroll;
  border: 1px solid #DFE2E8;
  
}
::v-deep .ql-container {
  height: 200px !important;
  width: 850px;
}
::v-deep .ql-toolbar {
  // height: 200px !important;
  width: 850px;
}
</style>
 
<style>
.rich-text img {
  width: 50% !important;
}
</style>