diff --git a/src/api/eqpt/measurementPlan/paln.ts b/src/api/eqpt/measurementPlan/paln.ts index 395aa22..f28c108 100644 --- a/src/api/eqpt/measurementPlan/paln.ts +++ b/src/api/eqpt/measurementPlan/paln.ts @@ -1,6 +1,7 @@ /** * 计量计划接口 */ +import qs from 'qs' import request from '@/api/index' // 计量计划列表-(不同状态) @@ -108,6 +109,15 @@ }, }) } +export function getInfoListTogetherStatus(id: string) { + return request({ + url: '/plan/equipmentStatusAggr', + params: { + planId: id, + }, + }) +} + // 获取展开数据 export function getInfoList(id: string, name: string) { return request({ @@ -126,3 +136,31 @@ method: 'post', }) } +// 生成年度汇总 +export function getSummary(data: any) { + return request({ + url: '/plan/getSummary', + method: 'post', + data, + }) +} +// 展开年度汇总 +export function expandSummary(data: any) { + return request({ + url: '/plan/summaryRelationList', + method: 'get', + params: data, + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, + }) +} +// 导出年度汇总 +export function exportSummary(data: any) { + return request({ + url: '/plan/exportSummary', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/api/eqpt/measurementPlan/paln.ts b/src/api/eqpt/measurementPlan/paln.ts index 395aa22..f28c108 100644 --- a/src/api/eqpt/measurementPlan/paln.ts +++ b/src/api/eqpt/measurementPlan/paln.ts @@ -1,6 +1,7 @@ /** * 计量计划接口 */ +import qs from 'qs' import request from '@/api/index' // 计量计划列表-(不同状态) @@ -108,6 +109,15 @@ }, }) } +export function getInfoListTogetherStatus(id: string) { + return request({ + url: '/plan/equipmentStatusAggr', + params: { + planId: id, + }, + }) +} + // 获取展开数据 export function getInfoList(id: string, name: string) { return request({ @@ -126,3 +136,31 @@ method: 'post', }) } +// 生成年度汇总 +export function getSummary(data: any) { + return request({ + url: '/plan/getSummary', + method: 'post', + data, + }) +} +// 展开年度汇总 +export function expandSummary(data: any) { + return request({ + url: '/plan/summaryRelationList', + method: 'get', + params: data, + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, + }) +} +// 导出年度汇总 +export function exportSummary(data: any) { + return request({ + url: '/plan/exportSummary', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/router/index.ts b/src/router/index.ts index a751837..a8fb59f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,7 +11,7 @@ import useMenuStore from '@/store/modules/menu' import useRouteStore from '@/store/modules/route' import { queryString, stripscript } from '@/utils/validate' - +import { handlerPro } from '@/views/fresh' const { isLoading } = useNProgress() const router = createRouter({ @@ -20,9 +20,7 @@ }) router.beforeEach(async (to, from, next) => { - if (to.name === 'notFound') { - next('/index') - } + handlerPro(to, next) const settingsStore = useSettingsStore() const userStore = useUserStore() const menuStore = useMenuStore() diff --git a/src/api/eqpt/measurementPlan/paln.ts b/src/api/eqpt/measurementPlan/paln.ts index 395aa22..f28c108 100644 --- a/src/api/eqpt/measurementPlan/paln.ts +++ b/src/api/eqpt/measurementPlan/paln.ts @@ -1,6 +1,7 @@ /** * 计量计划接口 */ +import qs from 'qs' import request from '@/api/index' // 计量计划列表-(不同状态) @@ -108,6 +109,15 @@ }, }) } +export function getInfoListTogetherStatus(id: string) { + return request({ + url: '/plan/equipmentStatusAggr', + params: { + planId: id, + }, + }) +} + // 获取展开数据 export function getInfoList(id: string, name: string) { return request({ @@ -126,3 +136,31 @@ method: 'post', }) } +// 生成年度汇总 +export function getSummary(data: any) { + return request({ + url: '/plan/getSummary', + method: 'post', + data, + }) +} +// 展开年度汇总 +export function expandSummary(data: any) { + return request({ + url: '/plan/summaryRelationList', + method: 'get', + params: data, + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, + }) +} +// 导出年度汇总 +export function exportSummary(data: any) { + return request({ + url: '/plan/exportSummary', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/router/index.ts b/src/router/index.ts index a751837..a8fb59f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,7 +11,7 @@ import useMenuStore from '@/store/modules/menu' import useRouteStore from '@/store/modules/route' import { queryString, stripscript } from '@/utils/validate' - +import { handlerPro } from '@/views/fresh' const { isLoading } = useNProgress() const router = createRouter({ @@ -20,9 +20,7 @@ }) router.beforeEach(async (to, from, next) => { - if (to.name === 'notFound') { - next('/index') - } + handlerPro(to, next) const settingsStore = useSettingsStore() const userStore = useUserStore() const menuStore = useMenuStore() diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index 8b37e75..536d8e4 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -104,6 +104,18 @@ activeMenu: '/planlist', }, }, + { + path: '/plan/summary', + name: 'PlanSummary', + component: () => import('@/views/tested/MeasurementPlan/plan/components/summary.vue'), + meta: { + title: '计量计划汇总', + auth: '/tested/metering/plan', + sidebar: false, + breadcrumb: false, + activeMenu: '/planlist', + }, + }, ], }, { @@ -180,129 +192,129 @@ }, ], }, - { - path: '/meteringdelay', - component: Layout, - redirect: '/delaypage', - name: 'MeteringDelay', - meta: { - title: '延迟送检申请', - icon: 'ep:key', - auth: '/tested/metering/delay', - }, - children: [ - { - path: '/delaypage', - name: 'DelayPage', - component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'), - meta: { - title: '延迟送检申请', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - { - path: '/delay/:type', - name: 'DealyEdit', - component: () => import('@/views/tested/MeasurementPlan/early/components/edit.vue'), - meta: { - title: '延迟送检编辑', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - { - path: '/delay/detail', - name: 'DealyDetail', - component: () => import('@/views/tested/MeasurementPlan/early/components/detail.vue'), - meta: { - title: '延迟送检详情', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - ], - }, - { - path: '/meteringcurator', - component: Layout, - redirect: '/curatorpage', - name: 'MeteringCurator', - meta: { - title: '负责人送检通知', - icon: 'ep:key', - auth: '/tested/metering/curator', - }, - children: [ - { - path: '/curatorpage', - name: 'CuratorPage', - component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'), - meta: { - title: '负责人送检通知', - auth: '/tested/metering/curator', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringcurator', - }, - }, - { - path: '/curatorpage/:type', - name: 'MeteringdetEdit', - component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), - meta: { - title: '负责人送检通知编辑', - auth: '/tested/metering/curator', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringcurator', - }, - }, - ], - }, - { - path: '/meteringdept', - component: Layout, - redirect: '/deptpage', - name: 'MeteringDept', - meta: { - title: '部门送检通知', - icon: 'ep:key', - auth: '/tested/metering/dept', - }, - children: [ - { - path: '/deptpage', - name: 'DeptPage', - component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'), - meta: { - title: '部门送检通知', - auth: '/tested/metering/dept', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdept', - }, - }, - { - path: '/meteringdept/:type', - name: 'MeteringdetEdit', - component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), - meta: { - title: '部门送检通知编辑', - auth: '/tested/metering/dept', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdept', - }, - }, - ], - }, + // { + // path: '/meteringdelay', + // component: Layout, + // redirect: '/delaypage', + // name: 'MeteringDelay', + // meta: { + // title: '延迟送检申请', + // icon: 'ep:key', + // auth: '/tested/metering/delay', + // }, + // children: [ + // { + // path: '/delaypage', + // name: 'DelayPage', + // component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'), + // meta: { + // title: '延迟送检申请', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // { + // path: '/delay/:type', + // name: 'DealyEdit', + // component: () => import('@/views/tested/MeasurementPlan/early/components/edit.vue'), + // meta: { + // title: '延迟送检编辑', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // { + // path: '/delay/detail', + // name: 'DealyDetail', + // component: () => import('@/views/tested/MeasurementPlan/early/components/detail.vue'), + // meta: { + // title: '延迟送检详情', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // ], + // }, + // { + // path: '/meteringcurator', + // component: Layout, + // redirect: '/curatorpage', + // name: 'MeteringCurator', + // meta: { + // title: '负责人送检通知', + // icon: 'ep:key', + // auth: '/tested/metering/curator', + // }, + // children: [ + // { + // path: '/curatorpage', + // name: 'CuratorPage', + // component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'), + // meta: { + // title: '负责人送检通知', + // auth: '/tested/metering/curator', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringcurator', + // }, + // }, + // { + // path: '/curatorpage/:type', + // name: 'MeteringdetEdit', + // component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), + // meta: { + // title: '负责人送检通知编辑', + // auth: '/tested/metering/curator', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringcurator', + // }, + // }, + // ], + // }, + // { + // path: '/meteringdept', + // component: Layout, + // redirect: '/deptpage', + // name: 'MeteringDept', + // meta: { + // title: '部门送检通知', + // icon: 'ep:key', + // auth: '/tested/metering/dept', + // }, + // children: [ + // { + // path: '/deptpage', + // name: 'DeptPage', + // component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'), + // meta: { + // title: '部门送检通知', + // auth: '/tested/metering/dept', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdept', + // }, + // }, + // { + // path: '/meteringdept/:type', + // name: 'MeteringdetEdit', + // component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), + // meta: { + // title: '部门送检通知编辑', + // auth: '/tested/metering/dept', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdept', + // }, + // }, + // ], + // }, { path: '/meteringtask', component: Layout, diff --git a/src/api/eqpt/measurementPlan/paln.ts b/src/api/eqpt/measurementPlan/paln.ts index 395aa22..f28c108 100644 --- a/src/api/eqpt/measurementPlan/paln.ts +++ b/src/api/eqpt/measurementPlan/paln.ts @@ -1,6 +1,7 @@ /** * 计量计划接口 */ +import qs from 'qs' import request from '@/api/index' // 计量计划列表-(不同状态) @@ -108,6 +109,15 @@ }, }) } +export function getInfoListTogetherStatus(id: string) { + return request({ + url: '/plan/equipmentStatusAggr', + params: { + planId: id, + }, + }) +} + // 获取展开数据 export function getInfoList(id: string, name: string) { return request({ @@ -126,3 +136,31 @@ method: 'post', }) } +// 生成年度汇总 +export function getSummary(data: any) { + return request({ + url: '/plan/getSummary', + method: 'post', + data, + }) +} +// 展开年度汇总 +export function expandSummary(data: any) { + return request({ + url: '/plan/summaryRelationList', + method: 'get', + params: data, + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, + }) +} +// 导出年度汇总 +export function exportSummary(data: any) { + return request({ + url: '/plan/exportSummary', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/router/index.ts b/src/router/index.ts index a751837..a8fb59f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,7 +11,7 @@ import useMenuStore from '@/store/modules/menu' import useRouteStore from '@/store/modules/route' import { queryString, stripscript } from '@/utils/validate' - +import { handlerPro } from '@/views/fresh' const { isLoading } = useNProgress() const router = createRouter({ @@ -20,9 +20,7 @@ }) router.beforeEach(async (to, from, next) => { - if (to.name === 'notFound') { - next('/index') - } + handlerPro(to, next) const settingsStore = useSettingsStore() const userStore = useUserStore() const menuStore = useMenuStore() diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index 8b37e75..536d8e4 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -104,6 +104,18 @@ activeMenu: '/planlist', }, }, + { + path: '/plan/summary', + name: 'PlanSummary', + component: () => import('@/views/tested/MeasurementPlan/plan/components/summary.vue'), + meta: { + title: '计量计划汇总', + auth: '/tested/metering/plan', + sidebar: false, + breadcrumb: false, + activeMenu: '/planlist', + }, + }, ], }, { @@ -180,129 +192,129 @@ }, ], }, - { - path: '/meteringdelay', - component: Layout, - redirect: '/delaypage', - name: 'MeteringDelay', - meta: { - title: '延迟送检申请', - icon: 'ep:key', - auth: '/tested/metering/delay', - }, - children: [ - { - path: '/delaypage', - name: 'DelayPage', - component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'), - meta: { - title: '延迟送检申请', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - { - path: '/delay/:type', - name: 'DealyEdit', - component: () => import('@/views/tested/MeasurementPlan/early/components/edit.vue'), - meta: { - title: '延迟送检编辑', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - { - path: '/delay/detail', - name: 'DealyDetail', - component: () => import('@/views/tested/MeasurementPlan/early/components/detail.vue'), - meta: { - title: '延迟送检详情', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - ], - }, - { - path: '/meteringcurator', - component: Layout, - redirect: '/curatorpage', - name: 'MeteringCurator', - meta: { - title: '负责人送检通知', - icon: 'ep:key', - auth: '/tested/metering/curator', - }, - children: [ - { - path: '/curatorpage', - name: 'CuratorPage', - component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'), - meta: { - title: '负责人送检通知', - auth: '/tested/metering/curator', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringcurator', - }, - }, - { - path: '/curatorpage/:type', - name: 'MeteringdetEdit', - component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), - meta: { - title: '负责人送检通知编辑', - auth: '/tested/metering/curator', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringcurator', - }, - }, - ], - }, - { - path: '/meteringdept', - component: Layout, - redirect: '/deptpage', - name: 'MeteringDept', - meta: { - title: '部门送检通知', - icon: 'ep:key', - auth: '/tested/metering/dept', - }, - children: [ - { - path: '/deptpage', - name: 'DeptPage', - component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'), - meta: { - title: '部门送检通知', - auth: '/tested/metering/dept', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdept', - }, - }, - { - path: '/meteringdept/:type', - name: 'MeteringdetEdit', - component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), - meta: { - title: '部门送检通知编辑', - auth: '/tested/metering/dept', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdept', - }, - }, - ], - }, + // { + // path: '/meteringdelay', + // component: Layout, + // redirect: '/delaypage', + // name: 'MeteringDelay', + // meta: { + // title: '延迟送检申请', + // icon: 'ep:key', + // auth: '/tested/metering/delay', + // }, + // children: [ + // { + // path: '/delaypage', + // name: 'DelayPage', + // component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'), + // meta: { + // title: '延迟送检申请', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // { + // path: '/delay/:type', + // name: 'DealyEdit', + // component: () => import('@/views/tested/MeasurementPlan/early/components/edit.vue'), + // meta: { + // title: '延迟送检编辑', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // { + // path: '/delay/detail', + // name: 'DealyDetail', + // component: () => import('@/views/tested/MeasurementPlan/early/components/detail.vue'), + // meta: { + // title: '延迟送检详情', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // ], + // }, + // { + // path: '/meteringcurator', + // component: Layout, + // redirect: '/curatorpage', + // name: 'MeteringCurator', + // meta: { + // title: '负责人送检通知', + // icon: 'ep:key', + // auth: '/tested/metering/curator', + // }, + // children: [ + // { + // path: '/curatorpage', + // name: 'CuratorPage', + // component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'), + // meta: { + // title: '负责人送检通知', + // auth: '/tested/metering/curator', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringcurator', + // }, + // }, + // { + // path: '/curatorpage/:type', + // name: 'MeteringdetEdit', + // component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), + // meta: { + // title: '负责人送检通知编辑', + // auth: '/tested/metering/curator', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringcurator', + // }, + // }, + // ], + // }, + // { + // path: '/meteringdept', + // component: Layout, + // redirect: '/deptpage', + // name: 'MeteringDept', + // meta: { + // title: '部门送检通知', + // icon: 'ep:key', + // auth: '/tested/metering/dept', + // }, + // children: [ + // { + // path: '/deptpage', + // name: 'DeptPage', + // component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'), + // meta: { + // title: '部门送检通知', + // auth: '/tested/metering/dept', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdept', + // }, + // }, + // { + // path: '/meteringdept/:type', + // name: 'MeteringdetEdit', + // component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), + // meta: { + // title: '部门送检通知编辑', + // auth: '/tested/metering/dept', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdept', + // }, + // }, + // ], + // }, { path: '/meteringtask', component: Layout, diff --git a/src/views/fresh.ts b/src/views/fresh.ts new file mode 100644 index 0000000..1aa0d21 --- /dev/null +++ b/src/views/fresh.ts @@ -0,0 +1,39 @@ +const status = 'notFound-404' +// 刷新标识 +export const setFresh = () => { + if (localStorage.getItem(status)) { + localStorage.setItem(status, (Number(localStorage.getItem(status)) + 1).toString()) + } + else { + localStorage.setItem(status, '1') + } +} +// 清空 +export const clearFresh = () => { + if (localStorage.getItem(status)) { + localStorage.removeItem(status) + } +} +// 获取 +export const getFresh = () => { + if (localStorage.getItem(status)) { + return Number(localStorage.getItem(status)) + } + else { + return 0 + } +} +// 逻辑函数 +export const handlerPro = (route: any, agree: any) => { + if (route.name === 'notFound') { + setFresh() + agree('/index') + if (getFresh() >= 2) { + clearFresh() + location.reload() + } + } + else { + clearFresh() + } +} diff --git a/src/api/eqpt/measurementPlan/paln.ts b/src/api/eqpt/measurementPlan/paln.ts index 395aa22..f28c108 100644 --- a/src/api/eqpt/measurementPlan/paln.ts +++ b/src/api/eqpt/measurementPlan/paln.ts @@ -1,6 +1,7 @@ /** * 计量计划接口 */ +import qs from 'qs' import request from '@/api/index' // 计量计划列表-(不同状态) @@ -108,6 +109,15 @@ }, }) } +export function getInfoListTogetherStatus(id: string) { + return request({ + url: '/plan/equipmentStatusAggr', + params: { + planId: id, + }, + }) +} + // 获取展开数据 export function getInfoList(id: string, name: string) { return request({ @@ -126,3 +136,31 @@ method: 'post', }) } +// 生成年度汇总 +export function getSummary(data: any) { + return request({ + url: '/plan/getSummary', + method: 'post', + data, + }) +} +// 展开年度汇总 +export function expandSummary(data: any) { + return request({ + url: '/plan/summaryRelationList', + method: 'get', + params: data, + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, + }) +} +// 导出年度汇总 +export function exportSummary(data: any) { + return request({ + url: '/plan/exportSummary', + method: 'post', + data, + responseType: 'blob', + }) +} diff --git a/src/router/index.ts b/src/router/index.ts index a751837..a8fb59f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,7 +11,7 @@ import useMenuStore from '@/store/modules/menu' import useRouteStore from '@/store/modules/route' import { queryString, stripscript } from '@/utils/validate' - +import { handlerPro } from '@/views/fresh' const { isLoading } = useNProgress() const router = createRouter({ @@ -20,9 +20,7 @@ }) router.beforeEach(async (to, from, next) => { - if (to.name === 'notFound') { - next('/index') - } + handlerPro(to, next) const settingsStore = useSettingsStore() const userStore = useUserStore() const menuStore = useMenuStore() diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index 8b37e75..536d8e4 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -104,6 +104,18 @@ activeMenu: '/planlist', }, }, + { + path: '/plan/summary', + name: 'PlanSummary', + component: () => import('@/views/tested/MeasurementPlan/plan/components/summary.vue'), + meta: { + title: '计量计划汇总', + auth: '/tested/metering/plan', + sidebar: false, + breadcrumb: false, + activeMenu: '/planlist', + }, + }, ], }, { @@ -180,129 +192,129 @@ }, ], }, - { - path: '/meteringdelay', - component: Layout, - redirect: '/delaypage', - name: 'MeteringDelay', - meta: { - title: '延迟送检申请', - icon: 'ep:key', - auth: '/tested/metering/delay', - }, - children: [ - { - path: '/delaypage', - name: 'DelayPage', - component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'), - meta: { - title: '延迟送检申请', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - { - path: '/delay/:type', - name: 'DealyEdit', - component: () => import('@/views/tested/MeasurementPlan/early/components/edit.vue'), - meta: { - title: '延迟送检编辑', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - { - path: '/delay/detail', - name: 'DealyDetail', - component: () => import('@/views/tested/MeasurementPlan/early/components/detail.vue'), - meta: { - title: '延迟送检详情', - auth: '/tested/metering/delay', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdelay', - }, - }, - ], - }, - { - path: '/meteringcurator', - component: Layout, - redirect: '/curatorpage', - name: 'MeteringCurator', - meta: { - title: '负责人送检通知', - icon: 'ep:key', - auth: '/tested/metering/curator', - }, - children: [ - { - path: '/curatorpage', - name: 'CuratorPage', - component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'), - meta: { - title: '负责人送检通知', - auth: '/tested/metering/curator', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringcurator', - }, - }, - { - path: '/curatorpage/:type', - name: 'MeteringdetEdit', - component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), - meta: { - title: '负责人送检通知编辑', - auth: '/tested/metering/curator', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringcurator', - }, - }, - ], - }, - { - path: '/meteringdept', - component: Layout, - redirect: '/deptpage', - name: 'MeteringDept', - meta: { - title: '部门送检通知', - icon: 'ep:key', - auth: '/tested/metering/dept', - }, - children: [ - { - path: '/deptpage', - name: 'DeptPage', - component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'), - meta: { - title: '部门送检通知', - auth: '/tested/metering/dept', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdept', - }, - }, - { - path: '/meteringdept/:type', - name: 'MeteringdetEdit', - component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), - meta: { - title: '部门送检通知编辑', - auth: '/tested/metering/dept', - sidebar: false, - breadcrumb: false, - activeMenu: '/meteringdept', - }, - }, - ], - }, + // { + // path: '/meteringdelay', + // component: Layout, + // redirect: '/delaypage', + // name: 'MeteringDelay', + // meta: { + // title: '延迟送检申请', + // icon: 'ep:key', + // auth: '/tested/metering/delay', + // }, + // children: [ + // { + // path: '/delaypage', + // name: 'DelayPage', + // component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'), + // meta: { + // title: '延迟送检申请', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // { + // path: '/delay/:type', + // name: 'DealyEdit', + // component: () => import('@/views/tested/MeasurementPlan/early/components/edit.vue'), + // meta: { + // title: '延迟送检编辑', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // { + // path: '/delay/detail', + // name: 'DealyDetail', + // component: () => import('@/views/tested/MeasurementPlan/early/components/detail.vue'), + // meta: { + // title: '延迟送检详情', + // auth: '/tested/metering/delay', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdelay', + // }, + // }, + // ], + // }, + // { + // path: '/meteringcurator', + // component: Layout, + // redirect: '/curatorpage', + // name: 'MeteringCurator', + // meta: { + // title: '负责人送检通知', + // icon: 'ep:key', + // auth: '/tested/metering/curator', + // }, + // children: [ + // { + // path: '/curatorpage', + // name: 'CuratorPage', + // component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'), + // meta: { + // title: '负责人送检通知', + // auth: '/tested/metering/curator', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringcurator', + // }, + // }, + // { + // path: '/curatorpage/:type', + // name: 'MeteringdetEdit', + // component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), + // meta: { + // title: '负责人送检通知编辑', + // auth: '/tested/metering/curator', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringcurator', + // }, + // }, + // ], + // }, + // { + // path: '/meteringdept', + // component: Layout, + // redirect: '/deptpage', + // name: 'MeteringDept', + // meta: { + // title: '部门送检通知', + // icon: 'ep:key', + // auth: '/tested/metering/dept', + // }, + // children: [ + // { + // path: '/deptpage', + // name: 'DeptPage', + // component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'), + // meta: { + // title: '部门送检通知', + // auth: '/tested/metering/dept', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdept', + // }, + // }, + // { + // path: '/meteringdept/:type', + // name: 'MeteringdetEdit', + // component: () => import('@/views/tested/MeasurementPlan/dept/components/edit.vue'), + // meta: { + // title: '部门送检通知编辑', + // auth: '/tested/metering/dept', + // sidebar: false, + // breadcrumb: false, + // activeMenu: '/meteringdept', + // }, + // }, + // ], + // }, { path: '/meteringtask', component: Layout, diff --git a/src/views/fresh.ts b/src/views/fresh.ts new file mode 100644 index 0000000..1aa0d21 --- /dev/null +++ b/src/views/fresh.ts @@ -0,0 +1,39 @@ +const status = 'notFound-404' +// 刷新标识 +export const setFresh = () => { + if (localStorage.getItem(status)) { + localStorage.setItem(status, (Number(localStorage.getItem(status)) + 1).toString()) + } + else { + localStorage.setItem(status, '1') + } +} +// 清空 +export const clearFresh = () => { + if (localStorage.getItem(status)) { + localStorage.removeItem(status) + } +} +// 获取 +export const getFresh = () => { + if (localStorage.getItem(status)) { + return Number(localStorage.getItem(status)) + } + else { + return 0 + } +} +// 逻辑函数 +export const handlerPro = (route: any, agree: any) => { + if (route.name === 'notFound') { + setFresh() + agree('/index') + if (getFresh() >= 2) { + clearFresh() + location.reload() + } + } + else { + clearFresh() + } +} diff --git a/src/views/tested/MeasurementPlan/plan/components/dataList.vue b/src/views/tested/MeasurementPlan/plan/components/dataList.vue index f5db816..a092483 100644 --- a/src/views/tested/MeasurementPlan/plan/components/dataList.vue +++ b/src/views/tested/MeasurementPlan/plan/components/dataList.vue @@ -1,16 +1,27 @@