data(){
return {
isSearch: false,
}
},
methods: {
//获取table数据
getData() {
let obj = {};
if (this.isSearch) {
obj = {
txnCommCom: {
tPageJump: this.current,
tRecInpage: this.size,
},
account: this.account,
usrNm: this.usrNm,
endDt: this.endDt,
startDt: this.startDt,
roleNm: this.roleNm,
deptName: this.deptName,
oprtType: this.oprtType,
};
} else {
obj = {
txnCommCom: {
tPageJump: this.current,
tRecInpage: this.size,
},
};
}
this.$post("/mkt0150", obj).then((res) => {
this.pages = res.commonPageOutVo.totalPage;
if (res.list.length) {
this.tableData = res.list;
this.total = res.commonPageOutVo.totalRec;
this.loading = 1;
} else {
this.loading = 2;
}
});
},
//重置按钮重置默认数据
clear() {
this.isSearch = false;
this.date = [];
this.endDt = "";
this.startDt = "";
this.roleNm = "";
this.deptName = "";
this.account = "";
this.usrNm = "";
this.oprtType = "";
this.current = 1;
this.getData();
},
//按条件搜索
search() {
this.isSearch = true;
this.current = 1;
this.getData();
},
}