Commit 012d4d86 by wangzhihui

```

feat(salaryPerformance): 优化薪资绩效页面路由跳转逻辑

移除EventBus事件总线方式,改用路由参数传递方式实现页面间通信,
通过this.$route.params获取tab标签页状态并正确切换到对应面板,
同时注释掉废弃的changeTab方法和相关的EventBus监听代码。
```
1 parent c8b462ac
...@@ -430,6 +430,7 @@ export const Util = { ...@@ -430,6 +430,7 @@ export const Util = {
} }
} else { } else {
that[formName].forEach((item, index) => { that[formName].forEach((item, index) => {
if (item.type === "select" && that.baseData[item.optionsName]?.length) { if (item.type === "select" && that.baseData[item.optionsName]?.length) {
that.$set( that.$set(
that[formName][index], that[formName][index],
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2026-01-21 11:17:18 * @Date: 2026-01-21 11:17:18
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-01-28 10:40:21 * @LastEditTime: 2026-01-29 15:06:21
* @FilePath: \dj-car-life-system\src\views\residentManage\salaryPerformance\index.vue * @FilePath: \dj-car-life-system\src\views\residentManage\salaryPerformance\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -54,16 +54,14 @@ export default { ...@@ -54,16 +54,14 @@ export default {
} }
}, },
mounted() { mounted() {
this.$EventBus.$on("salaryPerformanceTab", this.changeTab) console.log(this.$route.params)
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabName
}
}, },
watch: {}, watch: {},
methods: { methods: {
changeTab(e) {
console.log(e, '----')
this.activeName = e.tabName == 'performanceList' ? '1' : '0'
console.log(this.activeName, '11111')
this.handleClick()
},
handleClick() { handleClick() {
const arr = { const arr = {
1: "performanceList", 1: "performanceList",
......
...@@ -168,11 +168,15 @@ export default { ...@@ -168,11 +168,15 @@ export default {
}, },
handleCancel() { handleCancel() {
console.log(this.routeParams.page, '----') console.log(this.routeParams.page, '----')
this.$EventBus.$emit("salaryPerformanceTab", { // this.$EventBus.$emit("salaryPerformanceTab", {
tabName: this.routeParams.page // tabName: this.routeParams.page
}) // })
this.$router.push({ this.$router.push({
name: 'salaryPerformance' name: 'salaryPerformance',
params:{
tabPane:this.routeParams.page == 'performanceList' ? '1' : '0',
tabName: this.routeParams.page
}
}) })
}, },
async getDetail() { async getDetail() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!