操作人查询翻页调整
This commit is contained in:
parent
3113c4d79b
commit
0a063c783a
@ -61,7 +61,7 @@ import { getStaffList } from "@/api/emis/emisStaff";
|
|||||||
mixins: [emitter],
|
mixins: [emitter],
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: Number,
|
||||||
required: false
|
required: false
|
||||||
},
|
},
|
||||||
sideCode: {
|
sideCode: {
|
||||||
@ -143,14 +143,8 @@ import { getStaffList } from "@/api/emis/emisStaff";
|
|||||||
onClick(){
|
onClick(){
|
||||||
this.isInit=false;
|
this.isInit=false;
|
||||||
// 第一次点击时需要初始化
|
// 第一次点击时需要初始化
|
||||||
if(!this.defaultItems){
|
|
||||||
this.queryParams.pageNum=1;
|
this.queryParams.pageNum=1;
|
||||||
this.queryData(null,null);
|
this.queryData();
|
||||||
}else{
|
|
||||||
this.total = this.defaultTotal;
|
|
||||||
this.optionItems = [...this.defaultItems];
|
|
||||||
}
|
|
||||||
// this.$refs.popoverRef.doShow();
|
|
||||||
},
|
},
|
||||||
onInput(val) {
|
onInput(val) {
|
||||||
if(val == null ) return;
|
if(val == null ) return;
|
||||||
@ -158,7 +152,8 @@ import { getStaffList } from "@/api/emis/emisStaff";
|
|||||||
this.isInputing = true;
|
this.isInputing = true;
|
||||||
this.slable = val;
|
this.slable = val;
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.queryData(val,null)
|
this.queryParams.searchValue = val;
|
||||||
|
this.queryData()
|
||||||
|
|
||||||
},
|
},
|
||||||
onRowClick(row, column, event) {
|
onRowClick(row, column, event) {
|
||||||
@ -170,6 +165,7 @@ import { getStaffList } from "@/api/emis/emisStaff";
|
|||||||
this.$emit("input", this.svalue);
|
this.$emit("input", this.svalue);
|
||||||
this.$emit("onChange",row);
|
this.$emit("onChange",row);
|
||||||
this.$refs.popoverRef.doClose();
|
this.$refs.popoverRef.doClose();
|
||||||
|
this.queryParams.searchValue = this.slable;
|
||||||
},
|
},
|
||||||
isRed({ row }) {
|
isRed({ row }) {
|
||||||
if (row.userId == this.svalue) {
|
if (row.userId == this.svalue) {
|
||||||
@ -182,27 +178,24 @@ import { getStaffList } from "@/api/emis/emisStaff";
|
|||||||
onClear(el){
|
onClear(el){
|
||||||
this.slable = null;
|
this.slable = null;
|
||||||
this.svalue = null;
|
this.svalue = null;
|
||||||
|
this.queryParams.searchValue = null;
|
||||||
this.$emit("input", this.svalue);
|
this.$emit("input", this.svalue);
|
||||||
this.dispatch('ElFormItem', 'el.form.blur', [this.svalue]);
|
this.dispatch('ElFormItem', 'el.form.blur', [this.svalue]);
|
||||||
},
|
},
|
||||||
onBlur(el) {
|
onBlur(el) {
|
||||||
// 如果编辑没有选择则清关历史记录
|
if(this.svalue){
|
||||||
if( this.isInputing ){
|
this.queryParams.searchValue = this.slable;
|
||||||
this.svalue = null;
|
|
||||||
this.slable = null;
|
|
||||||
}
|
}
|
||||||
this.$emit("input", this.svalue);
|
this.$emit("input", this.svalue);
|
||||||
this.dispatch('ElFormItem', 'el.form.blur', [this.svalue]);
|
this.dispatch('ElFormItem', 'el.form.blur', [this.svalue]);
|
||||||
},
|
},
|
||||||
changePage(cur) {
|
changePage(cur) {
|
||||||
this.queryParams.pageNum = cur
|
this.queryParams.pageNum = cur
|
||||||
this.queryData()
|
this.queryData();
|
||||||
},
|
},
|
||||||
queryData(val,key) {
|
queryData(val,key) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
this.queryParams.searchValue = val;
|
|
||||||
this.queryParams.userId = key;
|
this.queryParams.userId = key;
|
||||||
|
|
||||||
getStaffList(this.queryParams).then(response => {
|
getStaffList(this.queryParams).then(response => {
|
||||||
@ -211,7 +204,7 @@ import { getStaffList } from "@/api/emis/emisStaff";
|
|||||||
this.optionItems = response.rows;
|
this.optionItems = response.rows;
|
||||||
|
|
||||||
// 初始值存储
|
// 初始值存储
|
||||||
if(key==null && val==null){
|
if (!this.queryParams.userId && !this.queryParams.searchValue) {
|
||||||
this.defaultTotal = this.total+0;
|
this.defaultTotal = this.total+0;
|
||||||
this.defaultItems=[...this.optionItems]
|
this.defaultItems=[...this.optionItems]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user