Merge pull request 'fix : 修复路由跳转' (#234) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/234
This commit is contained in:
2024-05-27 13:16:30 +00:00
9 changed files with 55 additions and 14 deletions

View File

@@ -115,7 +115,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if(row.targetState!==null){
if(row.targetState!==null||row.targetState!==undefined){
return (<Tag dictType={'todo_type'} value={row.targetState}/>)
}else {
return '--'
@@ -153,8 +153,7 @@ const tableConfig = reactive({
params: {},
})
const handleView = (row) => {
console.log('row', row)
if(row.targetState=='00'&&row.targetId){
if (row.targetState == '00' && row.targetId) {
router.push({
name: 'Requirement/detail',
query: {
@@ -162,6 +161,43 @@ const handleView = (row) => {
}
})
}
else if(row.targetState=='10'&&row.targetId){
router.push({
name: 'Summary/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}else if(row.targetState=='20'&&row.targetId){
router.push({
name: 'Initiation/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}else if(row.targetState=='40'&&row.targetId){
router.push({
name: 'Implementation/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}else if(row.targetState=='50'&&row.targetId){
router.push({
name: 'Filing/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}
}
</script>

View File

@@ -176,10 +176,11 @@ const handleDownload = (row) => {
})
}
const compositeParam = (item) => {
console.log('router.currentRoute.value.path',router.currentRoute.value.path)
let tag = ''
if (!formData.value.collectType && router.currentRoute.value.name === 'Requirement/add') {
tag = '需求征集'
}
// if (!formData.value.collectType && router.currentRoute.value.path === 'Requirement/add') {
// tag = '需求征集'
// }
return {
fileId: item.id,
size: item.size,

View File

@@ -149,7 +149,7 @@ const search = (val) => {
const handleAdd = () => {
//新增
router.push({
name: 'Requirement/add',
name:'Requirement/add',
query: {
isAdd: 1
}
@@ -157,7 +157,7 @@ const handleAdd = () => {
}
const handleEdit = (row) => {
router.push({
name: 'Requirement/edit',
name:'Requirement/edit',
query: {
id: row.requirementId
}
@@ -175,7 +175,7 @@ const handleDelete = (row) => {
}
const handleDetail = (row) => {
router.push({
name: 'Detail',
name:'Requirement/detail',
query: {
id: row.requirementId
}
@@ -183,7 +183,7 @@ const handleDetail = (row) => {
}
const handleReport = (row) => {
router.push({
name: 'Summary/add',
name:'Summary/add',
query: {
id:row.requirementId
}

View File

@@ -49,6 +49,7 @@ const getInfo = async (state) => {
message: msg,
type: code === 1000 ? 'success' : 'error'
})
if(data===undefined)return;
if(code===1000){
summaryData.value = data;
loading.value = false

View File

@@ -175,7 +175,7 @@ const search = (val) => {
const handleAdd = (row) => {
router.push({
name: 'Summary/add',
name:'Summary/add',
query: {
id:row.requirementId
}
@@ -183,7 +183,7 @@ const handleAdd = (row) => {
}
const handleEdit = (row) => {
router.push({
name: 'Summary/edit',
name:'Summary/edit',
query: {
id:row.requirementId,
projectId:row.projectId
@@ -192,7 +192,7 @@ const handleEdit = (row) => {
}
const handleDetail = (row) => {
router.push({
name: 'Summary/detail',
name:'Summary/detail',
query: {
id:row.requirementId,
projectId: row.projectId,

View File

@@ -71,6 +71,7 @@ const getAllInfo = async (state) => {
if(code===1000){
loading.value = false
}
if(data===undefined)return;
commonForm.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;

View File

@@ -76,6 +76,7 @@ const getAllInfo = async (state) => {
if(code===1000){
loading.value = false
}
if(data===undefined)return;
commonForm.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;

View File

@@ -216,7 +216,7 @@ const search = (val) => {
const handleDetail = (row) => {
router.push({
name: 'Implementation/detail',
name:'Implementation/detail',
query: {
id: row.requirementId,
projectId: row.projectId,

View File

@@ -117,6 +117,7 @@ const getAllInfo = async (state) => {
loading.value = false
}
console.log(data, 'data--22');
if(data===undefined)return;
commonForm.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;