diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue
index f7ed5ff..a6492f9 100644
--- a/src/components/ScanSampleDialog/index.vue
+++ b/src/components/ScanSampleDialog/index.vue
@@ -18,7 +18,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('list') // 页面类型 list需要提醒是否绑定、detail不需要提醒
const businessType = ref('') // 业务场景--1:设备收发场景,2:委托书场景,3:我的检测场景,4:部门检测场景
@@ -42,6 +42,7 @@
// 关闭弹窗
const closeDialog = () => {
+ list.value = []
dialogVisible.value = false
stopWebScket()
}
@@ -96,7 +97,7 @@
}
getReaderSampleList(param).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { sampleNo: string }) => item.sampleNo === res.data[0].sampleNo)
+ const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -106,7 +107,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].sampleName}已经添加过`)
+ console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -159,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
+
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -253,9 +257,9 @@
断开连接
-
+
确 定
diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue
index f7ed5ff..a6492f9 100644
--- a/src/components/ScanSampleDialog/index.vue
+++ b/src/components/ScanSampleDialog/index.vue
@@ -18,7 +18,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('list') // 页面类型 list需要提醒是否绑定、detail不需要提醒
const businessType = ref('') // 业务场景--1:设备收发场景,2:委托书场景,3:我的检测场景,4:部门检测场景
@@ -42,6 +42,7 @@
// 关闭弹窗
const closeDialog = () => {
+ list.value = []
dialogVisible.value = false
stopWebScket()
}
@@ -96,7 +97,7 @@
}
getReaderSampleList(param).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { sampleNo: string }) => item.sampleNo === res.data[0].sampleNo)
+ const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -106,7 +107,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].sampleName}已经添加过`)
+ console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -159,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
+
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -253,9 +257,9 @@
断开连接
-
+
确 定
diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue
index 75a8872..81511a6 100644
--- a/src/components/scanEquipmentDialog/index.vue
+++ b/src/components/scanEquipmentDialog/index.vue
@@ -19,7 +19,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('') // 页面类型、表格list、需要提醒是否绑定,detail详情不提醒
const singleChecked = ref('') // 单选选中id
@@ -102,7 +102,7 @@
else {
getReaderEquipmentList([labelId]).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { equipmentNo: string }) => item.equipmentNo === res.data[0].equipmentNo)
+ const index = list.value.findIndex((item: { id: string }) => item.id === res.data[0].id)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -113,7 +113,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].equipmentName}已经添加过`)
+ console.log(`${list.value[index].equipmentName}${list.value[index].model}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -160,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
+
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -220,7 +223,7 @@
断开连接
-
diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue
index f7ed5ff..a6492f9 100644
--- a/src/components/ScanSampleDialog/index.vue
+++ b/src/components/ScanSampleDialog/index.vue
@@ -18,7 +18,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('list') // 页面类型 list需要提醒是否绑定、detail不需要提醒
const businessType = ref('') // 业务场景--1:设备收发场景,2:委托书场景,3:我的检测场景,4:部门检测场景
@@ -42,6 +42,7 @@
// 关闭弹窗
const closeDialog = () => {
+ list.value = []
dialogVisible.value = false
stopWebScket()
}
@@ -96,7 +97,7 @@
}
getReaderSampleList(param).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { sampleNo: string }) => item.sampleNo === res.data[0].sampleNo)
+ const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -106,7 +107,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].sampleName}已经添加过`)
+ console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -159,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
+
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -253,9 +257,9 @@
断开连接
-
+
确 定
diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue
index 75a8872..81511a6 100644
--- a/src/components/scanEquipmentDialog/index.vue
+++ b/src/components/scanEquipmentDialog/index.vue
@@ -19,7 +19,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('') // 页面类型、表格list、需要提醒是否绑定,detail详情不提醒
const singleChecked = ref('') // 单选选中id
@@ -102,7 +102,7 @@
else {
getReaderEquipmentList([labelId]).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { equipmentNo: string }) => item.equipmentNo === res.data[0].equipmentNo)
+ const index = list.value.findIndex((item: { id: string }) => item.id === res.data[0].id)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -113,7 +113,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].equipmentName}已经添加过`)
+ console.log(`${list.value[index].equipmentName}${list.value[index].model}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -160,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
+
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -220,7 +223,7 @@
断开连接
-
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index 124c8f6..f86c137 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -27,6 +27,7 @@
type: String,
},
})
+
const emits = defineEmits(['reportData'])
const form: Ref = ref({ // 基本信息表单
sampleName: '', // 被检设备名称
diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue
index f7ed5ff..a6492f9 100644
--- a/src/components/ScanSampleDialog/index.vue
+++ b/src/components/ScanSampleDialog/index.vue
@@ -18,7 +18,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('list') // 页面类型 list需要提醒是否绑定、detail不需要提醒
const businessType = ref('') // 业务场景--1:设备收发场景,2:委托书场景,3:我的检测场景,4:部门检测场景
@@ -42,6 +42,7 @@
// 关闭弹窗
const closeDialog = () => {
+ list.value = []
dialogVisible.value = false
stopWebScket()
}
@@ -96,7 +97,7 @@
}
getReaderSampleList(param).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { sampleNo: string }) => item.sampleNo === res.data[0].sampleNo)
+ const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -106,7 +107,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].sampleName}已经添加过`)
+ console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -159,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
+
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -253,9 +257,9 @@
断开连接
-
+
确 定
diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue
index 75a8872..81511a6 100644
--- a/src/components/scanEquipmentDialog/index.vue
+++ b/src/components/scanEquipmentDialog/index.vue
@@ -19,7 +19,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('') // 页面类型、表格list、需要提醒是否绑定,detail详情不提醒
const singleChecked = ref('') // 单选选中id
@@ -102,7 +102,7 @@
else {
getReaderEquipmentList([labelId]).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { equipmentNo: string }) => item.equipmentNo === res.data[0].equipmentNo)
+ const index = list.value.findIndex((item: { id: string }) => item.id === res.data[0].id)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -113,7 +113,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].equipmentName}已经添加过`)
+ console.log(`${list.value[index].equipmentName}${list.value[index].model}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -160,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
+
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -220,7 +223,7 @@
断开连接
-
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index 124c8f6..f86c137 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -27,6 +27,7 @@
type: String,
},
})
+
const emits = defineEmits(['reportData'])
const form: Ref = ref({ // 基本信息表单
sampleName: '', // 被检设备名称
diff --git a/src/views/equipement/info/book/list.vue b/src/views/equipement/info/book/list.vue
index fda8b65..afc416f 100644
--- a/src/views/equipement/info/book/list.vue
+++ b/src/views/equipement/info/book/list.vue
@@ -60,6 +60,7 @@
const menu = ref([]) // 审批状态按钮组合
// 表头
const columns = ref([
+ // { text: '标签信息', value: 'label', align: 'center' },
{ text: '设备名称', value: 'equipmentName', align: 'center' },
{ text: '规格型号', value: 'model', align: 'center' },
{ text: '出厂编号', value: 'manufactureNo', align: 'center' },
diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue
index f7ed5ff..a6492f9 100644
--- a/src/components/ScanSampleDialog/index.vue
+++ b/src/components/ScanSampleDialog/index.vue
@@ -18,7 +18,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('list') // 页面类型 list需要提醒是否绑定、detail不需要提醒
const businessType = ref('') // 业务场景--1:设备收发场景,2:委托书场景,3:我的检测场景,4:部门检测场景
@@ -42,6 +42,7 @@
// 关闭弹窗
const closeDialog = () => {
+ list.value = []
dialogVisible.value = false
stopWebScket()
}
@@ -96,7 +97,7 @@
}
getReaderSampleList(param).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { sampleNo: string }) => item.sampleNo === res.data[0].sampleNo)
+ const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -106,7 +107,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].sampleName}已经添加过`)
+ console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -159,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
+
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -253,9 +257,9 @@
断开连接
-
+
确 定
diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue
index 75a8872..81511a6 100644
--- a/src/components/scanEquipmentDialog/index.vue
+++ b/src/components/scanEquipmentDialog/index.vue
@@ -19,7 +19,7 @@
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false) // 弹窗显示
-const scanStatus = ref('0')
+const scanStatus = ref('1')
const isBinding = ref(false) // 是否是标签绑定
const pageType = ref('') // 页面类型、表格list、需要提醒是否绑定,detail详情不提醒
const singleChecked = ref('') // 单选选中id
@@ -102,7 +102,7 @@
else {
getReaderEquipmentList([labelId]).then((res) => {
if (res && res.data && res.data.length) {
- const index = list.value.findIndex((item: { equipmentNo: string }) => item.equipmentNo === res.data[0].equipmentNo)
+ const index = list.value.findIndex((item: { id: string }) => item.id === res.data[0].id)
if (index === -1) {
list.value.push({
...res.data[0],
@@ -113,7 +113,7 @@
})
}
else {
- ElMessage.warning(`${list.value[index].equipmentName}已经添加过`)
+ console.log(`${list.value[index].equipmentName}${list.value[index].model}${list.value[index].manufactureNo}已经添加过`)
}
}
})
@@ -160,17 +160,20 @@
// 监听消息列表变化
watch(() => websocket.labelId, (newVal) => {
+ console.log('监听到了标签数据', newVal)
+
if (newVal) {
scan(newVal)
}
}, { immediate: true })
// 监听websocket是否连接
watch(() => websocket.wsStatus, (newVal) => {
+ console.log('监听到websocket是否连接', newVal)
if (newVal) { // 连上
- scanStatus.value === '2'
+ scanStatus.value = '2'
}
else { // 断开
- scanStatus.value === '1'
+ scanStatus.value = '1'
}
}, {
immediate: true,
@@ -220,7 +223,7 @@
断开连接
-
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index 124c8f6..f86c137 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -27,6 +27,7 @@
type: String,
},
})
+
const emits = defineEmits(['reportData'])
const form: Ref = ref({ // 基本信息表单
sampleName: '', // 被检设备名称
diff --git a/src/views/equipement/info/book/list.vue b/src/views/equipement/info/book/list.vue
index fda8b65..afc416f 100644
--- a/src/views/equipement/info/book/list.vue
+++ b/src/views/equipement/info/book/list.vue
@@ -60,6 +60,7 @@
const menu = ref([]) // 审批状态按钮组合
// 表头
const columns = ref([
+ // { text: '标签信息', value: 'label', align: 'center' },
{ text: '设备名称', value: 'equipmentName', align: 'center' },
{ text: '规格型号', value: 'model', align: 'center' },
{ text: '出厂编号', value: 'manufactureNo', align: 'center' },
diff --git a/src/views/resource/file/approval/dialog/editFileItemDialog.vue b/src/views/resource/file/approval/dialog/editFileItemDialog.vue
index c84a213..0582bbe 100644
--- a/src/views/resource/file/approval/dialog/editFileItemDialog.vue
+++ b/src/views/resource/file/approval/dialog/editFileItemDialog.vue
@@ -192,8 +192,11 @@
}
else {
ElMessage.error(res.message)
+ event.target.value = null
loading.value = false
}
+ }).catch(() => {
+ event.target.value = null
})
}
}