diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 65ea81c..f8f2daa 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -203,7 +203,7 @@ function refreshSelectedTag(view: TagView) { tagsViewStore.delCachedView(view); const { fullPath } = view; nextTick(() => { - router.replace({ path: "/redirect" + fullPath }); + router.push({ path: "/redirect" + fullPath }); }); } @@ -216,7 +216,7 @@ function toLastView(visitedViews: TagView[], view?: TagView) { // you can adjust it according to your needs. if (view?.name === "Dashboard") { // to reload home page - router.replace({ path: "/redirect" + view.fullPath }); + router.push({ path: "/redirect" + view.fullPath }); } else { router.push("/"); } diff --git a/src/views/connection/detail.vue b/src/views/connection/detail.vue index cef905b..29e4497 100644 --- a/src/views/connection/detail.vue +++ b/src/views/connection/detail.vue @@ -121,7 +121,7 @@ const info=reactive({ const operFlow=ref(); const doBack=()=>{ - router.replace({path:"/connection/index"}) + router.push({path:"/connection/index"}) } const mapToArray=obj=>{ let arr=[]; diff --git a/src/views/connection/edit.vue b/src/views/connection/edit.vue index c87e6e6..9a58c8d 100644 --- a/src/views/connection/edit.vue +++ b/src/views/connection/edit.vue @@ -322,7 +322,7 @@ const doSave = () => { ConnApi.add(postData).then(d=>{ if(d.data.code==0){ ElMessage.success("增加模型成功!"); - router.replace({ path: "/connection/index" }) + router.push({ path: "/connection/index" }) } }); @@ -331,7 +331,7 @@ const doSave = () => { } const doCancel = () => { - router.replace({ path: "/connection/index" }) + router.push({ path: "/connection/index" }) } const initData = () => { let id = route.query.id; diff --git a/src/views/connection/index.vue b/src/views/connection/index.vue index 064a14c..29678e8 100644 --- a/src/views/connection/index.vue +++ b/src/views/connection/index.vue @@ -99,7 +99,7 @@ function handleQuery() { } function doUploadModel(){ - router.replace({ path: "/modelMgr/uploadModel" }); + router.push({ path: "/modelMgr/uploadModel" }); } /** 重置查询 */ @@ -134,15 +134,15 @@ function handleDelete(row: { [key: string]: any }) { } const doShowDetail=(row:any)=>{ - router.replace({path:"/connection/detail",query:{id:row.connection_id}}) + router.push({path:"/connection/detail",query:{id:row.connection_id}}) } const doEdit=(row:any)=>{ - router.replace({path:"/connection/edit",query:{id:row.connection_id,type:'edit'}}) + router.push({path:"/connection/edit",query:{id:row.connection_id,type:'edit'}}) } const doAdd=(row:any)=>{ - router.replace({path:"/connection/edit",query:{id:row.connection_id,type:'add'}}) + router.push({path:"/connection/edit",query:{id:row.connection_id,type:'add'}}) } diff --git a/src/views/manage/calculate/edit.vue b/src/views/manage/calculate/edit.vue index d171cf6..bbb1600 100644 --- a/src/views/manage/calculate/edit.vue +++ b/src/views/manage/calculate/edit.vue @@ -168,7 +168,7 @@ function closeBack() { /** 算子主类型改变 */ function handleChange() { - listOpt.operTypeList.forEach((item) => { + router.pushpeList.forEach((item) => { if (item.oper_main_type == formData.oper_main_type) { listOpt.operSubTypeList = item.oper_sub_type_list; } diff --git a/src/views/manage/calculate/index.vue b/src/views/manage/calculate/index.vue index ef1ef4e..33b9b3a 100644 --- a/src/views/manage/calculate/index.vue +++ b/src/views/manage/calculate/index.vue @@ -136,12 +136,12 @@ function handleDelete(id?: number) { /** 查看算子 */ function handleDetail(operator_id?: number) { - router.replace({path:"/operatorLibrary/calculateDetail",query:{id:operator_id}}) + router.push({path:"/operatorLibrary/calculateDetail",query:{id:operator_id}}) } /** 新增算子 */ function handleAdd() { - router.replace({ path: "/operatorLibrary/calculateEdit" }); + router.push({ path: "/operatorLibrary/calculateEdit" }); } onMounted(() => { diff --git a/src/views/manage/calculate/view.vue b/src/views/manage/calculate/view.vue index a3fc441..79e8b7b 100644 --- a/src/views/manage/calculate/view.vue +++ b/src/views/manage/calculate/view.vue @@ -74,7 +74,7 @@ function closeBack() { } /** 初始化数据 */ -function initData() { +funcrouter.push) { let id = route.query.id; loading.value = true; OperatorApi.findOne(id) diff --git a/src/views/manage/calculateParam/edit.vue b/src/views/manage/calculateParam/edit.vue index 4cca295..abad109 100644 --- a/src/views/manage/calculateParam/edit.vue +++ b/src/views/manage/calculateParam/edit.vue @@ -206,7 +206,7 @@ const handleSubmit = useThrottleFn(() => { }, 3000); // 超出限制,清空文件列表 -function handleFileExceed() { +furouter.pushileExceed() { uploadRef.value.clearFiles(); ElMessage.warning("已清空文件列表,请重新上传!"); } diff --git a/src/views/manage/calculateParam/index.vue b/src/views/manage/calculateParam/index.vue index ddf10f9..5ef15b0 100644 --- a/src/views/manage/calculateParam/index.vue +++ b/src/views/manage/calculateParam/index.vue @@ -143,12 +143,12 @@ function handleDelete(id?: number) { /** 查看算子程序 */ function handleDetail(program_id?: number) { - router.replace({path:"/operatorLibrary/calculateParamDetail",query:{id:program_id}}) + router.push({path:"/operatorLibrary/calculateParamDetail",query:{id:program_id}}) } /** 新增算子程序 */ function handleAdd() { - router.replace({ path: "/operatorLibrary/calculateParamEdit" }); + router.push({ path: "/operatorLibrary/calculateParamEdit" }); } onMounted(() => { diff --git a/src/views/manage/calculateParam/view.vue b/src/views/manage/calculateParam/view.vue index 1d8090d..0abc179 100644 --- a/src/views/manage/calculateParam/view.vue +++ b/src/views/manage/calculateParam/view.vue @@ -138,3 +138,4 @@ onMounted(() => { } } +router.push \ No newline at end of file diff --git a/src/views/manage/datas/edit.vue b/src/views/manage/datas/edit.vue index ea4f740..e97828a 100644 --- a/src/views/manage/datas/edit.vue +++ b/src/views/manage/datas/edit.vue @@ -347,7 +347,7 @@ const handleSubmit = useThrottleFn(() => { /** 返回默认页面 */ function closeBack() { - router.replace({ path: "/dataMgr/datas" }); + router.push({ path: "/dataMgr/datas" }); } onMounted(() => { diff --git a/src/views/manage/datas/index.vue b/src/views/manage/datas/index.vue index 023ec60..b7cd714 100644 --- a/src/views/manage/datas/index.vue +++ b/src/views/manage/datas/index.vue @@ -187,7 +187,7 @@ function handleDelete(row: { [key: string]: any }) { * @param id 用户ID */ async function openDialog(type: string, id?: number) { - router.replace({ path: "/dataMgr/datasEdit" }); + router.push({ path: "/dataMgr/datasEdit" }); } /** 下载导入模板 */ diff --git a/src/views/manage/equipment/edit.vue b/src/views/manage/equipment/edit.vue index e22d830..efbe919 100644 --- a/src/views/manage/equipment/edit.vue +++ b/src/views/manage/equipment/edit.vue @@ -193,7 +193,7 @@ const handleSubmit = useThrottleFn(() => { /** 返回默认页面 */ function closeBack() { - router.replace({ path: "/tester/equipment" }); + router.push({ path: "/tester/equipment" }); } onMounted(() => { diff --git a/src/views/manage/equipment/editNet.vue b/src/views/manage/equipment/editNet.vue index 0dfcb63..7716ad2 100644 --- a/src/views/manage/equipment/editNet.vue +++ b/src/views/manage/equipment/editNet.vue @@ -182,7 +182,7 @@ const handleSubmit = useThrottleFn(() => { /** 返回默认页面 */ function closeBack() { - router.replace({ path: "/tester/equipment" }); + router.push({ path: "/tester/equipment" }); } // 单选框选中数据 diff --git a/src/views/manage/equipment/editPcie.vue b/src/views/manage/equipment/editPcie.vue index 3a1ac14..238f089 100644 --- a/src/views/manage/equipment/editPcie.vue +++ b/src/views/manage/equipment/editPcie.vue @@ -158,7 +158,7 @@ const handleSubmit = useThrottleFn(() => { /** 返回默认页面 */ function closeBack() { - router.replace({ path: "/tester/equipment" }); + router.push({ path: "/tester/equipment" }); } onMounted(() => { diff --git a/src/views/manage/equipment/index.vue b/src/views/manage/equipment/index.vue index 767d241..a91d983 100644 --- a/src/views/manage/equipment/index.vue +++ b/src/views/manage/equipment/index.vue @@ -201,22 +201,22 @@ function resetQuery() { /** 行选中 */ function handleSelectionChange(selection: any) { removeIds.value = selection.map((item: any) => item.id); -} +}router.push /** 删除数据 */ -function handleDelete(row: { [key: string]: any }) { +furouter.pushelete(row: { [key: string]: any }) { ElMessageBox.confirm("确认删除计算设备信息?", "警告", { confirmButtonText: "确定", - cancelButtonText: "取消", + router.pushText: "取消", type: "warning", }).then(function () { - ElMessage.success("删除成功"); + router.pushccess("删除成功"); }); } -/** +/**router.push * 打开弹窗 - * + *router.push * @param type 弹窗类型 用户表单:user-form | 用户导入:user-import * @param id 用户ID */ diff --git a/src/views/manage/equipment/view.vue b/src/views/manage/equipment/view.vue index f9f5471..527e250 100644 --- a/src/views/manage/equipment/view.vue +++ b/src/views/manage/equipment/view.vue @@ -146,7 +146,7 @@ const handleSubmit = useThrottleFn(() => { /** 返回默认页面 */ function closeBack() { - router.replace({ path: "/tester/equipment" }); + router.push({ path: "/tester/equipment" }); } onMounted(() => { diff --git a/src/views/manage/otherTool/index.vue b/src/views/manage/otherTool/index.vue index 1354643..ec0e755 100644 --- a/src/views/manage/otherTool/index.vue +++ b/src/views/manage/otherTool/index.vue @@ -165,3 +165,4 @@ onMounted(() => { handleQuery(); }); +router.pushrouter.push \ No newline at end of file diff --git a/src/views/manage/otherTool/view.vue b/src/views/manage/otherTool/view.vue index 6fe8e22..892c40e 100644 --- a/src/views/manage/otherTool/view.vue +++ b/src/views/manage/otherTool/view.vue @@ -133,7 +133,7 @@ - + router.pushm-item> { - router.replace({ path: "/modelMgr/uploadModel" }); + router.push({ path: "/modelMgr/uploadModel" }); } function doconnection(){ - router.replace({ path: "/connection/index" }); + router.push({ path: "/connection/index" }); } /** 重置查询 */ @@ -125,7 +125,7 @@ function handleDelete(row: { [key: string]: any }) { } const doShowModelDetail=(row:any)=>{ - router.replace({path:"/modelMgr/modelDetail",query:{id:row.model_id,from:'model'}}) + router.push({path:"/modelMgr/modelDetail",query:{id:row.model_id,from:'model'}}) } /** * 打开弹窗 @@ -134,7 +134,7 @@ const doShowModelDetail=(row:any)=>{ * @param id 用户ID */ async function openDialog(type: string, id?: number) { - router.replace({ path: "/operatorLibrary/calculateEdit" }); + router.push({ path: "/operatorLibrary/calculateEdit" }); } /** 下载导入模板 */ diff --git a/src/views/model/modelDetail.vue b/src/views/model/modelDetail.vue index e7c410e..143b245 100644 --- a/src/views/model/modelDetail.vue +++ b/src/views/model/modelDetail.vue @@ -119,10 +119,10 @@ onMounted(()=>{ }); const doBack=()=>{ if(route.query.from=='simulation'){ - router.replace({path:"/simulationEvaluation/index"}) + router.push({path:"/simulationEvaluation/index"}) return; } - router.replace({path:"/modelMgr/index"}) + router.push({path:"/modelMgr/index"}) }