chunk-acf0bcce.24197157.js 8.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-acf0bcce"],{c832:function(t,e,n){(function(e){var n="Expected a function",o="__lodash_hash_undefined__",r=1/0,a="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/[\\^$.*+?()[\]{}|]/g,f=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,g="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,_=g||y||Function("return this")();function b(t,e){return null==t?void 0:t[e]}function v(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}var w=Array.prototype,O=Function.prototype,S=Object.prototype,m=_["__core-js_shared__"],j=function(){var t=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),P=O.toString,$=S.hasOwnProperty,z=S.toString,R=RegExp("^"+P.call($).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=_.Symbol,D=w.splice,L=at(_,"Map"),N=at(Object,"create"),T=C?C.prototype:void 0,k=T?T.toString:void 0;function x(t){var e=-1,n=t?t.length:0;this.clear();while(++e<n){var o=t[e];this.set(o[0],o[1])}}function A(){this.__data__=N?N(null):{}}function E(t){return this.has(t)&&delete this.__data__[t]}function F(t){var e=this.__data__;if(N){var n=e[t];return n===o?void 0:n}return $.call(e,t)?e[t]:void 0}function K(t){var e=this.__data__;return N?void 0!==e[t]:$.call(e,t)}function I(t,e){var n=this.__data__;return n[t]=N&&void 0===e?o:e,this}function B(t){var e=-1,n=t?t.length:0;this.clear();while(++e<n){var o=t[e];this.set(o[0],o[1])}}function M(){this.__data__=[]}function J(t){var e=this.__data__,n=Z(e,t);if(n<0)return!1;var o=e.length-1;return n==o?e.pop():D.call(e,n,1),!0}function W(t){var e=this.__data__,n=Z(e,t);return n<0?void 0:e[n][1]}function q(t){return Z(this.__data__,t)>-1}function G(t,e){var n=this.__data__,o=Z(n,t);return o<0?n.push([t,e]):n[o][1]=e,this}function U(t){var e=-1,n=t?t.length:0;this.clear();while(++e<n){var o=t[e];this.set(o[0],o[1])}}function H(){this.__data__={hash:new x,map:new(L||B),string:new x}}function Q(t){return rt(this,t)["delete"](t)}function V(t){return rt(this,t).get(t)}function X(t){return rt(this,t).has(t)}function Y(t,e){return rt(this,t).set(t,e),this}function Z(t,e){var n=t.length;while(n--)if(ft(t[n][0],e))return n;return-1}function tt(t,e){e=it(e,t)?[e]:ot(e);var n=0,o=e.length;while(null!=t&&n<o)t=t[lt(e[n++])];return n&&n==o?t:void 0}function et(t){if(!yt(t)||st(t))return!1;var e=gt(t)||v(t)?R:d;return e.test(pt(t))}function nt(t){if("string"==typeof t)return t;if(bt(t))return k?k.call(t):"";var e=t+"";return"0"==e&&1/t==-r?"-0":e}function ot(t){return dt(t)?t:ut(t)}function rt(t,e){var n=t.__data__;return ct(e)?n["string"==typeof e?"string":"hash"]:n.map}function at(t,e){var n=b(t,e);return et(n)?n:void 0}function it(t,e){if(dt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!bt(t))||(u.test(t)||!s.test(t)||null!=e&&t in Object(e))}function ct(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function st(t){return!!j&&j in t}x.prototype.clear=A,x.prototype["delete"]=E,x.prototype.get=F,x.prototype.has=K,x.prototype.set=I,B.prototype.clear=M,B.prototype["delete"]=J,B.prototype.get=W,B.prototype.has=q,B.prototype.set=G,U.prototype.clear=H,U.prototype["delete"]=Q,U.prototype.get=V,U.prototype.has=X,U.prototype.set=Y;var ut=ht((function(t){t=vt(t);var e=[];return l.test(t)&&e.push(""),t.replace(p,(function(t,n,o,r){e.push(o?r.replace(f,"$1"):n||t)})),e}));function lt(t){if("string"==typeof t||bt(t))return t;var e=t+"";return"0"==e&&1/t==-r?"-0":e}function pt(t){if(null!=t){try{return P.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ht(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(n);var o=function(){var n=arguments,r=e?e.apply(this,n):n[0],a=o.cache;if(a.has(r))return a.get(r);var i=t.apply(this,n);return o.cache=a.set(r,i),i};return o.cache=new(ht.Cache||U),o}function ft(t,e){return t===e||t!==t&&e!==e}ht.Cache=U;var dt=Array.isArray;function gt(t){var e=yt(t)?z.call(t):"";return e==a||e==i}function yt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function _t(t){return!!t&&"object"==typeof t}function bt(t){return"symbol"==typeof t||_t(t)&&z.call(t)==c}function vt(t){return null==t?"":nt(t)}function wt(t,e,n){var o=null==t?void 0:tt(t,e);return void 0===o?n:o}t.exports=wt}).call(this,n("c8ba"))},e8c4:function(t,e,n){"use strict";var o=n("372e"),r=n("c832"),a=n.n(r);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e["a"]={data:function(){return{needTotalList:[],selectedRows:[],selectedRowKeys:[],localLoading:!1,localDataSource:[],localPagination:Object.assign({},o["a"].props.pagination)}},props:Object.assign({},o["a"].props,{rowKey:{type:[String,Function],default:"id"},data:{type:Function,required:!0},pageNum:{type:Number,default:1},pageSize:{type:Number,default:10},showSizeChanger:{type:Boolean,default:!0},showAlertInfo:{type:Boolean,default:!1},showPagination:{default:"auto"}}),watch:{"localPagination.current":function(t){this.$router.push({name:this.$route.name,params:Object.assign({},this.$route.params,{pageNo:t})})},pageNum:function(t){Object.assign(this.localPagination,{current:t})},pageSize:function(t){Object.assign(this.localPagination,{pageSize:t})},showSizeChanger:function(t){Object.assign(this.localPagination,{showSizeChanger:t})}},created:function(){this.localPagination=["auto",!0].includes(this.showPagination)&&Object.assign({},this.localPagination,{current:this.pageNum,pageSize:this.pageSize,showSizeChanger:this.showSizeChanger}),this.needTotalList=this.initTotalList(this.columns),this.loadData()},methods:{refresh:function(){this.loadData()},loadData:function(t,e,n){var o=this;this.localLoading=!0;var r=this.data(Object.assign({pageNo:t&&t.current||this.localPagination.current,pageSize:t&&t.pageSize||this.localPagination.pageSize},n&&n.field&&{sortField:n.field}||{},n&&n.order&&{sortOrder:n.order}||{},c({},e)));r instanceof Promise&&r.then((function(e){o.localPagination=Object.assign({},o.localPagination,{current:e.pageNo,total:e.totalCount,showSizeChanger:o.showSizeChanger,pageSize:t&&t.pageSize||o.localPagination.pageSize}),!e.totalCount&&["auto",!1].includes(o.showPagination)&&(o.localPagination=!1),o.localDataSource=e.data,o.localLoading=!1}))},initTotalList:function(t){var e=[];return t&&t instanceof Array&&t.forEach((function(t){t.needTotal&&e.push(c(c({},t),{},{total:0}))})),e},updateSelect:function(t,e){this.selectedRowKeys=t,this.selectedRows=e;var n=this.needTotalList;this.needTotalList=n.map((function(t){return c(c({},t),{},{total:e.reduce((function(e,n){var o=e+a()(n,t.dataIndex);return isNaN(o)?0:o}),0)})}))},updateEdit:function(){this.selectedRows=[]},onClearSelected:function(){this.selectedRowKeys=[],this.selectedRows=[],this.updateSelect([],[]),this.$emit("clearAll")},renderMsg:function(t){var e=this,n=[];return n.push(t("span",{style:{marginRight:"12px"}},["已选择 ",t("a",{style:{fontWeight:600}},this.selectedRows.length)])),this.needTotalList.map((function(e){n.push(t("span",{style:{marginRight:"12px"}},["".concat(e.title,"总计 "),t("a",{style:{fontWeight:600}},"".concat(e.customRender?e.customRender(e.total):e.total))]))})),n.push(t("a",{style:{marginLeft:"24px"},on:{click:e.onClearSelected}},"清空")),n},renderAlert:function(t){return t("span",{slot:"message"},this.renderMsg(t))}},render:function(t){var e=this,n={},r=Object.keys(this.$data);return Object.keys(o["a"].props).forEach((function(t){var o="local".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1));return r.includes(o)?n[t]=e[o]:n[t]=e[t]})),this.showAlertInfo?(n.rowSelection={selectedRowKeys:this.selectedRowKeys,onChange:function(t,n){e.updateSelect(t,n),e.$emit("onSelect",{selectedRowKeys:t,selectedRows:n})}},t("div",{},[t("a-alert",{style:{marginBottom:"16px"},props:{type:"info",showIcon:!0}},[e.renderAlert(t)]),t("a-table",{tag:"component",attrs:n,on:{change:e.loadData},scopedSlots:this.$scopedSlots},this.$slots.default)])):t("a-table",{tag:"component",attrs:n,on:{change:e.loadData},scopedSlots:this.$scopedSlots},this.$slots.default)}}}}]);