diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 0719c75..be90c53 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,5 +1,8 @@ import type { DeptTreeNode } from '@/views/system/dept/dept-interface' +interface approvalStatus { + [key: string]: string +} const useDictStore = defineStore( 'dict', { @@ -14,7 +17,7 @@ 已通过: '4', 未通过: '5', 已取消: '6', - }, // 审批状态 + } as approvalStatus, // 审批状态 }), getters: { getAllDeptList: (state) => { diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 0719c75..be90c53 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,5 +1,8 @@ import type { DeptTreeNode } from '@/views/system/dept/dept-interface' +interface approvalStatus { + [key: string]: string +} const useDictStore = defineStore( 'dict', { @@ -14,7 +17,7 @@ 已通过: '4', 未通过: '5', 已取消: '6', - }, // 审批状态 + } as approvalStatus, // 审批状态 }), getters: { getAllDeptList: (state) => { diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index 13291b2..0f8a9d5 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -78,7 +78,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 0, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -237,7 +237,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 12, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -487,7 +487,7 @@ - + diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 0719c75..be90c53 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,5 +1,8 @@ import type { DeptTreeNode } from '@/views/system/dept/dept-interface' +interface approvalStatus { + [key: string]: string +} const useDictStore = defineStore( 'dict', { @@ -14,7 +17,7 @@ 已通过: '4', 未通过: '5', 已取消: '6', - }, // 审批状态 + } as approvalStatus, // 审批状态 }), getters: { getAllDeptList: (state) => { diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index 13291b2..0f8a9d5 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -78,7 +78,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 0, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -237,7 +237,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 12, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -487,7 +487,7 @@ - + diff --git a/src/views/device/standingBook/components/templateAdd.vue b/src/views/device/standingBook/components/templateAdd.vue index e070af0..ff7153c 100644 --- a/src/views/device/standingBook/components/templateAdd.vue +++ b/src/views/device/standingBook/components/templateAdd.vue @@ -40,6 +40,12 @@ // 获取资产详情 function getInfo() { assetsDetailApi({ id: id.value }).then((res) => { + // 将数据中number转成string + for (var key in res.data) { + if (typeof res.data[key] === 'number') { + res.data[key] = String(res.data[key]) + } + } row.value = res.data }) } diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 0719c75..be90c53 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,5 +1,8 @@ import type { DeptTreeNode } from '@/views/system/dept/dept-interface' +interface approvalStatus { + [key: string]: string +} const useDictStore = defineStore( 'dict', { @@ -14,7 +17,7 @@ 已通过: '4', 未通过: '5', 已取消: '6', - }, // 审批状态 + } as approvalStatus, // 审批状态 }), getters: { getAllDeptList: (state) => { diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index 13291b2..0f8a9d5 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -78,7 +78,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 0, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -237,7 +237,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 12, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -487,7 +487,7 @@ - + diff --git a/src/views/device/standingBook/components/templateAdd.vue b/src/views/device/standingBook/components/templateAdd.vue index e070af0..ff7153c 100644 --- a/src/views/device/standingBook/components/templateAdd.vue +++ b/src/views/device/standingBook/components/templateAdd.vue @@ -40,6 +40,12 @@ // 获取资产详情 function getInfo() { assetsDetailApi({ id: id.value }).then((res) => { + // 将数据中number转成string + for (var key in res.data) { + if (typeof res.data[key] === 'number') { + res.data[key] = String(res.data[key]) + } + } row.value = res.data }) } diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index c7105dc..2d738fc 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -23,6 +23,16 @@ type: String, required: true, }, + // 是否测量设备 + equipmentCategory: { + type: String, + default: '', + }, + // 是否固定资产 + isFixedAssets: { + type: String, + default: '', + }, // 是否是技术指标需要校准检定的设备 isCalibrationTestEquipment: { type: String, @@ -48,18 +58,24 @@ mesureType: '', // 检定方式 managerState: '', // 管理状态 useDept: '', // 使用部门 - assetType: '1', // 资产类型 - isCalibrationTestEquipment: '', // 是否是技术指标需要校准检定的设备 - isMeasureAccount: '', // 是否是技术指标需要校准检定的设备 - isStandardSupportEquipment: '', // 是否是技术指标需要校准检定的设备 + assetType: '', // 资产类型 + equipmentCategory: '', // 测量设备 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 validStartDate: '', // 有效开始日期 validEndDate: '', // 有效结束日期 - abc: '', + abc: null, limit: 20, offset: 1, ids: [] as string[], }) // 查询参数 - +watch(() => searchQuery.abc, (newVal) => { + if (!newVal) { + searchQuery.abc = null + } +}) watch(() => validDate.value, (newVal) => { if (newVal) { searchQuery.validStartDate = newVal[0] @@ -118,6 +134,9 @@ searchQuery.isCalibrationTestEquipment = props.isCalibrationTestEquipment searchQuery.isMeasureAccount = props.isMeasureAccount searchQuery.isStandardSupportEquipment = props.isStandardSupportEquipment + if (props.name === '测量设备') { + searchQuery.equipmentCategory = '1' + } listPageApi(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 0719c75..be90c53 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,5 +1,8 @@ import type { DeptTreeNode } from '@/views/system/dept/dept-interface' +interface approvalStatus { + [key: string]: string +} const useDictStore = defineStore( 'dict', { @@ -14,7 +17,7 @@ 已通过: '4', 未通过: '5', 已取消: '6', - }, // 审批状态 + } as approvalStatus, // 审批状态 }), getters: { getAllDeptList: (state) => { diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index 13291b2..0f8a9d5 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -78,7 +78,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 0, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -237,7 +237,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 12, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -487,7 +487,7 @@ - + diff --git a/src/views/device/standingBook/components/templateAdd.vue b/src/views/device/standingBook/components/templateAdd.vue index e070af0..ff7153c 100644 --- a/src/views/device/standingBook/components/templateAdd.vue +++ b/src/views/device/standingBook/components/templateAdd.vue @@ -40,6 +40,12 @@ // 获取资产详情 function getInfo() { assetsDetailApi({ id: id.value }).then((res) => { + // 将数据中number转成string + for (var key in res.data) { + if (typeof res.data[key] === 'number') { + res.data[key] = String(res.data[key]) + } + } row.value = res.data }) } diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index c7105dc..2d738fc 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -23,6 +23,16 @@ type: String, required: true, }, + // 是否测量设备 + equipmentCategory: { + type: String, + default: '', + }, + // 是否固定资产 + isFixedAssets: { + type: String, + default: '', + }, // 是否是技术指标需要校准检定的设备 isCalibrationTestEquipment: { type: String, @@ -48,18 +58,24 @@ mesureType: '', // 检定方式 managerState: '', // 管理状态 useDept: '', // 使用部门 - assetType: '1', // 资产类型 - isCalibrationTestEquipment: '', // 是否是技术指标需要校准检定的设备 - isMeasureAccount: '', // 是否是技术指标需要校准检定的设备 - isStandardSupportEquipment: '', // 是否是技术指标需要校准检定的设备 + assetType: '', // 资产类型 + equipmentCategory: '', // 测量设备 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 validStartDate: '', // 有效开始日期 validEndDate: '', // 有效结束日期 - abc: '', + abc: null, limit: 20, offset: 1, ids: [] as string[], }) // 查询参数 - +watch(() => searchQuery.abc, (newVal) => { + if (!newVal) { + searchQuery.abc = null + } +}) watch(() => validDate.value, (newVal) => { if (newVal) { searchQuery.validStartDate = newVal[0] @@ -118,6 +134,9 @@ searchQuery.isCalibrationTestEquipment = props.isCalibrationTestEquipment searchQuery.isMeasureAccount = props.isMeasureAccount searchQuery.isStandardSupportEquipment = props.isStandardSupportEquipment + if (props.name === '测量设备') { + searchQuery.equipmentCategory = '1' + } listPageApi(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue index 27892a3..75f49ec 100644 --- a/src/views/device/standingBook/fixedAssets.vue +++ b/src/views/device/standingBook/fixedAssets.vue @@ -18,6 +18,7 @@ limit: 20, offset: 1, ids: [] as string[], + isFixedAssets: '1', }) // 查询参数 const loadingTable = ref(false) // 表格loading const total = ref(0) // 数据总条数 diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index e447f41..8b646b1 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -47,7 +47,7 @@ data, }) } -// 保存数据 +// 保存至草稿箱 export function sourceSave(data: object) { return request({ url: `${prefix}/supplier/save`, @@ -55,6 +55,14 @@ data, }) } +// 更新草稿箱文件 +export function sourceDraftUpdate(data: object) { + return request({ + url: `${prefix}/supplier/draftUpdate`, + method: 'post', + data, + }) +} // 更新数据 export function getSoucreLisUpdate(data: object) { return request({ diff --git a/src/components.d.ts b/src/components.d.ts index f5797b9..a40e715 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -27,8 +27,6 @@ DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] - EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] - EmployeesRoleDialog: typeof import('./components/dialog/employeesRoleDialog.vue')['default'] ErrorDialog: typeof import('./components/dialog/errorDialog.vue')['default'] FileUpload: typeof import('./components/FileUpload/index.vue')['default'] FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default'] @@ -46,7 +44,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RoleDialog: typeof import('./components/dialog/roleDialog.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] diff --git a/src/router/index.ts b/src/router/index.ts index 3af58ea..6b9ba93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -136,7 +136,8 @@ to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title) // 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态 if (to.meta.cache) { - const componentName = to.matched.at(-1)?.components?.default.name + const componentName = to.matched[to.matched.length - 1].components?.default.name + // debugger if (componentName) { keepAliveStore.add(componentName) } @@ -146,7 +147,7 @@ } // 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息 if (from.meta.cache) { - const componentName = from.matched.at(-1)?.components?.default.name + const componentName = from.matched[to.matched.length - 1].components?.default.name if (componentName) { // 通过 meta.cache 判断针对哪些页面进行缓存 switch (typeof from.meta.cache) { diff --git a/src/router/modules/customer.ts b/src/router/modules/customer.ts index 88c0f5d..d470c49 100644 --- a/src/router/modules/customer.ts +++ b/src/router/modules/customer.ts @@ -65,7 +65,7 @@ path: '/customerManage', component: Layout, redirect: '/customerManage/list', - name: 'MeasureSource', + name: 'Customer', meta: { title: '客户管理', icon: 'ep:key', diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index 855c6fa..4e41e86 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -390,7 +390,7 @@ children: [ { path: 'list', - name: 'measureSourceList', + name: 'MeasureSourceList', component: () => import('@/views/measure/source/list.vue'), meta: { title: '溯源供方列表', @@ -418,6 +418,7 @@ title: '溯源供方审批', icon: 'ep:key', auth: '/measure/measureSource/approve', + cache: true, }, }, { diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index 0719c75..be90c53 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -1,5 +1,8 @@ import type { DeptTreeNode } from '@/views/system/dept/dept-interface' +interface approvalStatus { + [key: string]: string +} const useDictStore = defineStore( 'dict', { @@ -14,7 +17,7 @@ 已通过: '4', 未通过: '5', 已取消: '6', - }, // 审批状态 + } as approvalStatus, // 审批状态 }), getters: { getAllDeptList: (state) => { diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index 13291b2..0f8a9d5 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -78,7 +78,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 0, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -237,7 +237,7 @@ uncertainty: '', // 不确定度 usePerson: '', // 使用人 mesureDept: '', // 检定部门 - mesureCycle: 12, // 检定周期 + mesureCycle: 24, // 检定周期 mesureDate: '', // 检定日期 validDate: '', // 有效日期 mesureResult: '', // 检定结果 @@ -487,7 +487,7 @@ - + diff --git a/src/views/device/standingBook/components/templateAdd.vue b/src/views/device/standingBook/components/templateAdd.vue index e070af0..ff7153c 100644 --- a/src/views/device/standingBook/components/templateAdd.vue +++ b/src/views/device/standingBook/components/templateAdd.vue @@ -40,6 +40,12 @@ // 获取资产详情 function getInfo() { assetsDetailApi({ id: id.value }).then((res) => { + // 将数据中number转成string + for (var key in res.data) { + if (typeof res.data[key] === 'number') { + res.data[key] = String(res.data[key]) + } + } row.value = res.data }) } diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index c7105dc..2d738fc 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -23,6 +23,16 @@ type: String, required: true, }, + // 是否测量设备 + equipmentCategory: { + type: String, + default: '', + }, + // 是否固定资产 + isFixedAssets: { + type: String, + default: '', + }, // 是否是技术指标需要校准检定的设备 isCalibrationTestEquipment: { type: String, @@ -48,18 +58,24 @@ mesureType: '', // 检定方式 managerState: '', // 管理状态 useDept: '', // 使用部门 - assetType: '1', // 资产类型 - isCalibrationTestEquipment: '', // 是否是技术指标需要校准检定的设备 - isMeasureAccount: '', // 是否是技术指标需要校准检定的设备 - isStandardSupportEquipment: '', // 是否是技术指标需要校准检定的设备 + assetType: '', // 资产类型 + equipmentCategory: '', // 测量设备 + isCalibrationTestEquipment: '', // 校准/检定设备 + isMeasureAccount: '', // 测量工装 + isStandardSupportEquipment: '', // 标准配套设备 + isFixedAssets: '', // 固定资产 validStartDate: '', // 有效开始日期 validEndDate: '', // 有效结束日期 - abc: '', + abc: null, limit: 20, offset: 1, ids: [] as string[], }) // 查询参数 - +watch(() => searchQuery.abc, (newVal) => { + if (!newVal) { + searchQuery.abc = null + } +}) watch(() => validDate.value, (newVal) => { if (newVal) { searchQuery.validStartDate = newVal[0] @@ -118,6 +134,9 @@ searchQuery.isCalibrationTestEquipment = props.isCalibrationTestEquipment searchQuery.isMeasureAccount = props.isMeasureAccount searchQuery.isStandardSupportEquipment = props.isStandardSupportEquipment + if (props.name === '测量设备') { + searchQuery.equipmentCategory = '1' + } listPageApi(searchQuery).then((res) => { if (res.code === 200) { list.value = res.data.rows diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue index 27892a3..75f49ec 100644 --- a/src/views/device/standingBook/fixedAssets.vue +++ b/src/views/device/standingBook/fixedAssets.vue @@ -18,6 +18,7 @@ limit: 20, offset: 1, ids: [] as string[], + isFixedAssets: '1', }) // 查询参数 const loadingTable = ref(false) // 表格loading const total = ref(0) // 数据总条数 diff --git a/src/views/device/standingBook/measureDevice.vue b/src/views/device/standingBook/measureDevice.vue index dcf37ae..887c39e 100644 --- a/src/views/device/standingBook/measureDevice.vue +++ b/src/views/device/standingBook/measureDevice.vue @@ -5,7 +5,7 @@