/*! * Avue.js v2.0.4 * (c) 2017-2019 Smallwei * Released under the MIT License. * */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("AVUE",[],e):"object"==typeof exports?exports.AVUE=e():t.AVUE=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=169)}([function(t,e){t.exports=function(t,e,n,i,r,o){var a,s=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(a=t,s=t.default);var u="function"==typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r);var c;if(o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=i),c){var d=u.functional,f=d?u.render:u.beforeCreate;d?(u._injectStyles=c,u.render=function(t,e){return c.call(e),f(t,e)}):u.beforeCreate=f?[].concat(f,c):[c]}return{esModule:a,exports:s,options:u}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.name=o.KEY_COMPONENT_NAME+t.name,t.mixins=t.mixins||[],t.mixins.push(r.default),t};var i=n(173),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(39)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.name=l.KEY_ECHART_NAME+t.name,t.mixins=t.mixins||[],t.mixins.push(s.default),(0,o.default)(t)};var r=n(1),o=i(r),a=n(390),s=i(a),l=n(39)},function(t,e,n){"use strict";(function(t){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(!t||!t.length)return null;var e={};return t.forEach(function(t){var n=t.field;e[n]=e[n]||[],e[n].push(t)}),e}function o(){for(var t=arguments.length,e=Array(t),n=0;n=o)return t;switch(t){case"%s":return String(e[i++]);case"%d":return Number(e[i++]);case"%j":try{return(0,C.default)(e[i++])}catch(t){return"[Circular]"}break;default:return t}}),s=e[i];i1&&void 0!==arguments[1]?arguments[1]:2;return Number(t.toFixed(e))}function o(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",e=t.length,n="",i=0;i<16;i++)n+=t.charAt(Math.floor(Math.random()*e));return n}Object.defineProperty(e,"__esModule",{value:!0}),e.vaildData=e.getPasswordChar=e.findArray=e.filterForm=e.getObjValue=e.getDeepData=e.findByValue=e.detailDic=e.setPx=e.sortArrys=e.deepClone=e.isJson=e.getObjType=void 0;var a="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};e.hasOwn=i,e.getFixed=r,e.randomId=o;var s=n(11),l=Object.prototype.hasOwnProperty,u=e.getObjType=function(t){var e=Object.prototype.toString,n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"};return t instanceof Element?"element":n[e.call(t)]},c=(e.isJson=function(t){return Array.isArray(t)?t[0]instanceof Object:t instanceof Object},e.deepClone=function t(e){var n,i=u(e);if("array"===i)n=[];else{if("object"!==i)return e;n={}}if("array"===i)for(var r=0,o=e.length;rn[e]?-1:t[e]1&&void 0!==arguments[1]?arguments[1]:"";return(0,s.validatenull)(t)&&(t=e),(0,s.validatenull)(t)?"":(t+="",-1===t.indexOf("%")&&(t+="px"),t)},e.detailDic=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2],r=n.value||"value",o=n.children||"children";return e.forEach(function(e){"number"===i?e[r]=Number(e[r]):"string"===i&&(e[r]=e[r]+""),e[o]&&t(e[o],n,i)}),e},""),d=(e.findByValue=function t(e,n,i,r,o,l){i=i||{};var u=i.label||"label",d=i.value||"value",p=i.children||"children";if(r&&(c=n),(0,s.validatenull)(e))return c;if(["string","number","boolean"].includes(void 0===n?"undefined":a(n)))for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2],i=e.split("."),r=t;return""===i[0]&&"object"!==n?d(t):(""!==i[0]&&i.forEach(function(t){r=r[t]}),r)},e.filterForm=function(t){var e={};return Object.keys(t).forEach(function(n){(0,s.validatenull)(t[n])||(e[n]=t[n])}),e},e.findArray=function(t,e,n){n=n||"value";for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments[1],n=t.toString().length;t="";for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(i,r){new o.default(t).validate(e,n,function(t){t?r(t):i()})})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(84);e.default={methods:{t:function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return t.forEach(function(e,n){if(e.cascaderItem){var r=[].concat(i(e.cascaderItem)),o=e.prop;t[n].cascader=[].concat(i(r)),r.forEach(function(a,s){var l=n+s+1;t[l].parentProp=o,t[l].cascaderChange=e.cascaderChange,t[l].cascader=[].concat(i(r)).splice(s+1),o=t[l].prop})}}),t},0),s=(e.calcCount=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(a=0);return a=a+(t.span||e)+(t.offset||0),24===a?a=0:a>24?a=0+(t.span||e)+(t.offset||0):t.row&&24!==a&&(t.count=24-a,a=0),t},e.dateList=["dates","date","datetime","datetimerange","daterange","week","month","dategrpup","year"]);e.initVal=function(t){var e=t.listType,n=t.type,i=t.multiple,o=t.dataType,a=t.value;if(["select","tree"].includes(n)&&i||["checkbox","cascader","dynamic","upload"].includes(n)){if("picture-img"===e&&"upload"===n)return[a];if(Array.isArray(a))return a;if((0,r.validatenull)(a))return[];var s=(a||"").split(",")||[];return"number"===o?s.map(function(t){return Number(t)}):s}return a},e.getCellType=function(t){var e="input";return["select","radio","checkbox"].includes(t)?e="select":["time","timerange"].includes(t)?e="time":s.includes(t)?e="date":["cascader"].includes(t)?e="cascader":["number"].includes(t)?e="input-number":["switch"].includes(t)&&(e="switch"),o.KEY_COMPONENT_NAME+e},e.getSearchType=function(t){var e="input";return["select","radio","checkbox","switch"].includes(t)?e="select":["time","timerange"].includes(t)?e="time":s.includes(t)?e="date":["cascader"].includes(t)?e="cascader":["number"].includes(t)&&(e="input-number"),o.KEY_COMPONENT_NAME+e},e.getComponent=function(t,e){var n="input";return(0,r.validatenull)(e)?"select"===t?n="select":"radio"===t?n="radio":"checkbox"===t?n="checkbox":["time","timerange"].includes(t)?n="time":["dates","date","datetime","datetimerange","daterange","week","month","dategrpup","year"].includes(t)?n="date":"cascader"===t?n="cascader":"number"===t?n="input-number":"password"===t?n="input":"switch"===t?n="switch":"rate"===t?n="rate":"upload"===t?n="upload":"silder"===t?n="silder":"dynamic"===t?n="dynamic":"icon-select"===t?n="icon-select":"color"===t&&(n="color"):n=e,o.KEY_COMPONENT_NAME+n},e.formInitVal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={},n={};return t.forEach(function(t){"checkbox"===t.type||"cascader"===t.type||"dynamic"===t.type||"dates"===t.type||"upload"===t.type&&"picture-img"!==t.listType||t.multiple||t.range||"array"===t.dataType?(e[t.prop]=[],t.search&&(n[t.prop]=[])):["number","rate","silder"].includes(t.type)||"number"===t.dataType?(e[t.prop]=0,t.search&&(n[t.prop]=0)):(e[t.prop]="",t.search&&(n[t.prop]="")),(0,r.validatenull)(t.valueDefault)||(e[t.prop]=t.valueDefault),(0,r.validatenull)(t.searchDefault)||(n[t.prop]=t.searchDefault)}),{tableForm:e,searchForm:n}},e.getPlaceholder=function(t,e){var n=t.placeholder,i=t.label;if("search"===e){var o=t.searchPlaceholder;return(0,r.validatenull)(o)?i:o}return(0,r.validatenull)(n)?["select","checkbox","radio","tree"].includes(t.type)?this.t("tip.select")+" "+i:this.t("tip.input")+" "+i:n},e.getType=function(t){var e=t.type;return t.more||!1?"date"===e?"daterange":"datetime"===e?"datetimerange":"time"===e?"timerange":e:"textarea"===e?"input":e}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(63),r=n(43);t.exports=function(t){return i(r(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e="crud"===t;return{props:{option:{type:Object,required:!0,default:function(){return{}}}},watch:{option:{handler:function(){this.init()},deep:!0}},data:function(){return{DIC:{},cascaderDIC:{},tableOption:{},isMobile:""}},created:function(){this.init()},computed:{menuType:function(){return this.tableOption.menuType||this.$AVUE.menuType||"button"},isMediumSize:function(){return"medium"===this.controlSize?"small":this.controlSize},controlSize:function(){return this.tableOption.size||(this.$AVUE||{}).size||"medium"}},methods:{getKey:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return t[e[n]||(this.parentOption.props||{})[n]||n]},getIsMobile:function(){this.isMobile=window.document.body.clientWidth<=768},init:function(){var t=this;this.tableOption=this.option,this.getIsMobile(),window.onresize=function(){t.getIsMobile()},this.rulesInit&&(e?this.propOption:this.columnOption).forEach(function(e){t.rulesInit(e.column)}),setTimeout(function(){t.initDic()},0)},initDic:function(){var t=this;e?this.propOption.forEach(function(e){Array.isArray(e.dicData)&&t.$set(t.DIC,e.prop,e.dicData)}):this.columnOption.forEach(function(e){(e.column||[]).forEach(function(e){Array.isArray(e.dicData)&&t.$set(t.DIC,e.prop,e.dicData)})})},handleLoadDic:function(t){var e=this;return new Promise(function(n){if(e.vaildData(e.tableOption.dicFlag,!0))(0,i.loadDic)(t||e.tableOption).then(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).forEach(function(n){e.$set(e.DIC,n,t[n])}),n()});else{var r=e.tableOption.dicData||[];e.DIC=e.deepClone(r),n()}})},handleLoadCascaderDic:function(t,n){var r=this;(0,i.loadCascaderDic)(t||(e?this.propOption:this.columnOption),this.data||[n]).then(function(e){t?Object.keys(e).forEach(function(t){r.$set(r.cascaderDIC,t,e)}):r.cascaderDIC=r.deepClone(e)})}}}};var i=n(30)},function(t,e,n){var i=n(62),r=n(47);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=!0},function(t,e){t.exports={}},function(t,e,n){"use strict";function i(t){var e=t.url,n=void 0===e?"":e,i=t.column,r=void 0===i?[]:i,o=t.props,a=void 0===o?{}:o,l=[],u={};return r.forEach(function(t){var e=t.dicData,i=t.dicUrl,r=t.prop;!1!==t.dicFlag&&(Array.isArray(e)?u[r]=e:(0,s.validatenull)(i)||l.push({url:i||n,name:e||r,method:t.dicMethod,props:t.props,dataType:t.dataType,resKey:(t.props||{}).res||(a||{}).res,query:t.dicQuery}))}),{ajaxdic:l,locationdic:u}}function r(t){var e={},n=[];return new Promise(function(i){t.forEach(function(t){n.push(new Promise(function(e){u(Object.assign(t,{url:""+t.url.replace("{{key}}","")})).then(function(n){n=(0,l.detailDic)(n,t.props,t.dataType),e(n)})}))}),Promise.all(n).then(function(n){t.forEach(function(t,i){e[t.name]=n[i]}),i(e)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.sendDic=e.loadDic=e.loadCascaderDic=void 0;var o=n(13),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=n(11),l=n(4),u=(e.loadCascaderDic=function(t,e){return new Promise(function(n,i){var r=[],o=[],a={};t.forEach(function(t){t.parentProp&&r.push(t)}),e.forEach(function(t,e){r.forEach(function(n){o.push(new Promise(function(i){(0,s.validatenull)(t[n.parentProp])?i({prop:n.prop,data:[],index:e}):u(Object.assign({url:""+n.dicUrl.replace("{{key}}",t[n.parentProp])},{resKey:(n.props||{}).res,method:n.dicMethod,query:n.dicQuery})).then(function(t){i({prop:n.prop,data:t,index:e})})}))})}),Promise.all(o).then(function(t){t.forEach(function(t){(0,s.validatenull)(a[t.index])&&(a[t.index]={}),a[t.index][t.prop]=t.data}),n(a)})})},e.loadDic=function(t){var e={},n={},o=[];return new Promise(function(l,u){e=t.dicData||{};var c=i(t);e=Object.assign(e,c.locationdic),o=c.ajaxdic,(0,s.validatenull)(e)&&(0,s.validatenull)(o)&&l(),window.axios||(0,s.validatenull)(o)||(a.default.logs("axios"),l()),r(o).then(function(t){n=t,l(Object.assign(e,n))}).catch(function(t){u(t)})})},e.sendDic=function(t){var e=t.url,n=t.query,i=t.method,r=t.resKey;return new Promise(function(t){var o=function(e){var n=(0,l.getObjValue)(e.data,r);t(n)};"post"===i?window.axios.post(e,n).then(function(t){o(t)}).catch(function(){return[t([])]}):window.axios.get(e,{params:n}).then(function(t){o(t)}).catch(function(){return[t([])]})})})},function(t,e,n){var i=n(32);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(43);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(18).f,r=n(20),o=n(10)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(217),o=i(r),a=n(219),s=i(a),l="function"==typeof s.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===l(o.default)?function(t){return void 0===t?"undefined":l(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":l(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.KEY_COMPONENT_NAME="avue-",e.KEY_ECHART_NAME="echart-"},function(t,e,n){"use strict";function i(t,e){return s.call(t,e)}function r(t){return null!==t&&"object"===(void 0===t?"undefined":a(t))&&i(t,"componentOptions")}function o(t){return"object"===("undefined"==typeof HTMLElement?"undefined":a(HTMLElement))?function(){return t instanceof HTMLElement}():function(){return t&&"object"===(void 0===t?"undefined":a(t))&&1===t.nodeType&&"string"==typeof t.nodeName}()}Object.defineProperty(e,"__esModule",{value:!0});var a="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};e.hasOwn=i,e.isVNode=r,e.isDom=o;var s=Object.prototype.hasOwnProperty},function(t,e,n){var i=n(19),r=n(7).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(19);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(46)("keys"),r=n(34);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(9),r=n(7),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(28)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";function i(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=r(e),this.reject=r(n)}var r=n(32);t.exports.f=function(t){return new i(t)}},function(t,e,n){e.f=n(10)},function(t,e,n){var i=n(7),r=n(9),o=n(28),a=n(50),s=n(18).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detail=void 0;var i=n(11),r=n(4),o=n(87),a=function(t){return t&&t.__esModule?t:{default:t}}(o);e.detail=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],s=t[e.prop||e.value],l=e.type;if((0,i.validatenull)(s)&&(s=""),e.formatter&&"function"==typeof e.formatter&&(s=e.formatter(t,t[e.prop],s,e)),!(0,i.validatenull)(s)&&["date","time","datetime"].includes(l)&&e.format){var u=e.format.replace("dd","DD").replace("yyyy","YYYY");s=(0,a.default)(s).format(u)}return["password"].includes(l)&&(s=(0,r.getPasswordChar)(s,"*")),(0,i.validatenull)(o)||(s=(0,r.findByValue)(o,s,e.props||n.props,!0,["cascader"].includes(e.type))),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(40);e.default=(0,r.default)({name:"affix",props:{id:{},offsetTop:{type:Number,default:0},offsetBottom:{type:Number}},data:function(){return{affix:!1,styles:{},slot:!1,slotStyle:{}}},computed:{parent:function(){return this.validatenull(this.id)?window:(0,o.isDom)(this.id)?this.id:window.document.getElementById(this.id)},offsetType:function(){var t="top";return this.offsetBottom>=0&&(t="bottom"),t}},mounted:function(){this.parent.addEventListener("scroll",this.handleScroll,!1),this.parent.addEventListener("resize",this.handleScroll,!1)},beforeDestroy:function(){this.parent.removeEventListener("scroll",this.handleScroll,!1),this.parent.removeEventListener("resize",this.handleScroll,!1)},methods:{getScroll:function(t,e){var n=e?"pageYOffset":"pageXOffset",i=e?"scrollTop":"scrollLeft",r=t[n];return"number"!=typeof r&&(r=window.document.documentElement[i]),r},getOffset:function(t){var e=t.getBoundingClientRect(),n=this.getScroll(this.parent,!0),i=this.getScroll(this.parent),r=window.document.body,o=r.clientTop||0,a=r.clientLeft||0;return{top:e.top+n-o,left:e.left+i-a}},handleScroll:function(){var t=this.affix,e=this.getScroll(window,!0),n=this.getOffset(this.$el),i=window.innerHeight,r=this.$el.getElementsByTagName("div")[0].offsetHeight;n.top-this.offsetTope&&"top"==this.offsetType&&t&&(this.slot=!1,this.slotStyle={},this.affix=!1,this.styles=null,this.$emit("on-change",!1)),n.top+this.offsetBottom+r>e+i&&"bottom"==this.offsetType&&!t?(this.affix=!0,this.styles={bottom:this.offsetBottom+"px",left:n.left+"px",width:this.$el.offsetWidth+"px"},this.$emit("on-change",!0)):n.top+this.offsetBottom+r table > tbody")[0];this.sortable=window.Sortable.create(e,{ghostClass:"avue-crud__sortable",handle:this.tableOption.dragHandler?".avue-crud__drag-handler":void 0,onEnd:function(e){var n=e.oldIndex,i=e.newIndex,r=t.list.splice(n,1)[0];t.list.splice(i,0,r),t.$emit("sortable-change",n,i,r,t.list)}})},updateDic:function(t,e){this.$refs.dialogForm.updateDic(t,e)},formatData:function(){var t=this.data;if(0===t.length)return[];(0,T.addAttrs)(this,t,{expand:this.expandAll,expandLevel:this.expandLevel}),this.list=(0,D.default)(this,t)},showRow:function(t){var e=(t.rowIndex,!t.row._parent||t.row._parent._expand&&t.row._parent._show);return t.row._show=e,e?"animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;":"display:none;"},validateField:function(t){return this.$refs.dialogForm.$refs.tableForm.validateField(t)},handleGetRowKeys:function(t){return t[this.rowKey]},rulesInit:function(){var t=this;this.formRules={},this.propOption.forEach(function(e){e.rules&&(t.formRules[e.prop]=e.rules),e.rules&&e.cell&&(t.formCellRules[e.prop]=e.rules)})},menuIcon:function(t){return"icon"===this.menuType?"":this.t("crud."+t)},menuText:function(t){return"text"===this.menuType?"text":t},selectClear:function(){this.$refs.table.clearSelection()},toggleRowSelection:function(t,e){this.$refs.table.toggleRowSelection(t,e)},toggleRowExpansion:function(t,e){this.$refs.table.toggleRowExpansion(t,e)},setCurrentRow:function(t){this.$refs.table.setCurrentRow(t)},indexMethod:function(t){return t+1+((this.$refs.tablePage.defaultPage.currentPage||1)-1)*(this.$refs.tablePage.defaultPage.pageSize||10)},formVal:function(){var t=this;Object.keys(this.value).forEach(function(e){t.$set(t.tableForm,e,t.value[e])})},dataInit:function(){this.list=[].concat(r(this.data)),this.list.forEach(function(t,e){t.$index=e})},expandChange:function(t,e){this.expandList=[].concat(r(e)),this.$emit("expand-change",t,e)},currentRowChange:function(t){this.$emit("current-row-change",t)},refreshChange:function(){this.$emit("refresh-change",{page:this.defaultPage,searchForm:this.searchForm})},toggleSelection:function(t){var e=this;t?t.forEach(function(t){e.$refs.table.toggleRowSelection(t)}):this.$refs.table.clearSelection()},selectionChange:function(t){this.tableSelect=t,this.$emit("selection-change",this.tableSelect)},select:function(t,e){this.$emit("select",t,e)},selectAll:function(t){this.$emit("select-all",t)},sortChange:function(t){this.$emit("sort-change",t)},rowDblclick:function(t,e){this.$emit("row-dblclick",t,e)},rowClick:function(t,e,n){this.$emit("row-click",t,e,n)},cellMouseEnter:function(t,e,n,i){this.$emit("cell-mouse-enter",t,e,n,i)},cellMouseLeave:function(t,e,n,i){this.$emit("cell-mouse-leave",t,e,n,i)},cellClick:function(t,e,n,i){this.$emit("cell-click",t,e,n,i)},cellDblclick:function(t,e,n,i){this.$emit("cell-dblclick",t,e,n,i)},rowCell:function(t,e){t.$cellEdit?this.rowCellUpdate(t,e):this.rowCellEdit(t,e)},rowCellAdd:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.list.length;this.list.push(this.deepClone(Object.assign(this.tableForm,{$cellEdit:!0,$index:e},t))),this.formIndexList.push(e)},rowCanel:function(t,e){if(this.validatenull(t[this.rowKey]))return void this.list.splice(e,1);this.formCascaderList[e].$cellEdit=!1,this.$set(this.list,e,this.formCascaderList[e]),this.$set(this.cascaderDIC,e,this.cascaderDicList[e]),this.formIndexList.splice(this.formIndexList.indexOf(e),1)},rowCellEdit:function(t,e){var n=this;t.$cellEdit=!0,this.$set(this.list,e,t),this.formCascaderList[e]=this.deepClone(t),this.cascaderDicList[e]=this.deepClone(this.cascaderDIC[e]),setTimeout(function(){n.formIndexList.push(e)},1e3)},rowCellUpdate:function(t,e){var n=this;this.asyncValidator(this.formCellRules,t).then(function(i){n.$refs.dialogForm.keyBtn=!0,n.$emit("row-update",t,e,function(){t.$cellEdit=!1,n.$set(n.list,e,t)},function(){n.$refs.dialogForm.keyBtn=!1})}).catch(function(t){n.$message.warning(t[0])})},rowAdd:function(){this.$refs.dialogForm.show("add")},rowClone:function(t){var e={};return Object.keys(t).forEach(function(n){["_parent","children"].includes(n)||(e[n]=t[n])}),e},searchChange:function(){this.$refs.headerSearch.searchChange()},searchReset:function(){this.$refs.headerSearch.searchReset()},rowEdit:function(t,e){this.tableForm=this.rowClone(t),this.$emit("input",this.tableForm),this.tableIndex=e,this.$refs.dialogForm.show("edit",e)},rowView:function(t,e){this.tableForm=this.rowClone(t),this.$emit("input",this.tableForm),this.tableIndex=e,this.$refs.dialogForm.show("view")},rowDel:function(t,e){this.$emit("row-del",t,e)},resetForm:function(){this.$refs.dialogForm.resetForm(),this.$emit("input",this.tableForm)},findColumnIndex:function(t){return this.findArray(this.propOption,t,"prop")},tableSpanMethod:function(t){if("function"==typeof this.spanMethod)return this.spanMethod(t)},tableSummaryMethod:function(t){var e=this;if("function"==typeof this.summaryMethod)return this.summaryMethod(t);var n=t.columns,i=t.data,r=[];return n.length>0&&n.forEach(function(t,n){var o=e.sumColumnList.find(function(e){return e.name===t.property});if(0===n)r[n]=e.tableOption.sumText||A.default.sumText;else if(o)switch(o.type){case"count":r[n]="计数:"+i.length;break;case"avg":var a=i.map(function(e){return Number(e[t.property])}),s=1;r[n]=a.reduce(function(t,e){var n=Number(e);return isNaN(n)?t:(t+e)/s++},0),r[n]="平均:"+r[n].toFixed(2);break;case"sum":var l=i.map(function(e){return Number(e[t.property])});r[n]=l.reduce(function(t,e){var n=Number(e);return isNaN(n)?t:t+e},0),r[n]="合计:"+r[n].toFixed(2)}else r[n]="-"}),this.sumsList=r,r}}})},function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:"default",e="";switch(t){case"default":e="#35495E";break;case"primary":e="#3488ff";break;case"success":e="#43B883";break;case"warning":e="#e6a23c";break;case"danger":e="#f56c6c"}return e}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.capsule=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"primary";console.log("%c "+t+" %c "+e+" %c","background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;","background:"+r(n)+"; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;","background:transparent")},o.colorful=function(t){var e;(e=console).log.apply(e,["%c"+t.map(function(t){return t.text||""}).join("%c")].concat(i(t.map(function(t){return"color: "+r(t.type)+";"}))))},o.default=function(t){o.colorful([{text:t}])},o.primary=function(t){o.colorful([{text:t,type:"primary"}])},o.success=function(t){o.colorful([{text:t,type:"success"}])},o.warning=function(t){o.colorful([{text:t,type:"warning"}])},o.danger=function(t){o.colorful([{text:t,type:"danger"}])},e.default=o},function(t,e,n){"use strict";e.__esModule=!0;var i=n(186),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=r.default||function(t){for(var e=1;el;)i(s,n=e[l++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var i=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(44),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){t.exports={default:n(192),__esModule:!0}},function(t,e){},function(t,e,n){"use strict";var i=n(193)(!0);n(68)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(28),r=n(16),o=n(69),a=n(17),s=n(29),l=n(194),u=n(37),c=n(196),d=n(10)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,m,v,y){l(n,e,h);var b,g,_,x=function(t){if(!f&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",O="values"==m,C=!1,S=t.prototype,M=S[d]||S["@@iterator"]||m&&S[m],k=M||x(m),j=m?O?x("entries"):k:void 0,P="Array"==e?S.entries||M:M;if(P&&(_=c(P.call(new t)))!==Object.prototype&&_.next&&(u(_,w,!0),i||"function"==typeof _[d]||a(_,d,p)),O&&M&&"values"!==M.name&&(C=!0,k=function(){return M.call(this)}),i&&!y||!f&&!C&&S[d]||a(S,d,k),s[e]=k,s[w]=p,m)if(b={values:O?k:x("values"),keys:v?k:x("keys"),entries:j},y)for(g in b)g in S||o(S,g,b[g]);else r(r.P+r.F*(f||C),e,b);return b}},function(t,e,n){t.exports=n(17)},function(t,e,n){var i=n(14),r=n(195),o=n(47),a=n(45)("IE_PROTO"),s=function(){},l=function(){var t,e=n(41)("iframe"),i=o.length;for(e.style.display="none",n(71).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("