2019-08-01 19:52:12 +08:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6d56"],{"6CXL":function(e,t,a){},"6bP5":function(e,t,a){"use strict";var i=a("Qq1u");a.n(i).a},Focj:function(e,t,a){"use strict";a.r(t);var i=a("P2sY"),n=a.n(i),r=a("jr1U"),l=a.n(r),o=a("rfXi"),s=a.n(o),c=a("Kw5r");function d(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=[];return s()(e).forEach(function(e){void 0===e._expanded&&c.default.set(e,"_expanded",t);var r=1;if(void 0!==i&&null!==i&&(r=i+1),c.default.set(e,"_level",r),a&&c.default.set(e,"parent",a),n.push(e),e.children&&e.children.length>0){var l=d(e.children,t,e,r);n=n.concat(l)}}),n}var u={name:"TreeTable",props:{data:{type:[Array,Object],required:!0},columns:{type:Array,default:function(){return[]}},evalFunc:Function,evalArgs:Array,expandAll:{type:Boolean,default:!1}},computed:{formatData:function(){var e=void 0;e=Array.isArray(this.data)?this.data:[this.data];var t=this.evalFunc||d,a=this.evalArgs?l()([e,this.expandAll],this.evalArgs):[e,this.expandAll];return t.apply(null,a)}},methods:{showRow:function(e){var t=!e.row.parent||e.row.parent._expanded&&e.row.parent._show;return e.row._show=t,t?"animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;":"display:none;"},toggleExpanded:function(e){var t=this.formatData[e];t._expanded=!t._expanded},iconShow:function(e,t){return 0===e&&t.children&&t.children.length>0}}},m=(a("6bP5"),a("vhXz"),a("KHd+")),f=Object(m.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-table",e._b({attrs:{data:e.formatData,"row-style":e.showRow}},"el-table",e.$attrs,!1),[0===e.columns.length?a("el-table-column",{attrs:{width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row._level,function(e){return a("span",{key:e,staticClass:"ms-tree-space"})}),e._v(" "),e.iconShow(0,t.row)?a("span",{staticClass:"tree-ctrl",on:{click:function(a){e.toggleExpanded(t.$index)}}},[t.row._expanded?a("i",{staticClass:"el-icon-minus"}):a("i",{staticClass:"el-icon-plus"})]):e._e(),e._v("\n "+e._s(t.$index)+"\n ")]}}])}):e._l(e.columns,function(t,i){return a("el-table-column",{key:t.value,attrs:{label:t.text,width:t.width},scopedSlots:e._u([{key:"default",fn:function(n){return[e._l(n.row._level,function(t){return 0===i?a("span",{key:t,staticClass:"ms-tree-space"}):e._e()}),e._v(" "),e.iconShow(i,n.row)?a("span",{staticClass:"tree-ctrl",on:{click:function(t){e.toggleExpanded(n.$index)}}},[n.row._expanded?a("i",{staticClass:"el-icon-minus"}):a("i",{staticClass:"el-icon-plus"})]):e._e(),e._v("\n "+e._s(n.row[t.value])+"\n ")]}}])})}),e._v(" "),e._t("default")],2)},[],!1,null,"414e2741",null);f.options.__file="index.vue";var p=f.exports,v=a("t3Un");function g(e){var t=new URLSearchParams;return t.append("name",e.name),t.append("levle",e.levle),t.append("parentid",e.parentid),t.append("firstlevelid",e.firstlevelid),t.append("createid",e.createid),Object(v.a)({url:"http://192.168.1.45:8080/region/create",method:"post",data:t})}function h(e){var t=new URLSearchParams;return t.append("regionid",e),Object(v.a)({url:"http://192.168.1.45:8080/region/regionmanagercandidate",method:"post",data:t})}function b(e,t,a,i){var n=new URLSearchParams;return n.append("regionid",e),n.append("name",t),n.append("regionmanagerid",a),n.append("parentid",i),Object(v.a)({url:"http://192.168.1.45:8080/region/updateregion",method:"post",data:n})}var _=a("Q2AE"),w={inserted:function(e,t,a){var i=t.value,n=_.a.getters&&_.a.getters.roles;if(!(i&&i instanceof Array&&i.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var r=i;n.some(function(e){return r.includes(e)})||e.parentNode&&e.parentNode.removeChild(e)}},y=function(e){e.directive("permission",w)};function x(e,t,a,i,n){var r=[],l=[];return s()(e).forEach(function(e){void 0===e._expanded&&c.default.set(e,"_expanded",t);var o=1;if(void 0!==i&&null!==i&&(o=i+1),c.default.set(e,"_level",o),a?(c.default.set(e,"parent",a),r[o]||(r[o]=0),c.default.set(e,"_marginLeft",r[o]+a._marginLeft),c.default.set(
|