表单跳转name

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

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

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

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

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

Loading…
Cancel
Save