Browse Source

some bugs

master
maochaoying 2 years ago
parent
commit
243d1431f7
  1. 25
      src/components/Debug.vue
  2. 10
      src/components/Excel.vue
  3. 7
      src/components/Image.vue
  4. 5
      src/components/Task.vue
  5. 6
      src/pages/index.vue

25
src/components/Debug.vue

@ -80,6 +80,7 @@
class="demo-select-base"
clearable
filterable
@change="handleSelectChange"
placeholder="请选择堆芯"
>
<t-option
@ -143,7 +144,7 @@ import {
} from '@/command'
import { coreListApi } from '@/api/info'
import { MessagePlugin } from 'tdesign-vue-next'
import { addCameraConfig } from '@/api/camera'
import { addCameraConfig, getCameraConfig } from '@/api/camera'
const photoUrl = ref('')
const recognitionResult = ref('')
@ -151,6 +152,28 @@ const station_core_id = ref('')
const coreList = ref([])
const handleSelectChange = async val => {
const res = await getCameraConfig(val)
if (res?.code == 200) {
if (res?.data?.exposure) {
exposure.value = res?.data?.exposure
// exposure
handleExposureTime(res?.data?.exposure)
} else {
exposure.value = 0
handleExposureTime(0)
}
if (res?.data?.brightness) {
simulation_brightness.value = res?.data?.brightness
// simulation_brightness
handleSimulationBrightness(res?.data?.brightness)
} else {
simulation_brightness.value = 0
handleSimulationBrightness(0)
}
}
}
onMounted(async () => {
const res = await coreListApi()
if (res?.code == 200) {

10
src/components/Excel.vue

@ -32,14 +32,8 @@ const showCoreDetail = index => {
}
//
if (arr?.length > 0) {
if ([1, 2].includes(item.result)) {
// itemstore
imageStore.updateShowImage(true)
imageStore.updateCoreInfo(item)
} else {
imageStore.updateCoreInfo({})
imageStore.updateShowImage(false)
}
imageStore.updateShowImage(true)
imageStore.updateCoreInfo(item)
}
}

7
src/components/Image.vue

@ -4,7 +4,10 @@
v-if="cameraStore?.cameraState || imageStore.showImage"
>
<img
v-if="cameraStore?.cameraState && !imageStore.showImage"
v-if="
(cameraStore?.cameraState && !imageStore.showImage) ||
!imageStore?.coreInfo?.resultImg
"
:src="photoUrl"
alt="图像"
class="img"
@ -28,7 +31,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
v-if="imageStore?.coreInfo?.result == 2"
v-if="imageStore?.coreInfo?.result != 1"
version="1.1"
width="30"
height="29.999998092651367"

5
src/components/Task.vue

@ -547,25 +547,24 @@ export default {
if (flag == 1 && canUpload) {
return
}
this.startCaptureFunc()
// id
const res = await getCameraConfig(row.nuclearCoreId)
console.log(res)
if (res?.code == 200) {
if (res?.data?.exposure) {
// exposure
this.startCaptureFunc()
this.handleExposureTime()
}
if (res?.data?.simulation_brightness) {
// simulation_brightness
this.startCaptureFunc()
this.handleSimulationBrightness()
}
}
this.startCaptureFunc()
taskStore.updateTaskStatus(row.status)
taskStore.updateCurrentCoord(row.currentCoord)
imageStore.updateNuclearCoreName(coreName)
Cookie.setCookie('core_name', coreName)
imageStore.updateOperatorName(row.operatorName)
imageStore.updateNuclearStationName(row.nuclearCoreName)
imageStore.updateShowImage(false)

6
src/pages/index.vue

@ -485,6 +485,7 @@ const continueWork = () => {
//
taskStore.updateType(0)
getInitData()
imageStore.updateNuclearCoreName(Cookie.getCookie('core_name'))
}
const getInitData = async () => {
@ -500,7 +501,7 @@ const getInitData = async () => {
taskStore.updateCheckStatus(false)
}
taskStore.updateCurrentCoord(data.currentCoord)
imageStore.updateNuclearCoreName(data.nuclearCoreName)
// imageStore.updateNuclearCoreName(data.nuclearCoreName)
imageStore.updateShowImage(false)
taskStore.getExcelList(data.id)
taskStore.updateCurrentTaskId(data.id)
@ -722,12 +723,13 @@ const websocketonmessage = async e => {
}
} else {
loading.value = false
MessagePlugin('error', { content: 'ws发送指令执行错误' })
// MessagePlugin('error', { content: 'ws' })
}
}
const websocketonopen = () => {
console.log('客户端链接成功!!!')
startCaptureFunc()
}
const websocketonerror = () => {

Loading…
Cancel
Save