Browse Source

图片展示

master
maochaoying 2 years ago
parent
commit
d5c84ad546
  1. 2
      src/command/index.js
  2. 22
      src/components/Excel.vue
  3. 6
      src/components/Image.vue
  4. 14
      src/pages/index.vue

2
src/command/index.js

@ -48,7 +48,7 @@ export const takePhoto = transformToString({
*/
export const takeAndSavePhoto = transformToString({
command: 'takeAndSavePhoto',
filePrefix: 'exprose1000/phto',
filePrefix: 'nuclear/iflytop',
messageId: uuidv4(),
need_receipt: true,
})

22
src/components/Excel.vue

@ -21,19 +21,23 @@ const checkStore = useCheckStore()
const showCoreDetail = index => {
const arr = taskStore.excelData.filter(item => item.num == index)
const item = arr[0]
if (item.firstSign == '' && item.secondSign == '') {
return
}
if (checkStore.manualCheck) {
if (arr?.length > 0) {
const item = arr[0]
checkStore.updateCheckNumber(item.serialNumber)
}
}
//
if (arr?.length > 0) {
const item = arr[0]
if ([1, 2].includes(item.result)) {
// itemstore
imageStore.updateShowImage(true)
imageStore.updateCoreInfo(item)
} else {
imageStore.updateShowImage(false)
}
}
}
@ -43,17 +47,19 @@ const getClass = index => {
const arr = taskStore.excelData.filter(item => item.num == index)
if (arr?.length > 0) {
const item = arr[0]
if (checkStore.manualCheck && checkStore.checkNumber == item.serialNumber) {
return 'box process'
}
if (item.result == 1) {
//
return 'box success'
} else if (item.result == 2) {
//
return 'box fail'
} else if (
checkStore.manualCheck &&
checkStore.checkNumber == item.serialNumber
item.result == 2 &&
item.firstSign != '' &&
item.secondSign != ''
) {
return 'box process'
//
return 'box fail'
} else if (
taskStore.currentCoord == item.serialNumber &&
taskStore.taskStatus == 1

6
src/components/Image.vue

@ -53,7 +53,11 @@
</div>
<div class="tag_wrap">
<p>
{{ imageStore?.coreInfo?.resultSerial?.split('-')[0]?.substr(-4) }}
{{
imageStore?.coreInfo?.resultSerial?.split('-')[0]?.substr(-4)
? imageStore?.coreInfo?.resultSerial?.split('-')[0]?.substr(-4)
: '空结果'
}}
</p>
<p>
{{ imageStore?.coreInfo?.resultSerial?.split('-')[1]?.substr(-4) }}

14
src/pages/index.vue

@ -598,11 +598,23 @@ const websocketonmessage = async e => {
// result
// result_img
// result_serial
const res = await saveCheckResult(checkNumber, currentTaskId)
const { result } = data
const { result: result_serial, srcImagePath } = result
const arr = srcImagePath?.split('//')
const result_img = arr[0] + '/' + arr[1]
const res = await saveCheckResult(
checkNumber,
currentTaskId,
result_serial,
result_img,
)
if (res?.code == 200) {
//
// exceldata
taskStore.getExcelList(taskStore.currentTaskId)
MessagePlugin('success', { content: '核查完毕' })
//
nextBtn()
}
break
default:

Loading…
Cancel
Save