(("undefined"!==typeof self?self:this)["webpackJsonpserverless_ui"]=("undefined"!==typeof self?self:this)["webpackJsonpserverless_ui"]||[]).push([[4],{"0f03":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"config-table"},[t.visible?a("div",{staticClass:"name"},[t._v(t._s(t.name))]):t._e(),a("div",{staticClass:"table-div"},[a("el-table",{attrs:{data:t.tableData}},[t._l(t.tableConfig,(function(e,n){return a("el-table-column",{key:n,attrs:{label:e.label,prop:e.name},scopedSlots:t._u([{key:"default",fn:function(n){return[a("span",[t._v(t._s(n.row[e.name]))])]}}],null,!0)})})),t.isOperation?a("el-table-column",{attrs:{label:t.operationName}},[t._t("default")],2):t._e()],2),a("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.currentPage,"page-sizes":t.pagination,"page-size":t.size,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])},r=[],i=(a("be65"),a("e6a8"),a("8f9f"),a("ade3")),o=a("4478"),l=a("53ca"),u=a("5530"),c=(a("8c03"),a("1da1")),s=Object(i["a"])({name:"config-table",props:{name:{type:String,default:""},visible:{type:Boolean,default:!1},pagination:{type:Array,default:function(){return[10]}},isOperation:{type:Boolean,default:!1},operationName:{type:String,default:"操作"},tableConfig:{type:Array,default:function(){return[]}},tableDataStatic:{type:Array,default:function(){return[]}},tableDataHandler:{type:String,default:""},url:{type:String,default:""},method:{type:String,default:""},query:{type:Object,default:function(){}},body:{type:Object,default:function(){}},headers:{type:Object,default:function(){}},appKey:{type:String,default:""},appSecret:{type:String,default:""},children:[]},data:function(){return{materialList:[],currentPage:1,total:10,size:10,tableData:[]}},watch:{url:function(){this.getData()},query:{handler:function(t){this.getData()}},body:{handler:function(t){this.getData()}},tableDataHandler:{handler:function(t){this.getData()}},tableDataStatic:{immediate:!0,deep:!0,handler:function(t){this.tableData=t}}},computed:{},mounted:function(){},methods:{handleSizeChange:function(t){console.log("每页 ".concat(t," 条")),this.size=t,this.getList()},handleCurrentChange:function(t){this.currentPage=t,this.getList(),console.log("当前页: ".concat(t))},handleMaterialChoose:function(t,e){console.log(t,e)},getData:function(){this.handler||(this.handler=this.throttle(this.getList,300)),this.handler()},getList:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var a,n,r,i,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log("table数据为：",t.tableData),e.prev=1,t.url){e.next=4;break}return e.abrupt("return");case 4:return a=Object(u["a"])({page:t.currentPage,size:t.size},t.query),e.next=7,t.$openAxios({url:t.url,method:t.method,query:a,body:t.body,appKey:t.appKey,appSecret:t.appSecret,headers:t.headers});case 7:if(n=e.sent,!t.tableDataHandler){e.next=16;break}if(r=t.createFunction(t.tableDataHandler,"response"),i=r()(n),!Array.isArray(i)){e.next=15;break}t.tableData=i,e.next=16;break;case 15:throw new Error("返回数据处理函数出错:基础表格只允许接收数组数据 ==> ".concat(t.tableDataHandler));case 16:e.next=23;break;case 18:e.prev=18,e.t0=e["catch"](1),o="object"===Object(l["a"])(e.t0)?e.t0.message:e.t0,t.$message?t.$message.error(o):alert(o),console.log("数据请求错误",o);case 23:case"end":return e.stop()}}),e,null,[[1,18]])})))()},createFunction:function(t){for(var e=arguments.length,a=new Array(e>1?e-1:0),n=1;n<e;n++)a[n-1]=arguments[n];return Object(o["a"])(Function,a.concat(["return ".concat(t)]))},debounce:function(t,e){var a=null;return function(){null!==a&&clearTimeout(a),a=setTimeout(t,e)}},throttle:function(t,e){var a=arguments,n=this,r=null;return function(){var i=n,o=a;r||(r=setTimeout((function(){t.apply(i,o),r=null}),e))}}}},"mounted",(function(){this.url&&this.getList()})),f=s,p=(a("9984"),a("6ffd")),d=Object(p["a"])(f,n,r,!1,null,null,null);e["default"]=d.exports},"53ca":function(t,e,a){"use strict";function n(t){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}a.d(e,"a",(function(){return n}))},"7fcc":function(t,e,a){},"8f9f":function(t,e,a){var n=a("21cf"),r=a("e138"),i=a("034a"),o=[].slice,l=/MSIE .\./.test(i),u=function(t){return function(e,a){var n=arguments.length>2,r=n?o.call(arguments,2):void 0;return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,a)}};n({global:!0,bind:!0,forced:l},{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},9984:function(t,e,a){"use strict";var n=a("7fcc"),r=a.n(n);r.a},e6a8:function(t,e,a){var n=a("21cf"),r=a("5bba");n({target:"Array",stat:!0},{isArray:r})}}]);