Merge pull request 'fix : 修复路由规范问题' (#172) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/172
This commit is contained in:
2024-05-14 12:56:36 +00:00
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>