diff --git a/package-lock.json b/package-lock.json index 85bd175..0b82da4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -766,7 +766,6 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", - "extraneous": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/src/constant/file.ts b/src/constant/file.ts index df4d499..01731dc 100644 --- a/src/constant/file.ts +++ b/src/constant/file.ts @@ -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文件类型 */ export const OfficeTypes = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx', 'pdf'] export const WordTypes = ['doc', 'docx'] -export const ExcelTypes = ['xls', 'xlsx'] +export const ExcelTypes = ['xls', 'xlsx'] \ No newline at end of file diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 7accf54..9376c3c 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -13,12 +13,13 @@ declare module 'vue' { ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb'] ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem'] AButton: typeof import('@arco-design/web-vue')['Button'] + AButtonGroup: typeof import('@arco-design/web-vue')['ButtonGroup'] ACard: typeof import('@arco-design/web-vue')['Card'] ACheckbox: typeof import('@arco-design/web-vue')['Checkbox'] + ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup'] ACol: typeof import('@arco-design/web-vue')['Col'] AColorPicker: typeof import('@arco-design/web-vue')['ColorPicker'] AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider'] - ADatePicker: typeof import('@arco-design/web-vue')['DatePicker'] ADescriptions: typeof import('@arco-design/web-vue')['Descriptions'] ADescriptionsItem: typeof import('@arco-design/web-vue')['DescriptionsItem'] ADivider: typeof import('@arco-design/web-vue')['Divider'] @@ -33,11 +34,11 @@ declare module 'vue' { AIcon: typeof import('@arco-design/web-vue')['Icon'] AImage: typeof import('@arco-design/web-vue')['Image'] AInput: typeof import('@arco-design/web-vue')['Input'] + AInputGroup: typeof import('@arco-design/web-vue')['InputGroup'] AInputNumber: typeof import('@arco-design/web-vue')['InputNumber'] AInputPassword: typeof import('@arco-design/web-vue')['InputPassword'] AInputSearch: typeof import('@arco-design/web-vue')['InputSearch'] ALayout: typeof import('@arco-design/web-vue')['Layout'] - ALayoutContent: typeof import('@arco-design/web-vue')['LayoutContent'] ALayoutHeader: typeof import('@arco-design/web-vue')['LayoutHeader'] ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider'] ALink: typeof import('@arco-design/web-vue')['Link'] @@ -64,15 +65,16 @@ declare module 'vue' { ASubMenu: typeof import('@arco-design/web-vue')['SubMenu'] ASwitch: typeof import('@arco-design/web-vue')['Switch'] ATable: typeof import('@arco-design/web-vue')['Table'] + ATableColumn: typeof import('@arco-design/web-vue')['TableColumn'] ATabPane: typeof import('@arco-design/web-vue')['TabPane'] ATabs: typeof import('@arco-design/web-vue')['Tabs'] ATag: typeof import('@arco-design/web-vue')['Tag'] + ATextarea: typeof import('@arco-design/web-vue')['Textarea'] ATooltip: typeof import('@arco-design/web-vue')['Tooltip'] ATree: typeof import('@arco-design/web-vue')['Tree'] ATreeSelect: typeof import('@arco-design/web-vue')['TreeSelect'] ATrigger: typeof import('@arco-design/web-vue')['Trigger'] ATypographyParagraph: typeof import('@arco-design/web-vue')['TypographyParagraph'] - ATypographyTitle: typeof import('@arco-design/web-vue')['TypographyTitle'] AUpload: typeof import('@arco-design/web-vue')['Upload'] Avatar: typeof import('./../components/Avatar/index.vue')['default'] AWatermark: typeof import('@arco-design/web-vue')['Watermark'] diff --git a/src/views/weightManage/index.vue b/src/views/weightManage/index.vue index 9d73b30..1e92ee3 100644 --- a/src/views/weightManage/index.vue +++ b/src/views/weightManage/index.vue @@ -298,22 +298,9 @@ const formData = 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('') @@ -556,7 +543,6 @@ watch(activeStep, (newVal) => { // 组件挂载时 onMounted(async () => { await loadFlvJs() - // pollingInterval = setInterval(getImage, 1000) }) // 组件卸载时 @@ -585,7 +571,8 @@ const workOrderResp = ref({ // 称重登记页面数据 const inputQuantity = ref('') -const ahDeviceWeight = ref('') +// todo +const ahDeviceWeight = ref('10.1') const calculatedWeight = ref('') const weighingCount = ref(1) @@ -781,9 +768,10 @@ const handleNext = async () => { return } - // 调用后端接口获取比对结果 - const res = await vmSend(materialCode); - compareMatchResult.value = res.data || ''; + // 调用后端接口获取比对结果 // todo + // const res = await vmSend(materialCode); + // compareMatchResult.value = res.data || ''; + compareMatchResult.value = 'success' if (compareMatchResult.value === 'success') { // 比对成功,按钮变为下一步 @@ -837,7 +825,8 @@ const handleBackToFirst = () => { // 重置称重登记页面数据 inputQuantity.value = '' - ahDeviceWeight.value = '' + // todo + ahDeviceWeight.value = '10.1' calculatedWeight.value = '' weighingCount.value = 1 // 清空称重列表 @@ -904,7 +893,8 @@ const handleConfirm = () => { // 重置输入(让用户能继续输入) inputQuantity.value = '' - ahDeviceWeight.value = '' + // todo + ahDeviceWeight.value = '10.1' calculatedWeight.value = '' weighingCount.value = weighingList.value.length + 1 @@ -1059,9 +1049,6 @@ const closeWebSocket = () => { // 组件卸载时关闭WebSocket连接 onUnmounted(() => { closeWebSocket() - if (pollingInterval) { - clearInterval(pollingInterval) - } })