From 58cd837553fc8241333e2ead575f613d9d8030e9 Mon Sep 17 00:00:00 2001 From: my_ong <429426262@qq.com> Date: Tue, 10 Dec 2024 11:01:23 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=8F=90=E7=A4=BA=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pontCore.ts | 7 +- src/components.d.ts | 6 +- src/router/index.ts | 7 +- src/views/admin/document/document-page.vue | 383 ------------------ src/views/admin/sensor/form.ts | 73 ---- src/views/admin/sensor/sensor-channel.vue | 95 ----- .../admin/sensor/sensor-detail-drawer.vue | 84 ---- src/views/admin/sensor/sensor-page.vue | 187 --------- src/views/admin/station/form.ts | 119 ------ src/views/admin/station/station-charts.vue | 255 ------------ src/views/admin/station/station-detail.vue | 98 ----- src/views/admin/station/station-page.vue | 314 -------------- src/views/admin/station/station-power-log.vue | 103 ----- .../admin/station/station-working-log.vue | 110 ----- src/views/admin/team/form.ts | 70 ---- src/views/admin/team/team-page.vue | 172 -------- src/views/dashboard/dashboard-page.vue | 223 ---------- src/views/dashboard/station-card.vue | 161 -------- src/views/stock/component/apply-page.vue | 13 +- src/views/stock/component/applyForm.vue | 8 +- src/views/stock/component/applyModal.vue | 9 +- src/views/stock/component/scanForm.vue | 6 +- tsconfig.app.tsbuildinfo | 2 +- 23 files changed, 34 insertions(+), 2471 deletions(-) delete mode 100644 src/views/admin/document/document-page.vue delete mode 100644 src/views/admin/sensor/form.ts delete mode 100644 src/views/admin/sensor/sensor-channel.vue delete mode 100644 src/views/admin/sensor/sensor-detail-drawer.vue delete mode 100644 src/views/admin/sensor/sensor-page.vue delete mode 100644 src/views/admin/station/form.ts delete mode 100644 src/views/admin/station/station-charts.vue delete mode 100644 src/views/admin/station/station-detail.vue delete mode 100644 src/views/admin/station/station-page.vue delete mode 100644 src/views/admin/station/station-power-log.vue delete mode 100644 src/views/admin/station/station-working-log.vue delete mode 100644 src/views/admin/team/form.ts delete mode 100644 src/views/admin/team/team-page.vue delete mode 100644 src/views/dashboard/dashboard-page.vue delete mode 100644 src/views/dashboard/station-card.vue diff --git a/src/api/pontCore.ts b/src/api/pontCore.ts index d16b941..fa183ba 100644 --- a/src/api/pontCore.ts +++ b/src/api/pontCore.ts @@ -3,7 +3,8 @@ */ class PontCoreManager { - static singleInstance = null as PontCoreManager; + // static singleInstance = undefined as PontCoreManager; + private static singleInstance: PontCoreManager | null = null; static getSignleInstance() { if (!PontCoreManager.singleInstance) { @@ -36,12 +37,12 @@ class PontCoreManager { this.fetch = fetch; } - getUrl(path: string, queryParams: any, method: string) { + getUrl(path: string, queryParams: any) { const params = { ...(queryParams || ({} as any)), }; - const url = path.replace(/\{([^\\}]*(?:\\.[^\\}]*)*)\}/gm, (match, key) => { + const url = path.replace(/\{([^\\}]*(?:\\.[^\\}]*)*)\}/gm, ( key) => { // eslint-disable-next-line no-param-reassign key = key.trim(); diff --git a/src/components.d.ts b/src/components.d.ts index 8c02785..493575d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,6 +7,7 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AAlert: typeof import('ant-design-vue/es')['Alert'] AAvatar: typeof import('ant-design-vue/es')['Avatar'] AButton: typeof import('ant-design-vue/es')['Button'] ACard: typeof import('ant-design-vue/es')['Card'] @@ -21,6 +22,7 @@ declare module 'vue' { AFormItem: typeof import('ant-design-vue/es')['FormItem'] AImage: typeof import('ant-design-vue/es')['Image'] AInput: typeof import('ant-design-vue/es')['Input'] + AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] AInputSearch: typeof import('ant-design-vue/es')['InputSearch'] ALayout: typeof import('ant-design-vue/es')['Layout'] ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent'] @@ -48,9 +50,11 @@ declare module 'vue' { ATabPane: typeof import('ant-design-vue/es')['TabPane'] ATabs: typeof import('ant-design-vue/es')['Tabs'] ATag: typeof import('ant-design-vue/es')['Tag'] - ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] + ATransfer: typeof import('ant-design-vue/es')['Transfer'] + ATree: typeof import('ant-design-vue/es')['Tree'] ATypographyLink: typeof import('ant-design-vue/es')['TypographyLink'] + ATypographyParagraph: typeof import('ant-design-vue/es')['TypographyParagraph'] ATypographyTitle: typeof import('ant-design-vue/es')['TypographyTitle'] AuxiliaryItemRender: typeof import('./components/form-render/auxiliary-item-render.vue')['default'] AWatermark: typeof import('ant-design-vue/es')['Watermark'] diff --git a/src/router/index.ts b/src/router/index.ts index 0c4196a..de0ac5c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -48,7 +48,7 @@ export const routes = [ path: '/stock/inbound', //入库 name: 'Inbound', meta: {title: 'menus.stock.inbound',icon: 'icon-permission'}, - component: ()=> import('../views/stock/inboud/inboud-page.vue'), + component: ()=> import('../views/stock/inboud/inboud-page.vue'), }, { path: '/stock/outbound', //出库 @@ -107,11 +107,6 @@ export default createRouter({ name: 'Index', redirect: '/login', }, - { - path: '/dashboard', - name: 'Dashboard', - component: () => import('../views/dashboard/dashboard-page.vue'), - }, { path: '/login', name: 'Login', diff --git a/src/views/admin/document/document-page.vue b/src/views/admin/document/document-page.vue deleted file mode 100644 index 357cb15..0000000 --- a/src/views/admin/document/document-page.vue +++ /dev/null @@ -1,383 +0,0 @@ - - - diff --git a/src/views/admin/sensor/form.ts b/src/views/admin/sensor/form.ts deleted file mode 100644 index 73a848a..0000000 --- a/src/views/admin/sensor/form.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { FormItem, FormConfig } from '@/components/form-render/form-render-types' - -export const config: FormConfig = { - layout: 'horizontal', - colon: true, - hideRequiredMark: false, - labelAlign: 'right', - scrollToFirstError: false, - validateOnRuleChange: true, - labelCol: { - span: 4, - offset: 0, - }, -} - -export const formItems: FormItem[] = [ - { - group: 'form', - type: 'input', - config: { - autoLink: true, - hasFeedback: false, - label: '设备编号', - name: 'key', - required: true, - }, - properties: { - size: 'default', - type: 'text', - allowClear: false, - bordered: true, - showCount: false, - placeholder: '请输入设备编号', - }, - rules: [], - }, - { - group: 'form', - type: 'input', - config: { - autoLink: true, - hasFeedback: false, - label: '设备名称', - name: 'name', - }, - properties: { - size: 'default', - type: 'text', - allowClear: false, - bordered: true, - showCount: false, - placeholder: '请输入设备名称', - }, - rules: [], - }, - { - type: 'input-number', - group: 'form', - config: { - autoLink: true, - hasFeedback: false, - label: '设备通道数', - name: 'channels', - required: true, - }, - properties: { - size: 'default', - controls: true, - placeholder: '请填写设备通道数', - }, - rules: [], - }, -] diff --git a/src/views/admin/sensor/sensor-channel.vue b/src/views/admin/sensor/sensor-channel.vue deleted file mode 100644 index 6234f66..0000000 --- a/src/views/admin/sensor/sensor-channel.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - diff --git a/src/views/admin/sensor/sensor-detail-drawer.vue b/src/views/admin/sensor/sensor-detail-drawer.vue deleted file mode 100644 index b41afd2..0000000 --- a/src/views/admin/sensor/sensor-detail-drawer.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - diff --git a/src/views/admin/sensor/sensor-page.vue b/src/views/admin/sensor/sensor-page.vue deleted file mode 100644 index ea33b23..0000000 --- a/src/views/admin/sensor/sensor-page.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - diff --git a/src/views/admin/station/form.ts b/src/views/admin/station/form.ts deleted file mode 100644 index 97d9c01..0000000 --- a/src/views/admin/station/form.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { FormItem, FormConfig } from '@/components/form-render/form-render-types' - -export const config: FormConfig = { - layout: 'horizontal', - colon: true, - hideRequiredMark: false, - labelAlign: 'right', - scrollToFirstError: false, - validateOnRuleChange: true, - labelCol: { - span: 4, - offset: 0, - }, -} - -export const formItems: FormItem[] = [ - { - type: 'divider', - group: 'auxiliary', - properties: { - showText: true, - type: 'horizontal', - orientation: 'left', - text: '工位信息', - }, - }, - { - group: 'form', - type: 'input', - config: { - autoLink: true, - hasFeedback: false, - label: '工位名称', - name: 'name', - required: true, - }, - properties: { - size: 'default', - type: 'text', - allowClear: true, - bordered: true, - showCount: true, - placeholder: '请输入工位名称', - }, - rules: [], - }, - { - type: 'divider', - group: 'auxiliary', - properties: { - showText: true, - type: 'horizontal', - orientation: 'left', - text: '工位参数', - }, - }, - { - type: 'input-number', - group: 'form', - config: { - autoLink: true, - hasFeedback: false, - label: '待机电流', - name: 'standby', - required: true, - }, - properties: { - size: 'default', - controls: true, - placeholder: '请输入待机电流', - precision: 2, - step: 0.01, - addonAfter: 'A', - decimalSeparator: '', - }, - rules: [], - }, - { - type: 'input-number', - group: 'form', - config: { - autoLink: true, - hasFeedback: false, - label: '工作电流', - name: 'working', - required: true, - }, - properties: { - size: 'default', - controls: true, - placeholder: '请输入工作电流', - precision: 2, - step: 0.01, - addonAfter: 'A', - }, - rules: [], - }, - { - type: 'input-number', - group: 'form', - config: { - autoLink: true, - hasFeedback: false, - label: '工作间歇', - name: 'maxGap', - required: true, - }, - properties: { - size: 'default', - controls: true, - placeholder: '请输入最大工作间隙时长', - min: 15, - step: 1, - prefix: '', - addonAfter: '秒', - }, - rules: [], - }, -] diff --git a/src/views/admin/station/station-charts.vue b/src/views/admin/station/station-charts.vue deleted file mode 100644 index 6fcb6e5..0000000 --- a/src/views/admin/station/station-charts.vue +++ /dev/null @@ -1,255 +0,0 @@ - - - - - diff --git a/src/views/admin/station/station-detail.vue b/src/views/admin/station/station-detail.vue deleted file mode 100644 index d2e3680..0000000 --- a/src/views/admin/station/station-detail.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - diff --git a/src/views/admin/station/station-page.vue b/src/views/admin/station/station-page.vue deleted file mode 100644 index c874229..0000000 --- a/src/views/admin/station/station-page.vue +++ /dev/null @@ -1,314 +0,0 @@ - - - diff --git a/src/views/admin/station/station-power-log.vue b/src/views/admin/station/station-power-log.vue deleted file mode 100644 index 95ff64e..0000000 --- a/src/views/admin/station/station-power-log.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - diff --git a/src/views/admin/station/station-working-log.vue b/src/views/admin/station/station-working-log.vue deleted file mode 100644 index ae70ee2..0000000 --- a/src/views/admin/station/station-working-log.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - diff --git a/src/views/admin/team/form.ts b/src/views/admin/team/form.ts deleted file mode 100644 index 497d784..0000000 --- a/src/views/admin/team/form.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { FormItem, FormConfig } from '@/components/form-render/form-render-types' - -export const config: FormConfig = { - layout: 'horizontal', - colon: true, - hideRequiredMark: false, - labelAlign: 'right', - scrollToFirstError: false, - validateOnRuleChange: true, - labelCol: { - span: 4, - offset: 0, - }, -} - -export const formItems: FormItem[] = [ - { - group: 'form', - type: 'input', - config: { - autoLink: true, - hasFeedback: false, - label: '班组名称', - name: 'name', - required: true, - }, - properties: { - size: 'default', - type: 'text', - allowClear: false, - bordered: true, - showCount: false, - placeholder: '请填写班组名称', - }, - rules: [], - }, - { - type: 'time-picker', - group: 'form', - config: { - autoLink: true, - hasFeedback: false, - label: '开始时间', - name: 'start', - required: true, - help: '', - }, - properties: { - size: 'default', - valueFormat: 'HH:mm:ss', - }, - rules: [], - }, - { - type: 'time-picker', - group: 'form', - config: { - autoLink: true, - hasFeedback: false, - label: '结束时间', - name: 'end', - required: true, - }, - properties: { - size: 'default', - valueFormat: 'HH:mm:ss', - }, - rules: [], - }, -] diff --git a/src/views/admin/team/team-page.vue b/src/views/admin/team/team-page.vue deleted file mode 100644 index 16d9e4c..0000000 --- a/src/views/admin/team/team-page.vue +++ /dev/null @@ -1,172 +0,0 @@ - - - diff --git a/src/views/dashboard/dashboard-page.vue b/src/views/dashboard/dashboard-page.vue deleted file mode 100644 index 923c8ac..0000000 --- a/src/views/dashboard/dashboard-page.vue +++ /dev/null @@ -1,223 +0,0 @@ - - - - diff --git a/src/views/dashboard/station-card.vue b/src/views/dashboard/station-card.vue deleted file mode 100644 index ad63168..0000000 --- a/src/views/dashboard/station-card.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - - diff --git a/src/views/stock/component/apply-page.vue b/src/views/stock/component/apply-page.vue index 1f07657..48986f7 100644 --- a/src/views/stock/component/apply-page.vue +++ b/src/views/stock/component/apply-page.vue @@ -51,7 +51,7 @@ const props = defineProps({ const { pageType } = toRefs(props) const searchKey = ref('') -const pagedata = ref>() +const pagedata = ref>() const loading = ref(false) @@ -59,9 +59,16 @@ const loading = ref(false) // 加载数据的方法 const loadData = async (page = 1, size = 10) => { loading.value = true - api.materialApi.apply.applies( + api.materialApi.apply.searchPage( //1: 采购入库 2: 归还入库 3: 出库外借 - { type: 1, page: page || pagedata.value?.current, size: size || pagedata.value?.size, key: searchKey.value }, + { + applyType: 1, + page: page || pagedata.value?.current, + size: size || pagedata.value?.size, + type: searchKey.value, + code: searchKey.value, + name: searchKey.value + }, (data) => { loading.value = false pagedata.value = data diff --git a/src/views/stock/component/applyForm.vue b/src/views/stock/component/applyForm.vue index 4e903be..7e4d702 100644 --- a/src/views/stock/component/applyForm.vue +++ b/src/views/stock/component/applyForm.vue @@ -70,7 +70,7 @@ const props = defineProps( } } // 申请类型 applyType页面传值的使用1和2,1: 采购入库 和 归还入库 2: 出库外借 ) -const getTableData = () => { +const getTableData = ()=> { const $table = tableRef.value return $table?.getTableData().fullData; } @@ -103,7 +103,7 @@ const formData = ref({ // vxe-table相关的设置 -interface RowVO { +export interface RowVO { id: number name: string code: string @@ -112,7 +112,7 @@ interface RowVO { quantity: number disabled: boolean checked: boolean - assignRule: number + assignRule: string } const tableRef = ref>() // vxe-table 数据结果 @@ -145,7 +145,7 @@ const insertEvent = (value: any) => { spec: m.spec ? m.spec : '未知', type: m.type ? m.type : '未知', quantity: 1, - assignRule: m.assignRule ? m.assignRule : 1, + assignRule: m.assignRule ? m.assignRule : 'HIGH_VALUE', disabled: false, checked: false } diff --git a/src/views/stock/component/applyModal.vue b/src/views/stock/component/applyModal.vue index dca17e6..0940be0 100644 --- a/src/views/stock/component/applyModal.vue +++ b/src/views/stock/component/applyModal.vue @@ -30,12 +30,11 @@