@persagy2/meri-design
Version:
fork from meri-design and extend it.
7 lines • 80.9 kB
JavaScript
/*!
* @@persagy2/meri-design v1.4.9-extend.2
* (c) 2019-2020 xiongshuang
* Released under the MIT License.
* 2022-12-07 10:32:51
*/
var e,t;e=this,t=function(e){return function(){"use strict";var t={1952:function(e,t,n){var i=n(5064);t.Z={name:"Checkbox",props:{checked:{type:String,default:"uncheck"},disabled:{type:Boolean,default:!1},stopPropagation:{type:Boolean,default:!1}},methods:{TextEllipsis:i.Z,handleChange:function(e){var t,n=this.disabled,i=this.checked;if(this.stopPropagation&&e.stopPropagation(),!n){var a=this.$el.dataset,r="";r="checked"===i?"uncheck":"checked",null!==(t=this._events)&&void 0!==t&&t.change?this.$emit("change",r,a):this.$emit("update:checked",r)}}}}},8349:function(e,t,n){n.d(t,{s:function(){return i},x:function(){return a}});var i=function(){var e=this,t=e._self._c;return t("div",{class:["p-checkbox",e.disabled&&"p-checkbox-disabled"],on:{click:e.handleChange}},[t("i",{class:["p-checkbox-box","p-checkbox-"+e.checked]}),e._v(" "),Object.keys(e.$slots).length?t("span",{staticClass:"p-checkbox-text",on:{mouseenter:e.TextEllipsis}},[e._t("default")],2):e._e()])},a=[]},6875:function(e,t,n){var i=n(3931);i.Z.install=function(e){return e.component(i.Z.name,i.Z)},t.default=i.Z},7488:function(e,t,n){n.d(t,{default:function(){return p}});var i=n(2205),a=n.n(i),r=n(3114),o=n(5171),l={name:"PopoverTip",props:{parent:{type:Object,default:function(){return{}}},show:{type:Boolean,default:!1},content:{type:String,default:""},position:{type:Boolean,default:!0},split:{type:Boolean,default:!0}},computed:{contentArr:function(){var e=this;return this.content.split("、").map((function(t,n){return{id:"content-".concat(n),text:t,scroll:t.length>32?e.getScrollWidth(t):0}}))}},methods:{getScrollWidth:function(e){var t=document.createElement("div");t.innerText=e,t.style.position="absolute",t.style.left="0",t.style.bottom="0",t.style.zIndex="-100",t.style.display="inline-block",t.style.height="0",t.style.opacity="0",t.style.overflow="hidden",t.style.whiteSpace="nowrap",t.style.fontSize="14px",document.body.appendChild(t);var n=t.scrollWidth;return(0,r.Z)()?t.removeNode(!0):t.remove(),n>452?n-452:0},popoverTipHandle:function(e){this.$emit("tipHandle",e)},contentEnter:function(){this.split||(this.show=!1)}}},s=(0,n(1900).Z)(l,(function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:e.position?"selectDownUpExtend":"selectDownUpExtendTop"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],class:["p-popover-tip",e.split?"p-popover-tip-split":"p-popover-tip-words",e.position?"p-popover-tip-bottom":"p-popover-tip-top"],on:{wheel:function(e){e.stopPropagation()},mouseenter:function(t){return e.popoverTipHandle("enter")},mouseleave:function(t){return e.popoverTipHandle("leave")}}},[t("section",{staticClass:"p-popover-tip-content",on:{mouseenter:e.contentEnter}},[e.split?e._l(e.contentArr,(function(n){return t("article",{key:n.id,class:["p-popover-tip-content-item",n.scroll&&"p-popover-tip-content-item-before"]},[t("span",{staticClass:"p-popover-tip-item-text",style:n.scroll&&{transform:"translateX(".concat(-n.scroll,"px)")}},[e._v(e._s(n.text))])])})):[t("article",{staticClass:"p-popover-tip-content-words"},[e._v(e._s(e.content))])]],2),e._v(" "),t("section",{staticClass:"p-popover-tip-triangle"})])])}),[],!1,null,null,null).exports,c=n(4597),h=a().extend(s),d=null,u=function(e){var t=e.propsData;if(t.content){var n=e.tag,i=e.countTag,a=document.body;return(d=(d=new h({propsData:t})).$mount()).tag=n,d.countTag=i,d.dom=a,a.appendChild(d.$el),d}};u.remove=o.Z,u.resetPosition=function(e){if(e.content){var t=window,n=t.innerWidth,i=t.pageXOffset,a=e.tag,o=e.countTag,l=e.dom,s=a.getBoundingClientRect(),h=s.left,d=s.width,u=o.getBoundingClientRect(),p=u.left,f=u.width;if(!(n<=p+f/2||n<=f||p<0)){var m=function(e){var t=e.content,n=e.split,i=t.split("、"),a=document.body,o=document.createElement("div");o.className="p-popover-tip",o.style.left="0",o.style.bottom="0",o.style.opacity="0",o.style.zIndex="-100";var l='<section class="p-popover-tip-content">';n?i.forEach((function(e){l+='<article class="p-popover-tip-content-item"><span class="p-popover-tip-item-text">'.concat(e,"</span></article>")})):l+='<article class="p-popover-tip-content-words">'.concat(t,"</article>"),l+="</section>",o.innerHTML=l,a.appendChild(o);var s=o.getBoundingClientRect(),h=s.width,d=s.height;return(0,r.Z)()?o.removeNode(!0):o.remove(),{width:h,height:d,scrollWidth:(0,c.Z)()}}(e),g=m.width,v=m.height,w=m.scrollWidth,y=function(e,t,n){var i,a=t.clientHeight,r=window.pageYOffset,o=e.getBoundingClientRect(),l=o.top,s=o.height,c=!0,h=l-8;return h>=n?(i=h-n+r,c=!1):i=a-(l+s+8)>=n?l+s+8+r:a-n+r,{Y:i,P:c}}(a,l,v),D=y.Y,C=y.P;e.position=C,e.$el.style.top="".concat(D,"px");var k,S=e.$el.lastChild,b=0;if(g===n)i>0&&(b=0),k=p+f/2-6;else{if(0===h)b=0;else{var x=p+f/2,T=g/2;b=x<T?0:g<=d?g<=n-h?x-T:n-g:x>=T?n-x<=T?n-g-w:x-T:0}k=p-b+f/2-6}e.$el.style.left="".concat(b+i,"px"),S.style.left="".concat(k,"px"),e.show=!0}}};var p=u},9099:function(e,t,n){n.d(t,{default:function(){return h}});var i=n(1900),a={name:"TreeNode",components:{ArrowTriangle:(0,i.Z)({},(function(){var e=this._self._c;return e("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("path",{staticClass:"svg-fill-grey-500",attrs:{d:"\r\n M7.36397105,6.47904167\r\n C7.71544566,6.05570759 8.29167643,6.06338938 8.63677321,6.47904167\r\n L10.9236602,9.23348584\r\n C11.2751348,9.65681992 11.1147123,10 10.555128,10\r\n L5.44561621,10 C4.89060692,10 4.7319873,9.64913813 5.07708407,9.23348584\r\n L7.36397105,6.47904167\r\n Z"}})])}),[],!1,null,null,null).exports,Checkbox:n(6875).default},props:{multiple:{type:Boolean,default:!1},linkage:{type:Boolean,default:!0},lastStage:{type:Boolean,default:!1},treeItem:{type:Object,default:function(){}},change:{type:Function,default:function(){return!1}},clickCallBack:{type:Function,default:function(){return!1}},openNode:{type:Function,default:function(){}},triangleShow:{type:Boolean,default:!1},index:{type:String,default:""},leftPosition:{type:Number,default:12},childDisabled:{type:Boolean,default:!1}},computed:{paddingLeft:function(){return 24*(this.index.split("-").length-1)+Number(this.leftPosition)},checkboxShow:function(){var e=this.treeItem,t=!e.hasOwnProperty("isleaf")||e.isleaf;return this.multiple&&(!this.triangleShow||!this.lastStage)&&t||this.multiple&&(!this.triangleShow||!this.lastStage)&&!1===t},showCheckBox:function(){var e=this.treeItem;return!e.hasOwnProperty("showCheckBox")||e.showCheckBox},isDisabled:function(){var e=this.treeItem;return!!e.disabled||!!e.hasOwnProperty("isleaf")&&!1===e.isleaf}},methods:{openChild:function(){var e=!this.treeItem.open;this.treeItem.open=e,this.openNode(e,this.treeItem)},treeItemEnter:function(e){var t=e.target,n=t.clientWidth,i=t.scrollWidth;!t.title&&i>n&&(t.title=t.innerText)},handleCheck:function(e,t){if(!(e.disabled||!1===e.isleaf||!this.showCheckBox&&this.multiple))if(this.multiple){if(this.checkboxShow){var n="",i=this.treeItem,a=i.checked,r=i.children;if(n="checked"===a?"uncheck":"checked",this.clickCallBack(e),this.linkage)r&&r.length&&(i.children=this.setCheckedStatus(r,n)),i.checked=n,this.treeItem=i,this.change(e,t);else{if(this.lastStage&&r&&r.length)return;this.treeItem=i,i.checked=n,this.change(e,t)}}}else{var o=e.children&&e.children.length||!!e.hasOwnProperty("isleaf")&&!e.isleaf;if(this.lastStage&&o)return;this.change(e,t)}},setCheckedStatus:function(e,t){var n=this;return e.map((function(e){return n.childDisabled?(e.checked=t,"checked"===t?n.$set(e,"disabled",!0):n.$set(e,"disabled",!1)):e.disabled||(e.checked=t),e.children&&e.children.length&&(e.children=n.setCheckedStatus(e.children,t)),e}))}}},r=(0,i.Z)(a,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"p-tree-node"},[t("div",{class:["p-tree-node-content",!e.multiple&&"checked"===e.treeItem.checked&&"p-tree-node-content-checked",e.treeItem.disabled&&"p-tree-node-content-disabled","0"===e.index&&"p-tree-node-content-".concat(e.index)],style:{paddingLeft:e.paddingLeft+"px"}},[t("section",{staticClass:"p-tree-svg",on:{click:function(t){return t.stopPropagation(),e.openChild.apply(null,arguments)}}},[e.triangleShow?t("ArrowTriangle",{class:["p-tree-icon-svg",e.treeItem.open&&"p-tree-icon-rotate"]}):e._e()],1),e._v(" "),t("div",{staticClass:"p-tree-node-check",on:{click:function(t){return t.stopPropagation(),e.handleCheck(e.treeItem,e.index)}}},[e.checkboxShow&&e.treeItem.name&&e.showCheckBox?t("div",{staticClass:"p-tree-node-checkbox"},[t("Checkbox",{attrs:{checked:e.treeItem.checked,disabled:e.isDisabled}})],1):e._e(),e._v(" "),e.treeItem.name?t("section",{class:["p-tree-node-title",e.multiple?"p-tree-node-title-multiple":"p-tree-node-title-single"]},[t("article",{staticClass:"p-tree-node-name",domProps:{innerHTML:e._s(e.treeItem.name)},on:{mouseenter:e.treeItemEnter}})]):e._e()])]),e._v(" "),e.triangleShow&&e.treeItem.open?t("div",{staticClass:"p-tree-child"},e._l(e.treeItem.children,(function(n,i){return t("TreeNode",{key:n.id+"-"+i,attrs:{multiple:e.multiple,linkage:e.linkage,childDisabled:e.childDisabled,lastStage:e.lastStage,treeItem:n,triangleShow:!!(n.children&&n.children.length&&n.children[0].id),index:"".concat(e.index,"-").concat(i),change:e.change,clickCallBack:e.clickCallBack,leftPosition:e.leftPosition,openNode:e.openNode},on:{"update:treeItem":function(e){n=e},"update:tree-item":function(e){n=e}}})})),1):e._e()])}),[],!1,null,null,null),o=r.exports,l=n(62),s={name:"Tree",components:{TreeNode:o},props:{multiple:{type:Boolean,default:!1},linkage:{type:Boolean,default:!0},lastStage:{type:Boolean,default:!1},notNull:{type:Boolean,default:!1},returnParentNode:{type:Boolean,default:!0},data:{type:Array,default:function(){return[]}},leftPosition:{type:Number,default:12}},computed:{treeData:{get:function(){return this.data},set:function(e){return e}}},methods:{change:function(e,t){var n=e.id;if(this.multiple){var i=t.split("-");i.pop();var a=this.treeData;this.linkage&&this.changeParentChecked(a,i);var r=this.filterIds(a),o=r.map((function(e){return e.id}));this.$emit("change",{id:n,checkedIds:o,obj:e,checkedObj:r})}else this.treeData=this.changeCheckedItem(this.treeData,n),this.$emit("change",e)},changeCheckedItem:function(e,t){var n=this;return e.map((function(e){return e.id===t?e.checked="checked":e.checked="uncheck",e.children&&e.children.length&&(e.children=n.changeCheckedItem(e.children,t)),e}))},changeParentChecked:function(e,t){var n=[];this.currentData(e,t,n),n.forEach((function(e){e.checked=(0,l.B5)(e.children)}))},currentData:function(e,t,n){var i=this,a=t.shift();e.forEach((function(e,r){a&&r===Number(a)&&(n.unshift(e),e.children&&e.children.length&&i.currentData(e.children,t,n))}))},filterIds:function(e){var t=[];return this.recursionIds(e,t),t},recursionIds:function(e,t){var n=this,i=this.returnParentNode,a=this.notNull;e.forEach((function(e){var r=e.children&&e.children.length;i?("checked"===e.checked&&t.push(e),a&&"notNull"===e.checked&&t.push(e)):"checked"!==e.checked||r||t.push(e),r&&n.recursionIds(e.children,t)}))},openNode:function(e,t){this.$emit("openNode",e,t)}}},c=(0,i.Z)(s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"p-tree"},e._l(e.treeData,(function(n,i){return t("TreeNode",{key:n.id+"-"+i,attrs:{multiple:e.multiple,linkage:e.linkage,lastStage:e.lastStage,treeItem:n,triangleShow:!(!n.children||!n.children.length),index:String(i),change:e.change,leftPosition:e.leftPosition,openNode:e.openNode},on:{"update:treeItem":function(e){n=e},"update:tree-item":function(e){n=e}}})})),1)}),[],!1,null,null,null).exports;c.install=function(e){return e.component(c.name,c)};var h=c},442:function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.Z=function e(t){if(t&&"object"===n(t)){var i=Array.isArray(t)?[]:{};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("object"===n(t[a])&&n(t[a])?i[a]=e(t[a]):i[a]=t[a]);return i}return[]}},4597:function(e,t,n){var i=n(3114);t.Z=function(){var e=document.createElement("div");e.style.cssText="position:absolute;top:-1000px;width:100px;height:100px;overflow:hidden;opacity:0;";var t=document.body.appendChild(e).clientWidth;e.style.overflowY="scroll";var n=e.clientWidth;(0,i.Z)()?e.removeNode(!0):e.remove();var a=t-n;return a<6?6:a}},3114:function(e,t){t.Z=function(){return!!window.ActiveXObject||"ActiveXObject"in window}},5171:function(e,t){t.Z=function(e){if(e&&!e._isDestroyed){e.$destroy();var t=e.$el;t&&t.parentNode.removeChild(t)}}},5064:function(e,t){t.Z=function(e){var t=e.target,n=t.clientWidth,i=t.scrollWidth;t.title=i>n?t.innerText:""}},62:function(e,t,n){n.d(t,{is:function(){return s},ih:function(){return u},X4:function(){return h},kp:function(){return p},B5:function(){return f},tz:function(){return m},rB:function(){return g},u_:function(){return v}});var i=n(442);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function e(t,n,i){return n.forEach((function(n){var a=o(o({},{parentId:i,id:n.id,name:n.name,checked:n.checked,open:n.open,showCheckBox:!n.hasOwnProperty("showCheckBox")||n.showCheckBox,disabled:!!n.disabled&&n.disabled,lastNode:!(n.hasOwnProperty("children")&&n.children instanceof Array&&n.children.length),isleaf:!n.hasOwnProperty("isleaf")||n.isleaf}),n);t.push(a),n.children&&n.children instanceof Array&&n.children.length&&e(t,n.children,n.id)})),t},c=function(e){var t=new Map;return e.forEach((function(e){t.has(e.id)||t.set(e.id,e)})),t},h=function(e){var t=[];if(!Array.isArray(e))return t;e.forEach((function(e){delete e.children}));var n=c(e);return e.forEach((function(e){var i=n.get(e.parentId);i?(i.children||(i.children=[])).push(e):t.push(e)})),t},d=function e(t,n,i){var a=i.get(n.parentId);a&&(t.push(a),e(t,a,i))},u=function(e,t){var n=[];return function(e,t,n){t.forEach((function(t){var i=[t];d(i,t,n),e.push(function(e){for(var t="",n="",i="",a="",r=null,o=e.length-1;o>=0;o--)t+="".concat(e[o].id,"/"),n+="".concat(e[o].name,"/"),0===o&&(i=e[0].id,a=e[0].name.replace(/<[^<>]+>/g,""),r="checked"===e[0].checked);return t&&(t=t.substring(0,t.length-1)),n&&(n=n.substring(0,n.length-1)),{id:t,name:n,lId:i,lName:a,selected:r}}(i))}))}(n,t,c(e)),n},p=function(e){var t=new Map;return e.filter((function(e){return!t.has(e.id)&&t.set(e.id,e.name)}))},f=function(e){var t=e.filter((function(e){return!e.disabled}));return t.every((function(e){return"checked"===e.checked}))?"checked":t.every((function(e){return"uncheck"===e.checked}))?"uncheck":"notNull"},m=function e(t,n,i){return i.forEach((function(a){a.id===n&&(t.push(a.parentId),e(t,a.parentId,i))})),t},g=function e(t){return t&&t.length?(0,i.Z)(t).map((function(t){return t.children&&t.children.length?(t.checked="uncheck",t.showCheckBox=!t.hasOwnProperty("showCheckBox")||t.showCheckBox,t.open=t.open||!1,t.disabled=t.disabled||!1,t.children=e(t.children)):(t.checked="uncheck",t.open=t.open||!1,t.disabled=t.disabled||!1,t.showCheckBox=!t.hasOwnProperty("showCheckBox")||t.showCheckBox),t})):[]},v=function(e,t,n,i,a){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=s([],t,"-1"),l=function e(t){var i=o.find((function(e){return e.id===t}));if(!i)return!1;var l=o.filter((function(e){return e.parentId===t}));a?i.open=!0:n?r||(i.checked=f(l),i.open="uncheck"!==f(l)):i.open=!0,e(i.parentId)},c=function e(t){var i=o.filter((function(e){return e.parentId===t})),a=o.find((function(e){return e.id===t}));if(!i||!i.length)return!1;a.open=!0,i.forEach((function(t){t.disabled&&(t.checked="checked",n&&e(t.id))}))};e.forEach((function(t){var i=o.findIndex((function(e){return e.id===t}));-1!==i&&(a?o[i].lastNode&&(o[i].checked="checked"):(o[i].checked="checked",r&&e.forEach((function(e){o.forEach((function(t){t.parentId===e&&(t.checked="checked",t.disabled=!0)}))}))),l(o[i].parentId),n&&c(o[i].id))}));var d=o.filter((function(e){return i?"uncheck"!==e.checked:"checked"===e.checked}));return{resultData:h(o),selectedData:d}}},7021:function(){},3931:function(e,t,n){var i=n(872),a=n(5242),r=(n(6921),(0,n(1900).Z)(a.Z,i.s,i.x,!1,null,null,null));t.Z=r.exports},5242:function(e,t,n){var i=n(1952);t.Z=i.Z},872:function(e,t,n){n.d(t,{s:function(){return i.s},x:function(){return i.x}});var i=n(8349)},6921:function(e,t,n){n(7021)},1900:function(e,t,n){function i(e,t,n,i,a,r,o,l){var s,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),o?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=s):a&&(s=l?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),s)if(c.functional){c._injectStyles=s;var h=c.render;c.render=function(e,t){return s.call(t),h(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:c}}n.d(t,{Z:function(){return i}})},2205:function(t){t.exports=e}},n={};function i(e){var a=n[e];if(void 0!==a)return a.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{default:function(){return ie}});var e=i(1900),t=(0,e.Z)({},(function(){var e=this._self._c;return e("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("path",{staticClass:"svg-fill-grey-500",attrs:{d:"\r\n M8.3904344,6.48804301\r\n L11.350122,10.1876525\r\n C11.5226268,10.4032834 11.4876661,10.7179296 11.2720351,10.8904344\r\n C11.1833786,10.9613596 11.0732233,11 10.9596876,11\r\n L5.04031242,11\r\n C4.76417005,11 4.54031242,10.7761424 4.54031242,10.5\r\n C4.54031242,10.3864643 4.5789528,10.276309 4.64987802,10.1876525\r\n L7.6095656,6.48804301\r\n C7.78207037,6.27241204 8.09671656,6.23745135 8.31234752,6.40995612\r\n C8.34117988,6.43302201 8.36736852,6.45921065 8.3904344,6.48804301\r\n Z",transform:"translate(0, -0.5)"}})])}),[],!1,null,null,null).exports,n=(0,e.Z)({},(function(){var e=this._self._c;return e("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("g",{attrs:{stroke:"none","stroke-width":"1","fill-rule":"evenodd"}},[e("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M8,1 C4.134375,1 1,4.134375 1,8 C1,11.865625 4.134375,15 8,15 C11.865625,15 15,11.865625 15,8 C15,4.134375 11.865625,1 8,1 Z M10.784375,9.6375 C11.040625,9.89375 11.040625,10.309375 10.784375,10.565625 C10.528125,10.821875 10.1125,10.821875 9.85625,10.565625 L8,8.709375 L6.14375,10.565625 C5.8875,10.821875 5.471875,10.821875 5.215625,10.565625 C4.959375,10.309375 4.959375,9.89375 5.215625,9.6375 L7.071875,7.78125 L5.215625,5.925 C4.959375,5.66875 4.959375,5.253125 5.215625,4.996875 C5.471875,4.740625 5.8875,4.740625 6.14375,4.996875 L8,6.853125 L9.85625,4.996875 C10.1125,4.740625 10.528125,4.740625 10.784375,4.996875 C11.040625,5.253125 11.040625,5.66875 10.784375,5.925 L8.928125,7.78125 L10.784375,9.6375 L10.784375,9.6375 Z"}})])])}),[],!1,null,null,null).exports,r=i(442),o=i(7488),l={name:"SelectInput",components:{TriangleSvg:t,DeleteIcon:n},props:{value:{type:String,default:""},title:{type:String,default:""},placeholder:{type:String,default:"请选择"},unit:{type:String,default:"个"},data:{type:Array,default:function(){return[]}},triangle:{type:Boolean,default:!1},activeClose:{type:Boolean,default:!1},tipPlace:{type:String,default:""},disabled:{type:Boolean,default:!1},hideClear:{type:Boolean,default:!1},isShowAllChoice:{type:Boolean,default:!1},isAllChoice:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},caption:{type:String,default:""},errorText:{type:String,default:""},errorShow:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},data:function(){return{tipHeight:0,selectedTipStyle:{bottom:0,left:0},tipShow:!1,inputValue:"",inputContent:"",fieldStatus:!0,TriggerIn:!1,targetVm:null,isReadyOnly:!0,captionWidth:0,popoverTip:null,tooltipText:"",timer:null}},computed:{curPaddingLeft:function(){return this.caption?65306===this.caption.charCodeAt(this.caption.length-1)?2:8:0}},beforeDestroy:function(){this.popoverTip&&o.default.remove(this.popoverTip)},watch:{value:function(e,t){e!==t&&(this.inputValue=e)},inputValue:function(e,t){e!==t&&(this.fieldStatus=!e,this.$emit("change",e))},triangle:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e!==n&&(this.triangle=e,this.popoverTip&&e?this.popoverTip.show=!1:setTimeout((function(){t.inputValue="",t.inputContent=""}),300))},activeClose:function(e,t){e!==t&&e&&this.triangle&&this.$refs.inputField.focus()},caption:{handler:function(e,t){var n=this;e!==t&&(e?this.$nextTick((function(){return n.getCaptionWidth()})):this.captionWidth=0)},immediate:!0},data:{handler:function(e,t){var n=(0,r.Z)(e),i=n.length-1,a="";n.forEach((function(e,t){a+=t<i?"".concat(e.name,"、"):e.name})),this.tooltipText=a},immediate:!0}},methods:{getCaptionWidth:function(){var e=this;this.caption&&setTimeout((function(){var t=e.$refs.captionDom;if(t){var n=14*t.textContent.length;e.captionWidth=n<196?n:196}}))},inputContentHandle:function(e){this.inputContent=e.target.value||e.data||""},enterTrigger:function(){this.TriggerIn=!0},leaveTrigger:function(){this.TriggerIn=!1},clearChoseData:function(){var e=this;this.$parent.isAllChoice=!1,this.popoverTip&&(this.popoverTip.show=!1),setTimeout((function(){e.inputValue="",e.inputContent=""}),300),this.$emit("clearChoseData"),this.clickCaption()},setTimer:function(){var e=this;this.timer=setTimeout((function(){e.popoverTip.show=!1,e.clearTimer()}),300)},clearTimer:function(){clearTimeout(this.timer),this.timer=null},setTipStatus:function(e){var t=this;if(e){if(this.isShowAllChoice&&this.isAllChoice||!this.tooltipText)return;this.popoverTip?this.timer?clearTimeout(this.timer):this.timerEnter=setTimeout((function(){t.triangle||(t.popoverTip.content=t.tooltipText,o.default.resetPosition(t.popoverTip),clearTimeout(t.timerEnter),t.timerEnter=null)}),300):this.timerEnter=setTimeout((function(){if(!t.triangle){var e=t.$refs,n=e.refTrigger,i=e.countTag;t.popoverTip=(0,o.default)({tag:n,countTag:i,propsData:{content:t.tooltipText}}).$on("popoverTipHandle",(function(e){"enter"===e?t.clearTimer():t.setTimer()})),t.popoverTip.$nextTick((function(){o.default.resetPosition(t.popoverTip)}))}clearTimeout(t.timerEnter),t.timerEnter=null}),300)}else{if(this.timerEnter)return void clearTimeout(this.timerEnter);this.popoverTip&&this.setTimer()}},clickFn:function(){var e=this;this.isReadOnly?this.triangle?this.inputBlur():this.inputFocus():this.triangle||(this.inputFocus(),this.$nextTick((function(){e.captionStatus=!0,e.$refs.inputField.focus()})))},clickCaption:function(){var e=this;this.captionStatus?setTimeout((function(){e.captionStatus=!1}),300):this.triangle?this.inputBlur():(this.inputFocus(),this.$nextTick((function(){e.captionStatus=!0,e.$refs.inputField.focus()})))},inputFocus:function(){this.$emit("changeTriangle",!0)},inputBlur:function(){this.captionStatus=!0,this.activeClose&&this.$emit("changeTriangle",!1)}}},s=l,c=(0,e.Z)(s,(function(){var e=this,t=e._self._c;return t("div",{ref:"refTrigger",staticClass:"p-select-input"},[t("div",{class:["p-select-input-content",e.triangle&&"p-select-input-content-active",e.disabled&&"p-select-search-box-disabled",e.errorShow&&"p-trigger-error"],on:{mouseenter:function(t){return e.setTipStatus(!0)},mouseleave:function(t){return e.setTipStatus(!1)}}},[e.caption?t("div",{ref:"captionDom",staticClass:"p-select-input-caption",on:{click:e.clickCaption}},[e._v(e._s(e.caption))]):e._e(),e._v(" "),t("section",{staticClass:"p-select-input-section",style:{width:e.caption&&"calc(100% - ".concat(e.captionWidth,"px)"),paddingLeft:e.caption&&"4px"},on:{mouseenter:e.enterTrigger,mouseleave:e.leaveTrigger}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.fieldStatus,expression:"fieldStatus"}],class:["p-select-input-place",!e.triangle&&e.data.length&&"p-select-input-place-selected"]},[t("span",{directives:[{name:"show",rawName:"v-show",value:0!==e.data.length&&!e.inputContent&&(!e.isAllChoice&&e.isShowAllChoice||e.isAllChoice&&!e.isShowAllChoice||!e.isAllChoice&&!e.isShowAllChoice),expression:"(\n data.length !== 0\n && !inputContent\n && ((!isAllChoice && isShowAllChoice)\n || (isAllChoice && !isShowAllChoice)\n || (!isAllChoice && !isShowAllChoice))\n )"}]},[e._v("已选择"),t("span",{ref:"countTag"},[e._v(e._s(e.data.length))]),e._v("项")]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:e.isShowAllChoice&&e.isAllChoice&&!e.inputContent,expression:"isShowAllChoice && isAllChoice && !inputContent"}]},[e._v("全部")]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:!e.data.length&&!e.inputContent,expression:"!data.length && !inputContent"}]},[e._v(e._s(e.placeholder))])]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.inputValue,expression:"inputValue"}],ref:"inputField",staticClass:"p-select-input-input",attrs:{type:"text",readonly:e.isReadOnly,disabled:e.disabled},domProps:{value:e.inputValue},on:{click:e.clickFn,input:[function(t){t.target.composing||(e.inputValue=t.target.value)},e.inputContentHandle],blur:e.inputBlur}}),e._v(" "),t("i",{directives:[{name:"show",rawName:"v-show",value:e.hideClear||!e.TriggerIn||!e.inputValue&&!e.tooltipText,expression:"hideClear || !TriggerIn || (!inputValue && !tooltipText)"}],staticClass:"p-select-icon-svg",on:{click:function(t){return t.stopPropagation(),e.clickCaption.apply(null,arguments)}}},[t("TriangleSvg",{class:["p-select-input-svg",!e.triangle&&"p-select-input-rotate"]})],1),e._v(" "),e.hideClear?e._e():t("i",{directives:[{name:"show",rawName:"v-show",value:e.TriggerIn&&(e.inputValue||e.tooltipText),expression:"TriggerIn && (inputValue || tooltipText)"}],staticClass:"p-select-icon-svg",on:{click:function(t){return t.stopPropagation(),e.clearChoseData.apply(null,arguments)}}},[t("DeleteIcon",{staticClass:"p-select-clear-icon"})],1)]),e._v(" "),e.errorShow?t("span",{staticClass:"p-trigger-error-text"},[e._v(e._s(e.errorText))]):e._e()])])}),[],!1,null,null,null),h=c.exports,d=i(2205),u=i.n(d),p=i(9099),f=(0,e.Z)({},(function(){var e=this._self._c;return e("svg",{attrs:{viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("g",{attrs:{transform:"translate(-1.000000, -1.000000)","fill-rule":"nonzero"}},[e("path",{staticClass:"svg-fill-grey-400",attrs:{d:"M8,1 C4.134375,1 1,4.134375 1,8 C1,11.865625 4.134375,15 8,15 C11.865625,15 15,11.865625 15,8 C15,4.134375 11.865625,1 8,1 Z M10.784375,9.6375 C11.040625,9.89375 11.040625,10.309375 10.784375,10.565625 C10.528125,10.821875 10.1125,10.821875 9.85625,10.565625 L8,8.709375 L6.14375,10.565625 C5.8875,10.821875 5.471875,10.821875 5.215625,10.565625 C4.959375,10.309375 4.959375,9.89375 5.215625,9.6375 L7.071875,7.78125 L5.215625,5.925 C4.959375,5.66875 4.959375,5.253125 5.215625,4.996875 C5.471875,4.740625 5.8875,4.740625 6.14375,4.996875 L8,6.853125 L9.85625,4.996875 C10.1125,4.740625 10.528125,4.740625 10.784375,4.996875 C11.040625,5.253125 11.040625,5.66875 10.784375,5.925 L8.928125,7.78125 L10.784375,9.6375 L10.784375,9.6375 Z"}})])])}),[],!1,null,null,null).exports,m=i(5064),g={name:"SelectOptionMultiple",props:{data:{type:Array,default:function(){return[]}}},computed:{selectData:{get:function(){return this.data},set:function(e){return e}}},methods:{TextEllipsis:m.Z,removeOption:function(e){this.selectData=this.selectData.map((function(t){return t.id===e&&(t.selected=!1),t}))},optionClick:function(e){var t={},n={};this.selectData=this.selectData.map((function(i){return i.id!==e||i.disabled||(i.selected=!i.selected,i.selected?t=i:n=i),i})),this.$emit("change",t,n)}}},v=(0,e.Z)(g,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.data&&e.data.length,expression:"data&&data.length"}],staticClass:"p-select-option"},e._l(e.selectData,(function(n){return t("section",{directives:[{name:"show",rawName:"v-show",value:!n.isHide,expression:"!item.isHide"}],key:n.id,class:["p-select-option-item",n.selected&&"p-select-option-item-selected-multiple",n.disabled&&"p-select-option-item-disabled"],domProps:{innerHTML:e._s(n.name)},on:{click:function(t){return e.optionClick(n.id)},mouseenter:e.TextEllipsis}})})),0)}),[],!1,null,null,null).exports,w=i(62);function y(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var C={name:"TransferMini",components:{Tree:p.default,IconClear:f,SelectOptionMultiple:v},props:{data:{type:Array,default:function(){return[]}},linkage:{type:Boolean,default:!0},lastStage:{type:Boolean,default:!1},notNull:{type:Boolean,default:!1},returnParentNode:{type:Boolean,default:!0},height:{type:[String,Number],default:244},searchValue:{type:String,default:""},width:{type:[String,Number],default:240},overWidth:{type:[String,Number],default:""},showChoseData:{type:Array,default:function(){return[]}},childDisabled:{type:Boolean,default:!1}},data:function(){return{selectedData:[],searchData:[],confirmData:[],confirmBtnType:"disabled",parentObjArr:[],parentNodeLen:0}},computed:{notFound:function(){return this.searchData.length},mulData:{get:function(){return this.data},set:function(e){return e}},shadowShow:function(){var e=this.selectedData.length,t=this.height-100;return!!e&&t/e<40}},watch:{searchValue:function(e,t){e!==t&&(e?this.setSearchData(e):this.searchData=[])},selectedData:function(e){var t=this.confirmData;this.checkArrDiff(t,e)},showChoseData:{handler:function(e,t){e!==t&&(this.selectedData=(0,r.Z)(e),this.confirmData=(0,r.Z)(e))},deep:!0}},mounted:function(){this.selectedData=(0,r.Z)(this.showChoseData),this.confirmData=(0,r.Z)(this.showChoseData)},methods:{checkArrDiff:function(e,t){if(e.length){if(t.length){var n=(0,w.kp)([].concat(y(t),y(e)));return n.length!==e.length||n.length!==t.length?(this.confirmBtnType="primary",!0):(this.confirmBtnType="disabled",!1)}return this.confirmBtnType="primary",!0}return t.length?(this.confirmBtnType="primary",!0):(this.confirmBtnType="disabled",!1)},itemEnter:function(e){var t=e.target,n=t.clientWidth,i=t.scrollWidth;!t.title&&i>n&&(t.title=t.innerText)},getParentName:function(e){var t=(0,w.is)([],(0,r.Z)(this.mulData),"-1").find((function(t){return t.id===e}));return t?"".concat(this.getParentName(t.parentId)).concat(t.name,"/"):""},treeChange:function(e){var t=e.id,n=(e.checkedIds,e.obj);if(this.linkage)this.selectedData=this.setSelectedData([],this.mulData);else{var i=n.checked,a=n.name,r=n.parentId;"checked"===i?this.selectedData.push({id:t,name:"".concat(this.getParentName(r)).concat(a)}):this.selectedData=this.selectedData.filter((function(e){return e.id!==t}))}},setSelectedData:function(e,t){var n=this;return t.forEach((function(t){if(n.childDisabled){if(n.returnParentNode){if(("checked"===t.checked||"notNull"===t.checked)&&t.showCheckBox)return e.push({id:t.id,name:"".concat(n.getParentName(t.parentId)).concat(t.name)}),!1}else if("checked"===t.checked&&t.showCheckBox)return e.push({id:t.id,name:"".concat(n.getParentName(t.parentId)).concat(t.name)}),!1}else t.disabled||(n.returnParentNode&&n.notNull?"checked"!==t.checked&&"notNull"!==t.checked||!t.showCheckBox||e.push({id:t.id,name:"".concat(n.getParentName(t.parentId)).concat(t.name)}):"checked"===t.checked&&t.showCheckBox&&e.push({id:t.id,name:"".concat(n.getParentName(t.parentId)).concat(t.name)}));t.children&&t.children.length&&n.setSelectedData(e,t.children)})),e},removeItem:function(e,t){this.selectedData[e],this.selectedData.splice(e,1),this.mulData=this.removeChecked(t,this.mulData);var n=this.searchData;n&&n.length&&(this.searchData=this.removeSearchDataChecked(t,"lId",n))},removeChecked:function(e,t){var n=this;return this.linkage?this.linkageSetUpperAndLowerStatus(t,e,"uncheck"):t.map((function(t){return t.id===e?t.checked="uncheck":t.children&&t.children.length&&n.removeChecked(e,t.children),t}))},linkageSetUpperAndLowerStatus:function(e,t,n){var i=(0,w.is)([],(0,r.Z)(e),"-1"),a=(0,w.tz)([],t,i),o=this.recursionMulData(e,t,n);return this.getParentData([],o,a).forEach((function(e){e.children&&e.children.length&&(e.checked=(0,w.B5)(e.children))})),this.selectedData=this.setSelectedData([],o),o},notLinkageSetUpperAndLowerStatus:function(e,t,n){var i=this;return e.map((function(e){return e.id===t?e.checked=n:e.children&&e.children.length&&(e.children=i.notLinkageSetUpperAndLowerStatus(e.children,t,n)),e}))},recursionMulData:function(e,t,n){var i=this;return e.map((function(e){return e.id===t?(e.checked=n,e.children&&e.children.length&&(e.children=i.removeChildChecked(e.children,n),i.childDisabled&&e.children.forEach((function(e){e.disabled=!1})))):e.children&&e.children.length&&(e.children=i.recursionMulData(e.children,t,n)),e}))},getParentData:function(e,t,n){var i=this;return t.forEach((function(t){n.includes(t.id)&&(e.unshift(t),t.children&&t.children.length&&i.getParentData(e,t.children,n))})),e},removeChildChecked:function(e,t){var n=this;return e.map((function(e){return e.checked=t,e.children&&e.children.length&&n.removeChildChecked(e.children,t),e}))},removeSearchDataChecked:function(e,t,n){return n.map((function(n){return n[t]===e&&(n.selected=!1),n}))},setMulDataUncheck:function(e){var t=this;return e.map((function(e){return t.childDisabled?(e.checked="uncheck",e.disabled=!1):e.disabled||(e.checked="uncheck"),e.children&&e.children.length&&(e.children=t.setMulDataUncheck(e.children)),e}))},setMulDataUnSelected:function(e){return e.map((function(e){return e.selected=!1,e}))},setMulDataSelectedByIds:function(e,t){return e.map((function(e){return e.selected=t.includes(e.id),e}))},setTreeCheckedByIds:function(e,t){return this.linkage?this.linkageSetStatusByIds(e,t):this.notLinkageSetStatusByIds(e,t)},linkageSetStatusByIds:function(e,t){var n=this;return e.map((function(e){return n.childDisabled?(t.includes(e.id)||t.includes(e.parentId)?(e.checked="checked",t.includes(e.parentId)&&(e.disabled=!0)):e.checked="uncheck",e.children&&e.children.length&&(e.children=n.linkageSetStatusByIds(e.children,t)),!t.includes(e.id)&&e.children&&e.children.length&&(e.checked="uncheck",e.children.forEach((function(e){e.disabled=!1})))):(t.includes(e.id)?e.checked="checked":e.checked="uncheck",e.children&&e.children.length&&(e.children=n.linkageSetStatusByIds(e.children,t)),setTimeout((function(){!t.includes(e.id)&&e.children&&e.children.length&&(e.checked=(0,w.B5)(e.children))}),0)),e}))},notLinkageSetStatusByIds:function(e,t){var n=this;return e.map((function(e){return t.includes(e.id)?e.checked="checked":e.checked="uncheck",e.children&&e.children.length&&(e.children=n.notLinkageSetStatusByIds(e.children,t)),e}))},optionChange:function(e,t,n){if(e&&e.selected){var i=e.id,a=e.name.replace(/<[^<>]+>/g,"");this.selectedData.push({id:i,name:a}),n&&n(i,!0)}else{var r=t.id;this.selectedData=this.selectedData.filter((function(e){return e.id!==r})),n&&n(r,!1)}},optionSearchChange:function(e,t){var n="",i="";if(e&&e.selected?(n="checked",i=e.lId):(n="uncheck",i=t.lId),this.linkage)this.mulData=this.linkageSetUpperAndLowerStatus(this.mulData,i,n);else{var a=this.notLinkageSetUpperAndLowerStatus(this.mulData,i,n);this.selectedData=this.setSelectedData([],a)}},setSearchData:function(e){var t=(0,r.Z)(this.mulData),n=new RegExp(e,"g"),i=(0,w.is)([],t,"-1");if(this.lastStage){var a=i.filter((function(t){var a=i.find((function(e){return e.parentId===t.id}));return t.isleaf&&!a&&t.name&&t.name.includes(e)&&!t.disabled?(t.name=t.name.replace(n,'<span class="p-select-area-search-highlight">'.concat(e,"</span>")),t):null}));this.searchData=(0,w.ih)(i,a)}else{var o=i.filter((function(t){return t.isleaf&&t.name&&t.name.includes(e)&&!t.disabled?(t.name=t.name.replace(n,'<span class="p-select-area-search-highlight">'.concat(e,"</span>")),t):null}));this.searchData=(0,w.ih)(i,o)}},clearObj:function(){var e=this;this.mulData=this.setMulDataUncheck(this.mulData),this.selectedData=[],setTimeout((function(){e.searchData&&e.searchData.length&&e.searchData.forEach((function(e){e.selected=!1}))}),300)},handleEmpty:function(){this.confirmBtnType="primary",this.clearObj()},handleCancel:function(){var e=this.confirmData;if(e&&e.length){if(this.checkArrDiff(e,this.selectedData)){this.selectedData=(0,r.Z)(e);var t=e.map((function(e){return e.id}));this.mulData=this.setTreeCheckedByIds(this.mulData,t)}this.searchData=[],this.$emit("changeValue","")}else this.clearObj();this.$emit("cancel")},handleConfirm:function(){var e=this;if("disabled"!==this.confirmBtnType){var t=(0,r.Z)(this.selectedData),n=t.map((function(e){return e.id}));if(this.confirmData=t,this.returnParentNode)this.parentNodeLen=0;else{var i=(0,w.is)([],(0,r.Z)(this.data),"-1");this.parentNodeLen=i.filter((function(e){return e.children})).length}this.$emit("confirm",n,t,this.parentNodeLen),this.confirmBtnType="disabled",this.parentObjArr=[],setTimeout((function(){e.searchData=[],e.$emit("changeValue","")}),200)}},clickCallBack:function(e){this.$emit("clickCallBack",e)}}},k={name:"AreaSelect",components:{TransferMini:(0,e.Z)(C,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"p-select-area-box"},[t("div",{staticClass:"p-select-area",style:{height:e.height+"px",width:2*e.width-2+"px"}},[t("div",{staticClass:"p-select-area-child p-transfer-left",style:{width:e.width+"px"}},[t("section",{directives:[{name:"show",rawName:"v-show",value:!e.searchValue,expression:"!searchValue"}],staticClass:"p-transfer-left-content",style:{width:e.overWidth+"px",height:e.height-8+"px"}},[t("Tree",{attrs:{multiple:!0,linkage:e.linkage,lastStage:e.lastStage,notNull:e.notNull,childDisabled:e.childDisabled,returnParentNode:e.returnParentNode,data:e.mulData},on:{clickCallBack:e.clickCallBack,"update:data":function(t){e.mulData=t},change:e.treeChange}})],1),e._v(" "),t("section",{directives:[{name:"show",rawName:"v-show",value:e.searchValue,expression:"searchValue"}],staticClass:"p-transfer-left-content",style:{height:e.height+"px"}},[e.notFound?t("SelectOptionMultiple",{attrs:{data:e.searchData},on:{change:e.optionSearchChange}}):t("div",{staticClass:"p-transfer-left-content-none"},[e._v("没有找到任何内容")])],1)]),e._v(" "),t("div",{staticClass:"p-select-area-child p-transfer-right",style:{width:e.width-2+"px"}},[t("section",{class:["p-transfer-right-title","p-transfer-right-title-border"]},[t("article",{staticClass:"p-transfer-right-title-text"},[e._v("\n 已选\n "),t("span",{directives:[{name:"show",rawName:"v-show",value:e.selectedData&&e.selectedData.length,expression:"selectedData&&selectedData.length"}],staticClass:"p-transfer-right-title-text-num"},[e._v(e._s(e.selectedData.length))])]),e._v(" "),t("article",{class:["p-transfer-right-clear",e.selectedData&&e.selectedData.length&&"p-transfer-right-clear-active"],on:{click:e.handleEmpty}},[e._v("清空\n ")])]),e._v(" "),t("section",{staticClass:"p-transfer-selected",style:{height:e.height-100+"px"}},e._l(e.selectedData,(function(n,i){return t("article",{key:"sd-"+n.id,staticClass:"p-transfer-selected-item"},[t("span",{on:{mouseenter:e.itemEnter}},[e._v(e._s(n.name))]),e._v(" "),t("IconClear",{nativeOn:{click:function(t){return e.removeItem(i,n.id)}}})],1)})),0),e._v(" "),t("section",{class:["p-transfer-handle",e.shadowShow&&"p-transfer-btn-shadow"]},[t("span",{staticClass:"p-select-cancel",on:{click:e.handleCancel}},[e._v("取消")]),e._v(" "),t("span",{class:["p-select-confirm","disabled"===e.confirmBtnType?"p-select-confirm-disabled":""],on:{click:e.handleConfirm}},[e._v("确定")])])])])])}),[],!1,null,null,null).exports},data:function(){return{treeData:[]}},methods:{boxEnter:function(){this.$emit("modalStatus",!1)},boxLeave:function(){this.$emit("modalStatus",!0)},transferCancel:function(){this.$emit("cancelModal",!1),this.transferShow=!1},transferConfirm:function(e,t,n){this.transferShow=!1,this.$emit("confirm",{ids:e,sd:t,len:n})},clickCallBack:function(e){this.$emit("clickCallBack",e)}}},S=(0,e.Z)(k,(function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:e.position?"selectDownUpExtend":"selectDownUpExtendTop"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.transferShow,expression:"transferShow"}],staticClass:"p-area-select-panel",on:{mouseenter:e.boxEnter,mouseleave:e.boxLeave,wheel:function(e){e.stopPropagation()}}},[t("TransferMini",{ref:"transferMini",attrs:{data:e.data,linkage:e.linkage,lastStage:e.lastStage,notNull:e.notNull,returnParentNode:e.returnParentNode,height:e.height,width:e.width,overWidth:e.overWidth,childDisabled:e.childDisabled,searchValue:e.searchValue,showChoseData:e.showChoseData},on:{"update:data":function(t){e.data=t},clickCallBack:e.clickCallBack,cancel:e.transferCancel,confirm:e.transferConfirm}})],1)])}),[],!1,null,null,null).exports,b=i(5171),x=function(e,t,n,i,a){var r,o,l=t.clientHeight,s=t.clientWidth,c=window,h=c.pageYOffset,d=c.pageXOffset,u=e.getBoundingClientRect(),p=u.top,f=u.left,m=u.height,g=u.width,v=!0;l-(p+m+8)>=n?r=p+m+8+h:p-8>=n?(r=p-n-8+h,v=!1):r=l-n+h;var w=s-f-g,y=w+g;return o=s<=i?d:f>0?y>=i?f+d:f+g>=i?f+g-i+d+(w>0?0:w):(s-i)/2+d:d,a&&y>=i&&(o=o-i+g),{X:o,Y:r,P:v}},T=u().extend(S),I=null,P=function(e){var t=e.tag,n=e.params,i=document.body,a=x(t,i,n.height,2*n.width),r=a.X,o=a.Y,l=a.P;return n.position=l,(I=new T({data:n}).$mount()).tag=t,I.dom=i,I.$el.style.top="".concat(o,"px"),I.$el.style.left="".concat(r,"px"),i.appendChild(I.$el),I};P.renderPosition=function(e){var t=x(e.tag,e.dom,e.height,2*e.width),n=t.X,i=t.Y,a=t.P;e.$el.style.top="".concat(i,"px"),e.$el.style.left="".concat(n,"px"),e.position=a},P.remove=function(e){(0,b.Z)(e)};var N=P,B={name:"TransferSelectTree",components:{SelectInput:h},props:{title:{type:String,default:""},unit:{type:String,default:""},placeholder:{type:String,default:"请选择"},tipPlace:{type:String,default:"bottom"},data:{type:Array,default:function(){return[]}},linkage:{type:Boolean,default:!0},lastStage:{type:Boolean,default:!1},width:{type:[String,Number],default:240},overWidth:{type:[String,Number],default:""},notNull:{type:Boolean,default:!1},returnParentNode:{type:Boolean,default:!0},height:{type:[String,Number],default:360},disabled:{type:Boolean,default:!1},selectedIds:{type:Array,default:function(){return[]}},hideClear:{type:Boolean,default:!1},transfer:{type:[String,Array],default:""},isShowAllChoice:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},caption:{type:String,default:""},childDisabled:{type:Boolean,default:!1},errorText:{type:String,default:""},errorShow:{type:Boolean,default:!1}},data:function(){return{searchValue:"",transferShow:!1,selectedData:[],activeClose:!0,targetVm:null,treeData:[],isAllChoice:!1,allDataLength:0,parentNodeLen:0}},watch:{data:{handler:function(e,t){e!==t&&e&&e.length&&this.setData(this.selectedIds,e)},deep:!0},selectedIds:{handler:function(e,t){this.setData(e,this.data),this.selectedIds&&this.selectedIds.length>0?this.returnParentNode?this.isAllChoice=this.selectedIds.length===this.allDataLength:this.isAllChoice=this.selectedIds.length+this.parentNodeLen===this.allDataLength:this.isAllChoice=!1},deep:!0},selectedData:{handler:function(e,t){e&&e.length>0?this.returnParentNode?this.isAllChoice=e.length===this.allDataLength:this.isAllChoice=e.length+this.parentNodeLen===this.allDataLength:this.isAllChoice=!1},deep:!0},searchValue:function(e,t){e!==t&&(this.targetVm.searchValue=e)},transferShow:function(e,t){this.$emit("focusChange",!e),e!==t&&(e&&this.targetVm&&(this.targetVm.transferShow=e,this.targetVm.data=this.treeData,N.renderPosition(this.targetVm),this.targetVm.showChoseData=(0,r.Z)(this.selectedData)),!e&&this.targetVm&&(this.targetVm.transferShow=e))}},mounted:function(){var e=this;if(this.data&&this.data.length&&this.setData(this.selectedIds,this.data),this.transfer){var t=this.transfer;t.startsWith("#")||(t="#".concat(t)),this.scrollDom=document.querySelector(t),this.scrollDom&&(this.scrollDom.addEventListener("mousewheel",this.hidePanel,!1),this.scrollDom.addEventListener("scroll",this.hidePanel,!1))}else window.addEventListener("mousewheel",this.hidePanel,!1),window.addEventListener("scroll",this.hidePanel,!1);this.$once("hook:beforeDestroy",(function(){e.targetVm&&N.remove(e.targetVm),e.transfer?e.scrollDom&&(e.scrollDom.removeEventListener("mousewheel",e.hidePanel),e.scrollDom.removeEventListener("scroll",e.hidePanel)):(window.removeEventListener("mousewheel",e.hidePanel),window.removeEventListener("scroll",e.hidePanel))}))},computed:{calcWidth:function(){return this.width>600?600:this.width<180?180:this.width},choseData:function(){return this.selectedData.map((function(e){return{name:e.name.split("/").pop(),id:e.id}}))}},methods:{deleteChoseData:function(){this.selectedData=[],this.isAllChoice=!1,this.setData([],this.data),this.targetVm&&(this.targetVm.data=(0,r.Z)(this.treeData)),this.$emit("change",[])},getParentName:function(e){var t=(0,w.is)([],(0,r.Z)(this.data),"-1").find((function(t){return t.id===e}));return t?"".concat(this.getParentName(t.parentId)).concat(t.name,"/"):""},setData:function(e,t){var n=this;if(this.selectedData=[],e.length){var i=(0,w.u_)(e,(0,r.Z)(t),this.linkage,this.notNull,this.lastStage,this.childDisabled),a=i.resultData,o=i.selectedData,l=o.filter((function(e){return!e.disabled})),s=(0,w.is)([],(0,r.Z)(t),"-1");if(this.childDisabled){var c=o.filter((function(e){return!e.disabled}));this.selectedData=c.map((function(e){return{name:"".concat(n.getParentName(e.parentId)).concat(e.name),id:e.id,parentId:e.parentId}}))}else if(this.returnParentNode)this.selectedData=l.map((function(e){return{name:"".concat(n.getParentName(e.parentId)).concat(e.name),id:e.id,parentId:e.parentId}}));else{var h=l.filter((function(e){return!e.children}));this.selectedData=h.map((function(e){return{name:"".concat(n.getParentName(e.parentId)).concat(e.name),id:e.id,parentId:e.parentId}}))}this.allDataLength=s.length,this.parentNodeLen=s.filter((function(e){return e.children&&e.children.length>0})).length||0,this.treeData=a}else this.treeData=(0,w.is)([],(0,r.Z)(t),"-1"),this.parentNodeLen=this.treeData.filter((function(e){return e.children&&e.children.length>0})).length||0,this.allDataLength=this.treeData.length,this.treeData=(0,w.X4)(this.treeData)},hidePanel:function(){this.transferShow=!1,this.$refs.selectInput&&this.$refs.selectInput.$refs.inputField.blur()},changeTriangle:function(e){var t=this,n=this;this.targetVm?n.$refs.selectInput.$refs.inputField.blur():this.targetVm=N({tag:this.$refs.TransferSelectTree,params:{transferShow:this.transferShow,data:(0,r.Z)(this.treeData),linkage:this.linkage,lastStage:this.lastStage,notNull:this.notNull,returnParentNode:this.returnParentNode,height:this.height,childDisabled:this.childDisabled,width:this.calcWidth,overWidth:this.overWidth,searchValue:this.searchValue,showChoseData:(0,r.Z)(this.selectedData)}}).$on("confirm",(function(e){n.transferShow=!1;var t=e.ids,i=e.sd,a=e.len;n.selectedData=i,n.parentNodeLen=a||0,n.$emit