This commit is contained in:
zc
2026-03-17 16:14:34 +08:00
parent 722fbd988c
commit 05c6cf6b1c
4 changed files with 18 additions and 30 deletions

1
package-lock.json generated
View File

@@ -766,7 +766,6 @@
}, },
"node_modules/@clack/prompts/node_modules/is-unicode-supported": { "node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0", "version": "1.3.0",
"extraneous": true,
"inBundle": true, "inBundle": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {

View File

@@ -38,11 +38,11 @@ export const FileIcon: FileExtendNameIconMap = {
} }
/** 图片类型 */ /** 图片类型 */
export const ImageTypes = ['jpg', 'png', 'gif', 'jpeg'] export const ImageTypes = ['jpg', 'png', 'gif', 'jpeg', 'bmp']
/** WPS、Office文件类型 */ /** WPS、Office文件类型 */
export const OfficeTypes = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx', 'pdf'] export const OfficeTypes = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
export const WordTypes = ['doc', 'docx'] export const WordTypes = ['doc', 'docx']
export const ExcelTypes = ['xls', 'xlsx'] export const ExcelTypes = ['xls', 'xlsx']

View File

@@ -13,12 +13,13 @@ declare module 'vue' {
ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb'] ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb']
ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem'] ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem']
AButton: typeof import('@arco-design/web-vue')['Button'] AButton: typeof import('@arco-design/web-vue')['Button']
AButtonGroup: typeof import('@arco-design/web-vue')['ButtonGroup']
ACard: typeof import('@arco-design/web-vue')['Card'] ACard: typeof import('@arco-design/web-vue')['Card']
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox'] ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup']
ACol: typeof import('@arco-design/web-vue')['Col'] ACol: typeof import('@arco-design/web-vue')['Col']
AColorPicker: typeof import('@arco-design/web-vue')['ColorPicker'] AColorPicker: typeof import('@arco-design/web-vue')['ColorPicker']
AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider'] AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider']
ADatePicker: typeof import('@arco-design/web-vue')['DatePicker']
ADescriptions: typeof import('@arco-design/web-vue')['Descriptions'] ADescriptions: typeof import('@arco-design/web-vue')['Descriptions']
ADescriptionsItem: typeof import('@arco-design/web-vue')['DescriptionsItem'] ADescriptionsItem: typeof import('@arco-design/web-vue')['DescriptionsItem']
ADivider: typeof import('@arco-design/web-vue')['Divider'] ADivider: typeof import('@arco-design/web-vue')['Divider']
@@ -33,11 +34,11 @@ declare module 'vue' {
AIcon: typeof import('@arco-design/web-vue')['Icon'] AIcon: typeof import('@arco-design/web-vue')['Icon']
AImage: typeof import('@arco-design/web-vue')['Image'] AImage: typeof import('@arco-design/web-vue')['Image']
AInput: typeof import('@arco-design/web-vue')['Input'] AInput: typeof import('@arco-design/web-vue')['Input']
AInputGroup: typeof import('@arco-design/web-vue')['InputGroup']
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber'] AInputNumber: typeof import('@arco-design/web-vue')['InputNumber']
AInputPassword: typeof import('@arco-design/web-vue')['InputPassword'] AInputPassword: typeof import('@arco-design/web-vue')['InputPassword']
AInputSearch: typeof import('@arco-design/web-vue')['InputSearch'] AInputSearch: typeof import('@arco-design/web-vue')['InputSearch']
ALayout: typeof import('@arco-design/web-vue')['Layout'] ALayout: typeof import('@arco-design/web-vue')['Layout']
ALayoutContent: typeof import('@arco-design/web-vue')['LayoutContent']
ALayoutHeader: typeof import('@arco-design/web-vue')['LayoutHeader'] ALayoutHeader: typeof import('@arco-design/web-vue')['LayoutHeader']
ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider'] ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider']
ALink: typeof import('@arco-design/web-vue')['Link'] ALink: typeof import('@arco-design/web-vue')['Link']
@@ -64,15 +65,16 @@ declare module 'vue' {
ASubMenu: typeof import('@arco-design/web-vue')['SubMenu'] ASubMenu: typeof import('@arco-design/web-vue')['SubMenu']
ASwitch: typeof import('@arco-design/web-vue')['Switch'] ASwitch: typeof import('@arco-design/web-vue')['Switch']
ATable: typeof import('@arco-design/web-vue')['Table'] ATable: typeof import('@arco-design/web-vue')['Table']
ATableColumn: typeof import('@arco-design/web-vue')['TableColumn']
ATabPane: typeof import('@arco-design/web-vue')['TabPane'] ATabPane: typeof import('@arco-design/web-vue')['TabPane']
ATabs: typeof import('@arco-design/web-vue')['Tabs'] ATabs: typeof import('@arco-design/web-vue')['Tabs']
ATag: typeof import('@arco-design/web-vue')['Tag'] ATag: typeof import('@arco-design/web-vue')['Tag']
ATextarea: typeof import('@arco-design/web-vue')['Textarea']
ATooltip: typeof import('@arco-design/web-vue')['Tooltip'] ATooltip: typeof import('@arco-design/web-vue')['Tooltip']
ATree: typeof import('@arco-design/web-vue')['Tree'] ATree: typeof import('@arco-design/web-vue')['Tree']
ATreeSelect: typeof import('@arco-design/web-vue')['TreeSelect'] ATreeSelect: typeof import('@arco-design/web-vue')['TreeSelect']
ATrigger: typeof import('@arco-design/web-vue')['Trigger'] ATrigger: typeof import('@arco-design/web-vue')['Trigger']
ATypographyParagraph: typeof import('@arco-design/web-vue')['TypographyParagraph'] ATypographyParagraph: typeof import('@arco-design/web-vue')['TypographyParagraph']
ATypographyTitle: typeof import('@arco-design/web-vue')['TypographyTitle']
AUpload: typeof import('@arco-design/web-vue')['Upload'] AUpload: typeof import('@arco-design/web-vue')['Upload']
Avatar: typeof import('./../components/Avatar/index.vue')['default'] Avatar: typeof import('./../components/Avatar/index.vue')['default']
AWatermark: typeof import('@arco-design/web-vue')['Watermark'] AWatermark: typeof import('@arco-design/web-vue')['Watermark']

View File

@@ -298,22 +298,9 @@ const formData = reactive({
}) })
const imgData = reactive({ const imgData = reactive({
imgUrl: '', // 样图URL imgUrl: 'http://localhost:6609/file/001.bmp', // 样图URL
}) })
// 定时器引用
let pollingInterval = null
// 获取图片的方法
const getImage = () => {
getImg().then((res) => {
if (res.code === '0') {
imgData.imgUrl = res.data || ''
}
})
}
//比对结果 //比对结果
const compareMatchResult = ref('') const compareMatchResult = ref('')
@@ -556,7 +543,6 @@ watch(activeStep, (newVal) => {
// 组件挂载时 // 组件挂载时
onMounted(async () => { onMounted(async () => {
await loadFlvJs() await loadFlvJs()
// pollingInterval = setInterval(getImage, 1000)
}) })
// 组件卸载时 // 组件卸载时
@@ -585,7 +571,8 @@ const workOrderResp = ref<WorkOrderResp>({
// 称重登记页面数据 // 称重登记页面数据
const inputQuantity = ref('') const inputQuantity = ref('')
const ahDeviceWeight = ref('') // todo
const ahDeviceWeight = ref('10.1')
const calculatedWeight = ref('') const calculatedWeight = ref('')
const weighingCount = ref(1) const weighingCount = ref(1)
@@ -781,9 +768,10 @@ const handleNext = async () => {
return return
} }
// 调用后端接口获取比对结果 // 调用后端接口获取比对结果 // todo
const res = await vmSend(materialCode); // const res = await vmSend(materialCode);
compareMatchResult.value = res.data || ''; // compareMatchResult.value = res.data || '';
compareMatchResult.value = 'success'
if (compareMatchResult.value === 'success') { if (compareMatchResult.value === 'success') {
// 比对成功,按钮变为下一步 // 比对成功,按钮变为下一步
@@ -837,7 +825,8 @@ const handleBackToFirst = () => {
// 重置称重登记页面数据 // 重置称重登记页面数据
inputQuantity.value = '' inputQuantity.value = ''
ahDeviceWeight.value = '' // todo
ahDeviceWeight.value = '10.1'
calculatedWeight.value = '' calculatedWeight.value = ''
weighingCount.value = 1 weighingCount.value = 1
// 清空称重列表 // 清空称重列表
@@ -904,7 +893,8 @@ const handleConfirm = () => {
// 重置输入(让用户能继续输入) // 重置输入(让用户能继续输入)
inputQuantity.value = '' inputQuantity.value = ''
ahDeviceWeight.value = '' // todo
ahDeviceWeight.value = '10.1'
calculatedWeight.value = '' calculatedWeight.value = ''
weighingCount.value = weighingList.value.length + 1 weighingCount.value = weighingList.value.length + 1
@@ -1059,9 +1049,6 @@ const closeWebSocket = () => {
// 组件卸载时关闭WebSocket连接 // 组件卸载时关闭WebSocket连接
onUnmounted(() => { onUnmounted(() => {
closeWebSocket() closeWebSocket()
if (pollingInterval) {
clearInterval(pollingInterval)
}
}) })
</script> </script>