AVUE 頁面 跳轉 帶入參數 url條件過濾


一、父頁面

      <template slot-scope="scope" slot="menu">
        <el-button
          type="text"
          icon="el-icon-circle-plus-outline"
          size="small"
          @click.stop="handleJumpDetail(scope.row,scope.index)"
        >查看詳情
        </el-button>
      </template>
      handleJumpDetail(row, index) {
        this.$router.push({// 跳轉到詳情界面
          path: '/oms/orderimportdetail',
          query: { importRecordId: row.id }
        });
      },







二、子頁面

修改前

import {validatenull} from "@/util/validate";

Object.assign(params, this.query);// 拷貝查詢model
if (!validatenull(this.$route.query) ) {// 寫入url參數
  for(let key in this.$route.query) {
	params[key] = this.$route.query[key];
  }
}

修改后

if (!this.validatenull(this.$route.query) ) {
  this.deepClone(params, this.query);// 拷貝查詢實體
  for(let key in this.$route.query) {
	params[key] = this.$route.query[key];// 寫入url中的參數
  }
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM