vue2-client 1.20.71 → 1.20.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/MarsCodeWorkspaceAppSettings.xml +7 -0
- package/.idea/af-vue2-client.iml +3 -2
- package/.idea/deployment.xml +14 -0
- package/.idea/encodings.xml +6 -0
- package/.idea/gradle.xml +7 -0
- package/.idea/inspectionProfiles/Project_Default.xml +0 -17
- package/.idea/misc.xml +6 -0
- package/package.json +2 -2
- package/src/assets/svg/unknown-icon.svg +3 -3
- package/src/base-client/components/common/AfMap/InfoWindowComponent.vue +141 -141
- package/src/base-client/components/common/AfMap/demo.vue +492 -492
- package/src/base-client/components/common/XInspectionDetailDrawer/components/AiDeviceStatus.vue +402 -199
- package/src/base-client/components/common/XInspectionDetailDrawer/components/CheckItems.vue +0 -34
- package/src/base-client/components/common/XInspectionDetailDrawer/demo.vue +3 -3
- package/src/base-client/components/common/XInspectionDetailDrawer/index.vue +40 -25
- package/src/base-client/components/common/XInspectionDetailDrawer/services/inspectionDetailApi.js +0 -1
- package/src/base-client/components/common/XInspectionDetailDrawer/services/inspectionService.js +6 -63
- package/src/components/ImagePreview/ImagePreview.vue +323 -323
- package/logs/afgit.config.log +0 -12
- package/logs/afgit.config.log.2026-02-27 +0 -7
- package/logs/afgit.config_error.log +0 -6
- package/logs/afgit.config_error.log.2026-02-27 +0 -3
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
<th>值</th>
|
|
47
47
|
<th>结果</th>
|
|
48
48
|
<th>照片</th>
|
|
49
|
-
<th v-if="showAiData">AI判断</th>
|
|
50
49
|
</tr>
|
|
51
50
|
</thead>
|
|
52
51
|
<tbody>
|
|
@@ -110,9 +109,6 @@
|
|
|
110
109
|
</div>
|
|
111
110
|
<span v-else class="no-photos">—</span>
|
|
112
111
|
</td>
|
|
113
|
-
|
|
114
|
-
<!-- ai -->
|
|
115
|
-
<td class="item-name" v-if="showAiData">{{ item.aiValue }}</td>
|
|
116
112
|
</tr>
|
|
117
113
|
</tbody>
|
|
118
114
|
</table>
|
|
@@ -156,18 +152,10 @@ export default {
|
|
|
156
152
|
type: Array,
|
|
157
153
|
default: () => []
|
|
158
154
|
},
|
|
159
|
-
repetitionPhoto: {
|
|
160
|
-
type: Array,
|
|
161
|
-
default: () => []
|
|
162
|
-
},
|
|
163
155
|
title: {
|
|
164
156
|
type: String,
|
|
165
157
|
default: '安检检查项'
|
|
166
158
|
},
|
|
167
|
-
showAiData: {
|
|
168
|
-
type: Boolean,
|
|
169
|
-
default: false
|
|
170
|
-
}
|
|
171
159
|
},
|
|
172
160
|
data () {
|
|
173
161
|
return {
|
|
@@ -395,9 +383,6 @@ export default {
|
|
|
395
383
|
* 获取项目状态样式类
|
|
396
384
|
*/
|
|
397
385
|
getItemStatusClass (item) {
|
|
398
|
-
if (this.getItemRepetitionPhoto(item)){
|
|
399
|
-
return 'item-status-fail'
|
|
400
|
-
}
|
|
401
386
|
const classMap = {
|
|
402
387
|
pass: 'item-status-pass',
|
|
403
388
|
warning: 'item-status-warning',
|
|
@@ -407,22 +392,6 @@ export default {
|
|
|
407
392
|
return classMap[item.status] || 'item-status-unknown'
|
|
408
393
|
},
|
|
409
394
|
|
|
410
|
-
getItemRepetitionPhoto(item) {
|
|
411
|
-
if (!this.showAiData){
|
|
412
|
-
return false
|
|
413
|
-
}
|
|
414
|
-
if (!item.photos || item.photos.length === 0) {
|
|
415
|
-
return false
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
for (const photo of item.photos) {
|
|
419
|
-
if (this.repetitionPhoto.includes(photo.url)) {
|
|
420
|
-
return true
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
return false
|
|
425
|
-
},
|
|
426
395
|
/**
|
|
427
396
|
* 获取状态图标
|
|
428
397
|
*/
|
|
@@ -440,9 +409,6 @@ export default {
|
|
|
440
409
|
* 获取状态文本
|
|
441
410
|
*/
|
|
442
411
|
getStatusText (item) {
|
|
443
|
-
if (this.getItemRepetitionPhoto(item)){
|
|
444
|
-
return '重复'
|
|
445
|
-
}
|
|
446
412
|
const textMap = {
|
|
447
413
|
pass: '正常',
|
|
448
414
|
warning: '警告',
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div class="inspection-detail-demo">
|
|
3
3
|
<a-card title="安检详情 Demo" :bordered="false">
|
|
4
4
|
<p class="demo-desc">
|
|
5
|
-
点击下方按钮打开安检结果详情抽屉,默认展示安检 ID 为 <strong>
|
|
5
|
+
点击下方按钮打开安检结果详情抽屉,默认展示安检 ID 为 <strong>1016038</strong> 的详情。
|
|
6
6
|
</p>
|
|
7
7
|
<a-space>
|
|
8
|
-
<a-button type="primary" @click="openDetail(
|
|
8
|
+
<a-button type="primary" @click="openDetail(1016038)">
|
|
9
9
|
<a-icon type="file-search" />
|
|
10
|
-
查看安检详情 (ID:
|
|
10
|
+
查看安检详情 (ID: 1016038)
|
|
11
11
|
</a-button>
|
|
12
12
|
<a-input-number
|
|
13
13
|
v-model="customId"
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
<div class="device-section" v-show="showAiDeviceTab">
|
|
76
76
|
<ai-device-status
|
|
77
77
|
:device-list="aiDeviceItem"
|
|
78
|
+
:config="AICheckConfig?.XInspectionDetailDrawer?.AiDeviceStatus"
|
|
78
79
|
@preview-photos="(photos, idx) => handlePreviewPhotos(photos, idx)"
|
|
80
|
+
@process-item="handleProcessItem"
|
|
79
81
|
/>
|
|
80
82
|
</div>
|
|
81
83
|
<div class="device-section" v-show="inspectionData.deviceList.length > 0">
|
|
@@ -88,8 +90,6 @@
|
|
|
88
90
|
<div class="check-items-section" v-show="inspectionData.checkItems.length > 0">
|
|
89
91
|
<check-items
|
|
90
92
|
:check-items="inspectionData.checkItems"
|
|
91
|
-
:show-ai-data="showAiDeviceTab"
|
|
92
|
-
:repetition-photo="inspectionData?.f_data?.f_repetition_photo ?? []"
|
|
93
93
|
/>
|
|
94
94
|
</div>
|
|
95
95
|
|
|
@@ -204,6 +204,7 @@ import HazardPhotos from './components/HazardPhotos.vue'
|
|
|
204
204
|
import { FileImageGroup } from '@vue2-client/base-client/components/common/FileImage'
|
|
205
205
|
import ImagePreviewModal from '@vue2-client/base-client/components/common/ImagePreviewModal/ImagePreviewModal.vue'
|
|
206
206
|
import { printWithHtmlToImage, exportToPDFWithJpeg } from '@vue2-client/utils/htmlToImage'
|
|
207
|
+
import { runLogic } from '@/services/api/common'
|
|
207
208
|
|
|
208
209
|
export default {
|
|
209
210
|
name: 'XInspectionDetailDrawer',
|
|
@@ -268,7 +269,9 @@ export default {
|
|
|
268
269
|
{ required: true, message: '请输入不通过原因', trigger: 'blur' },
|
|
269
270
|
{ min: 5, message: '不通过原因至少5个字符', trigger: 'blur' }
|
|
270
271
|
]
|
|
271
|
-
}
|
|
272
|
+
},
|
|
273
|
+
// AI辅助相关配置
|
|
274
|
+
AICheckConfig: {},
|
|
272
275
|
}
|
|
273
276
|
},
|
|
274
277
|
computed: {
|
|
@@ -299,28 +302,11 @@ export default {
|
|
|
299
302
|
return `${width}vw`
|
|
300
303
|
},
|
|
301
304
|
showAiDeviceTab () {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const show = Array.isArray(item)
|
|
305
|
-
&& item.length > 0
|
|
306
|
-
&& Array.isArray(item[0])
|
|
307
|
-
&& item[0].length > 0
|
|
308
|
-
console.warn('show', show)
|
|
309
|
-
return show
|
|
305
|
+
return this.AICheckConfig?.enable
|
|
310
306
|
},
|
|
311
|
-
aiDeviceItem(){
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
const show = Array.isArray(item)
|
|
315
|
-
&& item.length > 0
|
|
316
|
-
&& Array.isArray(item[0])
|
|
317
|
-
&& item[0].length > 0
|
|
318
|
-
if (show) {
|
|
319
|
-
return this.inspectionData?.photoAiRecognition?.items[0]
|
|
320
|
-
}
|
|
321
|
-
return []
|
|
307
|
+
aiDeviceItem () {
|
|
308
|
+
return this.inspectionData?.pcAiInspectionAssistResult || []
|
|
322
309
|
}
|
|
323
|
-
|
|
324
310
|
},
|
|
325
311
|
mounted () {
|
|
326
312
|
this._onResize = () => { this.windowWidth = window.innerWidth }
|
|
@@ -331,6 +317,7 @@ export default {
|
|
|
331
317
|
},
|
|
332
318
|
methods: {
|
|
333
319
|
async init (params) {
|
|
320
|
+
this.AICheckConfig = await inspectionService.getAICheckConfig()
|
|
334
321
|
try {
|
|
335
322
|
this.loading = true
|
|
336
323
|
this.visible = true
|
|
@@ -374,12 +361,18 @@ export default {
|
|
|
374
361
|
|
|
375
362
|
async loadInspectionData (id, userInfoId = null) {
|
|
376
363
|
const data = await inspectionService.getFullDetail(id, userInfoId)
|
|
364
|
+
let pcAiInspectionAssistResult = []
|
|
365
|
+
if (this.showAiDeviceTab){
|
|
366
|
+
pcAiInspectionAssistResult = await runLogic('getPcAiInspectionAssistResultLogic', {
|
|
367
|
+
paperId: this.currentId
|
|
368
|
+
}, 'af-hone')
|
|
369
|
+
}
|
|
377
370
|
console.warn('datra', data)
|
|
378
371
|
this.inspectionData = {
|
|
379
372
|
...data,
|
|
380
|
-
historyList: this.inspectionData.historyList || data.historyList || []
|
|
373
|
+
historyList: this.inspectionData.historyList || data.historyList || [],
|
|
374
|
+
pcAiInspectionAssistResult: pcAiInspectionAssistResult
|
|
381
375
|
}
|
|
382
|
-
console.warn('11', this.inspectionData?.photoAiRecognition?.items)
|
|
383
376
|
if (this.inspectionData.historyList && this.inspectionData.historyList.length > 0) {
|
|
384
377
|
const activeItem = this.inspectionData.historyList.find(item => item.isActive)
|
|
385
378
|
if (activeItem) this.currentHistoryId = activeItem.id
|
|
@@ -457,6 +450,28 @@ export default {
|
|
|
457
450
|
}
|
|
458
451
|
},
|
|
459
452
|
|
|
453
|
+
/**
|
|
454
|
+
* 处理AI检测项(检测结果不一致/新增隐患)
|
|
455
|
+
*/
|
|
456
|
+
async handleProcessItem (item) {
|
|
457
|
+
try {
|
|
458
|
+
this.loading = true
|
|
459
|
+
const params = {
|
|
460
|
+
...item
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
delete params.options
|
|
464
|
+
await runLogic('updatePcAiInspectionAssistResultLogic', params, 'af-hone')
|
|
465
|
+
this.$message.success('处理成功')
|
|
466
|
+
await this.loadInspectionData(this.currentId)
|
|
467
|
+
} catch (error) {
|
|
468
|
+
console.error('处理AI检测项失败:', error)
|
|
469
|
+
this.$message.error(error.message || '处理失败')
|
|
470
|
+
} finally {
|
|
471
|
+
this.loading = false
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
|
|
460
475
|
/**
|
|
461
476
|
* 打印/导出前的布局调整(隐藏历史面板,展开单列布局)
|
|
462
477
|
* 返回还原函数,调用后恢复原始布局
|
package/src/base-client/components/common/XInspectionDetailDrawer/services/inspectionDetailApi.js
CHANGED
|
@@ -14,7 +14,6 @@ export const getInspectionFullDetail = async (paperId) => {
|
|
|
14
14
|
}
|
|
15
15
|
throw new Error('API返回数据格式不正确')
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
export const fetchHistoryList = async (userinfoId) => {
|
|
19
18
|
return post('api/af-safecheck/logic/getSafecheckHistoryList', { f_userinfo_id: userinfoId })
|
|
20
19
|
}
|
package/src/base-client/components/common/XInspectionDetailDrawer/services/inspectionService.js
CHANGED
|
@@ -218,56 +218,6 @@ class InspectionService {
|
|
|
218
218
|
return String(dateTimeStr).replace('T', ' ').substring(0, 19)
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
buildMapContent(photoAiRecognition) {
|
|
222
|
-
if (
|
|
223
|
-
!photoAiRecognition ||
|
|
224
|
-
!Array.isArray(photoAiRecognition.items)
|
|
225
|
-
|| photoAiRecognition.items.length === 0
|
|
226
|
-
) {
|
|
227
|
-
return {}
|
|
228
|
-
}
|
|
229
|
-
const mapContent = {}
|
|
230
|
-
photoAiRecognition.items.forEach(item => {
|
|
231
|
-
if (Array.isArray(item)) {
|
|
232
|
-
item.forEach(i => {
|
|
233
|
-
if (Array.isArray(i.properties)) {
|
|
234
|
-
i.properties.forEach(prop => {
|
|
235
|
-
if (prop && prop.key && prop.key !== '名称' && prop.key !== '可信度') {
|
|
236
|
-
mapContent[prop.key] = prop.value
|
|
237
|
-
}
|
|
238
|
-
})
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
}
|
|
242
|
-
})
|
|
243
|
-
return mapContent
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
attachAiValue(checkItems, AiContent) {
|
|
247
|
-
if (!Array.isArray(checkItems)) return
|
|
248
|
-
const nameMap = {
|
|
249
|
-
'燃气管道及表具包裹': '燃气表被包裹'
|
|
250
|
-
}
|
|
251
|
-
checkItems.forEach(group => {
|
|
252
|
-
if (!Array.isArray(group.items)) return
|
|
253
|
-
|
|
254
|
-
group.items.forEach(item => {
|
|
255
|
-
if (!item || !item.name) return
|
|
256
|
-
|
|
257
|
-
// 1. 根据 name 找到 AiContent 的 key
|
|
258
|
-
const aiKey = nameMap[item.name]
|
|
259
|
-
|
|
260
|
-
// 2. 取值
|
|
261
|
-
const aiValue = aiKey ? AiContent?.[aiKey] : undefined
|
|
262
|
-
|
|
263
|
-
// 3. 挂载
|
|
264
|
-
item.aiValue = aiValue ?? '--'
|
|
265
|
-
})
|
|
266
|
-
})
|
|
267
|
-
|
|
268
|
-
return checkItems
|
|
269
|
-
}
|
|
270
|
-
|
|
271
221
|
async transformApiData (apiData) {
|
|
272
222
|
if (!apiData.checkPaper && apiData.basicInfo) return apiData
|
|
273
223
|
const checkPaper = apiData.checkPaper?.[0] || {}
|
|
@@ -275,13 +225,6 @@ class InspectionService {
|
|
|
275
225
|
const checkResultJson = apiData.checkResultJson || []
|
|
276
226
|
const signatureForm = apiData.signatureForm || {}
|
|
277
227
|
const historyList = apiData.historyList || []
|
|
278
|
-
const f_safe_content = JSON.parse(checkPaper.f_safe_content)
|
|
279
|
-
const f_data = JSON.parse(checkPaper.f_data)
|
|
280
|
-
console.warn('f_safe_content', f_safe_content)
|
|
281
|
-
const photoAiRecognition = Array.isArray(f_safe_content)
|
|
282
|
-
? f_safe_content.find(item => item.type === 'photoAiRecognition') || {}
|
|
283
|
-
: {}
|
|
284
|
-
const AiContent = this.buildMapContent(photoAiRecognition)
|
|
285
228
|
return {
|
|
286
229
|
basicInfo: {
|
|
287
230
|
id: checkPaper.id,
|
|
@@ -306,13 +249,9 @@ class InspectionService {
|
|
|
306
249
|
},
|
|
307
250
|
historyList,
|
|
308
251
|
deviceList: await this.extractDeviceList(checkResultJson),
|
|
309
|
-
checkItems: this.
|
|
252
|
+
checkItems: this.extractCheckItems(checkResultJson),
|
|
310
253
|
hazardList: this.transformDefectList(defectList),
|
|
311
|
-
attachments: this.extractAttachments(signatureForm)
|
|
312
|
-
checkPaper: checkPaper,
|
|
313
|
-
photoAiRecognition,
|
|
314
|
-
AiContent,
|
|
315
|
-
f_data
|
|
254
|
+
attachments: this.extractAttachments(signatureForm)
|
|
316
255
|
}
|
|
317
256
|
}
|
|
318
257
|
|
|
@@ -589,6 +528,10 @@ class InspectionService {
|
|
|
589
528
|
this.cache.clear()
|
|
590
529
|
}
|
|
591
530
|
}
|
|
531
|
+
|
|
532
|
+
async getAICheckConfig() {
|
|
533
|
+
return await getConfigByNameAsync('AICheckConfig')
|
|
534
|
+
}
|
|
592
535
|
}
|
|
593
536
|
|
|
594
537
|
export default new InspectionService()
|