@zhijiancloud/bpm 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmArea.umd.js +1 -1
- package/dist/bpmAreaElevation.umd.js +1 -1
- package/dist/bpmAudit.umd.js +1 -1
- package/dist/bpmField.umd.js +5 -5
- package/dist/bpmFormField.umd.js +5 -5
- package/dist/bpmMulImage.umd.js +1 -1
- package/dist/bpmSelect.umd.js +1 -1
- package/dist/bpmSelectEntranceForm.umd.js +1 -1
- package/dist/bpmSelectFromForm.umd.js +1 -1
- package/dist/bpmSelectFromId.umd.js +1 -1
- package/dist/bpmSignature.umd.js +1 -1
- package/dist/bpmSubForm.umd.js +1 -1
- package/dist/bpmSubFormField.umd.js +5 -5
- package/dist/bpmText.umd.js +1 -1
- package/dist/css/bpmSubForm.css +1 -1
- package/dist/css/index.css +1 -1
- package/dist/index.umd.js +5 -5
- package/package.json +1 -1
package/dist/bpmArea.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,(function(e){return function(){var t={1900:function(e,t,a){"use strict";function s(e,t,a,s,i,l,n,o){var r,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=a,d._compiled=!0),s&&(d.functional=!0),l&&(d._scopeId="data-v-"+l),n?(r=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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},d._ssrRegister=r):i&&(r=o?function(){i.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:i),r)if(d.functional){d._injectStyles=r;var c=d.render;d.render=function(e,t){return r.call(t),c(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,r):[r]}return{exports:e,options:d}}a.d(t,{Z:function(){return s}})},6981:function(e){e.exports=function(){return this.ELEMENT}()},3371:function(e){e.exports=function(){return this.Vue}()},467:function(t){"use strict";t.exports=e}},a={};function s(e){var i=a[e];if(void 0!==i)return i.exports;var l=a[e]={exports:{}};return t[e](l,l.exports,s),l.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";s.r(i),s.d(i,{default:function(){return x}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-area",attrs:{fieldConf:e.fieldConf,row:e.row,isMultiple:e.isMultiple,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select-area-editor"},[a("div",{on:{click:e.toOpen}},[a("div",[e._v(e._s(e.label))])]),e._v(" "),a("el-dialog",e._g(e._b({attrs:{visible:e.opened,"before-close":e.onHide,width:"65%",title:e.fieldConf.name,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},"el-dialog",e.$attrs,!1),e.$listeners),[a("div",[e._v("\n "+e._s(e.$z("当前选中","b2.common. selected"))+":\n "),a("el-tag",[e._v(e._s(e.label))])],1),e._v(" "),e.refresh?a("div",{staticClass:"subcategory-tree-box"},[a("el-tree",{ref:"tree",attrs:{props:e.defaultProps,lazy:"","show-checkbox":!1,load:e.onLazyTreeLoad,"expand-on-click-node":!0,"check-strictly":!0},on:{"node-click":e.handleNodeClick,"check-change":e.handleCheckChange},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.node;return a("span",{staticClass:"custom-tree-node"},[a("div",{staticClass:"tree-body-content"},[a("div",[e._v(e._s(s.label))]),e._v(" "),"strict"==e.tickStrategy&&s.lazy&&s.selectable?a("span",{on:{click:function(t){return t.stopPropagation(),e.expand(s.id,"force")}}},[e._v(e._s(e.$z("选择","c.choose")))]):e._e()])])}}],null,!1,3939466302)})],1):e._e()]),e._v(" "),e.openLocate?a("room-map-select",{attrs:{field:e.field,drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas},on:{save:e.savePlan}}):e._e()],1)};t._withStripped=!0;var a=s(3371),l=s.n(a),n=s(467),o=s.n(n),r=s(6981),d=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._v("\n slsls\n")])};d._withStripped=!0;var c=s(1900),p=(0,c.Z)({},d,[],!1,null,null,null);p.options.__file="components/lib/bpmArea/src/part/room-map-select.vue";var u=p.exports;l().use(r.Dialog);var h={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:u},inject:["selectOptions"],data(){return{curVal:"",label:"选择区域",keyword:"",opened:!1,debounceSearch:o().debounce(o().bind(this.search,this),150,{trailing:!0,leading:!1}),formList:[],treeItemMap:{},subareas:[],drawingMd5s:[],refresh:!0,selectedKey:"",defaultProps:{children:"children",label:"label",isLeaf:"isLeaf"},selectList:[],allAreaMap:{}}},watch:{value(){this.curVal=this.value,this.loadRemoteLabel()},selectedKey(e){e&&this.selected(e)},getSelectOptions(e){this.refresh=!1,this.selectList=e,setTimeout((()=>{this.refresh=!0}),500)}},computed:{tickStrategy(){return"leaf_only"==o().get(this.fieldConf,"can","all")?"leaf-filtered":"strict"},openLocate(){return o().get(this.fieldConf,"enable_locate")},points(){return o().get(this.value,"all_points",[])},canSelect(){return o().get(this.fieldConf,"can")},getSelectOptions(){return this.selectOptions()}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{handleNodeClick(e){this.selectedKey=o().get(e,"id","")},handleCheckChange(e,t,a){console.log(e,t,a)},toOpen(){this.opened=!0},toClose(){this.opened=!1},reset(){try{let e=this.value;this.selectedKey=o().get(e,"id","")}catch(e){this.selectedKey=""}},async onOpen(){if(o().isEmpty(this.selectList)||!this.selectList){let e=await this.loadList("");console.log("onOpendata",e),this.selectList=e,this.reset()}this.opened=!0},clear(){this.removeValue(),this.resetLabel(),this.selectedKey=""},onLazyTreeLoad(e,t){setTimeout((async()=>{let a=[];console.log("node——onLazyTreeLoad",e),a=0==e.level?await this._loadNextCategoryList(""):await this._loadNextCategoryList(e.data.id),this.setCategoryInMap(a),console.log("list",a),t(a)}),500)},async _loadNextCategoryList(e){let t=await this.loadList(e);return console.log("data_tree",t),this.transformResultToTree(t)},transformResultToTree(e){let t=this.canSelect;return o().map(e,(e=>{let a=e.drawing_md5s;a=o().compact(a);let s={id:e.id,lazy:e.is_parent,label:e.name,isLeaf:!e.is_parent,path_ids:e.path_ids,path_names:e.path_names,selectable:e.available,haspic:!!a.length,type:e.type};return"building_floor"==t&&3==e.type&&(s.lazy=!1),o().set(this.treeItemMap,e.id,s),s}))},async loadList(e){let t=this.search_keyword,a=JSON.stringify({id:e,path_ids:o().get(this.treeItemMap,`${e}.path_ids`),type:o().get(this.treeItemMap,`${e}.type`)}),s=zj.pageParam({father:a,q:t});e||delete s.father,this.selectFields&&(s.fields=this.selectFields);let i=await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:s,cusFormName:this.formName,field:this,container:this.container});return console.log("data",i),i},setCategoryInMap(e){o().each(e,(e=>{o().set(this.allAreaMap,e.value,e)}))},selected(e,t){e=o().toString(e);let a=o().get(this.treeItemMap,e,null);a&&(a&&a.lazy&&!t||!e||!a.selectable||(this.label=a.label,a=o().cloneDeep(a),delete a.label,delete a.lazy,delete a.path_names,delete a.pathNames,delete a.selectable,delete a.haspic,delete a.children,this.value,this.$emit("input",[{id:a.id,path_ids:a.path_ids,all_points:[],type:a.type}]),this.loadRemoteLabel(),this.toClose()))},expand(e,t){if(e=o().toString(e),!o().get(this.treeItemMap,e,null).lazy||t)this.selected(e,t);else{let t=this.$refs.tree.isExpanded(o().toInteger(e));this.$refs.tree.setExpanded(o().toInteger(e),!t)}},savePlan(e){this.curVal.all_points=o().cloneDeep(e),this.$emit("input",this.curVal.all_points),this.$emit("change",this.curVal.all_points)},async search(){let e=this.search_keyword;if(this.keyword=e,this.expandedKeys=[],!e)return;this.$bpm.setFuncGIO("区域搜索");let t=await this._loadNextCategoryList("");this.changeLazy(t),this.filterNodes=t},changeLazy(e){this.setCategoryInMap(e),o().each(e,(e=>{this.expandedKeys.push(e.value),e.lazy=!1,e.expandable=!0,e.children&&this.changeLazy(e.children)}))},async loadRemoteLabel(){if(!this.value)return;let e=this.value[0];if(!o().isNil(e)&&e)try{this.loading=!0,e=o().cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=o().get(t,"subareas",[]),this.drawingMd5s=o().get(t,"drawing_md5s",[]);let a=o().join(t.path_names,"/");this.label=`${a}${a?"/":""}${t.name}`}finally{this.loading=!1}else this.label="选择区域"},onHide(){this.opened=!1}}},f=(0,c.Z)(h,t,[],!1,null,null,null);f.options.__file="components/lib/bpmArea/src/part/editor.vue";var m=f.exports,g=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"area-reader"},[a("span",{attrs:{title:e.label}},[e._v(e._s(e.label)+" "),a("i",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"el-icon-loading",attrs:{size:"14px"}})]),e._v(" "),e.openLocate?a("room-map-select",{attrs:{drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas}}):e._e()],1)};g._withStripped=!0;var v={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:u},data(){return{label:"",loading:!1,subareas:[],drawingMd5s:[],curVal:[]}},watch:{value(){this.curVal=this.value,this.loadRemoteLabel()}},computed:{openLocate(){return _.get(this.fieldConf,"enable_locate")},points(){return _.get(this.value,"all_points",[])}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{async loadRemoteLabel(){console.log("this.value",this.value);let e=this.value[0];if(!_.isNil(e)&&e)try{this.loading=!0,e=_.cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=_.get(t,"subareas",[]),this.drawingMd5s=_.get(t,"drawing_md5s",[]);let a=_.join(t.path_names,"/");this.label=`${a}${a?"/":""}${t.name}`,this.loading=!1}finally{this.loading=!1}else this.label="未选择"}}},y=(0,c.Z)(v,g,[],!1,null,null,null);y.options.__file="components/lib/bpmArea/src/part/reader.vue";var b=y.exports,C={name:"BpmArea",components:{editorComponent:m,readerComponent:b},props:{value:{type:[String,Array,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?b:(this.isMultiple,m)}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},w=(0,c.Z)(C,e,[],!1,null,null,null);w.options.__file="components/lib/bpmArea/src/main.vue";var L=w.exports;L.install=function(e){e.component(L.name,L)};var x=L}(),i}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,(function(e){return function(){var t={1900:function(e,t,a){"use strict";function s(e,t,a,s,i,l,n,o){var r,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=a,d._compiled=!0),s&&(d.functional=!0),l&&(d._scopeId="data-v-"+l),n?(r=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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},d._ssrRegister=r):i&&(r=o?function(){i.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:i),r)if(d.functional){d._injectStyles=r;var c=d.render;d.render=function(e,t){return r.call(t),c(e,t)}}else{var p=d.beforeCreate;d.beforeCreate=p?[].concat(p,r):[r]}return{exports:e,options:d}}a.d(t,{Z:function(){return s}})},6981:function(e){e.exports=function(){return this.ELEMENT}()},3371:function(e){e.exports=function(){return this.Vue}()},467:function(t){"use strict";t.exports=e}},a={};function s(e){var i=a[e];if(void 0!==i)return i.exports;var l=a[e]={exports:{}};return t[e](l,l.exports,s),l.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";s.r(i),s.d(i,{default:function(){return x}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-area",attrs:{fieldConf:e.fieldConf,row:e.row,isMultiple:e.isMultiple,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select-area-editor"},[a("div",{on:{click:e.toOpen}},[a("div",[e._v(e._s(e.label))])]),e._v(" "),a("el-dialog",e._g(e._b({attrs:{visible:e.opened,"before-close":e.onHide,width:"65%",title:e.fieldConf.name,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},"el-dialog",e.$attrs,!1),e.$listeners),[a("div",[e._v("\n "+e._s(e.$z("当前选中","b2.common.selected"))+":\n "),a("el-tag",[e._v(e._s(e.label))])],1),e._v(" "),e.refresh?a("div",{staticClass:"subcategory-tree-box"},[a("el-tree",{ref:"tree",attrs:{props:e.defaultProps,lazy:"","show-checkbox":!1,load:e.onLazyTreeLoad,"expand-on-click-node":!0,"check-strictly":!0},on:{"node-click":e.handleNodeClick,"check-change":e.handleCheckChange},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.node;return a("span",{staticClass:"custom-tree-node"},[a("div",{staticClass:"tree-body-content"},[a("div",[e._v(e._s(s.label))]),e._v(" "),"strict"==e.tickStrategy&&s.lazy&&s.selectable?a("span",{on:{click:function(t){return t.stopPropagation(),e.expand(s.id,"force")}}},[e._v(e._s(e.$z("选择","c.choose")))]):e._e()])])}}],null,!1,3939466302)})],1):e._e()]),e._v(" "),e.openLocate?a("room-map-select",{attrs:{field:e.field,drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas},on:{save:e.savePlan}}):e._e()],1)};t._withStripped=!0;var a=s(3371),l=s.n(a),n=s(467),o=s.n(n),r=s(6981),d=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._v("\n slsls\n")])};d._withStripped=!0;var c=s(1900),p=(0,c.Z)({},d,[],!1,null,null,null);p.options.__file="components/lib/bpmArea/src/part/room-map-select.vue";var u=p.exports;l().use(r.Dialog);var h={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:u},inject:["selectOptions"],data(){return{curVal:"",label:zj.z("选择区域","c.select_area"),keyword:"",opened:!1,debounceSearch:o().debounce(o().bind(this.search,this),150,{trailing:!0,leading:!1}),formList:[],treeItemMap:{},subareas:[],drawingMd5s:[],refresh:!0,selectedKey:"",defaultProps:{children:"children",label:"label",isLeaf:"isLeaf"},selectList:[],allAreaMap:{}}},watch:{value(){this.curVal=this.value,this.loadRemoteLabel()},selectedKey(e){e&&this.selected(e)},getSelectOptions(e){this.refresh=!1,this.selectList=e,setTimeout((()=>{this.refresh=!0}),500)}},computed:{tickStrategy(){return"leaf_only"==o().get(this.fieldConf,"can","all")?"leaf-filtered":"strict"},openLocate(){return o().get(this.fieldConf,"enable_locate")},points(){return o().get(this.value,"all_points",[])},canSelect(){return o().get(this.fieldConf,"can")},getSelectOptions(){return this.selectOptions()}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{handleNodeClick(e){this.selectedKey=o().get(e,"id","")},handleCheckChange(e,t,a){console.log(e,t,a)},toOpen(){this.opened=!0},toClose(){this.opened=!1},reset(){try{let e=this.value;this.selectedKey=o().get(e,"id","")}catch(e){this.selectedKey=""}},async onOpen(){if(o().isEmpty(this.selectList)||!this.selectList){let e=await this.loadList("");console.log("onOpendata",e),this.selectList=e,this.reset()}this.opened=!0},clear(){this.removeValue(),this.resetLabel(),this.selectedKey=""},onLazyTreeLoad(e,t){setTimeout((async()=>{let a=[];console.log("node——onLazyTreeLoad",e),a=0==e.level?await this._loadNextCategoryList(""):await this._loadNextCategoryList(e.data.id),this.setCategoryInMap(a),console.log("list",a),t(a)}),500)},async _loadNextCategoryList(e){let t=await this.loadList(e);return console.log("data_tree",t),this.transformResultToTree(t)},transformResultToTree(e){let t=this.canSelect;return o().map(e,(e=>{let a=e.drawing_md5s;a=o().compact(a);let s={id:e.id,lazy:e.is_parent,label:e.name,isLeaf:!e.is_parent,path_ids:e.path_ids,path_names:e.path_names,selectable:e.available,haspic:!!a.length,type:e.type};return"building_floor"==t&&3==e.type&&(s.lazy=!1),o().set(this.treeItemMap,e.id,s),s}))},async loadList(e){let t=this.search_keyword,a=JSON.stringify({id:e,path_ids:o().get(this.treeItemMap,`${e}.path_ids`),type:o().get(this.treeItemMap,`${e}.type`)}),s=zj.pageParam({father:a,q:t});e||delete s.father,this.selectFields&&(s.fields=this.selectFields);let i=await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:s,cusFormName:this.formName,field:this,container:this.container});return console.log("data",i),i},setCategoryInMap(e){o().each(e,(e=>{o().set(this.allAreaMap,e.value,e)}))},selected(e,t){e=o().toString(e);let a=o().get(this.treeItemMap,e,null);a&&(a&&a.lazy&&!t||!e||!a.selectable||(this.label=a.label,a=o().cloneDeep(a),delete a.label,delete a.lazy,delete a.path_names,delete a.pathNames,delete a.selectable,delete a.haspic,delete a.children,this.value,this.$emit("input",[{id:a.id,path_ids:a.path_ids,all_points:[],type:a.type}]),this.loadRemoteLabel(),this.toClose()))},expand(e,t){if(e=o().toString(e),!o().get(this.treeItemMap,e,null).lazy||t)this.selected(e,t);else{let t=this.$refs.tree.isExpanded(o().toInteger(e));this.$refs.tree.setExpanded(o().toInteger(e),!t)}},savePlan(e){this.curVal.all_points=o().cloneDeep(e),this.$emit("input",this.curVal.all_points),this.$emit("change",this.curVal.all_points)},async search(){let e=this.search_keyword;if(this.keyword=e,this.expandedKeys=[],!e)return;this.$bpm.setFuncGIO("区域搜索");let t=await this._loadNextCategoryList("");this.changeLazy(t),this.filterNodes=t},changeLazy(e){this.setCategoryInMap(e),o().each(e,(e=>{this.expandedKeys.push(e.value),e.lazy=!1,e.expandable=!0,e.children&&this.changeLazy(e.children)}))},async loadRemoteLabel(){if(!this.value)return;let e=this.value[0];if(!o().isNil(e)&&e)try{this.loading=!0,e=o().cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=o().get(t,"subareas",[]),this.drawingMd5s=o().get(t,"drawing_md5s",[]);let a=o().join(t.path_names,"/");this.label=`${a}${a?"/":""}${t.name}`}finally{this.loading=!1}else this.label=zj.z("选择区域","c.select_area")},onHide(){this.opened=!1}}},f=(0,c.Z)(h,t,[],!1,null,null,null);f.options.__file="components/lib/bpmArea/src/part/editor.vue";var m=f.exports,g=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"area-reader"},[a("span",{attrs:{title:e.label}},[e._v(e._s(e.label)+" "),a("i",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"el-icon-loading",attrs:{size:"14px"}})]),e._v(" "),e.openLocate?a("room-map-select",{attrs:{drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas}}):e._e()],1)};g._withStripped=!0;var v={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:u},data(){return{label:"",loading:!1,subareas:[],drawingMd5s:[],curVal:[]}},watch:{value(){this.curVal=this.value,this.loadRemoteLabel()}},computed:{openLocate(){return _.get(this.fieldConf,"enable_locate")},points(){return _.get(this.value,"all_points",[])}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{async loadRemoteLabel(){console.log("this.value",this.value);let e=this.value[0];if(!_.isNil(e)&&e)try{this.loading=!0,e=_.cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=_.get(t,"subareas",[]),this.drawingMd5s=_.get(t,"drawing_md5s",[]);let a=_.join(t.path_names,"/");this.label=`${a}${a?"/":""}${t.name}`,this.loading=!1}finally{this.loading=!1}else this.label=zj.z("未选择","c.not_selected")}}},y=(0,c.Z)(v,g,[],!1,null,null,null);y.options.__file="components/lib/bpmArea/src/part/reader.vue";var b=y.exports,C={name:"BpmArea",components:{editorComponent:m,readerComponent:b},props:{value:{type:[String,Array,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?b:(this.isMultiple,m)}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},w=(0,c.Z)(C,e,[],!1,null,null,null);w.options.__file="components/lib/bpmArea/src/main.vue";var L=w.exports;L.install=function(e){e.component(L.name,L)};var x=L}(),i}()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see bpmAreaElevation.umd.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.bpm2=e():t.bpm2=e()}(self,(function(){return function(){var t={7157:function(t,e,o){"use strict";var n=o(8081),i=o.n(n),r=o(3645);o.n(r)()(i()).push([t.id,".area-elevation .area-elevation-select-box .area-elevation-select-item {\n float: left;\n margin-right: 5px;\n margin-bottom: 5px;\n}\n",""])},1870:function(t,e,o){"use strict";var n=o(8081),i=o.n(n),r=o(3645),l=o.n(r)()(i());l.push([t.id,".color-indication{width:auto;bottom:0;height:40px;left:0;right:0;color:#666;line-height:20px;background:#fff;display:flex;justify-content:space-around;align-items:center;padding:0 5px;z-index:999}.color-indication-item{flex:1;padding:2px;display:flex}.color-indication .color-rect{background-color:#666;border:1px solid #666;width:22px;height:16px;border-radius:4px;margin-right:5px;display:inline-block}",""]),e.Z=l},8459:function(t,e,o){"use strict";var n=o(8081),i=o.n(n),r=o(3645),l=o.n(r)()(i());l.push([t.id,".select-position-table{height:100%;max-height:600px;overflow:auto}.select-position-table table,.select-position-table td,.select-position-table th{border:0 solid #E2E2E2;border-collapse:collapse;text-align:center;padding:0}.select-position-table .left-table{height:100%}.select-position-table .select-position-table-content{display:flex}.select-position-table .select-position-table-content .select-position-table-content-left .floor{display:flex;align-items:center;height:100%;border:2px solid #E2E2E2;text-align:center;justify-content:center;width:100px!important}.select-position-table .select-position-table-content .select-position-table-content-right{width:100%;overflow:auto}.position-table-cell .flag{position:absolute;right:0;top:0;width:0;height:0;border-style:solid;border-top:8px solid #246AE3;border-right:8px solid #246AE3;border-left:8px solid transparent;border-bottom:8px solid transparent}.position-table-cell .flag .icon{position:absolute;right:-10px;top:-10px;font-size:12px;color:#FFF;font-weight:900}.position-table-cell .is_selected .parent{position:relative;border-top:2px solid #246AE3!important;border-left:2px solid #246AE3!important;border-right:2px solid #246AE3!important}.position-table-cell .is_selected .only-parent{border-bottom:2px solid #246AE3!important}.position-table-cell .is_selected .cell-childs{position:relative}.position-table-cell .is_selected .cell-childs .cell-child{position:relative;border-bottom:2px solid #246AE3!important}.position-table-cell .is_selected .cell-childs .cell-child:first-child{border-left:2px solid #246AE3!important}.position-table-cell .is_selected .cell-childs .cell-child:last-child{border-right:2px solid #246AE3!important}.position-table-cell .is_child_selected{border:2px solid #246AE3!important}.position-table-cell .cell-parent{box-sizing:content-box}.position-table-cell .cell-parent .parent{padding:10px;border:2px solid #E2E2E2;min-width:60px;overflow:hidden}.position-table-cell .cell-parent .cell-childs{box-sizing:content-box;display:flex;border:none}.position-table-cell .cell-parent .cell-childs .cell-child{position:relative;border:2px solid #E2E2E2;white-space:nowrap;word-break:none;padding:10px;flex:1;border-right:2px solid #E2E2E2}",""]),e.Z=l},3645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var l={};if(n)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(l[s]=!0)}for(var c=0;c<t.length;c++){var d=[].concat(t[c]);n&&l[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},8081:function(t){"use strict";t.exports=function(t){return t[1]}},3379:function(t){"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var r={},l=[],a=0;a<t.length;a++){var s=t[a],c=n.base?s[0]+n.base:s[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=o(u),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==h)e[h].references++,e[h].updater(f);else{var p=i(f,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:p,references:1})}l.push(u)}return l}function i(t,e){var o=e.domAPI(e);return o.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var r=n(t=t||[],i=i||{});return function(t){t=t||[];for(var l=0;l<r.length;l++){var a=o(r[l]);e[a].references--}for(var s=n(t,i),c=0;c<r.length;c++){var d=o(r[c]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=s}}},569:function(t){"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},9216:function(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},3565:function(t,e,o){"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},7795:function(t){"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var r=o.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},1900:function(t,e,o){"use strict";function n(t,e,o,n,i,r,l,a){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=o,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),l?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},c._ssrRegister=s):i&&(s=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var d=c.render;c.render=function(t,e){return s.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,s):[s]}return{exports:t,options:c}}o.d(e,{Z:function(){return n}})},6407:function(t){self,t.exports=function(){"use strict";var t={109:function(t,e,o){o.d(e,{default:function(){return a}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"color-indication"},t._l(t.colorConfig.data,(function(e){return o("div",{key:e.name,staticClass:"color-indication-item",style:{width:e.width}},["left"==t.textPlace?o("span",[t._v(t._s(e.title))]):t._e(),t._v(" "),o("div",{staticClass:"color-rect",style:{"background-color":e.color,"border-color":e.border_color}}),t._v(" "),"right"==t.textPlace?o("span",[t._v(t._s(e.title))]):t._e()])})),0)};n._withStripped=!0;var i={name:"ZjColorIndication",props:{colorConfig:{type:Object,default:function(){return{}}},textPlace:{type:String,default:"right"}}},r=(0,o(900).Z)(i,n,[],!1,null,"3d1ff590",null);r.options.__file="components/lib/color-indication/src/main.vue";var l=r.exports;l.install=function(t){t.component(l.name,l)};var a=l},924:function(t,e,o){o.d(e,{default:function(){return l}});var n=function(){var t=this;return t.$createElement,t._self._c,t._m(0)};n._withStripped=!0;var i=(0,o(900).Z)({name:"Demo"},n,[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("h1",{staticClass:"m-demo"},[t._v("demo1")])])}],!1,null,null,null);i.options.__file="components/lib/demo/src/main.vue";var r=i.exports;r.install=function(t){t.component(r.name,r)};var l=r},367:function(t,e,o){o.d(e,{default:function(){return l}});var n=function(){var t=this;return t.$createElement,t._self._c,t._m(0)};n._withStripped=!0;var i=(0,o(900).Z)({name:"Demo2"},n,[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("h1",{staticClass:"m-demo"},[t._v("demo2")])])}],!1,null,null,null);i.options.__file="components/lib/demo2/src/main.vue";var r=i.exports;r.install=function(t){t.component(r.name,r)};var l=r},622:function(t,e,o){o.d(e,{default:function(){return u}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"select-position-table"},[o("div",{staticClass:"select-position-table-content"},[o("div",{staticClass:"select-position-table-content-left",staticStyle:{width:"100px"}},[o("table",{staticClass:"left-table"},[o("tbody",t._l(t.list,(function(e){return o("tr",{key:e.key},[o("td",{staticClass:"floor"},[o("div",[t._v(t._s(e.title))])]),t._v(" "),t._l(e.childrens,(function(n,i){return o("td",{key:n.key,staticStyle:{visibility:"hidden"}},[o("cell-item",{model:{value:e.childrens[i],callback:function(o){t.$set(e.childrens,i,o)},expression:"item.childrens[index]"}})],1)}))],2)})),0)])]),t._v(" "),o("div",{staticClass:"select-position-table-content-right"},[o("table",[o("tbody",t._l(t.list,(function(e){return o("tr",{key:e.key},t._l(e.childrens,(function(n,i){return o("td",{key:n.key},[o("cell-item",{attrs:{readonly:t.readonly},model:{value:e.childrens[i],callback:function(o){t.$set(e.childrens,i,o)},expression:"item.childrens[index]"}})],1)})),0)})),0)])])])])};n._withStripped=!0;var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"position-table-cell"},[o("div",{staticClass:"cell-parent",class:{is_selected:t.curVal.state},style:{background:t.curVal.color}},[o("div",{staticClass:"parent",class:{"only-parent":t.curVal.childrens&&0==t.curVal.childrens.length||!t.curVal.childrens},on:{click:function(e){return t.troggleParent(t.curVal)}}},[t._v(t._s(t.curVal.title)+"\n "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.curVal.state,expression:"curVal.state"}],staticClass:"flag"},[o("i",{staticClass:"icon el-icon-check"})])]),t._v(" "),o("div",{staticClass:"cell-childs"},t._l(t.curVal.childrens,(function(e){return o("div",{key:e.key,staticClass:"cell-child",class:{is_child_selected:e.state&&!t.curVal.state},style:{background:e.color},on:{click:function(o){return t.troggleChild(e)}}},[t._v(t._s(e.title)+"\n\n "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.state&&!t.curVal.state,expression:"child_item.state && !curVal.state"}],staticClass:"flag"},[o("i",{staticClass:"icon el-icon-check"})])])})),0)])])};i._withStripped=!0;var r={props:{value:{type:Object,default:function(){return{}}},readonly:{type:Boolean,default:!1}},data(){return{curVal:{}}},watch:{value(t){this.curVal=t}},methods:{troggleParent(t){if(this.readonly)return!1;if(console.log("item",t),t.color&&"#FFFFFF"!=t.color&&"#ffffff"!=t.color&&"#FFF"!=t.color&&"#fff"!=t.color)return!1;let e=!1;if(_.each(this.curVal.childrens,(t=>{t.color&&"#FFFFFF"!=t.color&&"#ffffff"!=t.color&&"#FFF"!=t.color&&"#fff"!=t.color&&(e=!0)})),e)return!1;this.curVal.state=!this.curVal.state,_.each(this.curVal.childrens,(t=>{t.state=this.curVal.state})),this.setVal()},troggleChild(t){if(this.readonly)return!1;if(this.curVal.color&&"#FFFFFF"!=this.curVal.color&&"#ffffff"!=this.curVal.color&&"#FFF"!=this.curVal.color&&"#fff"!=this.curVal.color)return!1;if(t.color&&"#FFFFFF"!=t.color&&"#ffffff"!=t.color&&"#FFF"!=t.color&&"#fff"!=t.color)return!1;t.state=!t.state;let e=!0;_.each(this.curVal.childrens,(t=>{t.state||(e=!1)})),this.curVal.state=e,this.setVal()},setVal(){this.$emit("input",this.curVal)}},mounted(){this.curVal=this.value}},l=o(900),a=(0,l.Z)(r,i,[],!1,null,null,null);a.options.__file="components/lib/select-position-table/src/widgets/cell-item.vue";var s={name:"ZjSelectPositionTable",components:{CellItem:a.exports},props:{value:{type:Array,default:function(){return[]}},data:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1},withParent:{type:Boolean,default:!0}},watch:{value:{handler(){this.setSelectedItem()},deep:!0},data:{handler(t){this.list=_.cloneDeep(t),this.setSelectedItem()},deep:!0,immediate:!0},list:{handler(t){this.getSelectedItem(t)},deep:!0}},data(){return{list:[]}},methods:{setSelectedItem(){_.each(this.list,(t=>{_.each(t.childrens,(t=>{if(t.childrens&&t.childrens.length>0){let e=0;_.each(t.childrens,(t=>{_.find(this.value,{key:t.key})?(t.state=!0,e++):t.state=!1})),e==t.childrens.length?t.state=!0:t.state=!1}else _.find(this.value,{key:t.key})?t.state=!0:t.state=!1}))}))},getSelectedItem(t){let e=[];_.each(t,(t=>{_.each(t.childrens,(o=>{o.childrens&&o.childrens.length>0?(_.each(o.childrens,(n=>{n.state&&e.push({name:t.title+"-"+o.title+"-"+n.title,key:n.key})})),this.withParent&&o.state&&e.push({name:t.title+"-"+o.title,key:o.key})):o.state&&e.push({name:t.title+"-"+o.title,key:o.key})}))})),this.$emit("input",e)}},mounted(){}},c=(0,l.Z)(s,n,[],!1,null,null,null);c.options.__file="components/lib/select-position-table/src/main.vue";var d=c.exports;d.install=function(t){t.component(d.name,d)};var u=d},387:function(t,e,o){o.d(e,{default:function(){return ue}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-popover",{ref:"col_config",attrs:{"popper-class":"table-cloumn-configer",placement:"bottom",width:"200",trigger:"click"}},[o("div",{staticClass:"content"},[o("div",[t.showConfirm?o("div",{staticClass:"btn-grp"},[o("el-button",{attrs:{round:"",size:"mini",disabled:!t.editing},on:{click:t.reset}},[t._v(t._s(t.$z("重置","c.reset"))+"\n ")]),t._v(" "),o("el-button",{attrs:{type:"primary",round:"",size:"mini",disabled:!t.editing},on:{click:t.submit}},[t._v(t._s(t.$z("确定","c.confirm"))+"\n ")])],1):t._e(),t._v(" "),o("div",{staticClass:"tip"},[t._v("\n "+t._s(t.$z("提示:拖拽可排序","b2.common.tip_can_drap_sort")))])]),t._v(" "),o("ul",{staticClass:"col-config-list"},t._l(t.cols_config,(function(e,n){return o("li",{key:""+n,staticStyle:{cursor:"grab"}},[o("el-checkbox",{on:{change:function(e){return t.checkboxClick()}},model:{value:e.show,callback:function(o){t.$set(e,"show",o)},expression:"col.show"}}),t._v(" "),o("div",{staticClass:"item-name",attrs:{title:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])],1)})),0)]),t._v(" "),t._t("default",(function(){return[o("i",{staticClass:"el-icon-s-tools",staticStyle:{"font-size":"20px",color:"#666",cursor:"pointer"},attrs:{title:"设置字段"}})]}),{slot:"reference"})],2)],1)};function i(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function r(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?i(Object(o),!0).forEach((function(e){a(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function l(t){return l="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},l(t)}function a(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},s.apply(this,arguments)}function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}n._withStripped=!0;var d=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=c(/Edge/i),h=c(/firefox/i),f=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),g={capture:!1,passive:!1};function v(t,e,o){t.addEventListener(e,o,!d&&g)}function b(t,e,o){t.removeEventListener(e,o,!d&&g)}function y(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function w(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function C(t,e,o,n){if(t){o=o||document;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&y(t,e):y(t,e))||n&&t===o)return t;if(t===o)break}while(t=w(t))}return null}var S,x=/\s+/g;function D(t,e,o){if(t&&e)if(t.classList)t.classList[o?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(x," ").replace(" "+e+" "," ");t.className=(n+(o?" "+e:"")).replace(x," ")}}function E(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=o+("string"==typeof o?"":"px")}}function T(t,e){var o="";if("string"==typeof t)o=t;else do{var n=E(t,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function k(t,e,o){if(t){var n=t.getElementsByTagName(e),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function I(){return document.scrollingElement||document.documentElement}function O(t,e,o,n,i){if(t.getBoundingClientRect||t===window){var r,l,a,s,c,u,h;if(t!==window&&t.parentNode&&t!==I()?(l=(r=t.getBoundingClientRect()).top,a=r.left,s=r.bottom,c=r.right,u=r.height,h=r.width):(l=0,a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||o)&&t!==window&&(i=i||t.parentNode,!d))do{if(i&&i.getBoundingClientRect&&("none"!==E(i,"transform")||o&&"static"!==E(i,"position"))){var f=i.getBoundingClientRect();l-=f.top+parseInt(E(i,"border-top-width")),a-=f.left+parseInt(E(i,"border-left-width")),s=l+r.height,c=a+r.width;break}}while(i=i.parentNode);if(n&&t!==window){var p=T(i||t),m=p&&p.a,g=p&&p.d;p&&(s=(l/=g)+(u/=g),c=(a/=m)+(h/=m))}return{top:l,left:a,bottom:s,right:c,width:h,height:u}}}function M(t){var e=O(t),o=parseInt(E(t,"padding-left")),n=parseInt(E(t,"padding-top")),i=parseInt(E(t,"padding-right")),r=parseInt(E(t,"padding-bottom"));return e.top+=n+parseInt(E(t,"border-top-width")),e.left+=o+parseInt(E(t,"border-left-width")),e.width=t.clientWidth-o-i,e.height=t.clientHeight-n-r,e.bottom=e.top+e.height,e.right=e.left+e.width,e}function N(t,e,o){for(var n=j(t,!0),i=O(t)[e];n;){var r=O(n)[o];if(!("top"===o||"left"===o?i>=r:i<=r))return n;if(n===I())break;n=j(n,!1)}return!1}function A(t,e,o,n){for(var i=0,r=0,l=t.children;r<l.length;){if("none"!==l[r].style.display&&l[r]!==$t.ghost&&(n||l[r]!==$t.dragged)&&C(l[r],o.draggable,t,!1)){if(i===e)return l[r];i++}r++}return null}function F(t,e){for(var o=t.lastElementChild;o&&(o===$t.ghost||"none"===E(o,"display")||e&&!y(o,e));)o=o.previousElementSibling;return o||null}function P(t,e){var o=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===$t.clone||e&&!y(t,e)||o++;return o}function V(t){var e=0,o=0,n=I();if(t)do{var i=T(t),r=i.a,l=i.d;e+=t.scrollLeft*r,o+=t.scrollTop*l}while(t!==n&&(t=t.parentNode));return[e,o]}function j(t,e){if(!t||!t.getBoundingClientRect)return I();var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=E(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return I();if(n||e)return o;n=!0}}}while(o=o.parentNode);return I()}function R(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function $(t,e){return function(){if(!S){var o=arguments;1===o.length?t.call(this,o[0]):t.apply(this,o),S=setTimeout((function(){S=void 0}),e)}}}function B(t,e,o){t.scrollLeft+=e,t.scrollTop+=o}function X(t){var e=window.Polymer,o=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):o?o(t).clone(!0)[0]:t.cloneNode(!0)}var Y="Sortable"+(new Date).getTime(),L=[],z={initializeByDefault:!0},Z={mount:function(t){for(var e in z)z.hasOwnProperty(e)&&!(e in t)&&(t[e]=z[e]);L.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),L.push(t)},pluginEvent:function(t,e,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var i=t+"Global";L.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][i]&&e[n.pluginName][i](r({sortable:e},o)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](r({sortable:e},o)))}))},initializePlugins:function(t,e,o,n){for(var i in L.forEach((function(n){var i=n.pluginName;if(t.options[i]||n.initializeByDefault){var r=new n(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,s(o,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var o={};return L.forEach((function(n){"function"==typeof n.eventProperties&&s(o,n.eventProperties.call(e[n.pluginName],t))})),o},modifyOption:function(t,e,o){var n;return L.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(n=i.optionListeners[e].call(t[i.pluginName],o))})),n}},H=["evt"],U=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=function(t,e){if(null==t)return{};var o,n,i=function(t,e){if(null==t)return{};var o,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)o=r[n],e.indexOf(o)>=0||(i[o]=t[o]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n<r.length;n++)o=r[n],e.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(i[o]=t[o])}return i}(o,H);Z.pluginEvent.bind($t)(t,e,r({dragEl:G,parentEl:K,ghostEl:q,rootEl:J,nextEl:Q,lastDownEl:tt,cloneEl:et,cloneHidden:ot,dragStarted:mt,putSortable:st,activeSortable:$t.active,originalEvent:n,oldIndex:nt,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:lt,hideGhostForTarget:Pt,unhideGhostForTarget:Vt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){W({sortable:e,name:t,originalEvent:n})}},i))};function W(t){!function(t){var e=t.sortable,o=t.rootEl,n=t.name,i=t.targetEl,l=t.cloneEl,a=t.toEl,s=t.fromEl,c=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,m=t.originalEvent,g=t.putSortable,v=t.extraEventProperties;if(e=e||o&&o[Y]){var b,_=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||d||u?(b=document.createEvent("Event")).initEvent(n,!0,!0):b=new CustomEvent(n,{bubbles:!0,cancelable:!0}),b.to=a||o,b.from=s||o,b.item=i||o,b.clone=l,b.oldIndex=c,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=m,b.pullMode=g?g.lastPutMode:void 0;var w=r(r({},v),Z.getEventProperties(n,e));for(var C in w)b[C]=w[C];o&&o.dispatchEvent(b),_[y]&&_[y].call(e,b)}}(r({putSortable:st,cloneEl:et,targetEl:G,rootEl:J,oldIndex:nt,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:lt},t))}var G,K,q,J,Q,tt,et,ot,nt,it,rt,lt,at,st,ct,dt,ut,ht,ft,pt,mt,gt,vt,bt,_t,yt=!1,wt=!1,Ct=[],St=!1,xt=!1,Dt=[],Et=!1,Tt=[],kt="undefined"!=typeof document,It=p,Ot=u||d?"cssFloat":"float",Mt=kt&&!m&&!p&&"draggable"in document.createElement("div"),Nt=function(){if(kt){if(d)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),At=function(t,e){var o=E(t),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=A(t,0,e),r=A(t,1,e),l=i&&E(i),a=r&&E(r),s=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&l.float&&"none"!==l.float){var d="left"===l.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===l.display||"flex"===l.display||"table"===l.display||"grid"===l.display||s>=n&&"none"===o[Ot]||r&&"none"===o[Ot]&&s+c>n)?"vertical":"horizontal"},Ft=function(t){function e(t,o){return function(n,i,r,l){var a=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==t&&(o||a))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(n,i,r,l),o)(n,i,r,l);var s=(o?n:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},n=t.group;n&&"object"==l(n)||(n={name:n}),o.name=n.name,o.checkPull=e(n.pull,!0),o.checkPut=e(n.put),o.revertClone=n.revertClone,t.group=o},Pt=function(){!Nt&&q&&E(q,"display","none")},Vt=function(){!Nt&&q&&E(q,"display","")};kt&&!m&&document.addEventListener("click",(function(t){if(wt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),wt=!1,!1}),!0);var jt=function(t){if(G){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Ct.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!F(t)){var o=O(t),n=i>=o.left-e&&i<=o.right+e,a=r>=o.top-e&&r<=o.bottom+e;return n&&a?l=t:void 0}})),l);if(e){var o={};for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[Y]._onDragOver(o)}}var i,r,l},Rt=function(t){G&&G.parentNode[Y]._isOutsideThisEl(t.target)};function $t(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[Y]=this;var o,n,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return At(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==$t.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var l in Z.initializePlugins(this,t,i),i)!(l in e)&&(e[l]=i[l]);for(var a in Ft(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Mt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),Ct.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==E(t,"display")&&t!==$t.ghost){n.push({target:t,rect:O(t)});var e=r({},n[n.length-1].rect);if(t.thisAnimationDuration){var o=T(t,!0);o&&(e.top-=o.f,e.left-=o.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var o in t)if(t.hasOwnProperty(o))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[o][n])return Number(o);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof t&&t());var i=!1,r=0;n.forEach((function(t){var o=0,n=t.target,l=n.fromRect,a=O(n),s=n.prevFromRect,c=n.prevToRect,d=t.rect,u=T(n,!0);u&&(a.top-=u.f,a.left-=u.e),n.toRect=a,n.thisAnimationDuration&&R(s,a)&&!R(l,a)&&(d.top-a.top)/(d.left-a.left)==(l.top-a.top)/(l.left-a.left)&&(o=function(t,e,o,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))*n.animation}(d,s,c,e.options)),R(a,l)||(n.prevFromRect=l,n.prevToRect=a,o||(o=e.options.animation),e.animate(n,d,a,o)),o&&(i=!0,r=Math.max(r,o),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),o),n.thisAnimationDuration=o)})),clearTimeout(o),i?o=setTimeout((function(){"function"==typeof t&&t()}),r):"function"==typeof t&&t(),n=[]},animate:function(t,e,o,n){if(n){E(t,"transition",""),E(t,"transform","");var i=T(this.el),r=i&&i.a,l=i&&i.d,a=(e.left-o.left)/(r||1),s=(e.top-o.top)/(l||1);t.animatingX=!!a,t.animatingY=!!s,E(t,"transform","translate3d("+a+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),E(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),E(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){E(t,"transition",""),E(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Bt(t,e,o,n,i,r,l,a){var s,c,h=t[Y],f=h.options.onMove;return!window.CustomEvent||d||u?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=o,s.draggedRect=n,s.related=i||e,s.relatedRect=r||O(e),s.willInsertAfter=a,s.originalEvent=l,t.dispatchEvent(s),f&&(c=f.call(h,s,l)),c}function Xt(t){t.draggable=!1}function Yt(){Et=!1}function Lt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,n=0;o--;)n+=e.charCodeAt(o);return n.toString(36)}function zt(t){return setTimeout(t,0)}function Zt(t){return clearTimeout(t)}$t.prototype={constructor:$t,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,n=this.options,i=n.preventOnFilter,r=t.type,l=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(l||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=n.filter;if(function(t){Tt.length=0;for(var e=t.getElementsByTagName("input"),o=e.length;o--;){var n=e[o];n.checked&&Tt.push(n)}}(o),!G&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||n.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!f||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=C(a,n.draggable,o,!1))&&a.animated||tt===a)){if(nt=P(a),rt=P(a,n.draggable),"function"==typeof c){if(c.call(this,t,a,this))return W({sortable:e,rootEl:s,name:"filter",targetEl:a,toEl:o,fromEl:o}),U("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=C(s,n.trim(),o,!1))return W({sortable:e,rootEl:n,name:"filter",targetEl:a,fromEl:o,toEl:o}),U("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());n.handle&&!C(s,n.handle,o,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,e,o){var n,i=this,r=i.el,l=i.options,a=r.ownerDocument;if(o&&!G&&o.parentNode===r){var s=O(o);if(J=r,K=(G=o).parentNode,Q=G.nextSibling,tt=o,at=l.group,$t.dragged=G,ct={target:G,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ct.clientX-s.left,pt=ct.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,G.style["will-change"]="all",n=function(){U("delayEnded",i,{evt:t}),$t.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(G.draggable=!0),i._triggerDragStart(t,e),W({sortable:i,name:"choose",originalEvent:t}),D(G,l.chosenClass,!0))},l.ignore.split(",").forEach((function(t){k(G,t.trim(),Xt)})),v(a,"dragover",jt),v(a,"mousemove",jt),v(a,"touchmove",jt),v(a,"mouseup",i._onDrop),v(a,"touchend",i._onDrop),v(a,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),U("delayStart",this,{evt:t}),!l.delay||l.delayOnTouchOnly&&!e||this.nativeDraggable&&(u||d))n();else{if($t.eventCanceled)return void this._onDrop();v(a,"mouseup",i._disableDelayedDrag),v(a,"touchend",i._disableDelayedDrag),v(a,"touchcancel",i._disableDelayedDrag),v(a,"mousemove",i._delayedDragTouchMoveHandler),v(a,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&v(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(n,l.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Xt(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v(G,"dragend",this),v(J,"dragstart",this._onDragStart));try{document.selection?zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(yt=!1,J&&G){U("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Rt);var o=this.options;!t&&D(G,o.dragClass,!1),D(G,o.ghostClass,!0),$t.active=this,t&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Pt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(G.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]&&e[Y]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Vt()}},_onTouchMove:function(t){if(ct){var e=this.options,o=e.fallbackTolerance,n=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=q&&T(q,!0),l=q&&r&&r.a,a=q&&r&&r.d,s=It&&_t&&V(_t),c=(i.clientX-ct.clientX+n.x)/(l||1)+(s?s[0]-Dt[0]:0)/(l||1),d=(i.clientY-ct.clientY+n.y)/(a||1)+(s?s[1]-Dt[1]:0)/(a||1);if(!$t.active&&!yt){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(q){r?(r.e+=c-(ut||0),r.f+=d-(ht||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");E(q,"webkitTransform",u),E(q,"mozTransform",u),E(q,"msTransform",u),E(q,"transform",u),ut=c,ht=d,dt=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!q){var t=this.options.fallbackOnBody?document.body:J,e=O(G,!0,It,!0,t),o=this.options;if(It){for(_t=t;"static"===E(_t,"position")&&"none"===E(_t,"transform")&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=I()),e.top+=_t.scrollTop,e.left+=_t.scrollLeft):_t=I(),Dt=V(_t)}D(q=G.cloneNode(!0),o.ghostClass,!1),D(q,o.fallbackClass,!0),D(q,o.dragClass,!0),E(q,"transition",""),E(q,"transform",""),E(q,"box-sizing","border-box"),E(q,"margin",0),E(q,"top",e.top),E(q,"left",e.left),E(q,"width",e.width),E(q,"height",e.height),E(q,"opacity","0.8"),E(q,"position",It?"absolute":"fixed"),E(q,"zIndex","100000"),E(q,"pointerEvents","none"),$t.ghost=q,t.appendChild(q),E(q,"transform-origin",ft/parseInt(q.style.width)*100+"% "+pt/parseInt(q.style.height)*100+"%")}},_onDragStart:function(t,e){var o=this,n=t.dataTransfer,i=o.options;U("dragStart",this,{evt:t}),$t.eventCanceled?this._onDrop():(U("setupClone",this),$t.eventCanceled||((et=X(G)).removeAttribute("id"),et.draggable=!1,et.style["will-change"]="",this._hideClone(),D(et,this.options.chosenClass,!1),$t.clone=et),o.cloneId=zt((function(){U("clone",o),$t.eventCanceled||(o.options.removeCloneOnHide||J.insertBefore(et,G),o._hideClone(),W({sortable:o,name:"clone"}))})),!e&&D(G,i.dragClass,!0),e?(wt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(b(document,"mouseup",o._onDrop),b(document,"touchend",o._onDrop),b(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",i.setData&&i.setData.call(o,n,G)),v(document,"drop",o),E(G,"transform","translateZ(0)")),yt=!0,o._dragStartId=zt(o._dragStarted.bind(o,e,t)),v(document,"selectstart",o),mt=!0,f&&E(document.body,"user-select","none"))},_onDragOver:function(t){var e,o,n,i,l=this.el,a=t.target,s=this.options,c=s.group,d=$t.active,u=at===c,h=s.sort,f=st||d,p=this,m=!1;if(!Et){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=C(a,s.draggable,l,!0),$("dragOver"),$t.eventCanceled)return m;if(G.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return L(!1);if(wt=!1,d&&!s.disabled&&(u?h||(n=K!==J):st===this||(this.lastPutMode=at.checkPull(this,d,G,t))&&c.checkPut(this,d,G,t))){if(i="vertical"===this._getDirection(t,a),e=O(G),$("dragOverValid"),$t.eventCanceled)return m;if(n)return K=J,X(),this._hideClone(),$("revert"),$t.eventCanceled||(Q?J.insertBefore(G,Q):J.appendChild(G)),L(!0);var g=F(l,s.draggable);if(!g||function(t,e,o){var n=O(F(o.el,o.options.draggable)),i=M(o.el);return e?t.clientX>i.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>i.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,i,this)&&!g.animated){if(g===G)return L(!1);if(g&&l===t.target&&(a=g),a&&(o=O(a)),!1!==Bt(J,l,G,e,a,o,t,!!a))return X(),g&&g.nextSibling?l.insertBefore(G,g.nextSibling):l.appendChild(G),K=l,z(),L(!0)}else if(g&&function(t,e,o){var n=O(A(o.el,0,o.options,!0)),i=M(o.el);return e?t.clientX<i.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<i.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,i,this)){var v=A(l,0,s,!0);if(v===G)return L(!1);if(o=O(a=v),!1!==Bt(J,l,G,e,a,o,t,!1))return X(),l.insertBefore(G,v),K=l,z(),L(!0)}else if(a.parentNode===l){o=O(a);var b,_,y,w=G.parentNode!==l,S=!function(t,e,o){var n=o?t.left:t.top,i=o?t.right:t.bottom,r=o?t.width:t.height,l=o?e.left:e.top,a=o?e.right:e.bottom,s=o?e.width:e.height;return n===l||i===a||n+r/2===l+s/2}(G.animated&&G.toRect||e,a.animated&&a.toRect||o,i),x=i?"top":"left",T=N(a,"top","top")||N(G,"top","top"),k=T?T.scrollTop:void 0;if(gt!==a&&(_=o[x],St=!1,xt=!S&&s.invertSwap||w),b=function(t,e,o,n,i,r,l,a){var s=n?t.clientY:t.clientX,c=n?o.height:o.width,d=n?o.top:o.left,u=n?o.bottom:o.right,h=!1;if(!l)if(a&&bt<c*i){if(!St&&(1===vt?s>d+c*r/2:s<u-c*r/2)&&(St=!0),St)h=!0;else if(1===vt?s<d+bt:s>u-bt)return-vt}else if(s>d+c*(1-i)/2&&s<u-c*(1-i)/2)return function(t){return P(G)<P(t)?1:-1}(e);return(h=h||l)&&(s<d+c*r/2||s>u-c*r/2)?s>d+c/2?1:-1:0}(t,a,o,i,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,xt,gt===a),0!==b){var I=P(G);do{I-=b,y=K.children[I]}while(y&&("none"===E(y,"display")||y===q))}if(0===b||y===a)return L(!1);gt=a,vt=b;var V=a.nextElementSibling,j=!1,R=Bt(J,l,G,e,a,o,t,j=1===b);if(!1!==R)return 1!==R&&-1!==R||(j=1===R),Et=!0,setTimeout(Yt,30),X(),j&&!V?l.appendChild(G):a.parentNode.insertBefore(G,j?V:a),T&&B(T,0,k-T.scrollTop),K=G.parentNode,void 0===_||xt||(bt=Math.abs(_-O(a)[x])),z(),L(!0)}if(l.contains(G))return L(!1)}return!1}function $(s,c){U(s,p,r({evt:t,isOwner:u,axis:i?"vertical":"horizontal",revert:n,dragRect:e,targetRect:o,canSort:h,fromSortable:f,target:a,completed:L,onMove:function(o,n){return Bt(J,l,G,e,o,O(o),t,n)},changed:z},c))}function X(){$("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function L(e){return $("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(p),p!==f&&(D(G,st?st.options.ghostClass:d.options.ghostClass,!1),D(G,s.ghostClass,!0)),st!==p&&p!==$t.active?st=p:p===$t.active&&st&&(st=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){$("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===G&&!G.animated||a===l&&!a.animated)&&(gt=null),s.dragoverBubble||t.rootEl||a===document||(G.parentNode[Y]._isOutsideThisEl(t.target),!e&&jt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function z(){it=P(G),lt=P(G,s.draggable),W({sortable:p,name:"change",toEl:l,newIndex:it,newDraggableIndex:lt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",jt),b(document,"mousemove",jt),b(document,"touchmove",jt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,o=this.options;it=P(G),lt=P(G,o.draggable),U("drop",this,{evt:t}),K=G&&G.parentNode,it=P(G),lt=P(G,o.draggable),$t.eventCanceled||(yt=!1,xt=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zt(this.cloneId),Zt(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&E(document.body,"user-select",""),E(G,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),q&&q.parentNode&&q.parentNode.removeChild(q),(J===K||st&&"clone"!==st.lastPutMode)&&et&&et.parentNode&&et.parentNode.removeChild(et),G&&(this.nativeDraggable&&b(G,"dragend",this),Xt(G),G.style["will-change"]="",mt&&!yt&&D(G,st?st.options.ghostClass:this.options.ghostClass,!1),D(G,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==K?(it>=0&&(W({rootEl:K,name:"add",toEl:K,fromEl:J,originalEvent:t}),W({sortable:this,name:"remove",toEl:K,originalEvent:t}),W({rootEl:K,name:"sort",toEl:K,fromEl:J,originalEvent:t}),W({sortable:this,name:"sort",toEl:K,originalEvent:t})),st&&st.save()):it!==nt&&it>=0&&(W({sortable:this,name:"update",toEl:K,originalEvent:t}),W({sortable:this,name:"sort",toEl:K,originalEvent:t})),$t.active&&(null!=it&&-1!==it||(it=nt,lt=rt),W({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),J=G=K=q=Q=et=tt=ot=ct=dt=mt=it=lt=nt=rt=gt=vt=st=at=$t.dragged=$t.ghost=$t.clone=$t.active=null,Tt.forEach((function(t){t.checked=!0})),Tt.length=ut=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)C(t=o[n],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Lt(t));return e},sort:function(t,e){var o={},n=this.el;this.toArray().forEach((function(t,e){var i=n.children[e];C(i,this.options.draggable,n,!1)&&(o[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){o[t]&&(n.removeChild(o[t]),n.appendChild(o[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return C(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(void 0===e)return o[t];var n=Z.modifyOption(this,t,e);o[t]=void 0!==n?n:e,"group"===t&&Ft(o)},destroy:function(){U("destroy",this);var t=this.el;t[Y]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ct.splice(Ct.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if(U("hideClone",this),$t.eventCanceled)return;E(et,"display","none"),this.options.removeCloneOnHide&&et.parentNode&&et.parentNode.removeChild(et),ot=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ot){if(U("showClone",this),$t.eventCanceled)return;G.parentNode!=J||this.options.group.revertClone?Q?J.insertBefore(et,Q):J.appendChild(et):J.insertBefore(et,G),this.options.group.revertClone&&this.animate(G,et),E(et,"display",""),ot=!1}}else this._hideClone()}},kt&&v(document,"touchmove",(function(t){($t.active||yt)&&t.cancelable&&t.preventDefault()})),$t.utils={on:v,off:b,css:E,find:k,is:function(t,e){return!!C(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t},throttle:$,closest:C,toggleClass:D,clone:X,index:P,nextTick:zt,cancelNextTick:Zt,detectDirection:At,getChild:A},$t.get=function(t){return t[Y]},$t.mount=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&($t.utils=r(r({},$t.utils),t.utils)),Z.mount(t)}))},$t.create=function(t,e){return new $t(t,e)},$t.version="1.15.1";var Ht,Ut,Wt,Gt,Kt,qt,Jt=[],Qt=!1;function te(){Jt.forEach((function(t){clearInterval(t.pid)})),Jt=[]}function ee(){clearInterval(qt)}var oe=$((function(t,e,o,n){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,c=I(),d=!1;Ut!==o&&(Ut=o,te(),Ht=e.scroll,i=e.scrollFn,!0===Ht&&(Ht=j(o,!0)));var u=0,h=Ht;do{var f=h,p=O(f),m=p.top,g=p.bottom,v=p.left,b=p.right,_=p.width,y=p.height,w=void 0,C=void 0,S=f.scrollWidth,x=f.scrollHeight,D=E(f),T=f.scrollLeft,k=f.scrollTop;f===c?(w=_<S&&("auto"===D.overflowX||"scroll"===D.overflowX||"visible"===D.overflowX),C=y<x&&("auto"===D.overflowY||"scroll"===D.overflowY||"visible"===D.overflowY)):(w=_<S&&("auto"===D.overflowX||"scroll"===D.overflowX),C=y<x&&("auto"===D.overflowY||"scroll"===D.overflowY));var M=w&&(Math.abs(b-r)<=a&&T+_<S)-(Math.abs(v-r)<=a&&!!T),N=C&&(Math.abs(g-l)<=a&&k+y<x)-(Math.abs(m-l)<=a&&!!k);if(!Jt[u])for(var A=0;A<=u;A++)Jt[A]||(Jt[A]={});Jt[u].vx==M&&Jt[u].vy==N&&Jt[u].el===f||(Jt[u].el=f,Jt[u].vx=M,Jt[u].vy=N,clearInterval(Jt[u].pid),0==M&&0==N||(d=!0,Jt[u].pid=setInterval(function(){n&&0===this.layer&&$t.active._onTouchMove(Kt);var e=Jt[this.layer].vy?Jt[this.layer].vy*s:0,o=Jt[this.layer].vx?Jt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call($t.dragged.parentNode[Y],o,e,t,Kt,Jt[this.layer].el)||B(Jt[this.layer].el,o,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=j(h,!1)));Qt=d}}),30),ne=function(t){var e=t.originalEvent,o=t.putSortable,n=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var s=o||i;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),s&&!s.el.contains(d)&&(r("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function ie(){}function re(){}ie.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=A(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),o&&o.animateAll()},drop:ne},s(ie,{pluginName:"revertOnSpill"}),re.prototype={onSpill:function(t){var e=t.dragEl,o=t.putSortable||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:ne},s(re,{pluginName:"removeOnSpill"}),$t.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ee(),te(),clearTimeout(S),S=void 0},nulling:function(){Kt=Ut=Ht=Qt=qt=Wt=Gt=null,Jt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var o=this,n=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(n,i);if(Kt=t,e||this.options.forceAutoScrollFallback||u||d||f){oe(t,this.options,r,e);var l=j(r,!0);!Qt||qt&&n===Wt&&i===Gt||(qt&&ee(),qt=setInterval((function(){var r=j(document.elementFromPoint(n,i),!0);r!==l&&(l=r,te()),oe(t,o.options,r,e)}),10),Wt=n,Gt=i)}else{if(!this.options.bubbleScroll||j(r,!0)===I())return void te();oe(t,this.options,j(r,!1),!1)}}},s(t,{pluginName:"scroll",initializeByDefault:!0})}),$t.mount(re,ie);var le=$t,ae={name:"ZjTableColumnConfiger",props:{defaultColumnShowCount:{type:Number,default:20},defaultColumnShowKeys:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},columnKey:{type:String,default:"id"},props:{type:Object,default(){return{label:"label"}}},showConfirm:{type:Boolean,default:!1},tag:{type:String,default:""},userId:{type:[String,Number],default:""}},watch:{columns(t){console.log("newValue",t),this.cols_config=this.getCustomerColsConfig(t),this.$emit("change",this.cols_config)}},data(){return{editing:!1,visible:!1,cols_config:[],ColsConfigTmp:[]}},methods:{reset(){this.cols_config=[],this.$nextTick((()=>{this.cols_config=this.getCustomerColsConfig(this.columns)})),this.editing=!1},submit(){this.update(),this.editing=!1},update(){console.log("update: ",this.cols_config),this.setCutomerColsConfig(),this.$emit("change",this.cols_config)},checkboxClick(){this.editing=!0,this.showConfirm||this.update()},initDragSort(){const t=this.$refs.col_config.$el.querySelectorAll(".col-config-list")[0];le.create(t,{onEnd:({oldIndex:t,newIndex:e})=>{this.editing=!0;const o=this.ColsConfigTmp[t];this.ColsConfigTmp.splice(t,1),this.ColsConfigTmp.splice(e,0,o),console.log("this.ColsConfigTmp",this.ColsConfigTmp);const n=this.ColsConfigTmp.map((t=>t.id));console.log("newKeysArr: ",n),_.each(this.cols_config,(t=>{const e=n.indexOf(t.id);t.sort_index=e})),console.log("this.col_config: ",this.col_config),this.$forceUpdate(),this.showConfirm||this.update()}})},setCutomerColsConfig(){let t={},e="";t=localStorage.getItem("COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("COLUMN_CUSTOMER_CONFIG"))||{},e=t[this.userId+this.tag],e?e.field_colunms_config=this.cols_config:e={field_colunms_config:this.cols_config},t[this.userId+this.tag]=e,localStorage.setItem("COLUMN_CUSTOMER_CONFIG",JSON.stringify(t))},setColWidth(t,e){_.each(this.cols_config,(o=>{o.id==t&&(o.width=e)})),this.setCutomerColsConfig()},getCustomerColsConfig(t){let e=[],o={},n=[],i={};i=localStorage.getItem("COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("COLUMN_CUSTOMER_CONFIG"))||{},o=i[this.userId+this.tag],o&&o.field_colunms_config&&(n=o.field_colunms_config);let r=0;return _.each(t,(t=>{let o=_.find(n,{id:t[this.columnKey]});o?e.push({label:t[this.props.label],id:t[this.columnKey],show:o.show,sort_index:o.sort_index,width:o.width||""}):(r++,e.push({label:t[this.props.label],id:t[this.columnKey],show:!!(r<=this.defaultColumnShowCount||_.includes(this.defaultColumnShowKeys,t[this.columnKey])),sort_index:0,width:""}))})),e=_.sortBy(e,"sort_index"),this.ColsConfigTmp=_.cloneDeep(e),e}},mounted(){this.cols_config=this.getCustomerColsConfig(this.columns),this.initDragSort()}},se=ae,ce=(0,o(900).Z)(se,n,[],!1,null,null,null);ce.options.__file="components/lib/table-column-configer/src/main.vue";var de=ce.exports;de.install=function(t){t.component(de.name,de)};var ue=de},900:function(t,e,o){function n(t,e,o,n,i,r,l,a){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=o,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),l?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},c._ssrRegister=s):i&&(s=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var d=c.render;c.render=function(t,e){return s.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,s):[s]}return{exports:t,options:c}}o.d(e,{Z:function(){return n}})}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){o.r(n),o.d(n,{ColorIndication:function(){return l.default},Demo:function(){return t.default},Demo2:function(){return e.default},SelectPositionTable:function(){return r.default},TableColumnConfiger:function(){return i.default}});var t=o(924),e=o(367),i=o(387),r=o(622),l=o(109);const a={Demo:t.default,Demo2:e.default,TableColumnConfiger:i.default,SelectPositionTable:r.default,ColorIndication:l.default},s=function(t){s.installed||Object.keys(a).forEach((e=>{t.component(a[e].name,a[e])}))};n.default={version:"0.0.6",install:s}}(),n}()},6981:function(t){t.exports=function(){return this.ELEMENT}()},3371:function(t){t.exports=function(){return this.Vue}()}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0;var n={};return function(){"use strict";o.r(n),o.d(n,{default:function(){return N}});var t=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"area-elevation"},[t.curVal&&t.curVal.selected?t._l(t.curVal.selected,(function(e){return o("div",{key:e.key,staticClass:"area-elevation-select-box"},[o("el-tag",{staticClass:"area-elevation-select-item"},[t._v(t._s(e.name))])],1)})):t._e(),t._v(" "),t.loading?o("i",{staticClass:"el-icon-loading"}):o("el-button",{attrs:{type:"view"==t.mode?"text":"plain",size:"small",icon:"el-icon-location-outline"},on:{click:function(e){return t.openSelectSectionDlg()}}},[t._v(t._s(t.button_title))]),t._v(" "),o("dlg-select-section",{attrs:{mode:t.mode,dialog_title:t.dialog_title,areaMap:t.areaMap,allTreeData:t.allTreeData,colorConfig:t.colorConfig,value:t.curVal,show:t.dlg.show},on:{close:t.colseSelectSectionDlg}})],2)};t._withStripped=!0;var e=o(6981),i=o(3371),r=o.n(i),l=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{title:t.dialog_title,visible:t.dialogVisible,width:"80%","append-to-body":"","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[o("el-form",{ref:"form",attrs:{inline:!0,model:t.form,"label-width":"100px"}},[o("el-row",[o("el-form-item",{attrs:{label:"楼栋"}},[o("el-select",{attrs:{placeholder:"请选择楼栋",disabled:"view"==t.mode},on:{change:t.changeBuilding},model:{value:t.form.building_id,callback:function(e){t.$set(t.form,"building_id",e)},expression:"form.building_id"}},t._l(t.buildingOptions,(function(t){return o("el-option",{key:t.key,attrs:{label:t.title,value:t.key}})})),1)],1),t._v(" "),o("el-form-item",{attrs:{label:"楼层"}},[o("el-select",{attrs:{multiple:"",placeholder:"请选择楼层",disabled:"view"==t.mode},on:{change:t.filterData},model:{value:t.form.storey_ids,callback:function(e){t.$set(t.form,"storey_ids",e)},expression:"form.storey_ids"}},t._l(t.floor_options,(function(t){return o("el-option",{key:t.key,attrs:{label:t.title,value:t.key}})})),1)],1),t._v(" "),o("el-form-item",{attrs:{label:"关建字筛选"}},[o("el-input",{attrs:{placeholder:"请输入",disabled:"view"==t.mode},on:{input:t.filterData},model:{value:t.form.keyword,callback:function(e){t.$set(t.form,"keyword",e)},expression:"form.keyword"}})],1)],1),t._v(" "),o("el-row",[o("el-col",{attrs:{span:10}},[o("el-form-item",{attrs:{label:"展示方式"}},[o("el-radio-group",{attrs:{disabled:t.show_level_disable||"view"==t.mode},model:{value:t.form.show_level,callback:function(e){t.$set(t.form,"show_level",e)},expression:"form.show_level"}},[o("el-radio",{attrs:{label:3}},[t._v("展示到3级")]),t._v(" "),o("el-radio",{attrs:{label:4}},[t._v("展示到4级")])],1)],1)],1),t._v(" "),o("el-col",{attrs:{span:6}},[o("zj-color-indication",{staticStyle:{float:"right"},attrs:{colorConfig:t.colorConfig}})],1)],1)],1),t._v(" "),o("div",{staticStyle:{margin:"0 20px 20px 20px"}},[t._v("已选项:"),t._l(t.selectedItem,(function(e){return o("el-tag",{key:e.key,staticStyle:{margin:"5px"},attrs:{closable:"view"!=t.mode},on:{close:function(o){return t.removeItem(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2),t._v(" "),o("zj-select-position-table",{attrs:{data:t.treeData,readonly:"view"==t.mode},model:{value:t.selectedItem,callback:function(e){t.selectedItem=e},expression:"selectedItem"}}),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){return t.close()}}},[t._v("取 消")]),t._v(" "),"view"!=t.mode?o("el-button",{attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确 定")]):t._e()],1)],1)};l._withStripped=!0;var a=o(6407),s=o(3379),c=o.n(s),d=o(7795),u=o.n(d),h=o(569),f=o.n(h),p=o(3565),m=o.n(p),g=o(9216),v=o.n(g),b=o(4589),y=o.n(b),w=o(8459),C={};C.styleTagTransform=y(),C.setAttributes=m(),C.insert=f().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=v(),c()(w.Z,C),w.Z&&w.Z.locals&&w.Z.locals;var S=o(1870),x={};x.styleTagTransform=y(),x.setAttributes=m(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=v(),c()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals,r().use(a.SelectPositionTable),r().use(a.ColorIndication);var D={props:{allTreeData:{type:Array,default:function(){return[]}},mode:{type:String,default(){return"view"}},areaMap:{type:Object,default:function(){return{}}},colorConfig:{type:Object,default:function(){return{}}},value:{type:[String,Array,Number,Object]},statusList:{type:Array,default:function(){return[]}},show:{type:Boolean,default:!1},all_level:{type:Number,default:0},dialog_title:{type:String,default:"选择部位"}},watch:{"form.show_level"(t,e){this.selectedItemMap["level_"+e]=this.selectedItem,this.filterData()},allTreeData(t){this.buildingOptions=t},value:{handler(t){},immediate:!0},show(t){if(this.dialogVisible=t,t){if(this.value&&this.value.building_ids?(this.form.building_id=this.value.building_ids[0]+"",this.form.building_ids=this.value.building_ids):this.allTreeData&&this.allTreeData.length>0&&(this.form.building_id=this.allTreeData[0].key,this.form.building_ids=[this.allTreeData[0].key]),this.value&&this.value.storey_ids){let t=[];_.each(this.value.storey_ids,(e=>{t.push(e+"")}))}this.value&&this.value.selected?(this.selectedItem=this.value.selectedItem,this.form.keyword=this.value.keyword,this.form.show_level=this.value.show_level):this.selectedItem=[],this.loadBuildingData()}},selectedItem:{handler(t){},deep:!0}},data(){return{dialogVisible:!1,show_level_disable:!1,form:{building_id:"1",storey_ids:[],show_level:4,keyword:""},buildingOptions:[],floor_options:[],selectedItem:[],treeData:[],buildingTreeData:[],selectedItemMap:{level_3:[],level_4:[]}}},methods:{confirm(){let t=[];_.each(this.selectedItem,(e=>{this.areaMap[e.key]&&t.push(this.areaMap[e.key])}));let e=[];_.each(this.form.storey_ids,(t=>{e.push(parseInt(t))}));let o={selectedItem:this.selectedItem,selected:t,building_ids:[parseInt(this.form.building_id)],storey_ids:e,keyword:this.form.keyword,show_level:parseInt(this.form.show_level)};this.$emit("close",o)},close(){this.dialogVisible=!1,this.$emit("close",!1)},handleClose(t){this.$emit("close",!1)},filterData(){if(this.treeData=_.cloneDeep(this.buildingTreeData.filter((t=>this.form.storey_ids.length>0?_.includes(this.form.storey_ids,t.key)?t:void 0:t))),3==this.form.show_level&&_.each(this.treeData,(t=>{_.each(t.childrens,(t=>{delete t.childrens}))})),4==this.form.show_level){let t=this.selectedItemMap.level_3;t&&t.length>0&&(_.each(this.treeData,(e=>{_.each(e.childrens,(e=>{_.find(t,{key:e.key})&&_.each(e.childrens,(o=>{t.push({key:o.key,name:e.name+"-"+o.title})}))}))})),this.selectedItem=t)}this.filterKeyWord()},changeBuilding(){this.loadBuildingData()},loadBuildingData(){let t=_.find(this.allTreeData,{key:this.form.building_id});t&&(t.childrens?this.buildingTreeData=_.cloneDeep(t.childrens):this.buildingTreeData=[],this.buildingTreeData.length>0&&(this.buildingTreeData[0].childrens&&this.buildingTreeData[0].childrens[0].childrens&&this.buildingTreeData[0].childrens[0].childrens.length>0?this.show_level_disable=!1:(this.form.show_level=3,this.show_level_disable=!0)),this.floor_options=this.buildingTreeData,this.filterData())},filterKeyWord(){this.form.keyword&&(this.treeData=this.treeData.filter((t=>{let e=!1;if(t.childrens&&t.childrens.length>0&&(t.childrens=t.childrens.filter((t=>{if(-1!=t.title.indexOf(this.form.keyword)||-1!=this.form.keyword.indexOf(t.title))return e=!0,t;if(t.childrens&&t.childrens.length>0){let o=!1;if(_.each(t.childrens,(t=>{-1==t.title.indexOf(this.form.keyword)&&-1==this.form.keyword.indexOf(t.title)||(o=!0,e=!0)})),o)return t}}))),e)return t})))},removeItem(t){this.selectedItem=_.filter(this.selectedItem,(function(e){return e.key!=t.key}))}},mounted(){}},E=o(1900),T=(0,E.Z)(D,l,[],!1,null,null,null);T.options.__file="components/lib/bpmAreaElevation/src/part/dlgSelectSection.vue";var k=T.exports;r().use(e.Dialog);var I={name:"BpmAreaElevation",components:{dlgSelectSection:k},props:{value:{type:[String,Array,Number,Object]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}},formName:{type:String},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},isMultiple:{type:Boolean,default(){return!1}}},data(){return{sourceData:[],allTreeData:[],areaMap:{},dlg:{show:!1},curVal:{building_id:"",storey_ids:[],selected:[],keyword:"",show_level:"4"},loading:!1,button_title:"",dialog_title:"",colorConfig:{data:[{name:"task_no",title:"未开始",color:"#fff",border_color:"#D8DADD",width:"100px"},{name:"task_ready",title:"进行中",color:"#FFE9BD",border_color:"#FFE9BD",width:"100px"},{name:"task_ing",title:"已完成",color:"#B4EFCE",border_color:"#B4EFCE",width:"100px"}]}}},computed:{},watch:{curVal(t){this.$emit("input",t),this.$emit("change",t)},value(){this.value&&(this.curVal=this.value)}},mounted(){this.fieldConf.test&&(this.formateData(this.fieldConf.range_enum),this.getColorConfig(this.fieldConf.status_range_enum)),"view"==this.mode?(this.button_title="",this.dialog_title="查看部位"):(this.button_title="选择部位",this.dialog_title="选择部位"),this.curVal=this.value},methods:{async loadList(t){let e=this.fieldConf.area||"",o=this.fieldConf.status_scope.depends[0]||"";if(!e||!o)return console.log("没有配置联区域字段或检查项依赖自段"),!1;let n={fields:{}};return n.fields[e]=this.container.formData[e],n.fields[o]=this.container.formData[o],this.sourceData=await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:n,cusFormName:this.formName,field:this,container:this.container}),console.log("this.sourceData",this.sourceData),this.sourceData},formateData(t){console.log("source_data",t);let e=[],o={},n=[];this.fieldConf.test?_.each(this.fieldConf.status_range_enum,(t=>{o[t.id]=t,n.push(t)})):_.each(this.sourceData[1],(t=>{o[t.id]=t,n.push(t)})),console.log("statusMap",o);let i=(t,e,r)=>{let l=[];return _.each(t,(a=>{if(this.areaMap[a.id]=a,a.path_ids.length==e&&(0==r||_.last(a.path_ids)==r)){let r={title:a.name,key:a.id+"",path_names:a.path_names,state:!1,status:a.status};if(a.is_parent&&(r.childrens=i(t,e+1,a.id),r.childrens&&r.childrens.length>0)){let t=0,e=0,i=0;_.each(r.childrens,(o=>{o.status?(console.log("child",o),o.status==n[1].id?e+=1:o.status==n[2].id?i++:t++):t++})),console.log("_complete_count",i),console.log("_doing_count",e),console.log("_begin_count",t),i==r.childrens.length?a.status=n[2].id:t==r.childrens.length?a.status?_.each(r.childrens,(t=>{t.status=a.status,t.color=o[a.status].color})):a.status=n[0].id:a.status=n[1].id}a.status&&o[a.status]&&(r.color=o[a.status].color),l.push(r)}})),_.orderBy(l,["order"],["asc"]),1==e&&(l=_.reverse(l)),l};e=i(t,0,0),console.log("_treeData",e),this.allTreeData=e},async openSelectSectionDlg(){console.log("row",this.row),console.log("fieldConf",this.fieldConf),console.log("container",this.container),this.fieldConf.test||(this.loading=!0,await this.loadList(),this.loading=!1,this.formateData(this.sourceData[0]),this.getColorConfig(this.sourceData[1])),this.dlg.show=!0},colseSelectSectionDlg(t){console.log("confirm_Data",t),this.dlg.show=!1,t&&(this.curVal=t,this.$emit("input",t))},getColorConfig(t){let e={data:[]};t&&t.length>0&&(_.each(t,(t=>{let o={name:t.id,title:t.name,color:t.color||"#ffffff",border_color:t.color||"#D8DADD",width:"100px"};"#ffffff"!=o.color&&"#FFFFFF"!=o.color||(o.border_color="#D8DADD"),e.data.push(o)})),this.colorConfig=e)}}},O=(o(7157),(0,E.Z)(I,t,[],!1,null,null,null));O.options.__file="components/lib/bpmAreaElevation/src/main.vue";var M=O.exports;M.install=function(t){t.component(M.name,M)};var N=M}(),n}()}));
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.bpm2=e():t.bpm2=e()}(self,(function(){return function(){var t={7157:function(t,e,o){"use strict";var n=o(8081),i=o.n(n),r=o(3645);o.n(r)()(i()).push([t.id,".area-elevation .area-elevation-select-box .area-elevation-select-item {\n float: left;\n margin-right: 5px;\n margin-bottom: 5px;\n}\n",""])},1870:function(t,e,o){"use strict";var n=o(8081),i=o.n(n),r=o(3645),l=o.n(r)()(i());l.push([t.id,".color-indication{width:auto;bottom:0;height:40px;left:0;right:0;color:#666;line-height:20px;background:#fff;display:flex;justify-content:space-around;align-items:center;padding:0 5px;z-index:999}.color-indication-item{flex:1;padding:2px;display:flex}.color-indication .color-rect{background-color:#666;border:1px solid #666;width:22px;height:16px;border-radius:4px;margin-right:5px;display:inline-block}",""]),e.Z=l},8459:function(t,e,o){"use strict";var n=o(8081),i=o.n(n),r=o(3645),l=o.n(r)()(i());l.push([t.id,".select-position-table{height:100%;max-height:600px;overflow:auto}.select-position-table table,.select-position-table td,.select-position-table th{border:0 solid #E2E2E2;border-collapse:collapse;text-align:center;padding:0}.select-position-table .left-table{height:100%}.select-position-table .select-position-table-content{display:flex}.select-position-table .select-position-table-content .select-position-table-content-left .floor{display:flex;align-items:center;height:100%;border:2px solid #E2E2E2;text-align:center;justify-content:center;width:100px!important}.select-position-table .select-position-table-content .select-position-table-content-right{width:100%;overflow:auto}.position-table-cell .flag{position:absolute;right:0;top:0;width:0;height:0;border-style:solid;border-top:8px solid #246AE3;border-right:8px solid #246AE3;border-left:8px solid transparent;border-bottom:8px solid transparent}.position-table-cell .flag .icon{position:absolute;right:-10px;top:-10px;font-size:12px;color:#FFF;font-weight:900}.position-table-cell .is_selected .parent{position:relative;border-top:2px solid #246AE3!important;border-left:2px solid #246AE3!important;border-right:2px solid #246AE3!important}.position-table-cell .is_selected .only-parent{border-bottom:2px solid #246AE3!important}.position-table-cell .is_selected .cell-childs{position:relative}.position-table-cell .is_selected .cell-childs .cell-child{position:relative;border-bottom:2px solid #246AE3!important}.position-table-cell .is_selected .cell-childs .cell-child:first-child{border-left:2px solid #246AE3!important}.position-table-cell .is_selected .cell-childs .cell-child:last-child{border-right:2px solid #246AE3!important}.position-table-cell .is_child_selected{border:2px solid #246AE3!important}.position-table-cell .cell-parent{box-sizing:content-box}.position-table-cell .cell-parent .parent{padding:10px;border:2px solid #E2E2E2;min-width:60px;overflow:hidden}.position-table-cell .cell-parent .cell-childs{box-sizing:content-box;display:flex;border:none}.position-table-cell .cell-parent .cell-childs .cell-child{position:relative;border:2px solid #E2E2E2;white-space:nowrap;word-break:none;padding:10px;flex:1;border-right:2px solid #E2E2E2}",""]),e.Z=l},3645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var l={};if(n)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(l[s]=!0)}for(var c=0;c<t.length;c++){var d=[].concat(t[c]);n&&l[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},8081:function(t){"use strict";t.exports=function(t){return t[1]}},3379:function(t){"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var r={},l=[],a=0;a<t.length;a++){var s=t[a],c=n.base?s[0]+n.base:s[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=o(u),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==h)e[h].references++,e[h].updater(f);else{var p=i(f,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:p,references:1})}l.push(u)}return l}function i(t,e){var o=e.domAPI(e);return o.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var r=n(t=t||[],i=i||{});return function(t){t=t||[];for(var l=0;l<r.length;l++){var a=o(r[l]);e[a].references--}for(var s=n(t,i),c=0;c<r.length;c++){var d=o(r[c]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=s}}},569:function(t){"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},9216:function(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},3565:function(t,e,o){"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},7795:function(t){"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var r=o.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},1900:function(t,e,o){"use strict";function n(t,e,o,n,i,r,l,a){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=o,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),l?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},c._ssrRegister=s):i&&(s=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var d=c.render;c.render=function(t,e){return s.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,s):[s]}return{exports:t,options:c}}o.d(e,{Z:function(){return n}})},6407:function(t){self,t.exports=function(){"use strict";var t={109:function(t,e,o){o.d(e,{default:function(){return a}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"color-indication"},t._l(t.colorConfig.data,(function(e){return o("div",{key:e.name,staticClass:"color-indication-item",style:{width:e.width}},["left"==t.textPlace?o("span",[t._v(t._s(e.title))]):t._e(),t._v(" "),o("div",{staticClass:"color-rect",style:{"background-color":e.color,"border-color":e.border_color}}),t._v(" "),"right"==t.textPlace?o("span",[t._v(t._s(e.title))]):t._e()])})),0)};n._withStripped=!0;var i={name:"ZjColorIndication",props:{colorConfig:{type:Object,default:function(){return{}}},textPlace:{type:String,default:"right"}}},r=(0,o(900).Z)(i,n,[],!1,null,"3d1ff590",null);r.options.__file="components/lib/color-indication/src/main.vue";var l=r.exports;l.install=function(t){t.component(l.name,l)};var a=l},924:function(t,e,o){o.d(e,{default:function(){return l}});var n=function(){var t=this;return t.$createElement,t._self._c,t._m(0)};n._withStripped=!0;var i=(0,o(900).Z)({name:"Demo"},n,[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("h1",{staticClass:"m-demo"},[t._v("demo1")])])}],!1,null,null,null);i.options.__file="components/lib/demo/src/main.vue";var r=i.exports;r.install=function(t){t.component(r.name,r)};var l=r},367:function(t,e,o){o.d(e,{default:function(){return l}});var n=function(){var t=this;return t.$createElement,t._self._c,t._m(0)};n._withStripped=!0;var i=(0,o(900).Z)({name:"Demo2"},n,[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("h1",{staticClass:"m-demo"},[t._v("demo2")])])}],!1,null,null,null);i.options.__file="components/lib/demo2/src/main.vue";var r=i.exports;r.install=function(t){t.component(r.name,r)};var l=r},622:function(t,e,o){o.d(e,{default:function(){return u}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"select-position-table"},[o("div",{staticClass:"select-position-table-content"},[o("div",{staticClass:"select-position-table-content-left",staticStyle:{width:"100px"}},[o("table",{staticClass:"left-table"},[o("tbody",t._l(t.list,(function(e){return o("tr",{key:e.key},[o("td",{staticClass:"floor"},[o("div",[t._v(t._s(e.title))])]),t._v(" "),t._l(e.childrens,(function(n,i){return o("td",{key:n.key,staticStyle:{visibility:"hidden"}},[o("cell-item",{model:{value:e.childrens[i],callback:function(o){t.$set(e.childrens,i,o)},expression:"item.childrens[index]"}})],1)}))],2)})),0)])]),t._v(" "),o("div",{staticClass:"select-position-table-content-right"},[o("table",[o("tbody",t._l(t.list,(function(e){return o("tr",{key:e.key},t._l(e.childrens,(function(n,i){return o("td",{key:n.key},[o("cell-item",{attrs:{readonly:t.readonly},model:{value:e.childrens[i],callback:function(o){t.$set(e.childrens,i,o)},expression:"item.childrens[index]"}})],1)})),0)})),0)])])])])};n._withStripped=!0;var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"position-table-cell"},[o("div",{staticClass:"cell-parent",class:{is_selected:t.curVal.state},style:{background:t.curVal.color}},[o("div",{staticClass:"parent",class:{"only-parent":t.curVal.childrens&&0==t.curVal.childrens.length||!t.curVal.childrens},on:{click:function(e){return t.troggleParent(t.curVal)}}},[t._v(t._s(t.curVal.title)+"\n "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.curVal.state,expression:"curVal.state"}],staticClass:"flag"},[o("i",{staticClass:"icon el-icon-check"})])]),t._v(" "),o("div",{staticClass:"cell-childs"},t._l(t.curVal.childrens,(function(e){return o("div",{key:e.key,staticClass:"cell-child",class:{is_child_selected:e.state&&!t.curVal.state},style:{background:e.color},on:{click:function(o){return t.troggleChild(e)}}},[t._v(t._s(e.title)+"\n\n "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.state&&!t.curVal.state,expression:"child_item.state && !curVal.state"}],staticClass:"flag"},[o("i",{staticClass:"icon el-icon-check"})])])})),0)])])};i._withStripped=!0;var r={props:{value:{type:Object,default:function(){return{}}},readonly:{type:Boolean,default:!1}},data(){return{curVal:{}}},watch:{value(t){this.curVal=t}},methods:{troggleParent(t){if(this.readonly)return!1;if(console.log("item",t),t.color&&"#FFFFFF"!=t.color&&"#ffffff"!=t.color&&"#FFF"!=t.color&&"#fff"!=t.color)return!1;let e=!1;if(_.each(this.curVal.childrens,(t=>{t.color&&"#FFFFFF"!=t.color&&"#ffffff"!=t.color&&"#FFF"!=t.color&&"#fff"!=t.color&&(e=!0)})),e)return!1;this.curVal.state=!this.curVal.state,_.each(this.curVal.childrens,(t=>{t.state=this.curVal.state})),this.setVal()},troggleChild(t){if(this.readonly)return!1;if(this.curVal.color&&"#FFFFFF"!=this.curVal.color&&"#ffffff"!=this.curVal.color&&"#FFF"!=this.curVal.color&&"#fff"!=this.curVal.color)return!1;if(t.color&&"#FFFFFF"!=t.color&&"#ffffff"!=t.color&&"#FFF"!=t.color&&"#fff"!=t.color)return!1;t.state=!t.state;let e=!0;_.each(this.curVal.childrens,(t=>{t.state||(e=!1)})),this.curVal.state=e,this.setVal()},setVal(){this.$emit("input",this.curVal)}},mounted(){this.curVal=this.value}},l=o(900),a=(0,l.Z)(r,i,[],!1,null,null,null);a.options.__file="components/lib/select-position-table/src/widgets/cell-item.vue";var s={name:"ZjSelectPositionTable",components:{CellItem:a.exports},props:{value:{type:Array,default:function(){return[]}},data:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1},withParent:{type:Boolean,default:!0}},watch:{value:{handler(){this.setSelectedItem()},deep:!0},data:{handler(t){this.list=_.cloneDeep(t),this.setSelectedItem()},deep:!0,immediate:!0},list:{handler(t){this.getSelectedItem(t)},deep:!0}},data(){return{list:[]}},methods:{setSelectedItem(){_.each(this.list,(t=>{_.each(t.childrens,(t=>{if(t.childrens&&t.childrens.length>0){let e=0;_.each(t.childrens,(t=>{_.find(this.value,{key:t.key})?(t.state=!0,e++):t.state=!1})),e==t.childrens.length?t.state=!0:t.state=!1}else _.find(this.value,{key:t.key})?t.state=!0:t.state=!1}))}))},getSelectedItem(t){let e=[];_.each(t,(t=>{_.each(t.childrens,(o=>{o.childrens&&o.childrens.length>0?(_.each(o.childrens,(n=>{n.state&&e.push({name:t.title+"-"+o.title+"-"+n.title,key:n.key})})),this.withParent&&o.state&&e.push({name:t.title+"-"+o.title,key:o.key})):o.state&&e.push({name:t.title+"-"+o.title,key:o.key})}))})),this.$emit("input",e)}},mounted(){}},c=(0,l.Z)(s,n,[],!1,null,null,null);c.options.__file="components/lib/select-position-table/src/main.vue";var d=c.exports;d.install=function(t){t.component(d.name,d)};var u=d},387:function(t,e,o){o.d(e,{default:function(){return ue}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-popover",{ref:"col_config",attrs:{"popper-class":"table-cloumn-configer",placement:"bottom",width:"200",trigger:"click"}},[o("div",{staticClass:"content"},[o("div",[t.showConfirm?o("div",{staticClass:"btn-grp"},[o("el-button",{attrs:{round:"",size:"mini",disabled:!t.editing},on:{click:t.reset}},[t._v(t._s(t.$z("重置","c.reset"))+"\n ")]),t._v(" "),o("el-button",{attrs:{type:"primary",round:"",size:"mini",disabled:!t.editing},on:{click:t.submit}},[t._v(t._s(t.$z("确定","c.confirm"))+"\n ")])],1):t._e(),t._v(" "),o("div",{staticClass:"tip"},[t._v("\n "+t._s(t.$z("提示:拖拽可排序","b2.common.tip_can_drap_sort")))])]),t._v(" "),o("ul",{staticClass:"col-config-list"},t._l(t.cols_config,(function(e,n){return o("li",{key:""+n,staticStyle:{cursor:"grab"}},[o("el-checkbox",{on:{change:function(e){return t.checkboxClick()}},model:{value:e.show,callback:function(o){t.$set(e,"show",o)},expression:"col.show"}}),t._v(" "),o("div",{staticClass:"item-name",attrs:{title:e.label}},[t._v("\n "+t._s(e.label)+"\n ")])],1)})),0)]),t._v(" "),t._t("default",(function(){return[o("i",{staticClass:"el-icon-s-tools",staticStyle:{"font-size":"20px",color:"#666",cursor:"pointer"},attrs:{title:"设置字段"}})]}),{slot:"reference"})],2)],1)};function i(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function r(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?i(Object(o),!0).forEach((function(e){a(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function l(t){return l="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},l(t)}function a(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},s.apply(this,arguments)}function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}n._withStripped=!0;var d=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=c(/Edge/i),h=c(/firefox/i),f=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),g={capture:!1,passive:!1};function v(t,e,o){t.addEventListener(e,o,!d&&g)}function b(t,e,o){t.removeEventListener(e,o,!d&&g)}function y(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function w(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function C(t,e,o,n){if(t){o=o||document;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&y(t,e):y(t,e))||n&&t===o)return t;if(t===o)break}while(t=w(t))}return null}var S,x=/\s+/g;function D(t,e,o){if(t&&e)if(t.classList)t.classList[o?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(x," ").replace(" "+e+" "," ");t.className=(n+(o?" "+e:"")).replace(x," ")}}function E(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=o+("string"==typeof o?"":"px")}}function T(t,e){var o="";if("string"==typeof t)o=t;else do{var n=E(t,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function k(t,e,o){if(t){var n=t.getElementsByTagName(e),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function I(){return document.scrollingElement||document.documentElement}function O(t,e,o,n,i){if(t.getBoundingClientRect||t===window){var r,l,a,s,c,u,h;if(t!==window&&t.parentNode&&t!==I()?(l=(r=t.getBoundingClientRect()).top,a=r.left,s=r.bottom,c=r.right,u=r.height,h=r.width):(l=0,a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||o)&&t!==window&&(i=i||t.parentNode,!d))do{if(i&&i.getBoundingClientRect&&("none"!==E(i,"transform")||o&&"static"!==E(i,"position"))){var f=i.getBoundingClientRect();l-=f.top+parseInt(E(i,"border-top-width")),a-=f.left+parseInt(E(i,"border-left-width")),s=l+r.height,c=a+r.width;break}}while(i=i.parentNode);if(n&&t!==window){var p=T(i||t),m=p&&p.a,g=p&&p.d;p&&(s=(l/=g)+(u/=g),c=(a/=m)+(h/=m))}return{top:l,left:a,bottom:s,right:c,width:h,height:u}}}function M(t){var e=O(t),o=parseInt(E(t,"padding-left")),n=parseInt(E(t,"padding-top")),i=parseInt(E(t,"padding-right")),r=parseInt(E(t,"padding-bottom"));return e.top+=n+parseInt(E(t,"border-top-width")),e.left+=o+parseInt(E(t,"border-left-width")),e.width=t.clientWidth-o-i,e.height=t.clientHeight-n-r,e.bottom=e.top+e.height,e.right=e.left+e.width,e}function N(t,e,o){for(var n=V(t,!0),i=O(t)[e];n;){var r=O(n)[o];if(!("top"===o||"left"===o?i>=r:i<=r))return n;if(n===I())break;n=V(n,!1)}return!1}function A(t,e,o,n){for(var i=0,r=0,l=t.children;r<l.length;){if("none"!==l[r].style.display&&l[r]!==$t.ghost&&(n||l[r]!==$t.dragged)&&C(l[r],o.draggable,t,!1)){if(i===e)return l[r];i++}r++}return null}function F(t,e){for(var o=t.lastElementChild;o&&(o===$t.ghost||"none"===E(o,"display")||e&&!y(o,e));)o=o.previousElementSibling;return o||null}function P(t,e){var o=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===$t.clone||e&&!y(t,e)||o++;return o}function j(t){var e=0,o=0,n=I();if(t)do{var i=T(t),r=i.a,l=i.d;e+=t.scrollLeft*r,o+=t.scrollTop*l}while(t!==n&&(t=t.parentNode));return[e,o]}function V(t,e){if(!t||!t.getBoundingClientRect)return I();var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=E(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o.getBoundingClientRect||o===document.body)return I();if(n||e)return o;n=!0}}}while(o=o.parentNode);return I()}function R(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function $(t,e){return function(){if(!S){var o=arguments;1===o.length?t.call(this,o[0]):t.apply(this,o),S=setTimeout((function(){S=void 0}),e)}}}function B(t,e,o){t.scrollLeft+=e,t.scrollTop+=o}function z(t){var e=window.Polymer,o=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):o?o(t).clone(!0)[0]:t.cloneNode(!0)}var X="Sortable"+(new Date).getTime(),Y=[],L={initializeByDefault:!0},Z={mount:function(t){for(var e in L)L.hasOwnProperty(e)&&!(e in t)&&(t[e]=L[e]);Y.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Y.push(t)},pluginEvent:function(t,e,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var i=t+"Global";Y.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][i]&&e[n.pluginName][i](r({sortable:e},o)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](r({sortable:e},o)))}))},initializePlugins:function(t,e,o,n){for(var i in Y.forEach((function(n){var i=n.pluginName;if(t.options[i]||n.initializeByDefault){var r=new n(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,s(o,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var o={};return Y.forEach((function(n){"function"==typeof n.eventProperties&&s(o,n.eventProperties.call(e[n.pluginName],t))})),o},modifyOption:function(t,e,o){var n;return Y.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(n=i.optionListeners[e].call(t[i.pluginName],o))})),n}},H=["evt"],U=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=function(t,e){if(null==t)return{};var o,n,i=function(t,e){if(null==t)return{};var o,n,i={},r=Object.keys(t);for(n=0;n<r.length;n++)o=r[n],e.indexOf(o)>=0||(i[o]=t[o]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n<r.length;n++)o=r[n],e.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(i[o]=t[o])}return i}(o,H);Z.pluginEvent.bind($t)(t,e,r({dragEl:G,parentEl:K,ghostEl:q,rootEl:J,nextEl:Q,lastDownEl:tt,cloneEl:et,cloneHidden:ot,dragStarted:mt,putSortable:st,activeSortable:$t.active,originalEvent:n,oldIndex:nt,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:lt,hideGhostForTarget:Pt,unhideGhostForTarget:jt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){W({sortable:e,name:t,originalEvent:n})}},i))};function W(t){!function(t){var e=t.sortable,o=t.rootEl,n=t.name,i=t.targetEl,l=t.cloneEl,a=t.toEl,s=t.fromEl,c=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,m=t.originalEvent,g=t.putSortable,v=t.extraEventProperties;if(e=e||o&&o[X]){var b,_=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||d||u?(b=document.createEvent("Event")).initEvent(n,!0,!0):b=new CustomEvent(n,{bubbles:!0,cancelable:!0}),b.to=a||o,b.from=s||o,b.item=i||o,b.clone=l,b.oldIndex=c,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=m,b.pullMode=g?g.lastPutMode:void 0;var w=r(r({},v),Z.getEventProperties(n,e));for(var C in w)b[C]=w[C];o&&o.dispatchEvent(b),_[y]&&_[y].call(e,b)}}(r({putSortable:st,cloneEl:et,targetEl:G,rootEl:J,oldIndex:nt,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:lt},t))}var G,K,q,J,Q,tt,et,ot,nt,it,rt,lt,at,st,ct,dt,ut,ht,ft,pt,mt,gt,vt,bt,_t,yt=!1,wt=!1,Ct=[],St=!1,xt=!1,Dt=[],Et=!1,Tt=[],kt="undefined"!=typeof document,It=p,Ot=u||d?"cssFloat":"float",Mt=kt&&!m&&!p&&"draggable"in document.createElement("div"),Nt=function(){if(kt){if(d)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),At=function(t,e){var o=E(t),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=A(t,0,e),r=A(t,1,e),l=i&&E(i),a=r&&E(r),s=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&l.float&&"none"!==l.float){var d="left"===l.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===l.display||"flex"===l.display||"table"===l.display||"grid"===l.display||s>=n&&"none"===o[Ot]||r&&"none"===o[Ot]&&s+c>n)?"vertical":"horizontal"},Ft=function(t){function e(t,o){return function(n,i,r,l){var a=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==t&&(o||a))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(n,i,r,l),o)(n,i,r,l);var s=(o?n:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},n=t.group;n&&"object"==l(n)||(n={name:n}),o.name=n.name,o.checkPull=e(n.pull,!0),o.checkPut=e(n.put),o.revertClone=n.revertClone,t.group=o},Pt=function(){!Nt&&q&&E(q,"display","none")},jt=function(){!Nt&&q&&E(q,"display","")};kt&&!m&&document.addEventListener("click",(function(t){if(wt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),wt=!1,!1}),!0);var Vt=function(t){if(G){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Ct.some((function(t){var e=t[X].options.emptyInsertThreshold;if(e&&!F(t)){var o=O(t),n=i>=o.left-e&&i<=o.right+e,a=r>=o.top-e&&r<=o.bottom+e;return n&&a?l=t:void 0}})),l);if(e){var o={};for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[X]._onDragOver(o)}}var i,r,l},Rt=function(t){G&&G.parentNode[X]._isOutsideThisEl(t.target)};function $t(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[X]=this;var o,n,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return At(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==$t.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var l in Z.initializePlugins(this,t,i),i)!(l in e)&&(e[l]=i[l]);for(var a in Ft(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Mt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),Ct.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==E(t,"display")&&t!==$t.ghost){n.push({target:t,rect:O(t)});var e=r({},n[n.length-1].rect);if(t.thisAnimationDuration){var o=T(t,!0);o&&(e.top-=o.f,e.left-=o.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var o in t)if(t.hasOwnProperty(o))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[o][n])return Number(o);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof t&&t());var i=!1,r=0;n.forEach((function(t){var o=0,n=t.target,l=n.fromRect,a=O(n),s=n.prevFromRect,c=n.prevToRect,d=t.rect,u=T(n,!0);u&&(a.top-=u.f,a.left-=u.e),n.toRect=a,n.thisAnimationDuration&&R(s,a)&&!R(l,a)&&(d.top-a.top)/(d.left-a.left)==(l.top-a.top)/(l.left-a.left)&&(o=function(t,e,o,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))*n.animation}(d,s,c,e.options)),R(a,l)||(n.prevFromRect=l,n.prevToRect=a,o||(o=e.options.animation),e.animate(n,d,a,o)),o&&(i=!0,r=Math.max(r,o),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),o),n.thisAnimationDuration=o)})),clearTimeout(o),i?o=setTimeout((function(){"function"==typeof t&&t()}),r):"function"==typeof t&&t(),n=[]},animate:function(t,e,o,n){if(n){E(t,"transition",""),E(t,"transform","");var i=T(this.el),r=i&&i.a,l=i&&i.d,a=(e.left-o.left)/(r||1),s=(e.top-o.top)/(l||1);t.animatingX=!!a,t.animatingY=!!s,E(t,"transform","translate3d("+a+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),E(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),E(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){E(t,"transition",""),E(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Bt(t,e,o,n,i,r,l,a){var s,c,h=t[X],f=h.options.onMove;return!window.CustomEvent||d||u?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=o,s.draggedRect=n,s.related=i||e,s.relatedRect=r||O(e),s.willInsertAfter=a,s.originalEvent=l,t.dispatchEvent(s),f&&(c=f.call(h,s,l)),c}function zt(t){t.draggable=!1}function Xt(){Et=!1}function Yt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,n=0;o--;)n+=e.charCodeAt(o);return n.toString(36)}function Lt(t){return setTimeout(t,0)}function Zt(t){return clearTimeout(t)}$t.prototype={constructor:$t,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,n=this.options,i=n.preventOnFilter,r=t.type,l=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(l||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=n.filter;if(function(t){Tt.length=0;for(var e=t.getElementsByTagName("input"),o=e.length;o--;){var n=e[o];n.checked&&Tt.push(n)}}(o),!G&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||n.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!f||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=C(a,n.draggable,o,!1))&&a.animated||tt===a)){if(nt=P(a),rt=P(a,n.draggable),"function"==typeof c){if(c.call(this,t,a,this))return W({sortable:e,rootEl:s,name:"filter",targetEl:a,toEl:o,fromEl:o}),U("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=C(s,n.trim(),o,!1))return W({sortable:e,rootEl:n,name:"filter",targetEl:a,fromEl:o,toEl:o}),U("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());n.handle&&!C(s,n.handle,o,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,e,o){var n,i=this,r=i.el,l=i.options,a=r.ownerDocument;if(o&&!G&&o.parentNode===r){var s=O(o);if(J=r,K=(G=o).parentNode,Q=G.nextSibling,tt=o,at=l.group,$t.dragged=G,ct={target:G,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ct.clientX-s.left,pt=ct.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,G.style["will-change"]="all",n=function(){U("delayEnded",i,{evt:t}),$t.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(G.draggable=!0),i._triggerDragStart(t,e),W({sortable:i,name:"choose",originalEvent:t}),D(G,l.chosenClass,!0))},l.ignore.split(",").forEach((function(t){k(G,t.trim(),zt)})),v(a,"dragover",Vt),v(a,"mousemove",Vt),v(a,"touchmove",Vt),v(a,"mouseup",i._onDrop),v(a,"touchend",i._onDrop),v(a,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),U("delayStart",this,{evt:t}),!l.delay||l.delayOnTouchOnly&&!e||this.nativeDraggable&&(u||d))n();else{if($t.eventCanceled)return void this._onDrop();v(a,"mouseup",i._disableDelayedDrag),v(a,"touchend",i._disableDelayedDrag),v(a,"touchcancel",i._disableDelayedDrag),v(a,"mousemove",i._delayedDragTouchMoveHandler),v(a,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&v(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(n,l.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&zt(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v(G,"dragend",this),v(J,"dragstart",this._onDragStart));try{document.selection?Lt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(yt=!1,J&&G){U("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Rt);var o=this.options;!t&&D(G,o.dragClass,!1),D(G,o.ghostClass,!0),$t.active=this,t&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Pt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(G.parentNode[X]._isOutsideThisEl(t),e)do{if(e[X]&&e[X]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);jt()}},_onTouchMove:function(t){if(ct){var e=this.options,o=e.fallbackTolerance,n=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=q&&T(q,!0),l=q&&r&&r.a,a=q&&r&&r.d,s=It&&_t&&j(_t),c=(i.clientX-ct.clientX+n.x)/(l||1)+(s?s[0]-Dt[0]:0)/(l||1),d=(i.clientY-ct.clientY+n.y)/(a||1)+(s?s[1]-Dt[1]:0)/(a||1);if(!$t.active&&!yt){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(q){r?(r.e+=c-(ut||0),r.f+=d-(ht||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");E(q,"webkitTransform",u),E(q,"mozTransform",u),E(q,"msTransform",u),E(q,"transform",u),ut=c,ht=d,dt=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!q){var t=this.options.fallbackOnBody?document.body:J,e=O(G,!0,It,!0,t),o=this.options;if(It){for(_t=t;"static"===E(_t,"position")&&"none"===E(_t,"transform")&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=I()),e.top+=_t.scrollTop,e.left+=_t.scrollLeft):_t=I(),Dt=j(_t)}D(q=G.cloneNode(!0),o.ghostClass,!1),D(q,o.fallbackClass,!0),D(q,o.dragClass,!0),E(q,"transition",""),E(q,"transform",""),E(q,"box-sizing","border-box"),E(q,"margin",0),E(q,"top",e.top),E(q,"left",e.left),E(q,"width",e.width),E(q,"height",e.height),E(q,"opacity","0.8"),E(q,"position",It?"absolute":"fixed"),E(q,"zIndex","100000"),E(q,"pointerEvents","none"),$t.ghost=q,t.appendChild(q),E(q,"transform-origin",ft/parseInt(q.style.width)*100+"% "+pt/parseInt(q.style.height)*100+"%")}},_onDragStart:function(t,e){var o=this,n=t.dataTransfer,i=o.options;U("dragStart",this,{evt:t}),$t.eventCanceled?this._onDrop():(U("setupClone",this),$t.eventCanceled||((et=z(G)).removeAttribute("id"),et.draggable=!1,et.style["will-change"]="",this._hideClone(),D(et,this.options.chosenClass,!1),$t.clone=et),o.cloneId=Lt((function(){U("clone",o),$t.eventCanceled||(o.options.removeCloneOnHide||J.insertBefore(et,G),o._hideClone(),W({sortable:o,name:"clone"}))})),!e&&D(G,i.dragClass,!0),e?(wt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(b(document,"mouseup",o._onDrop),b(document,"touchend",o._onDrop),b(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",i.setData&&i.setData.call(o,n,G)),v(document,"drop",o),E(G,"transform","translateZ(0)")),yt=!0,o._dragStartId=Lt(o._dragStarted.bind(o,e,t)),v(document,"selectstart",o),mt=!0,f&&E(document.body,"user-select","none"))},_onDragOver:function(t){var e,o,n,i,l=this.el,a=t.target,s=this.options,c=s.group,d=$t.active,u=at===c,h=s.sort,f=st||d,p=this,m=!1;if(!Et){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=C(a,s.draggable,l,!0),$("dragOver"),$t.eventCanceled)return m;if(G.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return Y(!1);if(wt=!1,d&&!s.disabled&&(u?h||(n=K!==J):st===this||(this.lastPutMode=at.checkPull(this,d,G,t))&&c.checkPut(this,d,G,t))){if(i="vertical"===this._getDirection(t,a),e=O(G),$("dragOverValid"),$t.eventCanceled)return m;if(n)return K=J,z(),this._hideClone(),$("revert"),$t.eventCanceled||(Q?J.insertBefore(G,Q):J.appendChild(G)),Y(!0);var g=F(l,s.draggable);if(!g||function(t,e,o){var n=O(F(o.el,o.options.draggable)),i=M(o.el);return e?t.clientX>i.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>i.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,i,this)&&!g.animated){if(g===G)return Y(!1);if(g&&l===t.target&&(a=g),a&&(o=O(a)),!1!==Bt(J,l,G,e,a,o,t,!!a))return z(),g&&g.nextSibling?l.insertBefore(G,g.nextSibling):l.appendChild(G),K=l,L(),Y(!0)}else if(g&&function(t,e,o){var n=O(A(o.el,0,o.options,!0)),i=M(o.el);return e?t.clientX<i.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<i.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,i,this)){var v=A(l,0,s,!0);if(v===G)return Y(!1);if(o=O(a=v),!1!==Bt(J,l,G,e,a,o,t,!1))return z(),l.insertBefore(G,v),K=l,L(),Y(!0)}else if(a.parentNode===l){o=O(a);var b,_,y,w=G.parentNode!==l,S=!function(t,e,o){var n=o?t.left:t.top,i=o?t.right:t.bottom,r=o?t.width:t.height,l=o?e.left:e.top,a=o?e.right:e.bottom,s=o?e.width:e.height;return n===l||i===a||n+r/2===l+s/2}(G.animated&&G.toRect||e,a.animated&&a.toRect||o,i),x=i?"top":"left",T=N(a,"top","top")||N(G,"top","top"),k=T?T.scrollTop:void 0;if(gt!==a&&(_=o[x],St=!1,xt=!S&&s.invertSwap||w),b=function(t,e,o,n,i,r,l,a){var s=n?t.clientY:t.clientX,c=n?o.height:o.width,d=n?o.top:o.left,u=n?o.bottom:o.right,h=!1;if(!l)if(a&&bt<c*i){if(!St&&(1===vt?s>d+c*r/2:s<u-c*r/2)&&(St=!0),St)h=!0;else if(1===vt?s<d+bt:s>u-bt)return-vt}else if(s>d+c*(1-i)/2&&s<u-c*(1-i)/2)return function(t){return P(G)<P(t)?1:-1}(e);return(h=h||l)&&(s<d+c*r/2||s>u-c*r/2)?s>d+c/2?1:-1:0}(t,a,o,i,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,xt,gt===a),0!==b){var I=P(G);do{I-=b,y=K.children[I]}while(y&&("none"===E(y,"display")||y===q))}if(0===b||y===a)return Y(!1);gt=a,vt=b;var j=a.nextElementSibling,V=!1,R=Bt(J,l,G,e,a,o,t,V=1===b);if(!1!==R)return 1!==R&&-1!==R||(V=1===R),Et=!0,setTimeout(Xt,30),z(),V&&!j?l.appendChild(G):a.parentNode.insertBefore(G,V?j:a),T&&B(T,0,k-T.scrollTop),K=G.parentNode,void 0===_||xt||(bt=Math.abs(_-O(a)[x])),L(),Y(!0)}if(l.contains(G))return Y(!1)}return!1}function $(s,c){U(s,p,r({evt:t,isOwner:u,axis:i?"vertical":"horizontal",revert:n,dragRect:e,targetRect:o,canSort:h,fromSortable:f,target:a,completed:Y,onMove:function(o,n){return Bt(J,l,G,e,o,O(o),t,n)},changed:L},c))}function z(){$("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function Y(e){return $("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(p),p!==f&&(D(G,st?st.options.ghostClass:d.options.ghostClass,!1),D(G,s.ghostClass,!0)),st!==p&&p!==$t.active?st=p:p===$t.active&&st&&(st=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){$("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===G&&!G.animated||a===l&&!a.animated)&&(gt=null),s.dragoverBubble||t.rootEl||a===document||(G.parentNode[X]._isOutsideThisEl(t.target),!e&&Vt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function L(){it=P(G),lt=P(G,s.draggable),W({sortable:p,name:"change",toEl:l,newIndex:it,newDraggableIndex:lt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Vt),b(document,"mousemove",Vt),b(document,"touchmove",Vt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,o=this.options;it=P(G),lt=P(G,o.draggable),U("drop",this,{evt:t}),K=G&&G.parentNode,it=P(G),lt=P(G,o.draggable),$t.eventCanceled||(yt=!1,xt=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zt(this.cloneId),Zt(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&E(document.body,"user-select",""),E(G,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),q&&q.parentNode&&q.parentNode.removeChild(q),(J===K||st&&"clone"!==st.lastPutMode)&&et&&et.parentNode&&et.parentNode.removeChild(et),G&&(this.nativeDraggable&&b(G,"dragend",this),zt(G),G.style["will-change"]="",mt&&!yt&&D(G,st?st.options.ghostClass:this.options.ghostClass,!1),D(G,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==K?(it>=0&&(W({rootEl:K,name:"add",toEl:K,fromEl:J,originalEvent:t}),W({sortable:this,name:"remove",toEl:K,originalEvent:t}),W({rootEl:K,name:"sort",toEl:K,fromEl:J,originalEvent:t}),W({sortable:this,name:"sort",toEl:K,originalEvent:t})),st&&st.save()):it!==nt&&it>=0&&(W({sortable:this,name:"update",toEl:K,originalEvent:t}),W({sortable:this,name:"sort",toEl:K,originalEvent:t})),$t.active&&(null!=it&&-1!==it||(it=nt,lt=rt),W({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),J=G=K=q=Q=et=tt=ot=ct=dt=mt=it=lt=nt=rt=gt=vt=st=at=$t.dragged=$t.ghost=$t.clone=$t.active=null,Tt.forEach((function(t){t.checked=!0})),Tt.length=ut=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)C(t=o[n],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Yt(t));return e},sort:function(t,e){var o={},n=this.el;this.toArray().forEach((function(t,e){var i=n.children[e];C(i,this.options.draggable,n,!1)&&(o[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){o[t]&&(n.removeChild(o[t]),n.appendChild(o[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return C(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(void 0===e)return o[t];var n=Z.modifyOption(this,t,e);o[t]=void 0!==n?n:e,"group"===t&&Ft(o)},destroy:function(){U("destroy",this);var t=this.el;t[X]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ct.splice(Ct.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if(U("hideClone",this),$t.eventCanceled)return;E(et,"display","none"),this.options.removeCloneOnHide&&et.parentNode&&et.parentNode.removeChild(et),ot=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ot){if(U("showClone",this),$t.eventCanceled)return;G.parentNode!=J||this.options.group.revertClone?Q?J.insertBefore(et,Q):J.appendChild(et):J.insertBefore(et,G),this.options.group.revertClone&&this.animate(G,et),E(et,"display",""),ot=!1}}else this._hideClone()}},kt&&v(document,"touchmove",(function(t){($t.active||yt)&&t.cancelable&&t.preventDefault()})),$t.utils={on:v,off:b,css:E,find:k,is:function(t,e){return!!C(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t},throttle:$,closest:C,toggleClass:D,clone:z,index:P,nextTick:Lt,cancelNextTick:Zt,detectDirection:At,getChild:A},$t.get=function(t){return t[X]},$t.mount=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&($t.utils=r(r({},$t.utils),t.utils)),Z.mount(t)}))},$t.create=function(t,e){return new $t(t,e)},$t.version="1.15.1";var Ht,Ut,Wt,Gt,Kt,qt,Jt=[],Qt=!1;function te(){Jt.forEach((function(t){clearInterval(t.pid)})),Jt=[]}function ee(){clearInterval(qt)}var oe=$((function(t,e,o,n){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,c=I(),d=!1;Ut!==o&&(Ut=o,te(),Ht=e.scroll,i=e.scrollFn,!0===Ht&&(Ht=V(o,!0)));var u=0,h=Ht;do{var f=h,p=O(f),m=p.top,g=p.bottom,v=p.left,b=p.right,_=p.width,y=p.height,w=void 0,C=void 0,S=f.scrollWidth,x=f.scrollHeight,D=E(f),T=f.scrollLeft,k=f.scrollTop;f===c?(w=_<S&&("auto"===D.overflowX||"scroll"===D.overflowX||"visible"===D.overflowX),C=y<x&&("auto"===D.overflowY||"scroll"===D.overflowY||"visible"===D.overflowY)):(w=_<S&&("auto"===D.overflowX||"scroll"===D.overflowX),C=y<x&&("auto"===D.overflowY||"scroll"===D.overflowY));var M=w&&(Math.abs(b-r)<=a&&T+_<S)-(Math.abs(v-r)<=a&&!!T),N=C&&(Math.abs(g-l)<=a&&k+y<x)-(Math.abs(m-l)<=a&&!!k);if(!Jt[u])for(var A=0;A<=u;A++)Jt[A]||(Jt[A]={});Jt[u].vx==M&&Jt[u].vy==N&&Jt[u].el===f||(Jt[u].el=f,Jt[u].vx=M,Jt[u].vy=N,clearInterval(Jt[u].pid),0==M&&0==N||(d=!0,Jt[u].pid=setInterval(function(){n&&0===this.layer&&$t.active._onTouchMove(Kt);var e=Jt[this.layer].vy?Jt[this.layer].vy*s:0,o=Jt[this.layer].vx?Jt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call($t.dragged.parentNode[X],o,e,t,Kt,Jt[this.layer].el)||B(Jt[this.layer].el,o,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=V(h,!1)));Qt=d}}),30),ne=function(t){var e=t.originalEvent,o=t.putSortable,n=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var s=o||i;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),s&&!s.el.contains(d)&&(r("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function ie(){}function re(){}ie.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=A(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),o&&o.animateAll()},drop:ne},s(ie,{pluginName:"revertOnSpill"}),re.prototype={onSpill:function(t){var e=t.dragEl,o=t.putSortable||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:ne},s(re,{pluginName:"removeOnSpill"}),$t.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ee(),te(),clearTimeout(S),S=void 0},nulling:function(){Kt=Ut=Ht=Qt=qt=Wt=Gt=null,Jt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var o=this,n=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(n,i);if(Kt=t,e||this.options.forceAutoScrollFallback||u||d||f){oe(t,this.options,r,e);var l=V(r,!0);!Qt||qt&&n===Wt&&i===Gt||(qt&&ee(),qt=setInterval((function(){var r=V(document.elementFromPoint(n,i),!0);r!==l&&(l=r,te()),oe(t,o.options,r,e)}),10),Wt=n,Gt=i)}else{if(!this.options.bubbleScroll||V(r,!0)===I())return void te();oe(t,this.options,V(r,!1),!1)}}},s(t,{pluginName:"scroll",initializeByDefault:!0})}),$t.mount(re,ie);var le=$t,ae={name:"ZjTableColumnConfiger",props:{defaultColumnShowCount:{type:Number,default:20},defaultColumnShowKeys:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},columnKey:{type:String,default:"id"},props:{type:Object,default(){return{label:"label"}}},showConfirm:{type:Boolean,default:!1},tag:{type:String,default:""},userId:{type:[String,Number],default:""}},watch:{columns(t){console.log("newValue",t),this.cols_config=this.getCustomerColsConfig(t),this.$emit("change",this.cols_config)}},data(){return{editing:!1,visible:!1,cols_config:[],ColsConfigTmp:[]}},methods:{reset(){this.cols_config=[],this.$nextTick((()=>{this.cols_config=this.getCustomerColsConfig(this.columns)})),this.editing=!1},submit(){this.update(),this.editing=!1},update(){console.log("update: ",this.cols_config),this.setCutomerColsConfig(),this.$emit("change",this.cols_config)},checkboxClick(){this.editing=!0,this.showConfirm||this.update()},initDragSort(){const t=this.$refs.col_config.$el.querySelectorAll(".col-config-list")[0];le.create(t,{onEnd:({oldIndex:t,newIndex:e})=>{this.editing=!0;const o=this.ColsConfigTmp[t];this.ColsConfigTmp.splice(t,1),this.ColsConfigTmp.splice(e,0,o),console.log("this.ColsConfigTmp",this.ColsConfigTmp);const n=this.ColsConfigTmp.map((t=>t.id));console.log("newKeysArr: ",n),_.each(this.cols_config,(t=>{const e=n.indexOf(t.id);t.sort_index=e})),console.log("this.col_config: ",this.col_config),this.$forceUpdate(),this.showConfirm||this.update()}})},setCutomerColsConfig(){let t={},e="";t=localStorage.getItem("COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("COLUMN_CUSTOMER_CONFIG"))||{},e=t[this.userId+this.tag],e?e.field_colunms_config=this.cols_config:e={field_colunms_config:this.cols_config},t[this.userId+this.tag]=e,localStorage.setItem("COLUMN_CUSTOMER_CONFIG",JSON.stringify(t))},setColWidth(t,e){_.each(this.cols_config,(o=>{o.id==t&&(o.width=e)})),this.setCutomerColsConfig()},getCustomerColsConfig(t){let e=[],o={},n=[],i={};i=localStorage.getItem("COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("COLUMN_CUSTOMER_CONFIG"))||{},o=i[this.userId+this.tag],o&&o.field_colunms_config&&(n=o.field_colunms_config);let r=0;return _.each(t,(t=>{let o=_.find(n,{id:t[this.columnKey]});o?e.push({label:t[this.props.label],id:t[this.columnKey],show:o.show,sort_index:o.sort_index,width:o.width||""}):(r++,e.push({label:t[this.props.label],id:t[this.columnKey],show:!!(r<=this.defaultColumnShowCount||_.includes(this.defaultColumnShowKeys,t[this.columnKey])),sort_index:0,width:""}))})),e=_.sortBy(e,"sort_index"),this.ColsConfigTmp=_.cloneDeep(e),e}},mounted(){this.cols_config=this.getCustomerColsConfig(this.columns),this.initDragSort()}},se=ae,ce=(0,o(900).Z)(se,n,[],!1,null,null,null);ce.options.__file="components/lib/table-column-configer/src/main.vue";var de=ce.exports;de.install=function(t){t.component(de.name,de)};var ue=de},900:function(t,e,o){function n(t,e,o,n,i,r,l,a){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=o,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),l?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},c._ssrRegister=s):i&&(s=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var d=c.render;c.render=function(t,e){return s.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,s):[s]}return{exports:t,options:c}}o.d(e,{Z:function(){return n}})}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){o.r(n),o.d(n,{ColorIndication:function(){return l.default},Demo:function(){return t.default},Demo2:function(){return e.default},SelectPositionTable:function(){return r.default},TableColumnConfiger:function(){return i.default}});var t=o(924),e=o(367),i=o(387),r=o(622),l=o(109);const a={Demo:t.default,Demo2:e.default,TableColumnConfiger:i.default,SelectPositionTable:r.default,ColorIndication:l.default},s=function(t){s.installed||Object.keys(a).forEach((e=>{t.component(a[e].name,a[e])}))};n.default={version:"0.0.6",install:s}}(),n}()},6981:function(t){t.exports=function(){return this.ELEMENT}()},3371:function(t){t.exports=function(){return this.Vue}()}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0;var n={};return function(){"use strict";o.r(n),o.d(n,{default:function(){return N}});var t=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"area-elevation"},[t.curVal&&t.curVal.selected?t._l(t.curVal.selected,(function(e){return o("div",{key:e.key,staticClass:"area-elevation-select-box"},[o("el-tag",{staticClass:"area-elevation-select-item"},[t._v(t._s(e.name))])],1)})):t._e(),t._v(" "),t.loading?o("i",{staticClass:"el-icon-loading"}):o("el-button",{attrs:{type:"view"==t.mode?"text":"plain",size:"small",icon:"el-icon-location-outline"},on:{click:function(e){return t.openSelectSectionDlg()}}},[t._v(t._s(t.button_title))]),t._v(" "),o("dlg-select-section",{attrs:{mode:t.mode,dialog_title:t.dialog_title,areaMap:t.areaMap,allTreeData:t.allTreeData,colorConfig:t.colorConfig,value:t.curVal,show:t.dlg.show},on:{close:t.colseSelectSectionDlg}})],2)};t._withStripped=!0;var e=o(6981),i=o(3371),r=o.n(i),l=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{title:t.dialog_title,visible:t.dialogVisible,width:"80%","append-to-body":"","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[o("el-form",{ref:"form",attrs:{inline:!0,model:t.form,"label-width":"100px"}},[o("el-row",[o("el-form-item",{attrs:{label:t.$z("楼栋","c.building")}},[o("el-select",{attrs:{placeholder:t.$z("请选择楼栋","c.select_a_building"),disabled:"view"==t.mode},on:{change:t.changeBuilding},model:{value:t.form.building_id,callback:function(e){t.$set(t.form,"building_id",e)},expression:"form.building_id"}},t._l(t.buildingOptions,(function(t){return o("el-option",{key:t.key,attrs:{label:t.title,value:t.key}})})),1)],1),t._v(" "),o("el-form-item",{attrs:{label:t.$z("楼层","c.floor")}},[o("el-select",{attrs:{multiple:"",placeholder:"请选择楼层",disabled:"view"==t.mode},on:{change:t.filterData},model:{value:t.form.storey_ids,callback:function(e){t.$set(t.form,"storey_ids",e)},expression:"form.storey_ids"}},t._l(t.floor_options,(function(t){return o("el-option",{key:t.key,attrs:{label:t.title,value:t.key}})})),1)],1),t._v(" "),o("el-form-item",{attrs:{label:"关建字筛选"}},[o("el-input",{attrs:{placeholder:"请输入",disabled:"view"==t.mode},on:{input:t.filterData},model:{value:t.form.keyword,callback:function(e){t.$set(t.form,"keyword",e)},expression:"form.keyword"}})],1)],1),t._v(" "),o("el-row",[o("el-col",{attrs:{span:10}},[o("el-form-item",{attrs:{label:"展示方式"}},[o("el-radio-group",{attrs:{disabled:t.show_level_disable||"view"==t.mode},model:{value:t.form.show_level,callback:function(e){t.$set(t.form,"show_level",e)},expression:"form.show_level"}},[o("el-radio",{attrs:{label:3}},[t._v("展示到3级")]),t._v(" "),o("el-radio",{attrs:{label:4}},[t._v("展示到4级")])],1)],1)],1),t._v(" "),o("el-col",{attrs:{span:6}},[o("zj-color-indication",{staticStyle:{float:"right"},attrs:{colorConfig:t.colorConfig}})],1)],1)],1),t._v(" "),o("div",{staticStyle:{margin:"0 20px 20px 20px"}},[t._v("已选项:"),t._l(t.selectedItem,(function(e){return o("el-tag",{key:e.key,staticStyle:{margin:"5px"},attrs:{closable:"view"!=t.mode},on:{close:function(o){return t.removeItem(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2),t._v(" "),o("zj-select-position-table",{attrs:{data:t.treeData,readonly:"view"==t.mode},model:{value:t.selectedItem,callback:function(e){t.selectedItem=e},expression:"selectedItem"}}),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){return t.close()}}},[t._v(t._s(t.$z("取消","c.cancel")))]),t._v(" "),"view"!=t.mode?o("el-button",{attrs:{type:"primary"},on:{click:t.confirm}},[t._v(t._s(t.$z("确定","c.confirm")))]):t._e()],1)],1)};l._withStripped=!0;var a=o(6407),s=o(3379),c=o.n(s),d=o(7795),u=o.n(d),h=o(569),f=o.n(h),p=o(3565),m=o.n(p),g=o(9216),v=o.n(g),b=o(4589),y=o.n(b),w=o(8459),C={};C.styleTagTransform=y(),C.setAttributes=m(),C.insert=f().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=v(),c()(w.Z,C),w.Z&&w.Z.locals&&w.Z.locals;var S=o(1870),x={};x.styleTagTransform=y(),x.setAttributes=m(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=v(),c()(S.Z,x),S.Z&&S.Z.locals&&S.Z.locals,r().use(a.SelectPositionTable),r().use(a.ColorIndication);var D={props:{allTreeData:{type:Array,default:function(){return[]}},mode:{type:String,default(){return"view"}},areaMap:{type:Object,default:function(){return{}}},colorConfig:{type:Object,default:function(){return{}}},value:{type:[String,Array,Number,Object]},statusList:{type:Array,default:function(){return[]}},show:{type:Boolean,default:!1},all_level:{type:Number,default:0},dialog_title:{type:String,default:"选择部位"}},watch:{"form.show_level"(t,e){this.selectedItemMap["level_"+e]=this.selectedItem,this.filterData()},allTreeData(t){this.buildingOptions=t},value:{handler(t){},immediate:!0},show(t){if(this.dialogVisible=t,t){if(this.value&&this.value.building_ids?(this.form.building_id=this.value.building_ids[0]+"",this.form.building_ids=this.value.building_ids):this.allTreeData&&this.allTreeData.length>0&&(this.form.building_id=this.allTreeData[0].key,this.form.building_ids=[this.allTreeData[0].key]),this.value&&this.value.storey_ids){let t=[];_.each(this.value.storey_ids,(e=>{t.push(e+"")}))}this.value&&this.value.selected?(this.selectedItem=this.value.selectedItem,this.form.keyword=this.value.keyword,this.form.show_level=this.value.show_level):this.selectedItem=[],this.loadBuildingData()}},selectedItem:{handler(t){},deep:!0}},data(){return{dialogVisible:!1,show_level_disable:!1,form:{building_id:"1",storey_ids:[],show_level:4,keyword:""},buildingOptions:[],floor_options:[],selectedItem:[],treeData:[],buildingTreeData:[],selectedItemMap:{level_3:[],level_4:[]}}},methods:{confirm(){let t=[];_.each(this.selectedItem,(e=>{this.areaMap[e.key]&&t.push(this.areaMap[e.key])}));let e=[];_.each(this.form.storey_ids,(t=>{e.push(parseInt(t))}));let o={selectedItem:this.selectedItem,selected:t,building_ids:[parseInt(this.form.building_id)],storey_ids:e,keyword:this.form.keyword,show_level:parseInt(this.form.show_level)};this.$emit("close",o)},close(){this.dialogVisible=!1,this.$emit("close",!1)},handleClose(t){this.$emit("close",!1)},filterData(){if(this.treeData=_.cloneDeep(this.buildingTreeData.filter((t=>this.form.storey_ids.length>0?_.includes(this.form.storey_ids,t.key)?t:void 0:t))),3==this.form.show_level&&_.each(this.treeData,(t=>{_.each(t.childrens,(t=>{delete t.childrens}))})),4==this.form.show_level){let t=this.selectedItemMap.level_3;t&&t.length>0&&(_.each(this.treeData,(e=>{_.each(e.childrens,(e=>{_.find(t,{key:e.key})&&_.each(e.childrens,(o=>{t.push({key:o.key,name:e.name+"-"+o.title})}))}))})),this.selectedItem=t)}this.filterKeyWord()},changeBuilding(){this.loadBuildingData()},loadBuildingData(){let t=_.find(this.allTreeData,{key:this.form.building_id});t&&(t.childrens?this.buildingTreeData=_.cloneDeep(t.childrens):this.buildingTreeData=[],this.buildingTreeData.length>0&&(this.buildingTreeData[0].childrens&&this.buildingTreeData[0].childrens[0].childrens&&this.buildingTreeData[0].childrens[0].childrens.length>0?this.show_level_disable=!1:(this.form.show_level=3,this.show_level_disable=!0)),this.floor_options=this.buildingTreeData,this.filterData())},filterKeyWord(){this.form.keyword&&(this.treeData=this.treeData.filter((t=>{let e=!1;if(t.childrens&&t.childrens.length>0&&(t.childrens=t.childrens.filter((t=>{if(-1!=t.title.indexOf(this.form.keyword)||-1!=this.form.keyword.indexOf(t.title))return e=!0,t;if(t.childrens&&t.childrens.length>0){let o=!1;if(_.each(t.childrens,(t=>{-1==t.title.indexOf(this.form.keyword)&&-1==this.form.keyword.indexOf(t.title)||(o=!0,e=!0)})),o)return t}}))),e)return t})))},removeItem(t){this.selectedItem=_.filter(this.selectedItem,(function(e){return e.key!=t.key}))}},mounted(){}},E=o(1900),T=(0,E.Z)(D,l,[],!1,null,null,null);T.options.__file="components/lib/bpmAreaElevation/src/part/dlgSelectSection.vue";var k=T.exports;r().use(e.Dialog);var I={name:"BpmAreaElevation",components:{dlgSelectSection:k},props:{value:{type:[String,Array,Number,Object]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}},formName:{type:String},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},isMultiple:{type:Boolean,default(){return!1}}},data(){return{sourceData:[],allTreeData:[],areaMap:{},dlg:{show:!1},curVal:{building_id:"",storey_ids:[],selected:[],keyword:"",show_level:"4"},loading:!1,button_title:"",dialog_title:"",colorConfig:{data:[{name:"task_no",title:zj.z("未开始","c.not_started"),color:"#fff",border_color:"#D8DADD",width:"100px"},{name:"task_ready",title:zj.z("进行中","c.in_progress"),color:"#FFE9BD",border_color:"#FFE9BD",width:"100px"},{name:"task_ing",title:zj.z("已完成","c.completed"),color:"#B4EFCE",border_color:"#B4EFCE",width:"100px"}]}}},computed:{},watch:{curVal(t){this.$emit("input",t),this.$emit("change",t)},value(){this.value&&(this.curVal=this.value)}},mounted(){this.fieldConf.test&&(this.formateData(this.fieldConf.range_enum),this.getColorConfig(this.fieldConf.status_range_enum)),"view"==this.mode?(this.button_title="",this.dialog_title=zj.z("查看部位","c.view_part")):(this.button_title=zj.z("选择部位","c.select_part"),this.dialog_title=zj.z("选择部位","c.select_part")),this.curVal=this.value},methods:{async loadList(t){let e=this.fieldConf.area||"",o=this.fieldConf.status_scope.depends[0]||"";if(!e||!o)return console.log("没有配置联区域字段或检查项依赖自段"),!1;let n={fields:{}};return n.fields[e]=this.container.formData[e],n.fields[o]=this.container.formData[o],this.sourceData=await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:n,cusFormName:this.formName,field:this,container:this.container}),console.log("this.sourceData",this.sourceData),this.sourceData},formateData(t){console.log("source_data",t);let e=[],o={},n=[];this.fieldConf.test?_.each(this.fieldConf.status_range_enum,(t=>{o[t.id]=t,n.push(t)})):_.each(this.sourceData[1],(t=>{o[t.id]=t,n.push(t)})),console.log("statusMap",o);let i=(t,e,r)=>{let l=[];return _.each(t,(a=>{if(this.areaMap[a.id]=a,a.path_ids.length==e&&(0==r||_.last(a.path_ids)==r)){let r={title:a.name,key:a.id+"",path_names:a.path_names,state:!1,status:a.status};if(a.is_parent&&(r.childrens=i(t,e+1,a.id),r.childrens&&r.childrens.length>0)){let t=0,e=0,i=0;_.each(r.childrens,(o=>{o.status?(console.log("child",o),o.status==n[1].id?e+=1:o.status==n[2].id?i++:t++):t++})),console.log("_complete_count",i),console.log("_doing_count",e),console.log("_begin_count",t),i==r.childrens.length?a.status=n[2].id:t==r.childrens.length?a.status?_.each(r.childrens,(t=>{t.status=a.status,t.color=o[a.status].color})):a.status=n[0].id:a.status=n[1].id}a.status&&o[a.status]&&(r.color=o[a.status].color),l.push(r)}})),_.orderBy(l,["order"],["asc"]),1==e&&(l=_.reverse(l)),l};e=i(t,0,0),console.log("_treeData",e),this.allTreeData=e},async openSelectSectionDlg(){console.log("row",this.row),console.log("fieldConf",this.fieldConf),console.log("container",this.container),this.fieldConf.test||(this.loading=!0,await this.loadList(),this.loading=!1,this.formateData(this.sourceData[0]),this.getColorConfig(this.sourceData[1])),this.dlg.show=!0},colseSelectSectionDlg(t){console.log("confirm_Data",t),this.dlg.show=!1,t&&(this.curVal=t,this.$emit("input",t))},getColorConfig(t){let e={data:[]};t&&t.length>0&&(_.each(t,(t=>{let o={name:t.id,title:t.name,color:t.color||"#ffffff",border_color:t.color||"#D8DADD",width:"100px"};"#ffffff"!=o.color&&"#FFFFFF"!=o.color||(o.border_color="#D8DADD"),e.data.push(o)})),this.colorConfig=e)}}},O=(o(7157),(0,E.Z)(I,t,[],!1,null,null,null));O.options.__file="components/lib/bpmAreaElevation/src/main.vue";var M=O.exports;M.install=function(t){t.component(M.name,M)};var N=M}(),n}()}));
|