吉安感知网项目-前端
罗广辉
2026-06-06 3576f633dc5591d626897c5526aeb2dac9d43b1e
applications/task-work-order/src/views/orderView/orderManage/clueEvents/ViewDiaLog.vue
@@ -5,14 +5,20 @@
            <el-table-column label="线索缩略图" width="120">
               <template v-slot="{ row }">
                  <el-image
                     v-if="row.aiImg || row.resultUrl"
                     :src="row.aiImg || row.resultUrl"
                     :preview-src-list="[row.aiImg || row.resultUrl]"
                     v-if="row.attachmentType === 1 && row.resultUrl"
                     :src="row.resultUrl"
                     :preview-src-list="[row.resultUrl]"
                     fit="cover"
                     style="width: 80px; height: 60px"
                     style="width: 80px; height: 80px; border-radius: 4px"
                     preview-teleported
                  />
                  <span v-else>-</span>
                  <el-image
                     v-if="row.attachmentType === 2 && row.resultUrl"
                     :src="row.resultUrl"
                     :preview-src-list="[row.resultUrl]"
                     fit="cover"
                     preview-teleported
                  />
               </template>
            </el-table-column>
            <el-table-column prop="resultCode" show-overflow-tooltip label="线索编号" />
@@ -31,8 +37,12 @@
            <el-table-column prop="distributeUserName" show-overflow-tooltip label="分发人员" />
            <el-table-column label="操作" class-name="operation-btns" width="140">
               <template v-slot="{ row }">
                  <el-link type="primary" @click="openDistributeDialog(row)" v-if="permission.clueEvents_distribute && (row.distributeStatus === 0 || row.distributeStatus === 2)">
                     {{ row.distributeStatus === 2 ? '再次分发':'转为事件并分发' }}
                  <el-link
                     type="primary"
                     @click="openDistributeDialog(row)"
                     v-if="permission.clueEvents_distribute && (row.distributeStatus === 0 || row.distributeStatus === 2)"
                  >
                     {{ row.distributeStatus === 2 ? '再次分发' : '转为事件并分发' }}
                  </el-link>
                  <el-button disabled type="text" v-else>转为事件并分发</el-button>
               </template>
@@ -101,26 +111,28 @@
   try {
      const res = await gdTaskResultListApi({ patrolTaskId: currentRow.value.id })
      list.value = res?.data?.data ?? []
      list.value = await Promise.all(list.value.map(async i => {
         const aiImg = await getAiImg(i.resultUrl)
         return { ...i, aiImg }
      }))
      list.value = await Promise.all(
         list.value.map(async i => {
            const aiImg = await getAiImg(i.resultUrl)
            return { ...i, aiImg }
         })
      )
   } finally {
      loading.value = false
   }
}
const aiFrame = [
   "{\"score\":0.91357421875,\"bbox\":{\"x_cen\":1246.0,\"y_cen\":209.0,\"width\":166.0,\"height\":334.0},\"class_name\":\"car\",\"algorithmId\":\"e71116098eeb1d60cfebd04d30653b151\"}",
   "{\"score\":0.89697265625,\"bbox\":{\"x_cen\":370.0,\"y_cen\":694.5,\"width\":162.0,\"height\":331.0},\"class_name\":\"car\",\"algorithmId\":\"e71116098eeb1d60cfebd04d30653b151\"}",
   "{\"score\":0.89501953125,\"bbox\":{\"x_cen\":396.0,\"y_cen\":343.0,\"width\":168.0,\"height\":330.0},\"class_name\":\"car\",\"algorithmId\":\"e71116098eeb1d60cfebd04d30653b151\"}",
   "{\"score\":0.79296875,\"bbox\":{\"x_cen\":409.5,\"y_cen\":52.5,\"width\":167.0,\"height\":105.0},\"class_name\":\"car\",\"algorithmId\":\"e71116098eeb1d60cfebd04d30653b151\"}"
   '{"score":0.91357421875,"bbox":{"x_cen":1246.0,"y_cen":209.0,"width":166.0,"height":334.0},"class_name":"car","algorithmId":"e71116098eeb1d60cfebd04d30653b151"}',
   '{"score":0.89697265625,"bbox":{"x_cen":370.0,"y_cen":694.5,"width":162.0,"height":331.0},"class_name":"car","algorithmId":"e71116098eeb1d60cfebd04d30653b151"}',
   '{"score":0.89501953125,"bbox":{"x_cen":396.0,"y_cen":343.0,"width":168.0,"height":330.0},"class_name":"car","algorithmId":"e71116098eeb1d60cfebd04d30653b151"}',
   '{"score":0.79296875,"bbox":{"x_cen":409.5,"y_cen":52.5,"width":167.0,"height":105.0},"class_name":"car","algorithmId":"e71116098eeb1d60cfebd04d30653b151"}',
]
function getAiImg(url) {
   if (!url) return ''
   const img = new Image()
   img.crossOrigin = 'anonymous';
   img.crossOrigin = 'anonymous'
   return new Promise(resolve => {
      img.onload = () => {
         if (!img.naturalWidth || !img.naturalHeight) {
@@ -184,7 +196,6 @@
   })
}
// 打开分发弹框
function openDistributeDialog(row) {
   distributeDialogVisible.value = true
@@ -206,8 +217,8 @@
</script>
<style lang="scss" scoped>
   .disabled-text {
      color: #C0C4CC;
      cursor: not-allowed;
   }
.disabled-text {
   color: #c0c4cc;
   cursor: not-allowed;
}
</style>