Browse Source

遮照

master
maochaoying 2 years ago
parent
commit
7cdc87a2d2
  1. 3
      src/components/Task.vue
  2. 20
      src/pages/index.vue
  3. 9
      src/store/modules/task.js

3
src/components/Task.vue

@ -550,7 +550,6 @@ export default {
this.startCaptureFunc() this.startCaptureFunc()
// id // id
const res = await getCameraConfig(row.nuclearCoreId) const res = await getCameraConfig(row.nuclearCoreId)
console.log(res)
if (res?.code == 200) { if (res?.code == 200) {
if (res?.data?.exposure) { if (res?.data?.exposure) {
// exposure // exposure
@ -569,7 +568,7 @@ export default {
imageStore.updateNuclearStationName(row.nuclearCoreName) imageStore.updateNuclearStationName(row.nuclearCoreName)
imageStore.updateShowImage(false) imageStore.updateShowImage(false)
accountStore.changePage(0) accountStore.changePage(0)
taskStore.getExcelList(row.id)
await taskStore.getExcelList(row.id)
taskStore.updateCurrentTaskId(row.id) taskStore.updateCurrentTaskId(row.id)
taskStore.updateCurrentDetailTaskId(null) taskStore.updateCurrentDetailTaskId(null)
}, },

20
src/pages/index.vue

@ -366,6 +366,12 @@
<Nuclear /> <Nuclear />
</div> </div>
<t-loading :loading="loading" text="核查中..." fullscreen size="large" /> <t-loading :loading="loading" text="核查中..." fullscreen size="large" />
<t-loading
:loading="taskStore.showLoading"
text="设置参数中..."
fullscreen
size="large"
/>
</div> </div>
</template> </template>
@ -683,14 +689,11 @@ const websocketonmessage = async e => {
if (res?.code == 200) { if (res?.code == 200) {
// //
// exceldata // exceldata
loading.value = false
taskStore.getExcelList(taskStore.currentTaskId)
const res1 = await taskStore.getExcelList(taskStore.currentTaskId)
// //
const arr = taskStore.excelData.filter(
item => item.serialNumber == checkNumber,
)
const arr = res1.filter(item => item.serialNumber == checkNumber)
const item = arr[0] const item = arr[0]
console.log(item)
if (item.firstSign == '' && item.secondSign == '') { if (item.firstSign == '' && item.secondSign == '') {
return return
} }
@ -701,9 +704,10 @@ const websocketonmessage = async e => {
} }
if (arr?.length > 0) { if (arr?.length > 0) {
// itemstore // itemstore
// imageStore.updateShowImage(true)
// imageStore.updateCoreInfo(item)
imageStore.updateShowImage(true)
imageStore.updateCoreInfo(item)
} }
loading.value = false
MessagePlugin('success', { content: '核查完毕' }) MessagePlugin('success', { content: '核查完毕' })
// //
// nextBtn() // nextBtn()

9
src/store/modules/task.js

@ -13,6 +13,7 @@ export const useTaskStore = defineStore({
currentDetailTaskId: null, currentDetailTaskId: null,
taskStatus: 0, taskStatus: 0,
pathData: [], pathData: [],
showLoading: false,
} }
}, },
// actions // actions
@ -45,6 +46,10 @@ export const useTaskStore = defineStore({
this.excelData = excelData this.excelData = excelData
}, },
async getExcelList(taskId) { async getExcelList(taskId) {
if (this.excelData.length == 0) {
this.showLoading = true
}
const res = await getNuclearExcelApi(taskId) const res = await getNuclearExcelApi(taskId)
if (res?.code == 200) { if (res?.code == 200) {
// 根据data的serialNumber算出序列号 // 根据data的serialNumber算出序列号
@ -54,6 +59,10 @@ export const useTaskStore = defineStore({
item.num = parseInt(arr[0]) * 14 + parseInt(arr[1]) + 1 item.num = parseInt(arr[0]) * 14 + parseInt(arr[1]) + 1
}) })
this.excelData = list this.excelData = list
this.showLoading = false
return list
} else {
this.showLoading = false
} }
}, },
}, },

Loading…
Cancel
Save