riku
2023-07-14 023dd7fafa5d1a39d6f62ba88b6c4ec590aa20cd
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
<template>
  <el-descriptions
    class="margin-top"
    title="With border"
    :column="3"
    :size="size"
    border
  >
    <template #extra>
      <el-button type="primary">Operation</el-button>
    </template>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          <el-icon :style="iconStyle">
            <user />
          </el-icon>
          Username
        </div>
      </template>
      kooriookami
    </el-descriptions-item>
 
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          <el-icon :style="iconStyle">
            <iphone />
          </el-icon>
          Telephone
        </div>
      </template>
      18100000000
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          <el-icon :style="iconStyle">
            <location />
          </el-icon>
          Place
        </div>
      </template>
      Suzhou
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          <el-icon :style="iconStyle">
            <tickets />
          </el-icon>
          Remarks
        </div>
      </template>
      <el-tag size="small">School</el-tag>
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          <el-icon :style="iconStyle">
            <office-building />
          </el-icon>
          Address
        </div>
      </template>
      No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
    </el-descriptions-item>
  </el-descriptions>
 
 
  <!-- 清单详情 -->
<el-descriptions 
class=""
    title="线索清单详情"
    :column="1"
    :size="size"
    border
    >
    <!-- <el-descriptions-item class="inventory-descriptions-item"  v-for="item in 10" :key="item" >
      <template #label>
          <span>{{ item }}</span>
      </template>
      {{ item }}
    </el-descriptions-item> -->
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          主键
        </div>
      </template>
      {{ clueData.id }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          线索名称
        </div>
      </template>
      {{ clueData.clueName }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          线索结论
        </div>
      </template>
      {{ clueData.conclusion }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          创建时间
        </div>
      </template>
      {{ clueData.createTime }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          报警站点名称
        </div>
      </template>
      {{ clueData.siteName }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          站点类型
        </div>
      </template>
      {{ clueData.sitetype }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          下发时间
        </div>
      </template>
      {{ clueData.xfsj }}
    </el-descriptions-item>
 
    <el-descriptions-item>
      <template #label>
        <div class="cell-item">
          站点类型
        </div>
      </template>
      {{ clueData.airCheckedOptions }}
    </el-descriptions-item>
</el-descriptions>
 
<el-button type="primary" @click="reportButton">反馈上报</el-button>
<el-dialog  v-if="!this.isClueHave" v-model="isShow" width="50%"  :before-close="handleClose">
  <template #title>
    <span> 反馈上报</span>
  </template> 
   <el-form label-width="120px" label-position="left">
    <el-form-item label="问题类型" >
      <el-radio-group v-model="form.radio">
          <el-radio label="有问题">有问题</el-radio>
          <el-radio label="无问题">无问题</el-radio>
          <el-radio label="已解决">已解决</el-radio> 
      </el-radio-group>
    </el-form-item>
    <el-form-item label="线索id">
        <el-input v-model.number="form.id"></el-input>
    </el-form-item>
    <el-form-item label="线索结论">
        <el-input v-model="form.conclusion"></el-input>
    </el-form-item>
    <el-form-item label="详细描述">
      <el-input v-model="form.details" type="textarea" placeholder="请输入详情"></el-input>
    </el-form-item>
  </el-form>
    <template #footer>
      <el-button type="" @click="isShow=false">取消</el-button>
      <el-button @click="report">确定</el-button>
    </template>
</el-dialog>
<el-button type="primary" @click="reportPhoto">图片上传</el-button>
<el-dialog v-model="isShowReportPhoto">
<el-form>
    <el-form-item label="线索id">
      <el-input v-model=""></el-input>
    </el-form-item>
</el-form>
</el-dialog>
</template>
 
 
<script>
import axios from 'axios'
export default {
  // 布尔类型 控制反馈上报的样式
  // fasle代表无数据 true代表有数据
  props:{
    isClueHave:{
      type:Boolean,
      default:false
    }
  },
  name: 'HomePage',
  data(){
    return{
      // 保存下发线索查询后返回的数组数据
      // 或者是点击的展示结果对应的对象数据
      clueData:{},
      // 上报弹出框
      isShow:false,
      // 图片上传的弹出框
      isShowReportPhoto:false,
      // 表单中
      form:{
        // 问题类型 单选按钮的值
        radio:'',
        // 线索id
        id:0,
        // 线索结论
        conclusion:'',
        // 详细描述
        details:'',
        // 保存提交后的返回结果 
        result:''
      },
      photoForm:{
        clueId:0,
        questionDescription:'',
        
      }
    }
  },
  methods:{
    // 点击上报按钮
    reportButton(){
      // 当该线索id已经有结论了
      if(this.isClueHave === true){
        alert('该线索已经有结论了,不可重复上报')
      }
      else if(this.isClueHave === false){
        this.isShow = !this.isShow
      }
    },
// 点击反馈上报时
report(){
  //发出请求 
  axios.post('').then(response =>{
      // 获取结果
      this.result = response.data.data
      if(this.result =='上报成功'){
        ElMessage.success(this.result);
        // 只有上传成功时才关闭对话框
        this.isShow = false
      }
      else if(this.result =='上报失败'){
        ElMessage.error(this.result);
        // 否则暂时不关闭对话框 
      }
  })
 
},
reportPhoto(){
 
}
  }
}
</script>
 
<style>
 
</style>