表单跳转name

main
严飞永 2 weeks ago
parent 6805c8d186
commit a435955937

@ -294,7 +294,7 @@
</template>
<script setup>
import { ref, onMounted, onUnmounted, computed } from 'vue'
import { ref, onMounted, onUnmounted, computed,getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue"
@ -330,13 +330,14 @@ const loading = ref(false)
const tabHeader = ref(undefined)
const btnShow = ref("web")
const chakanyuanyin = ref("")
const { proxy } = getCurrentInstance();
const btnArr = [
{ label: "web资产", value: "web" },
{ label: "小程序", value: "xcx" },
{ label: "公众号", value: "gzh" },
{ label: "电子邮件", value: "emil" },
{ label: "移动应用系统", value: "app" }
]
{ label: "web资产", value: "web", routeName: "WebZC-info"},
{ label: "小程序", value: "xcx", routeName: "XcxZC-info" },
{ label: "公众号", value: "gzh", routeName: "GzhZC-info" },
{ label: "电子邮件", value: "emil", routeName: "DzyjZC-info" },
{ label: "移动应用系统", value: "app", routeName: "YdyyxtZC-info" },
];
//
const getInfo = (id) => {
@ -412,53 +413,47 @@ const getPagination = (pages) => {
case "app": getInfo(5); break
}
}
//
const navigateToDetail = (row, pageType) => {
const typeMap = {
web: 0,
xcx: 1,
gzh: 2,
emil: 3,
app: 4,
};
//
const goInfo = (row) => {
router.push({
name: "assetsAuthRecord",
query: {
type: btnShow.value === "web" ? 0 :
btnShow.value === "xcx" ? 1 :
btnShow.value === "gzh" ? 2 :
btnShow.value === "emil" ? 3 :
btnShow.value === "app" ? 4 : 5,
pageType: "look",
btnShow: btnShow.value,
id: btnShow.value === "web" ? row.currentId :
btnShow.value === "xcx" ? row.miniId :
btnShow.value === "gzh" ? row.accountId :
btnShow.value === "emil" ? row.emailId :
btnShow.value === "app" ? row.appId : null,
name: "AssetRecord",
queryData: pagination.value
}
})
}
const idMap = {
web: row.currentId,
xcx: row.miniId,
gzh: row.accountId,
emil: row.emailId,
app: row.appId,
};
const assetType = btnShow.value;
const routeItem = btnArr.find((item) => item.value === assetType);
const routeName = routeItem.routeName;
proxy.setActiveMenu("/assetRecord2");
//
const delInfo = (row) => {
router.push({
name: "assetsAuthRecord",
name: routeName,
query: {
type: btnShow.value === "web" ? 0 :
btnShow.value === "xcx" ? 1 :
btnShow.value === "gzh" ? 2 :
btnShow.value === "emil" ? 3 :
btnShow.value === "app" ? 4 : 5,
pageType: "change",
btnShow: btnShow.value,
id: btnShow.value === "web" ? row.currentId :
btnShow.value === "xcx" ? row.miniId :
btnShow.value === "gzh" ? row.accountId :
btnShow.value === "emil" ? row.emailId :
btnShow.value === "app" ? row.appId : null,
name: "AssetRecord",
queryData: pagination.value
}
})
}
type: typeMap[assetType],
pageType: pageType,
btnShow: assetType,
id: idMap[assetType],
// queryData: JSON.stringify(pagination.value),
name: "AssetRecord2",
},
});
};
//
const goInfo = (row) => navigateToDetail(row, "look");
//
const delInfo = (row) => navigateToDetail(row, "change");
//
const lookInfo = (row) => {
chakanyuanyin.value = row.auditYy

@ -474,6 +474,7 @@ function goInfo(type, row) {
taskId: row.taskId,
assetId: row.id,
type: activeName.value,
name:"Mytask-info"
},
});
}
@ -485,6 +486,7 @@ function goInfo(type, row) {
taskId: row.taskId,
assetId: row.id,
type: activeName.value,
name:"Mytask-info"
},
});
}

@ -853,6 +853,7 @@ const goInfo = (type, row) => {
path: "/webZC-add",
query: {
pageType: "look",
name:"TaskManagement-info",
taskId: row.taskId,
assetId: row.id,
type: activeName.value,
@ -864,6 +865,7 @@ const goInfo = (type, row) => {
path: "/webZC-add",
query: {
pageType: "change",
name:"TaskManagement-info",
taskId: row.taskId,
assetId: row.id,
type: activeName.value,

@ -434,7 +434,7 @@ const goInfo = (row) => {
const routeItem = btnArr.find((item) => item.value === assetType);
const routeName = routeItem.routeName
proxy.setActiveMenu("/unitFill2" );
proxy.setActiveMenu("/unitFillsec" );
router.push({
name: routeName,
query: {
@ -443,7 +443,7 @@ const goInfo = (row) => {
btnShow: btnShow.value,
id: idMap[btnShow.value],
queryData: JSON.stringify(pagination.value),
name: "UnitFill",
name: "unitFillsec",
},
});
};
@ -465,16 +465,16 @@ const delInfo = (row) => {
emil: row.emailId,
app: row.appId,
};
proxy.setActiveMenu("/unitFillsec" );
router.push({
name: "unitAssetsAuth",
name: routeName,
query: {
type: typeMap[btnShow.value],
pageType: "change",
btnShow: btnShow.value,
id: idMap[btnShow.value],
queryData: JSON.stringify(pagination.value),
name: "UnitFill",
name: "UnitFillsec",
},
});
};

Loading…
Cancel
Save