fix : 修复路由规范问题

This commit is contained in:
2024-05-14 20:55:49 +08:00
parent de0e0be953
commit de2f566bd0
4 changed files with 36 additions and 11 deletions

View File

@@ -1,11 +1,10 @@
<template>
<div>
项目立项申请
</div>
</template>
<script>
export default {
name: "apply"
}
<script setup lang="jsx">
</script>
<style scoped>

View File

@@ -4,10 +4,7 @@
</div>
</template>
<script>
export default {
name: "add"
}
<script setup lang="jsx">
</script>
<style scoped>

View File

@@ -0,0 +1,12 @@
<template>
<div>
项目立项编辑
</div>
</template>
<script setup lang="jsx">
</script>
<style scoped>
</style>

View File

@@ -141,7 +141,7 @@ const tableConfig = reactive({
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
if (row.state === '3' || row.state === '2') {
if (row.state === '3') {
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
} else if (row.state === '4') {
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
@@ -176,10 +176,27 @@ const search = (val) => {
const handleDetail = (row) => {
router.push({
name:'Detail',
name:'Initiation/detail',
query: {
id: row.requirementId
}
})
}
const handleEdit = (row) => {
router.push({
name:'Initiation/edit',
query: {
id: row.requirementId
}
})
}
const handleApply = (row) => {
router.push({
name:'Initiation/apply',
query: {
id: row.requirementId
}
})
}
</script>