fix : 修复首页查看跳转问题及简化代码

This commit is contained in:
2024-06-02 11:54:19 +08:00
parent cd715fbf98
commit c05322a2bf
8 changed files with 59 additions and 90 deletions

View File

@@ -46,14 +46,14 @@
</el-col>
</el-row>
</div>
<div v-else style="display: flex; justify-content: center; align-items: center; height: 100%;" >
<div v-else style="display: flex; justify-content: center; align-items: center; height: 100%;">
您没有任何角色 请联系管理员
</div>
</template>
<script setup lang="jsx">
import 'element-plus/theme-chalk/display.css'
import { useAuthStore } from '@/stores/userstore.js'
import {useAuthStore} from '@/stores/userstore.js'
const AuthStore = useAuthStore()
const router = useRouter()
@@ -120,9 +120,9 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if(row.targetState!==null||row.targetState!==undefined){
if (row.targetState !== null || row.targetState !== undefined) {
return (<Tag dictType={'todo_type'} value={row.targetState}/>)
}else {
} else {
return '--'
}
}
@@ -162,16 +162,27 @@ const handleView = (row) => {
router.push({
name: 'Requirement/detail',
query: {
id: row.targetId
id: row.targetId,
source: 'home'
}
})
} else{
} else if (row.targetState == '10' && row.targetId) {
router.push({
name: 'Summary/detail',
query: {
projectId: row.targetId,
state: row.state,
source: 'home'
}
})
} else {
router.push({
name: 'Implementation/detail',
query: {
projectId: row.targetId,
state: row.state,
step: row.targetState
step: row.targetState,
source: 'home'
}
})
}