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> <template>
<div>
项目立项申请
</div>
</template> </template>
<script> <script setup lang="jsx">
export default {
name: "apply"
}
</script> </script>
<style scoped> <style scoped>

View File

@@ -4,10 +4,7 @@
</div> </div>
</template> </template>
<script> <script setup lang="jsx">
export default {
name: "add"
}
</script> </script>
<style scoped> <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, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}] 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'}) btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
} else if (row.state === '4') { } else if (row.state === '4') {
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'}) btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
@@ -176,10 +176,27 @@ const search = (val) => {
const handleDetail = (row) => { const handleDetail = (row) => {
router.push({ router.push({
name:'Detail', name:'Initiation/detail',
query: { query: {
id: row.requirementId 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> </script>