|
@@ -27,13 +27,16 @@ export default class ModuleViewHandle extends VueViews{
|
|
getQuery(){
|
|
getQuery(){
|
|
let query:any = (this.$refs[this.searchID] as any).getValue();
|
|
let query:any = (this.$refs[this.searchID] as any).getValue();
|
|
const page:any = (this.$refs[this.tableID] as any).getPage();
|
|
const page:any = (this.$refs[this.tableID] as any).getPage();
|
|
- query.pageNum = page.pageNo;
|
|
|
|
|
|
+ query.pageNo = page.pageNo;
|
|
query.pageSize = page.pageSize;
|
|
query.pageSize = page.pageSize;
|
|
return query;
|
|
return query;
|
|
}
|
|
}
|
|
|
|
|
|
//获取数据列表
|
|
//获取数据列表
|
|
getList(){
|
|
getList(){
|
|
|
|
+ if(!this.requestConfig || !this.requestConfig.url){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if(!this.$refs[this.tableID]){
|
|
if(!this.$refs[this.tableID]){
|
|
if(this.timeNum > 4){
|
|
if(this.timeNum > 4){
|
|
clearInterval(this.time)
|
|
clearInterval(this.time)
|
|
@@ -68,37 +71,37 @@ export default class ModuleViewHandle extends VueViews{
|
|
}
|
|
}
|
|
|
|
|
|
//删除
|
|
//删除
|
|
- onDelete(){
|
|
|
|
- let data = (this.$refs[this.tableID] as any).getSelectData();
|
|
|
|
- if(!data || data.length == 0){
|
|
|
|
- this.$message('请选择数据!')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- let id = '';
|
|
|
|
- data.forEach((item:any) => {
|
|
|
|
- if(item.id){
|
|
|
|
- id = id ? id + ',' + item.id : item.id
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- this.requestHandle({
|
|
|
|
- url: this.requestConfig.url+'/'+id,
|
|
|
|
- method: 'delete',
|
|
|
|
- success:(res:any) => {
|
|
|
|
- this.load = false;
|
|
|
|
- this.getList();
|
|
|
|
- },
|
|
|
|
- fail:(err:any) => {
|
|
|
|
- this.load = false;
|
|
|
|
- this.failHandle(err);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // onDelete(){
|
|
|
|
+ // let data = (this.$refs[this.tableID] as any).getSelectData();
|
|
|
|
+ // if(!data || data.length == 0){
|
|
|
|
+ // this.$message('请选择数据!')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // let id = '';
|
|
|
|
+ // data.forEach((item:any) => {
|
|
|
|
+ // if(item.id){
|
|
|
|
+ // id = id ? id + ',' + item.id : item.id
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // this.requestHandle({
|
|
|
|
+ // url: this.requestConfig.url+'/'+id,
|
|
|
|
+ // method: 'delete',
|
|
|
|
+ // success:(res:any) => {
|
|
|
|
+ // this.load = false;
|
|
|
|
+ // this.getList();
|
|
|
|
+ // },
|
|
|
|
+ // fail:(err:any) => {
|
|
|
|
+ // this.load = false;
|
|
|
|
+ // this.failHandle(err);
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
|
|
//刷新
|
|
//刷新
|
|
- onRefresh(){
|
|
|
|
- (this.$refs[this.tableID] as any).setPage({pageNo:1,total:0})
|
|
|
|
- this.getList();
|
|
|
|
- }
|
|
|
|
|
|
+ // onRefresh(){
|
|
|
|
+ // (this.$refs[this.tableID] as any).setPage({pageNo:1,total:0})
|
|
|
|
+ // this.getList();
|
|
|
|
+ // }
|
|
|
|
|
|
//搜索
|
|
//搜索
|
|
searchHandle(){
|
|
searchHandle(){
|
|
@@ -107,9 +110,10 @@ export default class ModuleViewHandle extends VueViews{
|
|
}
|
|
}
|
|
//重置
|
|
//重置
|
|
resertHandle(){
|
|
resertHandle(){
|
|
- (this.$refs[this.searchID] as any).setValue({})
|
|
|
|
|
|
+ (this.$refs[this.searchID] as any).setValue({});
|
|
(this.$refs[this.tableID] as any).setPage({pageNo:1,total:0})
|
|
(this.$refs[this.tableID] as any).setPage({pageNo:1,total:0})
|
|
- this.getList();
|
|
|
|
|
|
+ this.$emit('resert')
|
|
|
|
+ // this.getList();
|
|
}
|
|
}
|
|
|
|
|
|
//导出
|
|
//导出
|