Commit c39909d2 by jianshuqin

优化:组件功能

parent 382a3d01
...@@ -98,9 +98,9 @@ ...@@ -98,9 +98,9 @@
Vue.set(that.filterParams, 'currentPage', 1); Vue.set(that.filterParams, 'currentPage', 1);
} }
Vue.set(that.filterParams, 'code', that.code); Vue.set(that.filterParams, 'code', that.code);
if (!filterParams) { if (!filterParams || filterParams.constructor === Array) {
//获取过虑条件 //获取过虑条件
this.getFilter(); this.getFilter(filterParams);
//查询 //查询
that.$refs.table.onSearch(null, cb); that.$refs.table.onSearch(null, cb);
} else { } else {
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
var that = this; var that = this;
//异步请求 //异步请求
if (that.$refs.formFilter.validate()) { if (that.$refs.formFilter.validate()) {
that.$http.post("/Component/Table/Export", (filterParams || that.filterParams), { emulateJSON: true }, { that.$http.post("/Component/Table/Export", ((filterParams.constructor === Object ? filterParams : null) || that.filterParams), { emulateJSON: true }, {
responseType: 'arraybuffer', responseType: 'arraybuffer',
headers: { headers: {
'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8' 'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment