diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 0c14ddc4..cdd2c7ed 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -102,7 +102,6 @@ export default { console.log('🚀 ~ res-退出登录:', res) console.log("logout", process.env.VUE_APP_BASE_API) this.$store.dispatch('tagsView/delAllViews') - location.reload() if (process.env.VUE_APP_BASE_API == '/iws/jxhzb-api') { window.location.href = 'http://sgwpdm.ah.sgcc.com.cn/iws' } else { diff --git a/src/views/EquipmentRetireApply/audit-detail.vue b/src/views/EquipmentRetireApply/audit-detail.vue index 93006b92..fbe6b030 100644 --- a/src/views/EquipmentRetireApply/audit-detail.vue +++ b/src/views/EquipmentRetireApply/audit-detail.vue @@ -211,10 +211,10 @@ export default { }, methods: { goBack() { - this.$router.push({ path: '/business/EquipmentRetireApply/equipment/retire-apply' }) + this.$router.push({ path: '/business/EquipmentRetireApply/EquipmentRetireApply' }) }, async getAuditDetail() { - const id = this.$route.params.id + const id = this.$route.query.id // 从query参数中获取任务基本信息 const taskInfoStr = this.$route.query.taskInfo diff --git a/src/views/EquipmentRetireApply/audit.vue b/src/views/EquipmentRetireApply/audit.vue index 2ba1612e..3c10db9d 100644 --- a/src/views/EquipmentRetireApply/audit.vue +++ b/src/views/EquipmentRetireApply/audit.vue @@ -174,9 +174,8 @@ export default { // 审核 onHandleAudit(row) { this.$router.push({ - name: 'RetireApplyAuditDetail', - params: { id: row.id }, - query: { taskInfo: JSON.stringify(row) } + path: '/business/EquipmentRetireApply/audit-detail', + query: { id: row.id, taskInfo: JSON.stringify(row) } }) }, diff --git a/src/views/EquipmentRetireApply/detail.vue b/src/views/EquipmentRetireApply/detail.vue index 9f81648f..4621475d 100644 --- a/src/views/EquipmentRetireApply/detail.vue +++ b/src/views/EquipmentRetireApply/detail.vue @@ -140,6 +140,7 @@ import { getToken } from '@/utils/auth' import GoBack from '@/components/GoBack' export default { + name: 'RetireApplyDetail', components: { AddItemDialog, GoBack @@ -191,12 +192,13 @@ export default { } }, async getDetail() { - const id = this.$route.params.id + const id = this.$route.query.id if (id === 'new') { this.isNew = false this.baseInfo.createUser = this.$store.state.user?.nickName || '当前用户' this.baseInfo.createTime = new Date().toLocaleString() } else { + this.isNew = true // 从query参数中获取任务基本信息 const taskInfoStr = this.$route.query.taskInfo if (taskInfoStr) { @@ -386,7 +388,7 @@ export default { }, created() { - if (this.$route.params.id) { + if (this.$route.query.id) { this.getDetail() } if (this.$route.query.maId) { diff --git a/src/views/EquipmentRetireApply/index.vue b/src/views/EquipmentRetireApply/index.vue index 28cfef6c..abe87506 100644 --- a/src/views/EquipmentRetireApply/index.vue +++ b/src/views/EquipmentRetireApply/index.vue @@ -149,15 +149,15 @@ export default { // 新增 onHandleAdd() { - this.$router.push('/equipment/retire-apply/detail/new') + this.$router.push({ path: '/equipment/retire-apply/detail', query: { id: 'new' } }) }, // 查看 onHandleView(row) { this.$router.push({ - name: 'RetireApplyDetail', - params: { id: row.id }, + path: '/equipment/retire-apply/detail', query: { + id: row.id, taskInfo: JSON.stringify(row), mode: 'view' // 增加 mode 参数,标识为查看模式 } @@ -167,9 +167,9 @@ export default { // 编辑 onHandleEdit(row) { this.$router.push({ - name: 'RetireApplyDetail', - params: { id: row.id }, + path: '/equipment/retire-apply/detail', query: { + id: row.id, taskInfo: JSON.stringify(row), mode: 'edit' // 增加 mode 参数,标识为编辑模式 } diff --git a/src/views/EquipmentRetireApply/todo.vue b/src/views/EquipmentRetireApply/todo.vue index 92fd2c22..c740df74 100644 --- a/src/views/EquipmentRetireApply/todo.vue +++ b/src/views/EquipmentRetireApply/todo.vue @@ -112,18 +112,22 @@ export default { // 审批 onHandleApprove(row) { this.$router.push({ - name: 'RetireApplyAuditDetail', - params: { id: row.businessId }, - query: { taskInfo: JSON.stringify(row) } + // name: 'RetireApplyAuditDetail', + // params: { id: row.businessId }, + // query: { taskInfo: JSON.stringify(row) } + path: '/business/EquipmentRetireApply/audit-detail', + query: { id: row.businessId, taskInfo: JSON.stringify(row) } }) }, // 查看详情 onHandleDetail(row) { this.$router.push({ - name: 'RetireApplyAuditDetail', - params: { id: row.businessId }, - query: { taskInfo: JSON.stringify(row) } + // name: 'RetireApplyAuditDetail', + // params: { id: row.businessId }, + // query: { taskInfo: JSON.stringify(row) } + path: '/business/EquipmentRetireApply/audit-detail', + query: { id: row.businessId, taskInfo: JSON.stringify(row) } }) }, diff --git a/src/views/home/components/MunicipalCompany.vue b/src/views/home/components/MunicipalCompany.vue index a56a05f4..29372f02 100644 --- a/src/views/home/components/MunicipalCompany.vue +++ b/src/views/home/components/MunicipalCompany.vue @@ -381,9 +381,11 @@ export default { url = '/equipmentRepair/repairApprovalDetail' } else if (item.businessName == '设备退役') { this.$router.push({ - name: 'RetireApplyAuditDetail', - params: { id: item.id }, - query: { taskInfo: JSON.stringify(item) }, + // name: 'RetireApplyAuditDetail', + // params: { id: item.id }, + // query: { taskInfo: JSON.stringify(item) }, + path: '/business/EquipmentRetireApply/audit-detail', + query: { id: item.id, taskInfo: JSON.stringify(item) } }) } if (item.businessName == '设备退役') return