update code

main
haha 2024-07-14 22:26:43 +08:00
parent e75f470937
commit 9460b1401c
34 changed files with 54 additions and 52 deletions

View File

@ -203,7 +203,7 @@ function refreshSelectedTag(view: TagView) {
tagsViewStore.delCachedView(view); tagsViewStore.delCachedView(view);
const { fullPath } = view; const { fullPath } = view;
nextTick(() => { 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. // you can adjust it according to your needs.
if (view?.name === "Dashboard") { if (view?.name === "Dashboard") {
// to reload home page // to reload home page
router.replace({ path: "/redirect" + view.fullPath }); router.push({ path: "/redirect" + view.fullPath });
} else { } else {
router.push("/"); router.push("/");
} }

View File

@ -121,7 +121,7 @@ const info=reactive({
const operFlow=ref(); const operFlow=ref();
const doBack=()=>{ const doBack=()=>{
router.replace({path:"/connection/index"}) router.push({path:"/connection/index"})
} }
const mapToArray=obj=>{ const mapToArray=obj=>{
let arr=[]; let arr=[];

View File

@ -322,7 +322,7 @@ const doSave = () => {
ConnApi.add(postData).then(d=>{ ConnApi.add(postData).then(d=>{
if(d.data.code==0){ if(d.data.code==0){
ElMessage.success("增加模型成功!"); ElMessage.success("增加模型成功!");
router.replace({ path: "/connection/index" }) router.push({ path: "/connection/index" })
} }
}); });
@ -331,7 +331,7 @@ const doSave = () => {
} }
const doCancel = () => { const doCancel = () => {
router.replace({ path: "/connection/index" }) router.push({ path: "/connection/index" })
} }
const initData = () => { const initData = () => {
let id = route.query.id; let id = route.query.id;

View File

@ -99,7 +99,7 @@ function handleQuery() {
} }
function doUploadModel(){ 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)=>{ 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)=>{ 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)=>{ 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'}})
} }

View File

@ -168,7 +168,7 @@ function closeBack() {
/** 算子主类型改变 */ /** 算子主类型改变 */
function handleChange() { function handleChange() {
listOpt.operTypeList.forEach((item) => { router.pushpeList.forEach((item) => {
if (item.oper_main_type == formData.oper_main_type) { if (item.oper_main_type == formData.oper_main_type) {
listOpt.operSubTypeList = item.oper_sub_type_list; listOpt.operSubTypeList = item.oper_sub_type_list;
} }

View File

@ -136,12 +136,12 @@ function handleDelete(id?: number) {
/** 查看算子 */ /** 查看算子 */
function handleDetail(operator_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() { function handleAdd() {
router.replace({ path: "/operatorLibrary/calculateEdit" }); router.push({ path: "/operatorLibrary/calculateEdit" });
} }
onMounted(() => { onMounted(() => {

View File

@ -74,7 +74,7 @@ function closeBack() {
} }
/** 初始化数据 */ /** 初始化数据 */
function initData() { funcrouter.push) {
let id = route.query.id; let id = route.query.id;
loading.value = true; loading.value = true;
OperatorApi.findOne(id) OperatorApi.findOne(id)

View File

@ -206,7 +206,7 @@ const handleSubmit = useThrottleFn(() => {
}, 3000); }, 3000);
// //
function handleFileExceed() { furouter.pushileExceed() {
uploadRef.value.clearFiles(); uploadRef.value.clearFiles();
ElMessage.warning("已清空文件列表,请重新上传!"); ElMessage.warning("已清空文件列表,请重新上传!");
} }

View File

@ -143,12 +143,12 @@ function handleDelete(id?: number) {
/** 查看算子程序 */ /** 查看算子程序 */
function handleDetail(program_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() { function handleAdd() {
router.replace({ path: "/operatorLibrary/calculateParamEdit" }); router.push({ path: "/operatorLibrary/calculateParamEdit" });
} }
onMounted(() => { onMounted(() => {

View File

@ -138,3 +138,4 @@ onMounted(() => {
} }
} }
</style> </style>
router.push

View File

@ -347,7 +347,7 @@ const handleSubmit = useThrottleFn(() => {
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/dataMgr/datas" }); router.push({ path: "/dataMgr/datas" });
} }
onMounted(() => { onMounted(() => {

View File

@ -187,7 +187,7 @@ function handleDelete(row: { [key: string]: any }) {
* @param id 用户ID * @param id 用户ID
*/ */
async function openDialog(type: string, id?: number) { async function openDialog(type: string, id?: number) {
router.replace({ path: "/dataMgr/datasEdit" }); router.push({ path: "/dataMgr/datasEdit" });
} }
/** 下载导入模板 */ /** 下载导入模板 */

View File

@ -193,7 +193,7 @@ const handleSubmit = useThrottleFn(() => {
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/tester/equipment" }); router.push({ path: "/tester/equipment" });
} }
onMounted(() => { onMounted(() => {

View File

@ -182,7 +182,7 @@ const handleSubmit = useThrottleFn(() => {
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/tester/equipment" }); router.push({ path: "/tester/equipment" });
} }
// //

View File

@ -158,7 +158,7 @@ const handleSubmit = useThrottleFn(() => {
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/tester/equipment" }); router.push({ path: "/tester/equipment" });
} }
onMounted(() => { onMounted(() => {

View File

@ -201,22 +201,22 @@ function resetQuery() {
/** 行选中 */ /** 行选中 */
function handleSelectionChange(selection: any) { function handleSelectionChange(selection: any) {
removeIds.value = selection.map((item: any) => item.id); removeIds.value = selection.map((item: any) => item.id);
} }router.push
/** 删除数据 */ /** 删除数据 */
function handleDelete(row: { [key: string]: any }) { furouter.pushelete(row: { [key: string]: any }) {
ElMessageBox.confirm("确认删除计算设备信息?", "警告", { ElMessageBox.confirm("确认删除计算设备信息?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", router.pushText: "取消",
type: "warning", type: "warning",
}).then(function () { }).then(function () {
ElMessage.success("删除成功"); router.pushccess("删除成功");
}); });
} }
/** /**router.push
* 打开弹窗 * 打开弹窗
* *router.push
* @param type 弹窗类型 用户表单user-form | 用户导入user-import * @param type 弹窗类型 用户表单user-form | 用户导入user-import
* @param id 用户ID * @param id 用户ID
*/ */

View File

@ -146,7 +146,7 @@ const handleSubmit = useThrottleFn(() => {
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/tester/equipment" }); router.push({ path: "/tester/equipment" });
} }
onMounted(() => { onMounted(() => {

View File

@ -165,3 +165,4 @@ onMounted(() => {
handleQuery(); handleQuery();
}); });
</script> </script>
router.pushrouter.push

View File

@ -133,7 +133,7 @@
<el-form ref="formRef" :model="form" :rules="rules" label-width="108px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="108px">
<el-form-item label="运行参数名称" prop="params_name"> <el-form-item label="运行参数名称" prop="params_name">
<el-input v-model="form.params_name" placeholder="请输入运行参数名称" /> <el-input v-model="form.params_name" placeholder="请输入运行参数名称" />
</el-form-item> router.pushm-item>
<el-form-item label="运行参数描述" prop="params_desc"> <el-form-item label="运行参数描述" prop="params_desc">
<el-input <el-input
v-model="form.params_desc" v-model="form.params_desc"

View File

@ -87,10 +87,10 @@ function handleQuery() {
} }
const doUploadModel=()=>{ const doUploadModel=()=>{
router.replace({ path: "/modelMgr/uploadModel" }); router.push({ path: "/modelMgr/uploadModel" });
} }
function doconnection(){ 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)=>{ 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 * @param id 用户ID
*/ */
async function openDialog(type: string, id?: number) { async function openDialog(type: string, id?: number) {
router.replace({ path: "/operatorLibrary/calculateEdit" }); router.push({ path: "/operatorLibrary/calculateEdit" });
} }
/** 下载导入模板 */ /** 下载导入模板 */

View File

@ -119,10 +119,10 @@ onMounted(()=>{
}); });
const doBack=()=>{ const doBack=()=>{
if(route.query.from=='simulation'){ if(route.query.from=='simulation'){
router.replace({path:"/simulationEvaluation/index"}) router.push({path:"/simulationEvaluation/index"})
return; return;
} }
router.replace({path:"/modelMgr/index"}) router.push({path:"/modelMgr/index"})
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>

View File

@ -149,7 +149,7 @@ const doSave = () => {
ModelApi.add(upForm).then(d=>{ ModelApi.add(upForm).then(d=>{
if(d.data.code==0){ if(d.data.code==0){
ElMessage.success("增加模型成功!"); ElMessage.success("增加模型成功!");
router.replace({ path: "/modelMgr/index" }) router.push({ path: "/modelMgr/index" })
} }
}) })
@ -158,7 +158,7 @@ const doSave = () => {
} }
const doBack = () => { const doBack = () => {
router.replace({ path: "/modelMgr/index" }) router.push({ path: "/modelMgr/index" })
} }
const uploadForm = ref(ElForm) const uploadForm = ref(ElForm)
let upForm = reactive({ let upForm = reactive({

View File

@ -11,5 +11,5 @@ const router = useRouter();
const { params, query } = route; const { params, query } = route;
const { path } = params; const { path } = params;
router.replace({ path: "/" + path, query }); router.push({ path: "/" + path, query });
</script> </script>

View File

@ -45,7 +45,7 @@ const doStart = () => {
datas=tmp; datas=tmp;
ElMessage.success("开始执行!"); ElMessage.success("开始执行!");
setTimeout(()=>{ setTimeout(()=>{
router.replace({ path: "/simulationEvaluation/execution" }); router.push({ path: "/simulationEvaluation/execution" });
},1000); },1000);
}else{ }else{
ElMessage.error("请选择数据集!"); ElMessage.error("请选择数据集!");

View File

@ -98,7 +98,7 @@ const doToReason = () => {
} }
const doCancel = () => { const doCancel = () => {
router.replace({ path: "/simulationEvaluation/index" }) router.push({ path: "/simulationEvaluation/index" })
} }
const tableData = [ const tableData = [

View File

@ -81,7 +81,7 @@ const doDelete=(row)=>{
}); });
} }
const doShowDetail=row=>{ const doShowDetail=row=>{
router.replace({ path: "/simulationEvaluation/taskDesc",query:{...row} }); router.push({ path: "/simulationEvaluation/taskDesc",query:{...row} });
} }
</script> </script>
<style lang='scss'> <style lang='scss'>

View File

@ -135,7 +135,7 @@ function handleQuery() {
} }
function doUploadModel(){ function doUploadModel(){
router.replace({ path: "/modelMgr/uploadModel" }); router.push({ path: "/modelMgr/uploadModel" });
} }
/** 重置查询 */ /** 重置查询 */
@ -166,15 +166,15 @@ function handleDelete(row: { [key: string]: any }) {
} }
const doShowDetail=(row:any)=>{ const doShowDetail=(row:any)=>{
router.replace({path:"/modelMgr/modelDetail",query:{id:row.id,from:'simulation'}}) router.push({path:"/modelMgr/modelDetail",query:{id:row.id,from:'simulation'}})
} }
const doEdit=(row:any)=>{ const doEdit=(row:any)=>{
router.replace({path:"/simulationEvaluation/compile",query:{id:row.id,type:'edit'}}) router.push({path:"/simulationEvaluation/compile",query:{id:row.id,type:'edit'}})
} }
const doAdd=(row:any)=>{ const doAdd=(row:any)=>{
router.replace({path:"/connection/edit",query:{id:row.id,type:'add'}}) router.push({path:"/connection/edit",query:{id:row.id,type:'add'}})
} }

View File

@ -115,7 +115,7 @@ import BarChart2 from './BarChart2.vue'
const router = useRouter(); const router = useRouter();
let devList = ref("ST18-9\nRTX4080") let devList = ref("ST18-9\nRTX4080")
const doBack = () => { const doBack = () => {
router.replace({ path: "/simulationEvaluation/hisTaskList" }) router.push({ path: "/simulationEvaluation/hisTaskList" })
} }
const doPrint = () => { const doPrint = () => {
ElMessage.success("正在打印..."); ElMessage.success("正在打印...");

View File

@ -216,7 +216,7 @@
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/system/menu" }); router.push({ path: "/system/menu" });
} }
onMounted(() => { onMounted(() => {

View File

@ -467,7 +467,7 @@ function onRowClick(row: MenuVO) {
* @param menuId 菜单ID * @param menuId 菜单ID
*/ */
function openDialog(parentId?: number, menuId?: number) { function openDialog(parentId?: number, menuId?: number) {
router.replace({ path: "/system/menuEdit" }); router.push({ path: "/system/menuEdit" });
// MenuAPI.getOptions() // MenuAPI.getOptions()
// .then((data) => { // .then((data) => {
// menuOptions.value = [{ value: 0, label: "", children: data }]; // menuOptions.value = [{ value: 0, label: "", children: data }];

View File

@ -134,7 +134,7 @@
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/system/role" }); router.push({ path: "/system/role" });
} }
onMounted(() => { onMounted(() => {

View File

@ -391,7 +391,7 @@ function handleSelectionChange(selection: any) {
/** 打开角色表单弹窗 */ /** 打开角色表单弹窗 */
function openDialog(roleId?: number) { function openDialog(roleId?: number) {
router.replace({ path: "/system/roleEdit" }); router.push({ path: "/system/roleEdit" });
// dialog.visible = true; // dialog.visible = true;
// if (roleId) { // if (roleId) {
// dialog.title = ""; // dialog.title = "";

View File

@ -130,7 +130,7 @@ const handleSubmit = useThrottleFn(() => {
/** 返回默认页面 */ /** 返回默认页面 */
function closeBack() { function closeBack() {
router.replace({ path: "/system/user" }); router.push({ path: "/system/user" });
} }
onMounted(() => { onMounted(() => {

View File

@ -388,7 +388,7 @@ async function loadDeptOptions() {
* @param id 用户ID * @param id 用户ID
*/ */
async function openDialog(type: string, id?: number) { async function openDialog(type: string, id?: number) {
router.replace({ path: "/system/userEdit" }); router.push({ path: "/system/userEdit" });
// dialog.visible = true; // dialog.visible = true;
// dialog.type = type; // dialog.type = type;