diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementPlan/early/components/list.vue b/src/views/tested/MeasurementPlan/early/components/list.vue index 1f64a62..ee1d163 100644 --- a/src/views/tested/MeasurementPlan/early/components/list.vue +++ b/src/views/tested/MeasurementPlan/early/components/list.vue @@ -11,6 +11,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import { getPostList } from '@/api/system/post' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // 申请类型(字典值,提前/延迟) approvalType: { @@ -23,6 +24,9 @@ required: true, }, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.approvalType === '0' ? 'EarlyApplication' : 'DelayApplication') +}) const applyDict = ref<{ [key: string]: string }>({ 审批: '', 草稿箱: '1', diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementPlan/early/components/list.vue b/src/views/tested/MeasurementPlan/early/components/list.vue index 1f64a62..ee1d163 100644 --- a/src/views/tested/MeasurementPlan/early/components/list.vue +++ b/src/views/tested/MeasurementPlan/early/components/list.vue @@ -11,6 +11,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import { getPostList } from '@/api/system/post' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // 申请类型(字典值,提前/延迟) approvalType: { @@ -23,6 +24,9 @@ required: true, }, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.approvalType === '0' ? 'EarlyApplication' : 'DelayApplication') +}) const applyDict = ref<{ [key: string]: string }>({ 审批: '', 草稿箱: '1', diff --git a/src/views/tested/MeasurementPlan/plan/components/list.vue b/src/views/tested/MeasurementPlan/plan/components/list.vue index f5eedcb..d5b57e4 100644 --- a/src/views/tested/MeasurementPlan/plan/components/list.vue +++ b/src/views/tested/MeasurementPlan/plan/components/list.vue @@ -13,6 +13,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import useUserStore from '@/store/modules/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -28,6 +29,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'PlanIndex') +}) const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', // 申请状态(审批列表传) false diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementPlan/early/components/list.vue b/src/views/tested/MeasurementPlan/early/components/list.vue index 1f64a62..ee1d163 100644 --- a/src/views/tested/MeasurementPlan/early/components/list.vue +++ b/src/views/tested/MeasurementPlan/early/components/list.vue @@ -11,6 +11,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import { getPostList } from '@/api/system/post' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // 申请类型(字典值,提前/延迟) approvalType: { @@ -23,6 +24,9 @@ required: true, }, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.approvalType === '0' ? 'EarlyApplication' : 'DelayApplication') +}) const applyDict = ref<{ [key: string]: string }>({ 审批: '', 草稿箱: '1', diff --git a/src/views/tested/MeasurementPlan/plan/components/list.vue b/src/views/tested/MeasurementPlan/plan/components/list.vue index f5eedcb..d5b57e4 100644 --- a/src/views/tested/MeasurementPlan/plan/components/list.vue +++ b/src/views/tested/MeasurementPlan/plan/components/list.vue @@ -13,6 +13,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import useUserStore from '@/store/modules/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -28,6 +29,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'PlanIndex') +}) const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', // 申请状态(审批列表传) false diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 9c2f2d9..86b6bd2 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -54,6 +54,7 @@ isOnSiteCheck: '0', onSiteCheckTime: '', deptId: '', + orderStatusName: '', }) // 表单 const checkPhone = (rule: any, value: any, callback: any) => { if (value === '') { @@ -550,7 +551,7 @@ - + diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementPlan/early/components/list.vue b/src/views/tested/MeasurementPlan/early/components/list.vue index 1f64a62..ee1d163 100644 --- a/src/views/tested/MeasurementPlan/early/components/list.vue +++ b/src/views/tested/MeasurementPlan/early/components/list.vue @@ -11,6 +11,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import { getPostList } from '@/api/system/post' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // 申请类型(字典值,提前/延迟) approvalType: { @@ -23,6 +24,9 @@ required: true, }, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.approvalType === '0' ? 'EarlyApplication' : 'DelayApplication') +}) const applyDict = ref<{ [key: string]: string }>({ 审批: '', 草稿箱: '1', diff --git a/src/views/tested/MeasurementPlan/plan/components/list.vue b/src/views/tested/MeasurementPlan/plan/components/list.vue index f5eedcb..d5b57e4 100644 --- a/src/views/tested/MeasurementPlan/plan/components/list.vue +++ b/src/views/tested/MeasurementPlan/plan/components/list.vue @@ -13,6 +13,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import useUserStore from '@/store/modules/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -28,6 +29,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'PlanIndex') +}) const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', // 申请状态(审批列表传) false diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 9c2f2d9..86b6bd2 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -54,6 +54,7 @@ isOnSiteCheck: '0', onSiteCheckTime: '', deptId: '', + orderStatusName: '', }) // 表单 const checkPhone = (rule: any, value: any, callback: any) => { if (value === '') { @@ -550,7 +551,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/list.vue b/src/views/tested/MeasurementPlan/task/components/list.vue index c81fd92..d5c6e17 100644 --- a/src/views/tested/MeasurementPlan/task/components/list.vue +++ b/src/views/tested/MeasurementPlan/task/components/list.vue @@ -31,7 +31,7 @@ usePositionId: '', measureCompany: '', manufactureNo: '', - receiveStatus: '', + orderStatus: '', offset: 1, limit: 20, sort: 'desc', @@ -110,7 +110,7 @@ // }, { text: '计划送检时间', - value: 'requireOverTime', + value: 'planDeliverTime', align: 'center', }, // { @@ -144,7 +144,7 @@ watch(() => $props.statusName, (newVal) => { if (newVal) { listQuery.approvalStatus = applyDict.value[newVal] as string - listQuery.receiveStatus = $props.statusName === '全部' ? '' : listQuery.receiveStatus + listQuery.orderStatus = $props.statusName === '全部' ? '' : listQuery.orderStatus fetchData() } }, @@ -165,7 +165,7 @@ listQuery.usePositionId = '' listQuery.measureCompany = '' listQuery.manufactureNo = '' - listQuery.receiveStatus = '' + listQuery.orderStatus = '' listQuery.offset = 1 listQuery.limit = 20 listQuery.sort = 'desc' @@ -278,7 +278,7 @@ }) // }) // 接收状态 - getDictByCode('orderStatus').then((res) => { + getDictByCode('eqptTaskStatus').then((res) => { receiveStatusList.value = res.data }) } @@ -362,9 +362,12 @@ case '已退回': color = '#F68787' break - case '检测完成': + case '待取回': color = '#82CD5E' break + case '已取回': + color = '#89D961' + break default: color = '#000' break @@ -408,7 +411,7 @@ - + @@ -435,8 +438,8 @@ diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementPlan/early/components/list.vue b/src/views/tested/MeasurementPlan/early/components/list.vue index 1f64a62..ee1d163 100644 --- a/src/views/tested/MeasurementPlan/early/components/list.vue +++ b/src/views/tested/MeasurementPlan/early/components/list.vue @@ -11,6 +11,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import { getPostList } from '@/api/system/post' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // 申请类型(字典值,提前/延迟) approvalType: { @@ -23,6 +24,9 @@ required: true, }, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.approvalType === '0' ? 'EarlyApplication' : 'DelayApplication') +}) const applyDict = ref<{ [key: string]: string }>({ 审批: '', 草稿箱: '1', diff --git a/src/views/tested/MeasurementPlan/plan/components/list.vue b/src/views/tested/MeasurementPlan/plan/components/list.vue index f5eedcb..d5b57e4 100644 --- a/src/views/tested/MeasurementPlan/plan/components/list.vue +++ b/src/views/tested/MeasurementPlan/plan/components/list.vue @@ -13,6 +13,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import useUserStore from '@/store/modules/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -28,6 +29,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'PlanIndex') +}) const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', // 申请状态(审批列表传) false diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 9c2f2d9..86b6bd2 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -54,6 +54,7 @@ isOnSiteCheck: '0', onSiteCheckTime: '', deptId: '', + orderStatusName: '', }) // 表单 const checkPhone = (rule: any, value: any, callback: any) => { if (value === '') { @@ -550,7 +551,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/list.vue b/src/views/tested/MeasurementPlan/task/components/list.vue index c81fd92..d5c6e17 100644 --- a/src/views/tested/MeasurementPlan/task/components/list.vue +++ b/src/views/tested/MeasurementPlan/task/components/list.vue @@ -31,7 +31,7 @@ usePositionId: '', measureCompany: '', manufactureNo: '', - receiveStatus: '', + orderStatus: '', offset: 1, limit: 20, sort: 'desc', @@ -110,7 +110,7 @@ // }, { text: '计划送检时间', - value: 'requireOverTime', + value: 'planDeliverTime', align: 'center', }, // { @@ -144,7 +144,7 @@ watch(() => $props.statusName, (newVal) => { if (newVal) { listQuery.approvalStatus = applyDict.value[newVal] as string - listQuery.receiveStatus = $props.statusName === '全部' ? '' : listQuery.receiveStatus + listQuery.orderStatus = $props.statusName === '全部' ? '' : listQuery.orderStatus fetchData() } }, @@ -165,7 +165,7 @@ listQuery.usePositionId = '' listQuery.measureCompany = '' listQuery.manufactureNo = '' - listQuery.receiveStatus = '' + listQuery.orderStatus = '' listQuery.offset = 1 listQuery.limit = 20 listQuery.sort = 'desc' @@ -278,7 +278,7 @@ }) // }) // 接收状态 - getDictByCode('orderStatus').then((res) => { + getDictByCode('eqptTaskStatus').then((res) => { receiveStatusList.value = res.data }) } @@ -362,9 +362,12 @@ case '已退回': color = '#F68787' break - case '检测完成': + case '待取回': color = '#82CD5E' break + case '已取回': + color = '#89D961' + break default: color = '#000' break @@ -408,7 +411,7 @@ - + @@ -435,8 +438,8 @@ diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue index 0bf751f..8110a5b 100644 --- a/src/views/tested/MeasurementPlan/task/components/tableList.vue +++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue @@ -314,23 +314,44 @@ return (name: string) => { let color = '' switch (name) { - case '未接收': - color = '#888' + // case '未接收': + // color = '#888' + // break + // case '已接收': + // color = '#000' + // break + // case '已取消': + // color = '#EAA341' + // break + // case '已退回': + // color = '#F68787' + // break + // case '待取回': + // color = '#82CD5E' + // break + // case '已取回': + // color = '#89D961' + // break + case '检定中': + color = '#40AAFF' break - case '已接收': + case '已检完': + color = '#F0F9EB' + break + case '未检定': color = '#000' break - case '已取消': - color = '#EAA341' + case '已接收': + color = '#F0F9EB' + break + case '未接收': + color = '#000' break case '已退回': color = '#F68787' break - case '检测完成': - color = '#82CD5E' - break - case '检定中': - color = '#4FA6FF' + case '待补送': + color = '#EAA341' break default: color = '#000' @@ -372,11 +393,12 @@ + + + + + + + @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index 58aa0af..1c1c923 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/detection' import { printJSON } from '@/utils/printUtils' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ noticeDateEnd: '', @@ -14,6 +15,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'InspectionResultReviewNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index de0cf86..e161859 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/notice' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ applicantName: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'SubcontractingNotice') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementBusiness/opinion/components/list.vue b/src/views/tested/MeasurementBusiness/opinion/components/list.vue index a2e035c..4e5fd62 100644 --- a/src/views/tested/MeasurementBusiness/opinion/components/list.vue +++ b/src/views/tested/MeasurementBusiness/opinion/components/list.vue @@ -9,6 +9,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { getDictByCode } from '@/api/system/dict' import { getAdminDept, getUserDept, getUserDeptSon, getUserList } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -24,6 +25,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientOpinionForm') +}) const listQuery = reactive({ approvalStatus: '0', createTimeEnd: '', diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index b4c16f9..c2f4c68 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -4,6 +4,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/review' import { getDictByCode } from '@/api/system/dict' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', @@ -18,6 +19,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ReviewForm') +}) // 证书有效期开始结束时间 const datetimerange = ref([ `${new Date().getFullYear()}-01-01`, diff --git a/src/views/tested/MeasurementBusiness/satisfaction/index.vue b/src/views/tested/MeasurementBusiness/satisfaction/index.vue index 238bbd6..aef9dab 100644 --- a/src/views/tested/MeasurementBusiness/satisfaction/index.vue +++ b/src/views/tested/MeasurementBusiness/satisfaction/index.vue @@ -3,6 +3,7 @@ import { reactive, ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { getListPage } from '@/api/eqpt/MeasurementBusiness/satisfaction' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ sendTimeStart: '', @@ -11,6 +12,9 @@ offset: 1, limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'ClientSatisfactionSurveyForm') +}) // 证书有效期开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { diff --git a/src/views/tested/MeasurementPlan/board/index.vue b/src/views/tested/MeasurementPlan/board/index.vue index 8d14386..850326e 100644 --- a/src/views/tested/MeasurementPlan/board/index.vue +++ b/src/views/tested/MeasurementPlan/board/index.vue @@ -5,12 +5,16 @@ import { exportListApi, getListPage } from '@/api/eqpt/measurementPlan/board' import { exportFile } from '@/utils/exportUtils' import { buildTree, toTreeList } from '@/utils/structure' +import { keepSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const listQuery = reactive({ deptName: '', // offset: 1, // limit: 20, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'BoardList') +}) const columns = ref([ { text: '部门', diff --git a/src/views/tested/MeasurementPlan/dept/components/list.vue b/src/views/tested/MeasurementPlan/dept/components/list.vue index f7390f9..e2061e0 100644 --- a/src/views/tested/MeasurementPlan/dept/components/list.vue +++ b/src/views/tested/MeasurementPlan/dept/components/list.vue @@ -5,6 +5,7 @@ import { getListPage } from '@/api/eqpt/measurementPlan/dept' import useUserStore from '@/store/modules/user' import { getUserDept } from '@/api/system/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // notifyType 通知类型(负责人/部门,字典值) notifyType: { @@ -12,6 +13,10 @@ required: true, }, }) + +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.notifyType === '2' ? 'DeptNotice' : 'CuratorNotice') +}) const $route = useRoute() const { proxy } = getCurrentInstance() as any const userStore = useUserStore() diff --git a/src/views/tested/MeasurementPlan/early/components/list.vue b/src/views/tested/MeasurementPlan/early/components/list.vue index 1f64a62..ee1d163 100644 --- a/src/views/tested/MeasurementPlan/early/components/list.vue +++ b/src/views/tested/MeasurementPlan/early/components/list.vue @@ -11,6 +11,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import { getPostList } from '@/api/system/post' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ // 申请类型(字典值,提前/延迟) approvalType: { @@ -23,6 +24,9 @@ required: true, }, }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, $props.approvalType === '0' ? 'EarlyApplication' : 'DelayApplication') +}) const applyDict = ref<{ [key: string]: string }>({ 审批: '', 草稿箱: '1', diff --git a/src/views/tested/MeasurementPlan/plan/components/list.vue b/src/views/tested/MeasurementPlan/plan/components/list.vue index f5eedcb..d5b57e4 100644 --- a/src/views/tested/MeasurementPlan/plan/components/list.vue +++ b/src/views/tested/MeasurementPlan/plan/components/list.vue @@ -13,6 +13,7 @@ import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import useUserStore from '@/store/modules/user' +import { keepSearchParams } from '@/utils/keepQuery' const $props = defineProps({ statusName: { type: String, @@ -28,6 +29,9 @@ 未通过: '5', 已取消: '6', }) +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'PlanIndex') +}) const { proxy } = getCurrentInstance() as any const listQuery = reactive({ approvalStatus: '', // 申请状态(审批列表传) false diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 9c2f2d9..86b6bd2 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -54,6 +54,7 @@ isOnSiteCheck: '0', onSiteCheckTime: '', deptId: '', + orderStatusName: '', }) // 表单 const checkPhone = (rule: any, value: any, callback: any) => { if (value === '') { @@ -550,7 +551,7 @@ - + diff --git a/src/views/tested/MeasurementPlan/task/components/list.vue b/src/views/tested/MeasurementPlan/task/components/list.vue index c81fd92..d5c6e17 100644 --- a/src/views/tested/MeasurementPlan/task/components/list.vue +++ b/src/views/tested/MeasurementPlan/task/components/list.vue @@ -31,7 +31,7 @@ usePositionId: '', measureCompany: '', manufactureNo: '', - receiveStatus: '', + orderStatus: '', offset: 1, limit: 20, sort: 'desc', @@ -110,7 +110,7 @@ // }, { text: '计划送检时间', - value: 'requireOverTime', + value: 'planDeliverTime', align: 'center', }, // { @@ -144,7 +144,7 @@ watch(() => $props.statusName, (newVal) => { if (newVal) { listQuery.approvalStatus = applyDict.value[newVal] as string - listQuery.receiveStatus = $props.statusName === '全部' ? '' : listQuery.receiveStatus + listQuery.orderStatus = $props.statusName === '全部' ? '' : listQuery.orderStatus fetchData() } }, @@ -165,7 +165,7 @@ listQuery.usePositionId = '' listQuery.measureCompany = '' listQuery.manufactureNo = '' - listQuery.receiveStatus = '' + listQuery.orderStatus = '' listQuery.offset = 1 listQuery.limit = 20 listQuery.sort = 'desc' @@ -278,7 +278,7 @@ }) // }) // 接收状态 - getDictByCode('orderStatus').then((res) => { + getDictByCode('eqptTaskStatus').then((res) => { receiveStatusList.value = res.data }) } @@ -362,9 +362,12 @@ case '已退回': color = '#F68787' break - case '检测完成': + case '待取回': color = '#82CD5E' break + case '已取回': + color = '#89D961' + break default: color = '#000' break @@ -408,7 +411,7 @@ - + @@ -435,8 +438,8 @@ diff --git a/src/views/tested/MeasurementPlan/task/components/tableList.vue b/src/views/tested/MeasurementPlan/task/components/tableList.vue index 0bf751f..8110a5b 100644 --- a/src/views/tested/MeasurementPlan/task/components/tableList.vue +++ b/src/views/tested/MeasurementPlan/task/components/tableList.vue @@ -314,23 +314,44 @@ return (name: string) => { let color = '' switch (name) { - case '未接收': - color = '#888' + // case '未接收': + // color = '#888' + // break + // case '已接收': + // color = '#000' + // break + // case '已取消': + // color = '#EAA341' + // break + // case '已退回': + // color = '#F68787' + // break + // case '待取回': + // color = '#82CD5E' + // break + // case '已取回': + // color = '#89D961' + // break + case '检定中': + color = '#40AAFF' break - case '已接收': + case '已检完': + color = '#F0F9EB' + break + case '未检定': color = '#000' break - case '已取消': - color = '#EAA341' + case '已接收': + color = '#F0F9EB' + break + case '未接收': + color = '#000' break case '已退回': color = '#F68787' break - case '检测完成': - color = '#82CD5E' - break - case '检定中': - color = '#4FA6FF' + case '待补送': + color = '#EAA341' break default: color = '#000' @@ -372,11 +393,12 @@ + + + + + + + @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@ @@ -452,4 +484,13 @@ .el-select { width: 100%; } + +.link { + color: #40aaff; + + &:hover { + cursor: pointer; + text-decoration: underline; + } +} diff --git a/src/views/tested/dashboard/list.vue b/src/views/tested/dashboard/list.vue index f82c9b0..ec65781 100644 --- a/src/views/tested/dashboard/list.vue +++ b/src/views/tested/dashboard/list.vue @@ -1,8 +1,13 @@