当页码为第二页第三页时,点击编辑按钮,进入到另外一个页面,点击保存和取消都会回到编辑页面,现在点击保存取消都会回到第一页,而不是停留在第二三页
<el-table-column align="center" label="操作" width="100">
<template slot-scope="scope">
<el-button
type="text"
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
</template>
</el-table-column>
handleEdit:function(val){
var infobox=vm.tableData[val];
infobox.branch_typ=vm.branch_type;
localStorage.setItem("infoboxagent", JSON.stringify(infobox));
window.location.href="newagent.html?type="+vm.branch_type;
},
<el-form-item class="last_btn">
<el-button type="primary" @click="submitForm()">保存</el-button>
<el-button @click="resetForm()">取消</el-button>
</el-form-item>
submitForm() {
var errorstr="不能为空!";
if(vm.isedit){
this.url="updata/branchinfo";
}
infoaxios(this.url,this.ruleForm,this.backurl)
},
resetForm() {
window.location.href=this.backurl;
},