bri-components 1.2.1 → 1.2.3

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.
Files changed (43) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/2.bri-components.min.js +1 -1
  4. package/lib/5.bri-components.min.js +1 -1
  5. package/lib/bri-components.min.js +5 -5
  6. package/package.json +1 -1
  7. package/src/abolish/DshCascaders.vue +3 -0
  8. package/src/abolish/DshTexts.vue +3 -0
  9. package/src/components/controls/base/BriUpload/BriUploadImage.vue +45 -32
  10. package/src/components/controls/base/BriUpload/uploadMixin.js +7 -5
  11. package/src/components/controls/base/DshCascader/DshCascader.vue +25 -17
  12. package/src/components/controls/base/DshCheckbox.vue +127 -137
  13. package/src/components/controls/base/DshCoordinates.vue +121 -147
  14. package/src/components/controls/base/DshDaterange.vue +3 -3
  15. package/src/components/controls/base/DshEditor.vue +2 -1
  16. package/src/components/controls/base/DshSelect.vue +3 -13
  17. package/src/components/controls/base/DshSwitch.vue +13 -20
  18. package/src/components/controls/controlMixin.js +19 -1
  19. package/src/components/controls/senior/BriLabels.vue +98 -93
  20. package/src/components/controls/senior/selectDepartments.vue +16 -11
  21. package/src/components/controls/senior/selectUsers/DepartmentMenu.vue +2 -2
  22. package/src/components/controls/senior/selectUsers/selectUsers.vue +18 -15
  23. package/src/components/small/BriDrawer.vue +1 -1
  24. package/src/components/small/DshDropdown.vue +1 -0
  25. package/src/components/small/DshModal.vue +1 -1
  26. package/src/components/small/DshTags.vue +135 -8
  27. package/src/styles/common/control.less +19 -15
  28. package/src/styles/components/controls/.DS_Store +0 -0
  29. package/src/styles/components/controls/base/BriUpload/BriUpload.less +1 -1
  30. package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +6 -0
  31. package/src/styles/components/controls/base/DshCascader/DshCascader.less +13 -11
  32. package/src/styles/components/controls/base/DshCheckbox.less +39 -75
  33. package/src/styles/components/controls/base/DshCoordinates.less +1 -35
  34. package/src/styles/components/controls/base/DshSelect.less +16 -1
  35. package/src/styles/components/controls/base/DshSwitch.less +1 -31
  36. package/src/styles/components/controls/senior/.DS_Store +0 -0
  37. package/src/styles/components/controls/senior/BriLabels.less +1 -1
  38. package/src/styles/components/list/BriFlatTable.less +1 -1
  39. package/src/styles/components/small/DshDropdown.less +6 -5
  40. package/src/styles/components/small/DshModal.less +20 -42
  41. package/src/styles/components/small/DshTags.less +32 -14
  42. package/src/styles/components/unit/DshFormItem.less +3 -25
  43. package/src/styles/variables.less +2 -1
@@ -1 +1 @@
1
- webpackJsonpbri_components([0,1],{186:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(403),i=s(404),a=s(0)(n.a,i.a,!1,null,null,null);t.default=a.exports},193:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(415),i=s(435),a=s(0)(n.a,i.a,!1,null,null,null);t.default=a.exports},403:function(e,t,s){"use strict";t.a={name:"DepartmentMenu",props:{canEdit:{type:Boolean,default:!1},parent:Object,list:{type:Array,default:function(){return[]}},propSelect:{type:Object,default:function(){return{_key:"noDepart"}}}},data:function(){return{deleteModal:!0,dropdownList:[{name:"添加下级部门",type:"addSub",event:"addSubDepartment",icon:"ios-add-circle-outline"},{name:"修改部门信息",type:"change",event:"showChange",icon:"ios-create-outline"},{name:"删除部门",type:"delete",event:"tipDelete",icon:"ios-trash-outline"},{name:"移动部门",type:"remove",event:"removeDepartment",icon:"ios-move"}]}},computed:{iconType:function(){return function(e){return e.isShowChildren?"ios-arrow-down":"ios-arrow-forward"}},departSelected:{get:function(){return this.propSelect},set:function(e){this.propSelect._key=e._key}}},created:function(){},methods:{addSubDepartment:function(e,t,s,n,i){this.$emit("showAddModal",s)},addPeerDepartment:function(){this.$emit("showAddModal",this.parent)},departClick:function(e){this.departSelected=e,this.$emit("departClick",e)},toggleChildren:function(e){e.isShowChildren=!e.isShowChildren,this.$forceUpdate()},showAddModal:function(e){this.$emit("showAddModal",e)},deleteDepart:function(e){this.departSelected={_key:"noDepart"},this.$emit("deleteDepart",e)},tipDelete:function(e,t,s,n,i){var a=this;this.$Modal.confirm({title:"警告",content:"确定要删除该部门吗?",onOk:function(){a.deleteDepart(s)},onCancel:function(){a.$Message.info("已取消!")}})},showChange:function(e,t,s,n,i){this.$emit("showChange",s)},showChilrenChange:function(e){this.$emit("showChange",e)},removeDepartment:function(e,t,s,n,i){this.$emit("removeDepartment",e,t,s,n,i)}}}},404:function(e,t,s){"use strict";var n={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"DepartmentMenu"},[!e.parent&&e.canEdit?s("div",{class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":"noDepart"===e.departSelected._key||null===e.departSelected}},[s("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":"noDepart"===e.departSelected._key||null===e.departSelected},on:{click:function(t){return e.departClick({_key:"noDepart"})}}},[e._v("\n 无部门员工\n ")])]):e._e(),e._v(" "),e._l(e.list,function(t,n){return s("div",{key:t._key,class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":e.departSelected._key===t._key}},[s("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":e.departSelected._key===t._key},on:{click:function(s){return s.stopPropagation(),e.departClick(t)}}},[s("span",[t.children&&t.children.length?s("Icon",{attrs:{type:e.iconType(t)},on:{click:function(s){return s.stopPropagation(),e.toggleChildren(t)}}}):e._e(),e._v(" "),s("span",{staticClass:"DepartmentMenu-item-name-text"},[e._v("\n "+e._s(t.name)+"\n ")])],1),e._v(" "),e.canEdit?s("dsh-dropdown",{attrs:{trigger:"hover",list:e.dropdownList},on:{click:function(s){return e.$dispatchEvent(s,void 0,t,n,e.parent)}}}):e._e()],1),e._v(" "),t.isShowChildren?[s("department-menu",{staticStyle:{"margin-left":"15px"},attrs:{list:t.children,parent:t,propSelect:e.departSelected,canEdit:e.canEdit},on:{showAddModal:e.showAddModal,showChange:e.showChilrenChange,deleteDepart:e.deleteDepart,departClick:e.departClick,removeDepartment:e.removeDepartment}})]:e._e()],2)})],2)},staticRenderFns:[]};t.a=n},415:function(e,t,s){"use strict";var n=s(3),i=s.n(n),a=s(1),r=s.n(a),c=s(2),l=s(186);t.a={name:"selectUsers",mixins:[c.default],components:{departmentMenu:l.default},props:{showSelectUserModalOnly:Boolean},data:function(){return{isHover:!1,newValList:[],showModal:!1,modalPropsObj:{title:"选择成员",showSlotClose:!1,closable:!0},searchData:{name:""},inputPropsObj:{_name:"成员名称",_key:"name",_search:!0,_clearable:!1},curDepartment:{},hightUsers:[{_key:"dyn_myself",realname:"当前用户"}],loading:!1,userList:[],departmentList:[],total:0,pagePropsObj:{page:1,pagesize:500,showSizer:!1},isSelect:function(e){return!!this.newValList.find(function(t){return t._key===e})},operationMap:{cancel:{name:"取消",type:"clickCancel",btnType:"cancel",event:"clickCancel"},confirm:{name:"完成",btnType:"primary",type:"clickConfirm",event:"clickConfirm"}}}},computed:{selfPropsObj:function(){return r()({_multiple:!1,_highSearch:!1},this.propsObj,this.commonDealPropsObj)},multiple:function(){return this.selfPropsObj._multiple},highSearch:function(){return this.selfPropsObj._highSearch},transmit_type:function(){return this.selfPropsObj.transmit_type},current_step_sp_user_key:function(){return this.selfPropsObj.current_step_sp_user_key},stepKey:function(){return this.selfPropsObj.stepKey},curCheckAll:function(){var e=this;return this.userList.every(function(t){return e.newValList.find(function(e){return e._key==t._key})})},showVal:function(){return this.$isEmptyData(this.curValList)?this.emptyShowVal:this.curValList.map(function(e){return e.realname||e.mobile}).join("、")}},created:function(){},methods:{openModal:function(){this.showModal=!0},closeModal:function(){this.showModal=!1},init:function(){this.searchData={name:""},this.curDepartment={},this.pagePropsObj.page=1,this.getUserList(),this.getDepartmentList()},search:function(){this.pagePropsObj.page=1,this.getUserList()},changeDepartment:function(e){this.pagePropsObj.page=1,this.curDepartment=e,"_highSearch"===e._key?(this.userList=this.hightUsers,this.total=1):this.getUserList()},clickInput:function(){this.finalCanEdit&&(this.openModal(),this.newValList=this.$deepCopy(this.curValList),this.init())},clickDeleteItem:function(e){this.curValList=this.curValList.filter(function(t){return t._key!==e._key})},clickClear:function(){this.curValList=[]},clickCheckAll:function(){var e=this;this.curCheckAll?this.newValList=this.newValList.filter(function(t){return!e.userList.some(function(e){return t._key===e._key})}):this.newValList=[].concat(i()(this.newValList),[this.userList.filter(function(t){return!e.newValList.some(function(e){return e._key===t._key})})])},clickSelectUserItem:function(e,t){this.multiple?this.newValList.some(function(t){return t._key===e._key})?this.newValList=this.newValList.filter(function(t){return t._key!==e._key}):this.newValList=[].concat(i()(this.newValList),[e]):this.newValList=!0===t?[e]:[]},clickDeleteUserItem:function(e,t,s){s.splice(t,1)},clickCancel:function(){this.closeModal()},clickConfirm:function(){this.closeModal(),this.curValList=this.newValList},getUserList:function(){var e=this;this.loading=!0,this.userList=[];var t=this.searchData.name,s={};t&&""!==t?s.realname={$regex:".*"+this.$speciaWord(t)+".*",$options:"i"}:delete s.realname,this.$https({url:{module:"company",name:"userIndex"},params:{search:s,department:this.curDepartment._key,transmit_type:this.transmit_type,current_step_sp_user_key:this.current_step_sp_user_key,stepKey:this.stepKey,pagination:{page:this.pagePropsObj.page,pagesize:this.pagePropsObj.pagesize}},callback:function(t){e.total=t.total,e.userList=t.list,e.loading=!1}})},getDepartmentList:function(){var e=this;this.$https({url:{module:"company",name:"compDepartCascaderAll"},params:{transmit_type:this.transmit_type,current_step_sp_user_key:this.current_step_sp_user_key,stepKey:this.stepKey,searchString:this.propsObj.searchString},callback:function(t){var s=[{is_leaf:!0,level:1,name:"全部",_key:""}];e.highSearch&&s.unshift({is_leaf:!0,level:1,name:"高级选项",_key:"_highSearch"}),e.departmentList=s.concat(t.list)}})}},watch:{showSelectUserModalOnly:function(e,t){e&&this.init(),e&&this.openModal()}},filters:{isActive:function(e,t){return t.some(function(t){return t._key===e._key})?"selectUsers-list-item-active":""}}}},435:function(e,t,s){"use strict";var n={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"selectUsers"},[s("bri-tooltip",{attrs:{content:e.showVal,placement:"top",transfer:!0,maxWidth:"200"}},[e.canEdit?s("div",{class:Object.assign({},e.commonClass,{"selectUsers-edit":!0}),on:{mouseenter:function(t){e.isHover=!0},mouseleave:function(t){e.isHover=!1},click:e.clickInput}},[e.$isEmptyData(e.curValList)?[e._v("\n "+e._s(e.emptyShowVal)+"\n ")]:[s("dsh-tags",{staticClass:"text",attrs:{list:e.curValList,propsObj:{disabled:!e.finalCanEdit}},on:{delete:e.clickDeleteItem}}),e._v(" "),e.selfPropsObj._clearable&&e.isHover?s("Icon",{staticClass:"icon-close",attrs:{type:"md-close"},on:{click:function(t){return t.stopPropagation(),e.clickClear.apply(null,arguments)}}}):s("Icon",{staticClass:"icon-default",attrs:{type:e.multiple?"ios-people":"ios-person"}})]],2):s("div",{class:Object.assign({},e.commonClass,{"selectUsers-show":!0})},[e.$isEmptyData(e.curValList)?[e._v("\n "+e._s(e.emptyShowVal)+"\n ")]:s("dsh-tags",{staticClass:"text",attrs:{list:e.curValList,propsObj:{closable:!1}}})],2)]),e._v(" "),e.finalCanEdit?s("dsh-modal",{staticClass:"selectUsers-modal",attrs:{propsObj:e.modalPropsObj,mode:"custom"},on:{cancel:e.clickCancel},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[s("div",{staticClass:"selectUsers-modal-wrap"},[s("div",{staticClass:"selectUsers-modal-wrap-left"},["_highSearch"!==e.curDepartment._key?s("div",{staticClass:"search"},[s("dsh-input",{attrs:{value:e.searchData,propsObj:e.inputPropsObj},on:{change:e.search}})],1):e._e(),e._v(" "),s("div",{staticClass:"content"},[s("department-menu",{staticClass:"content-menu",attrs:{canEdit:!1,list:e.departmentList},on:{departClick:e.changeDepartment}}),e._v(" "),s("div",{staticClass:"content-users"},[e.loading?s("bri-loading"):[e.userList.length?s("div",{staticClass:"content-users-list"},[e.multiple?s("div",{staticClass:"content-users-list-checkAll"},[s("Checkbox",{attrs:{indeterminate:!1,value:e.curCheckAll},nativeOn:{click:function(t){return t.preventDefault(),e.clickCheckAll.apply(null,arguments)}}},[e._v("\n 全选\n ")])],1):e._e(),e._v(" "),s("div",{staticClass:"content-users-list-selects"},e._l(e.userList,function(t){return s("div",{key:t._key,staticClass:"content-users-list-selects-item"},[s("Checkbox",{attrs:{value:e.isSelect(t._key)},on:{"on-change":function(s){for(var n=arguments.length,i=Array(n);n--;)i[n]=arguments[n];return e.clickSelectUserItem.apply(void 0,[t].concat(i))}}},[e._v("\n "+e._s(t.realname||t.mobile)+"\n ")])],1)}),0)]):s("div",{staticClass:"content-users-nodata"},[s("img",{attrs:{src:e.$imageSrcMap.nodata,alt:"该部门暂无人员"}}),e._v(" "),s("div",[e._v("\n 该部门暂无人员\n ")])])]],2)],1)]),e._v(" "),s("div",{staticClass:"selectUsers-modal-wrap-center"},[s("Icon",{staticClass:"icon",attrs:{type:"ios-arrow-forward"}})],1),e._v(" "),s("div",{staticClass:"selectUsers-modal-wrap-right"},[s("div",{staticClass:"list"},e._l(e.newValList,function(t,n){return s("span",{key:n,staticClass:"list-item"},[s("span",{staticClass:"list-item-name"},[e._v("\n "+e._s(t.realname||t.mobile)+"\n ")]),e._v(" "),s("Icon",{staticClass:"list-item-delete",attrs:{type:"md-close"},on:{click:function(s){return e.clickDeleteUserItem(t,n,e.newValList)}}})],1)}),0)])]),e._v(" "),s("div",{staticClass:"selectUsers-modal-wrap-footer"},[s("dsh-buttons",{attrs:{list:e.$getOperationList(["cancel","confirm"])},on:{click:function(t){return e.$dispatchEvent(t)}}})],1)]):e._e()],1)},staticRenderFns:[]};t.a=n}});
1
+ webpackJsonpbri_components([0,1],{186:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(403),i=s(404),a=s(0)(n.a,i.a,!1,null,null,null);t.default=a.exports},193:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(415),i=s(435),a=s(0)(n.a,i.a,!1,null,null,null);t.default=a.exports},403:function(e,t,s){"use strict";t.a={name:"DepartmentMenu",props:{canEdit:{type:Boolean,default:!1},parent:Object,list:{type:Array,default:function(){return[]}},propSelect:{type:Object,default:function(){return{_key:"noDepart"}}}},data:function(){return{deleteModal:!0,dropdownList:[{name:"添加下级部门",type:"addSub",event:"addSubDepartment",icon:"ios-add-circle-outline"},{name:"修改部门信息",type:"change",event:"showChange",icon:"ios-create-outline"},{name:"删除部门",type:"delete",event:"tipDelete",icon:"ios-trash-outline"},{name:"移动部门",type:"remove",event:"removeDepartment",icon:"ios-move"}]}},computed:{getIcon:function(){return function(e){return e.isShowChildren?"ios-arrow-down":"ios-arrow-forward"}},departSelected:{get:function(){return this.propSelect},set:function(e){this.propSelect._key=e._key}}},created:function(){},methods:{addSubDepartment:function(e,t,s,n,i){this.$emit("showAddModal",s)},addPeerDepartment:function(){this.$emit("showAddModal",this.parent)},departClick:function(e){this.departSelected=e,this.$emit("departClick",e)},toggleChildren:function(e){e.isShowChildren=!e.isShowChildren,this.$forceUpdate()},showAddModal:function(e){this.$emit("showAddModal",e)},deleteDepart:function(e){this.departSelected={_key:"noDepart"},this.$emit("deleteDepart",e)},tipDelete:function(e,t,s,n,i){var a=this;this.$Modal.confirm({title:"警告",content:"确定要删除该部门吗?",onOk:function(){a.deleteDepart(s)},onCancel:function(){a.$Message.info("已取消!")}})},showChange:function(e,t,s,n,i){this.$emit("showChange",s)},showChilrenChange:function(e){this.$emit("showChange",e)},removeDepartment:function(e,t,s,n,i){this.$emit("removeDepartment",e,t,s,n,i)}}}},404:function(e,t,s){"use strict";var n={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"DepartmentMenu"},[!e.parent&&e.canEdit?s("div",{class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":"noDepart"===e.departSelected._key||null===e.departSelected}},[s("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":"noDepart"===e.departSelected._key||null===e.departSelected},on:{click:function(t){return e.departClick({_key:"noDepart"})}}},[e._v("\n 无部门员工\n ")])]):e._e(),e._v(" "),e._l(e.list,function(t,n){return s("div",{key:t._key,class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":e.departSelected._key===t._key}},[s("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":e.departSelected._key===t._key},on:{click:function(s){return s.stopPropagation(),e.departClick(t)}}},[s("span",[t.children&&t.children.length?s("Icon",{attrs:{type:e.getIcon(t)},on:{click:function(s){return s.stopPropagation(),e.toggleChildren(t)}}}):e._e(),e._v(" "),s("span",{staticClass:"DepartmentMenu-item-name-text"},[e._v("\n "+e._s(t.name)+"\n ")])],1),e._v(" "),e.canEdit?s("dsh-dropdown",{attrs:{trigger:"hover",list:e.dropdownList},on:{click:function(s){return e.$dispatchEvent(s,void 0,t,n,e.parent)}}}):e._e()],1),e._v(" "),t.isShowChildren?[s("department-menu",{staticStyle:{"margin-left":"15px"},attrs:{list:t.children,parent:t,propSelect:e.departSelected,canEdit:e.canEdit},on:{showAddModal:e.showAddModal,showChange:e.showChilrenChange,deleteDepart:e.deleteDepart,departClick:e.departClick,removeDepartment:e.removeDepartment}})]:e._e()],2)})],2)},staticRenderFns:[]};t.a=n},415:function(e,t,s){"use strict";var n=s(3),i=s.n(n),a=s(1),r=s.n(a),c=s(2),l=s(186);t.a={name:"selectUsers",mixins:[c.default],components:{departmentMenu:l.default},props:{showSelectUserModalOnly:Boolean},data:function(){return{isHover:!1,newValList:[],showModal:!1,modalPropsObj:{title:"选择成员",showSlotClose:!1,closable:!0},searchData:{name:""},inputPropsObj:{_name:"成员名称",_key:"name",_search:!0,_clearable:!1},curDepartment:{},hightUsers:[{_key:"dyn_myself",realname:"当前用户"}],loading:!1,userList:[],departmentList:[],total:0,pagePropsObj:{page:1,pagesize:500,showSizer:!1},isSelect:function(e){return!!this.newValList.find(function(t){return t._key===e})},operationMap:{cancel:{name:"取消",type:"clickCancel",btnType:"cancel",event:"clickCancel"},confirm:{name:"完成",btnType:"primary",type:"clickConfirm",event:"clickConfirm"}}}},computed:{selfPropsObj:function(){return r()({_multiple:!1,_highSearch:!1},this.propsObj,this.commonDealPropsObj)},multiple:function(){return this.selfPropsObj._multiple},highSearch:function(){return this.selfPropsObj._highSearch},inputIcon:function(){return this.multiple?"ios-people":"ios-person"},transmit_type:function(){return this.selfPropsObj.transmit_type},current_step_sp_user_key:function(){return this.selfPropsObj.current_step_sp_user_key},stepKey:function(){return this.selfPropsObj.stepKey},curCheckAll:function(){var e=this;return this.userList.every(function(t){return e.newValList.find(function(e){return e._key===t._key})})},showVal:function(){return this.$isEmptyData(this.curValList)?this.emptyShowVal:this.curValList.map(function(e){return e.realname||e.mobile}).join("、")}},created:function(){},methods:{openModal:function(){this.showModal=!0},closeModal:function(){this.showModal=!1},init:function(){this.searchData={name:""},this.curDepartment={},this.pagePropsObj.page=1,this.getUserList(),this.getDepartmentList()},search:function(){this.pagePropsObj.page=1,this.getUserList()},changeDepartment:function(e){this.pagePropsObj.page=1,this.curDepartment=e,"_highSearch"===e._key?(this.userList=this.hightUsers,this.total=1):this.getUserList()},clickInput:function(){this.finalCanEdit&&(this.openModal(),this.newValList=this.$deepCopy(this.curValList),this.init())},clickDeleteItem:function(e){this.curValList=this.curValList.filter(function(t){return t._key!==e._key})},clickClear:function(){this.curValList=[]},clickCheckAll:function(){var e=this;this.curCheckAll?this.newValList=this.newValList.filter(function(t){return!e.userList.some(function(e){return t._key===e._key})}):this.newValList=[].concat(i()(this.newValList),[this.userList.filter(function(t){return!e.newValList.some(function(e){return e._key===t._key})})])},clickSelectUserItem:function(e,t){this.multiple?this.newValList.some(function(t){return t._key===e._key})?this.newValList=this.newValList.filter(function(t){return t._key!==e._key}):this.newValList=[].concat(i()(this.newValList),[e]):this.newValList=!0===t?[e]:[]},clickDeleteUserItem:function(e,t,s){s.splice(t,1)},clickCancel:function(){this.closeModal()},clickConfirm:function(){this.closeModal(),this.curValList=this.newValList},getUserList:function(){var e=this;this.loading=!0,this.userList=[];var t=this.searchData.name,s={};t&&""!==t?s.realname={$regex:".*"+this.$speciaWord(t)+".*",$options:"i"}:delete s.realname,this.$https({url:{module:"company",name:"userIndex"},params:{search:s,department:this.curDepartment._key,transmit_type:this.transmit_type,current_step_sp_user_key:this.current_step_sp_user_key,stepKey:this.stepKey,pagination:{page:this.pagePropsObj.page,pagesize:this.pagePropsObj.pagesize}},callback:function(t){e.total=t.total,e.userList=t.list,e.loading=!1}})},getDepartmentList:function(){var e=this;this.$https({url:{module:"company",name:"compDepartCascaderAll"},params:{transmit_type:this.transmit_type,current_step_sp_user_key:this.current_step_sp_user_key,stepKey:this.stepKey,searchString:this.propsObj.searchString},callback:function(t){var s=[{is_leaf:!0,level:1,name:"全部",_key:""}];e.highSearch&&s.unshift({is_leaf:!0,level:1,name:"高级选项",_key:"_highSearch"}),e.departmentList=s.concat(t.list)}})}},watch:{showSelectUserModalOnly:function(e,t){e&&this.init(),e&&this.openModal()}},filters:{isActive:function(e,t){return t.some(function(t){return t._key===e._key})?"selectUsers-list-item-active":""}}}},435:function(e,t,s){"use strict";var n={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"selectUsers"},[s("bri-tooltip",{attrs:{content:e.showVal,placement:"top",transfer:!0,maxWidth:"200"}},[e.canEdit?s("div",{class:Object.assign({},e.commonClass,{"selectUsers-edit":!0}),on:{mouseenter:function(t){e.isHover=!0},mouseleave:function(t){e.isHover=!1},click:e.clickInput}},[e.$isEmptyData(e.curValList)?[e._v("\n "+e._s(e.emptyShowVal)+"\n ")]:[s("dsh-tags",{staticClass:"text",attrs:{list:e.curValList,propsObj:{disabled:!e.finalCanEdit}},on:{delete:e.clickDeleteItem}})],e._v(" "),[!e.$isEmptyData(e.curValList)&&e.selfPropsObj._clearable&&e.isHover?s("Icon",{staticClass:"icon-close",attrs:{type:"ios-close-circle"},on:{click:function(t){return t.stopPropagation(),e.clickClear.apply(null,arguments)}}}):s("Icon",{staticClass:"icon-default",attrs:{type:e.inputIcon}})]],2):s("div",{class:Object.assign({},e.commonClass,{"selectUsers-show":!0})},[e.$isEmptyData(e.curValList)?[e._v("\n "+e._s(e.emptyShowVal)+"\n ")]:s("dsh-tags",{staticClass:"text",attrs:{list:e.curValList}})],2)]),e._v(" "),e.finalCanEdit?s("dsh-modal",{staticClass:"selectUsers-modal",attrs:{propsObj:e.modalPropsObj,mode:"custom"},on:{cancel:e.clickCancel},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[s("div",{staticClass:"selectUsers-modal-wrap"},[s("div",{staticClass:"selectUsers-modal-wrap-left"},["_highSearch"!==e.curDepartment._key?s("div",{staticClass:"search"},[s("dsh-input",{attrs:{value:e.searchData,propsObj:e.inputPropsObj},on:{change:e.search}})],1):e._e(),e._v(" "),s("div",{staticClass:"content"},[s("department-menu",{staticClass:"content-menu",attrs:{canEdit:!1,list:e.departmentList},on:{departClick:e.changeDepartment}}),e._v(" "),s("div",{staticClass:"content-users"},[e.loading?s("bri-loading"):[e.userList.length?s("div",{staticClass:"content-users-list"},[e.multiple?s("div",{staticClass:"content-users-list-checkAll"},[s("Checkbox",{attrs:{indeterminate:!1,value:e.curCheckAll},nativeOn:{click:function(t){return t.preventDefault(),e.clickCheckAll.apply(null,arguments)}}},[e._v("全选")])],1):e._e(),e._v(" "),s("div",{staticClass:"content-users-list-selects"},e._l(e.userList,function(t){return s("div",{key:t._key,staticClass:"content-users-list-selects-item"},[s("Checkbox",{attrs:{value:e.isSelect(t._key)},on:{"on-change":function(s){for(var n=arguments.length,i=Array(n);n--;)i[n]=arguments[n];return e.clickSelectUserItem.apply(void 0,[t].concat(i))}}},[e._v("\n "+e._s(t.realname||t.mobile)+"\n ")])],1)}),0)]):s("div",{staticClass:"content-users-nodata"},[s("img",{attrs:{src:e.$imageSrcMap.nodata,alt:"该部门暂无人员"}}),e._v(" "),s("div",[e._v("\n 该部门暂无人员\n ")])])]],2)],1)]),e._v(" "),s("div",{staticClass:"selectUsers-modal-wrap-center"},[s("Icon",{staticClass:"icon",attrs:{type:"ios-arrow-forward"}})],1),e._v(" "),s("div",{staticClass:"selectUsers-modal-wrap-right"},[s("div",{staticClass:"list"},e._l(e.newValList,function(t,n){return s("span",{key:n,staticClass:"list-item"},[s("span",{staticClass:"list-item-name"},[e._v("\n "+e._s(t.realname||t.mobile)+"\n ")]),e._v(" "),s("Icon",{staticClass:"list-item-delete",attrs:{type:"ios-close-circle"},on:{click:function(s){return e.clickDeleteUserItem(t,n,e.newValList)}}})],1)}),0)])]),e._v(" "),s("div",{staticClass:"selectUsers-modal-wrap-footer"},[s("dsh-buttons",{attrs:{list:e.$getOperationList(["cancel","confirm"])},on:{click:function(t){return e.$dispatchEvent(t)}}})],1)]):e._e()],1)},staticRenderFns:[]};t.a=n}});
@@ -1 +1 @@
1
- webpackJsonpbri_components([1],{186:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(403),r=n(404),a=n(0)(i.a,r.a,!1,null,null,null);t.default=a.exports},403:function(e,t,n){"use strict";t.a={name:"DepartmentMenu",props:{canEdit:{type:Boolean,default:!1},parent:Object,list:{type:Array,default:function(){return[]}},propSelect:{type:Object,default:function(){return{_key:"noDepart"}}}},data:function(){return{deleteModal:!0,dropdownList:[{name:"添加下级部门",type:"addSub",event:"addSubDepartment",icon:"ios-add-circle-outline"},{name:"修改部门信息",type:"change",event:"showChange",icon:"ios-create-outline"},{name:"删除部门",type:"delete",event:"tipDelete",icon:"ios-trash-outline"},{name:"移动部门",type:"remove",event:"removeDepartment",icon:"ios-move"}]}},computed:{iconType:function(){return function(e){return e.isShowChildren?"ios-arrow-down":"ios-arrow-forward"}},departSelected:{get:function(){return this.propSelect},set:function(e){this.propSelect._key=e._key}}},created:function(){},methods:{addSubDepartment:function(e,t,n,i,r){this.$emit("showAddModal",n)},addPeerDepartment:function(){this.$emit("showAddModal",this.parent)},departClick:function(e){this.departSelected=e,this.$emit("departClick",e)},toggleChildren:function(e){e.isShowChildren=!e.isShowChildren,this.$forceUpdate()},showAddModal:function(e){this.$emit("showAddModal",e)},deleteDepart:function(e){this.departSelected={_key:"noDepart"},this.$emit("deleteDepart",e)},tipDelete:function(e,t,n,i,r){var a=this;this.$Modal.confirm({title:"警告",content:"确定要删除该部门吗?",onOk:function(){a.deleteDepart(n)},onCancel:function(){a.$Message.info("已取消!")}})},showChange:function(e,t,n,i,r){this.$emit("showChange",n)},showChilrenChange:function(e){this.$emit("showChange",e)},removeDepartment:function(e,t,n,i,r){this.$emit("removeDepartment",e,t,n,i,r)}}}},404:function(e,t,n){"use strict";var i={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"DepartmentMenu"},[!e.parent&&e.canEdit?n("div",{class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":"noDepart"===e.departSelected._key||null===e.departSelected}},[n("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":"noDepart"===e.departSelected._key||null===e.departSelected},on:{click:function(t){return e.departClick({_key:"noDepart"})}}},[e._v("\n 无部门员工\n ")])]):e._e(),e._v(" "),e._l(e.list,function(t,i){return n("div",{key:t._key,class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":e.departSelected._key===t._key}},[n("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":e.departSelected._key===t._key},on:{click:function(n){return n.stopPropagation(),e.departClick(t)}}},[n("span",[t.children&&t.children.length?n("Icon",{attrs:{type:e.iconType(t)},on:{click:function(n){return n.stopPropagation(),e.toggleChildren(t)}}}):e._e(),e._v(" "),n("span",{staticClass:"DepartmentMenu-item-name-text"},[e._v("\n "+e._s(t.name)+"\n ")])],1),e._v(" "),e.canEdit?n("dsh-dropdown",{attrs:{trigger:"hover",list:e.dropdownList},on:{click:function(n){return e.$dispatchEvent(n,void 0,t,i,e.parent)}}}):e._e()],1),e._v(" "),t.isShowChildren?[n("department-menu",{staticStyle:{"margin-left":"15px"},attrs:{list:t.children,parent:t,propSelect:e.departSelected,canEdit:e.canEdit},on:{showAddModal:e.showAddModal,showChange:e.showChilrenChange,deleteDepart:e.deleteDepart,departClick:e.departClick,removeDepartment:e.removeDepartment}})]:e._e()],2)})],2)},staticRenderFns:[]};t.a=i}});
1
+ webpackJsonpbri_components([1],{186:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(403),i=n(404),a=n(0)(r.a,i.a,!1,null,null,null);t.default=a.exports},403:function(e,t,n){"use strict";t.a={name:"DepartmentMenu",props:{canEdit:{type:Boolean,default:!1},parent:Object,list:{type:Array,default:function(){return[]}},propSelect:{type:Object,default:function(){return{_key:"noDepart"}}}},data:function(){return{deleteModal:!0,dropdownList:[{name:"添加下级部门",type:"addSub",event:"addSubDepartment",icon:"ios-add-circle-outline"},{name:"修改部门信息",type:"change",event:"showChange",icon:"ios-create-outline"},{name:"删除部门",type:"delete",event:"tipDelete",icon:"ios-trash-outline"},{name:"移动部门",type:"remove",event:"removeDepartment",icon:"ios-move"}]}},computed:{getIcon:function(){return function(e){return e.isShowChildren?"ios-arrow-down":"ios-arrow-forward"}},departSelected:{get:function(){return this.propSelect},set:function(e){this.propSelect._key=e._key}}},created:function(){},methods:{addSubDepartment:function(e,t,n,r,i){this.$emit("showAddModal",n)},addPeerDepartment:function(){this.$emit("showAddModal",this.parent)},departClick:function(e){this.departSelected=e,this.$emit("departClick",e)},toggleChildren:function(e){e.isShowChildren=!e.isShowChildren,this.$forceUpdate()},showAddModal:function(e){this.$emit("showAddModal",e)},deleteDepart:function(e){this.departSelected={_key:"noDepart"},this.$emit("deleteDepart",e)},tipDelete:function(e,t,n,r,i){var a=this;this.$Modal.confirm({title:"警告",content:"确定要删除该部门吗?",onOk:function(){a.deleteDepart(n)},onCancel:function(){a.$Message.info("已取消!")}})},showChange:function(e,t,n,r,i){this.$emit("showChange",n)},showChilrenChange:function(e){this.$emit("showChange",e)},removeDepartment:function(e,t,n,r,i){this.$emit("removeDepartment",e,t,n,r,i)}}}},404:function(e,t,n){"use strict";var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"DepartmentMenu"},[!e.parent&&e.canEdit?n("div",{class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":"noDepart"===e.departSelected._key||null===e.departSelected}},[n("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":"noDepart"===e.departSelected._key||null===e.departSelected},on:{click:function(t){return e.departClick({_key:"noDepart"})}}},[e._v("\n 无部门员工\n ")])]):e._e(),e._v(" "),e._l(e.list,function(t,r){return n("div",{key:t._key,class:{"DepartmentMenu-item":!0,"DepartmentMenu-item-select":e.departSelected._key===t._key}},[n("div",{class:{"DepartmentMenu-item-name":!0,"DepartmentMenu-item-name-select":e.departSelected._key===t._key},on:{click:function(n){return n.stopPropagation(),e.departClick(t)}}},[n("span",[t.children&&t.children.length?n("Icon",{attrs:{type:e.getIcon(t)},on:{click:function(n){return n.stopPropagation(),e.toggleChildren(t)}}}):e._e(),e._v(" "),n("span",{staticClass:"DepartmentMenu-item-name-text"},[e._v("\n "+e._s(t.name)+"\n ")])],1),e._v(" "),e.canEdit?n("dsh-dropdown",{attrs:{trigger:"hover",list:e.dropdownList},on:{click:function(n){return e.$dispatchEvent(n,void 0,t,r,e.parent)}}}):e._e()],1),e._v(" "),t.isShowChildren?[n("department-menu",{staticStyle:{"margin-left":"15px"},attrs:{list:t.children,parent:t,propSelect:e.departSelected,canEdit:e.canEdit},on:{showAddModal:e.showAddModal,showChange:e.showChilrenChange,deleteDepart:e.deleteDepart,departClick:e.departClick,removeDepartment:e.removeDepartment}})]:e._e()],2)})],2)},staticRenderFns:[]};t.a=r}});
@@ -1 +1 @@
1
- webpackJsonpbri_components([2],{190:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(414),n=s(434),i=s(0)(a.a,n.a,!1,null,null,null);e.default=i.exports},414:function(t,e,s){"use strict";var a=s(3),n=s.n(a),i=s(1),c=s.n(i),l=s(2),r=s(191),o=s(192);e.a={name:"selectDepartments",mixins:[l.default],components:{BriTreeItem:r.a,BriCard:o.a},props:{},data:function(){return{isHover:!1,newValList:[],showModal:!1,loading:!1,searchName:"",departmentList:[],highDepartmentList:[{_key:"dyn_department",name:"当前部门"}],operationMap:{canCancel:{name:"取消",type:"canCancel",btnType:"cancel",event:"clickCancel"},canConfirm:{name:"确定",type:"canConfirm",btnType:"primary",event:"clickConfirm"}}}},computed:{selfPropsObj:function(){return c()({_multiple:!1,_highSearch:!1,_isCascader:!0,_changeOnSelect:!0,_searchString:""},this.propsObj,this.commonDealPropsObj)},multiple:function(){return this.selfPropsObj._multiple},highSearch:function(){return this.selfPropsObj._highSearch},isCascader:function(){return this.selfPropsObj._isCascader},changeOnSelect:function(){return this.selfPropsObj._changeOnSelect},searchString:function(){return this.selfPropsObj._searchString},modalPropsObj:function(){return{title:"选择部门",class:"z-modal "+(this.isCascader?"selectDepartments-cascaderModal":"selectDepartments-modal"),showSlotClose:!1,closable:!0}},selectKeys:function(){return this.newValList.map(function(t){return t._key})},allDepartmentList:function(){return this.transformDepartmentList([].concat(n()(this.highSearch?this.highDepartmentList:[]),n()(this.departmentList)),this.selectKeys)},showVal:function(){return this.$isEmptyData(this.curValList)?this.emptyShowVal:this.curValList.map(function(t){return t.full_name||t.name}).join("、")}},created:function(){},methods:{openModal:function(){this.showModal=!0},closeModal:function(){this.showModal=!1},search:function(){this.getListData()},clickInput:function(){this.finalCanEdit&&(this.openModal(),this.newValList=this.$deepCopy(this.curValList),this.searchName="",this.getListData())},clickDeleteItem:function(t){this.curValList=this.curValList.filter(function(e){return e._key!=t._key})},clickClear:function(){this.curValList=[]},changeSelect:function(t){this.newValList=this.multiple?this.selectKeys.includes(t._key)?this.newValList.filter(function(e){return e._key!==t._key}):[].concat(n()(this.newValList),[t]):t.checked?[t]:[]},deleteSelect:function(t,e,s){s.splice(e,1)},clickCancel:function(){this.closeModal()},clickConfirm:function(){this.closeModal(),this.curValList=this.newValList},transformDepartmentList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.map(function(e){return c()({},e,{title:e.name,checked:s.includes(e._key),expand:!!(e.children&&e.children.length&&e.level<2),children:t.transformDepartmentList(e.children,s)})})},getListData:function(){var t=this;this.loading=!0,this.$https({url:{module:"company",name:this.isCascader?"compDepartCascaderAll":"compDepartIndex"},params:{search:this.searchName?{name:{$regex:".*"+this.$speciaWord(this.searchName)+".*",$options:"i"}}:void 0,searchString:this.searchString,nameSearchFlag:!this.changeOnSelect},callback:function(e){t.loading=!1,t.departmentList=e.list}})}}}},434:function(t,e,s){"use strict";var a={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"selectDepartments"},[s("bri-tooltip",{attrs:{content:t.showVal,placement:"top",maxWidth:"200",transfer:!0}},[t.canEdit?s("div",{class:Object.assign({},t.commonClass,{"selectDepartments-edit":!0}),on:{mouseenter:function(e){t.isHover=!0},mouseleave:function(e){t.isHover=!1},click:t.clickInput}},[t.$isEmptyData(t.curValList)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:[s("dsh-tags",{staticClass:"text",attrs:{list:t.curValList,propsObj:{disabled:!t.finalCanEdit}},on:{delete:t.clickDeleteItem}}),t._v(" "),t.selfPropsObj._clearable&&t.isHover?s("Icon",{staticClass:"icon-close",attrs:{type:"md-close"},on:{click:function(e){return e.stopPropagation(),t.clickClear.apply(null,arguments)}}}):s("Icon",{staticClass:"icon-default",attrs:{type:t.multiple?"ios-people":"ios-person"}})]],2):s("div",{class:Object.assign({},t.commonClass,{"selectDepartments-show":!0})},[t.$isEmptyData(t.curValList)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:s("dsh-tags",{staticClass:"text",attrs:{list:t.curValList,propsObj:{closable:!1}}})],2)]),t._v(" "),t.finalCanEdit?s("dsh-modal",{attrs:{mode:"custom",propsObj:t.modalPropsObj},on:{cancel:t.clickCancel},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[s("div",{staticClass:"selectDepartments-list"},[s("div",{staticClass:"list-selected"},[s("span",{staticClass:"list-selected-label"},[t._v("\n 已选择"+t._s(t.multiple?"("+t.newValList.length+"个)":"")+":\n ")]),t._v(" "),t._l(t.newValList,function(e,a){return s("span",{key:a,staticClass:"item"},[s("span",{staticClass:"item-name"},[t._v("\n "+t._s(e.full_name||e.name)+"\n ")]),t._v(" "),s("Icon",{staticClass:"item-delete",attrs:{type:"md-close"},on:{click:function(s){return t.deleteSelect(e,a,t.newValList)}}})],1)})],2),t._v(" "),s("div",{staticClass:"list-search"},[s("Input",{attrs:{placeholder:"搜索部门",search:""},on:{"on-search":t.search},model:{value:t.searchName,callback:function(e){t.searchName=e},expression:"searchName"}})],1),t._v(" "),t.showModal?s("div",{staticClass:"list-center"},[t.loading?s("bri-loading"):[t.isCascader?s("div",{staticClass:"list-center-tree"},[t.allDepartmentList.length?t._l(t.allDepartmentList,function(e){return s("bri-tree-item",{key:e._key,attrs:{value:e,changeOnSelect:t.changeOnSelect,multiple:t.multiple},on:{"on-change":t.changeSelect}})}):s("div",{staticClass:"tree-nodata"},[t._v("\n 暂无数据……\n ")])],2):s("div",{staticClass:"list-center-card"},[s("bri-card",{attrs:{data:t.departmentList,changeOnSelect:t.changeOnSelect,multiple:t.multiple},on:{"on-change":t.changeSelect}}),t._v(" "),t.highSearch?s("div",{staticClass:"card-high"},[s("p",{staticClass:"card-high-title"},[t._v("高级选项")]),t._v(" "),s("bri-card",{attrs:{data:t.highDepartmentList,changeOnSelect:t.changeOnSelect,multiple:t.multiple},on:{"on-change":t.changeSelect}})],1):t._e()],1)]],2):t._e(),t._v(" "),s("div",{staticClass:"list-footer"},[s("dsh-buttons",{attrs:{list:t.$getOperationList(["canCancel","canConfirm"])},on:{click:function(e){return t.$dispatchEvent(e)}}})],1)])]):t._e()],1)},staticRenderFns:[]};e.a=a}});
1
+ webpackJsonpbri_components([2],{190:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(414),n=s(434),i=s(0)(a.a,n.a,!1,null,null,null);e.default=i.exports},414:function(t,e,s){"use strict";var a=s(3),n=s.n(a),i=s(1),c=s.n(i),l=s(2),r=s(191),o=s(192);e.a={name:"selectDepartments",mixins:[l.default],components:{BriTreeItem:r.a,BriCard:o.a},props:{},data:function(){return{isHover:!1,newValList:[],showModal:!1,loading:!1,searchName:"",departmentList:[],highDepartmentList:[{_key:"dyn_department",name:"当前部门"}],operationMap:{canCancel:{name:"取消",type:"canCancel",btnType:"cancel",event:"clickCancel"},canConfirm:{name:"确定",type:"canConfirm",btnType:"primary",event:"clickConfirm"}}}},computed:{selfPropsObj:function(){return c()({_multiple:!1,_highSearch:!1,_isCascader:!0,_changeOnSelect:!0,_searchString:""},this.propsObj,this.commonDealPropsObj)},multiple:function(){return this.selfPropsObj._multiple},highSearch:function(){return this.selfPropsObj._highSearch},inputIcon:function(){return this.multiple?"ios-people":"ios-person"},isCascader:function(){return this.selfPropsObj._isCascader},changeOnSelect:function(){return this.selfPropsObj._changeOnSelect},searchString:function(){return this.selfPropsObj._searchString},modalPropsObj:function(){return{title:"选择部门",class:"z-modal "+(this.isCascader?"selectDepartments-cascaderModal":"selectDepartments-modal"),showSlotClose:!1,closable:!0}},selectKeys:function(){return this.newValList.map(function(t){return t._key})},allDepartmentList:function(){return this.transformDepartmentList([].concat(n()(this.highSearch?this.highDepartmentList:[]),n()(this.departmentList)),this.selectKeys)},showVal:function(){return this.$isEmptyData(this.curValList)?this.emptyShowVal:this.curValList.map(function(t){return t.full_name||t.name}).join("、")}},created:function(){},methods:{openModal:function(){this.showModal=!0},closeModal:function(){this.showModal=!1},search:function(){this.getListData()},clickInput:function(){this.finalCanEdit&&(this.openModal(),this.newValList=this.$deepCopy(this.curValList),this.searchName="",this.getListData())},clickDeleteItem:function(t){this.curValList=this.curValList.filter(function(e){return e._key!=t._key})},clickClear:function(){this.curValList=[]},changeSelect:function(t){this.newValList=this.multiple?this.selectKeys.includes(t._key)?this.newValList.filter(function(e){return e._key!==t._key}):[].concat(n()(this.newValList),[t]):t.checked?[t]:[]},deleteSelect:function(t,e,s){s.splice(e,1)},clickCancel:function(){this.closeModal()},clickConfirm:function(){this.closeModal(),this.curValList=this.newValList},transformDepartmentList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.map(function(e){return c()({},e,{title:e.name,checked:s.includes(e._key),expand:!!(e.children&&e.children.length&&e.level<2),children:t.transformDepartmentList(e.children,s)})})},getListData:function(){var t=this;this.loading=!0,this.$https({url:{module:"company",name:this.isCascader?"compDepartCascaderAll":"compDepartIndex"},params:{search:this.searchName?{name:{$regex:".*"+this.$speciaWord(this.searchName)+".*",$options:"i"}}:void 0,searchString:this.searchString,nameSearchFlag:!this.changeOnSelect},callback:function(e){t.loading=!1,t.departmentList=e.list}})}}}},434:function(t,e,s){"use strict";var a={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"selectDepartments"},[s("bri-tooltip",{attrs:{content:t.showVal,placement:"top",maxWidth:"200",transfer:!0}},[t.canEdit?s("div",{class:Object.assign({},t.commonClass,{"selectDepartments-edit":!0}),on:{mouseenter:function(e){t.isHover=!0},mouseleave:function(e){t.isHover=!1},click:t.clickInput}},[t.$isEmptyData(t.curValList)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:[s("dsh-tags",{staticClass:"text",attrs:{list:t.curValList,propsObj:{disabled:!t.finalCanEdit}},on:{delete:t.clickDeleteItem}})],t._v(" "),[!t.$isEmptyData(t.curValList)&&t.selfPropsObj._clearable&&t.isHover?s("Icon",{staticClass:"icon-close",attrs:{type:"ios-close-circle"},on:{click:function(e){return e.stopPropagation(),t.clickClear.apply(null,arguments)}}}):s("Icon",{staticClass:"icon-default",attrs:{type:t.inputIcon}})]],2):s("div",{class:Object.assign({},t.commonClass,{"selectDepartments-show":!0})},[t.$isEmptyData(t.curValList)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:s("dsh-tags",{staticClass:"text",attrs:{list:t.curValList}})],2)]),t._v(" "),t.finalCanEdit?s("dsh-modal",{attrs:{mode:"custom",propsObj:t.modalPropsObj},on:{cancel:t.clickCancel},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[s("div",{staticClass:"selectDepartments-list"},[s("div",{staticClass:"list-selected"},[s("span",{staticClass:"list-selected-label"},[t._v("\n 已选择"+t._s(t.multiple?"("+t.newValList.length+"个)":"")+":\n ")]),t._v(" "),t._l(t.newValList,function(e,a){return s("span",{key:a,staticClass:"item"},[s("span",{staticClass:"item-name"},[t._v("\n "+t._s(e.full_name||e.name)+"\n ")]),t._v(" "),s("Icon",{staticClass:"item-delete",attrs:{type:"ios-close-circle"},on:{click:function(s){return t.deleteSelect(e,a,t.newValList)}}})],1)})],2),t._v(" "),s("div",{staticClass:"list-search"},[s("Input",{attrs:{placeholder:"搜索部门",search:""},on:{"on-search":t.search},model:{value:t.searchName,callback:function(e){t.searchName=e},expression:"searchName"}})],1),t._v(" "),t.showModal?s("div",{staticClass:"list-center"},[t.loading?s("bri-loading"):[t.isCascader?s("div",{staticClass:"list-center-tree"},[t.allDepartmentList.length?t._l(t.allDepartmentList,function(e){return s("bri-tree-item",{key:e._key,attrs:{value:e,changeOnSelect:t.changeOnSelect,multiple:t.multiple},on:{"on-change":t.changeSelect}})}):s("div",{staticClass:"tree-nodata"},[t._v("\n 暂无数据……\n ")])],2):s("div",{staticClass:"list-center-card"},[s("bri-card",{attrs:{data:t.departmentList,changeOnSelect:t.changeOnSelect,multiple:t.multiple},on:{"on-change":t.changeSelect}}),t._v(" "),t.highSearch?s("div",{staticClass:"card-high"},[s("p",{staticClass:"card-high-title"},[t._v("高级选项")]),t._v(" "),s("bri-card",{attrs:{data:t.highDepartmentList,changeOnSelect:t.changeOnSelect,multiple:t.multiple},on:{"on-change":t.changeSelect}})],1):t._e()],1)]],2):t._e(),t._v(" "),s("div",{staticClass:"list-footer"},[s("dsh-buttons",{attrs:{list:t.$getOperationList(["canCancel","canConfirm"])},on:{click:function(e){return t.$dispatchEvent(e)}}})],1)])]):t._e()],1)},staticRenderFns:[]};e.a=a}});
@@ -1 +1 @@
1
- webpackJsonpbri_components([5],{187:function(t,i,s){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=s(411),e=s(431),a=s(0)(n.a,e.a,!1,null,null,null);i.default=a.exports},411:function(t,i,s){"use strict";var n=s(1),e=s.n(n),a=s(2);i.a={name:"BriLabels",mixins:[a.default],data:function(){return{listData:[],listVisible:!1,inputIcon:"ios-arrow-down",renderList:!1}},computed:{selfPropsObj:function(){return e()({},this.propsObj,this.commonDealPropsObj)},val:{get:function(){return this.value[this.controlKey]||[]},set:function(t){this.value[this.controlKey]=t}},isCore:function(){return this.selfPropsObj.isCore},showValStr:function(){var t=this.val&&this.val.map(function(t){return t.name});return t&&t.join("、")}},created:function(){},methods:{init:function(){this.isCore?this.listData=this.selfPropsObj._originLabels.map(function(t){return e()({},t,{isEdit:!1})}):this.getListData()},clickInput:function(){this.finalCanEdit&&(this.renderList||this.init(),this.renderList=!0,this.listVisible=!this.listVisible,this.listVisible?this.inputIcon="ios-arrow-up":this.inputIcon="ios-arrow-down")},clickEditInput:function(t){t.stopPropagation()},clickEditIcon:function(t){t.isEdit=!0,this.$forceUpdate()},clickConfirm:function(t){""!=t.name&&(t.isEdit=!1,this.$forceUpdate(),this.change())},clickItem:function(t){this.val.findIndex(function(i){return i._key==t._key})>-1?this.val=this.val.filter(function(i){return i._key!=t._key}):this.val.push(t),this.change()},clickDeleteItem:function(t){this.change()},clickAddItem:function(){this.listData.push({_key:this.$randomB36("Labels"),isEdit:!0,name:"",labelType:this.selfPropsObj._labelType}),this.change()},getListData:function(){var t=this;this.$https({url:{module:"sheet",name:"memberAll"},params:{search:{entityKey:this.entityKey,fieldKey:"_default"===this.selfPropsObj._key?this.value._key:this.selfPropsObj.__realKey__||this.selfPropsObj._key,labelType:this.selfPropsObj._labelType,modKey:this.modKey},pagination:{page:1,pagesize:999}},callback:function(i){t.listData=i.list.map(function(t){return e()({},t,{isEdit:!1})})}})}}}},431:function(t,i,s){"use strict";var n={render:function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"BriLabels"},[t.canEdit?[s("Dropdown",{staticClass:"BriLabels-dropdown",attrs:{trigger:"custom",placement:"bottom-start",visible:t.listVisible,transfer:""},on:{"on-clickoutside":t.clickInput},scopedSlots:t._u([{key:"list",fn:function(){return[s("DropdownMenu",{staticClass:"BriLabels-dropdown-menu"},[t._l(t.listData,function(i){return s("DropdownItem",{key:i._key,class:{item:!0,"item-active":!!t.val.find(function(t){return t._key==i._key})},nativeOn:{click:function(s){return t.clickItem(i)}}},[i.isEdit?s("div",{staticClass:"item-edit"},[s("Input",{nativeOn:{click:function(i){return t.clickEditInput(i)}},scopedSlots:t._u([{key:"suffix",fn:function(){return[s("Icon",{attrs:{color:"#3DB8C5",custom:"bri bri-duigou"},nativeOn:{click:function(s){return s.stopPropagation(),t.clickConfirm(i)}}})]},proxy:!0}],null,!0),model:{value:i.name,callback:function(s){t.$set(i,"name",s)},expression:"item.name"}})],1):s("div",{staticClass:"item-show"},[t._v("\n "+t._s(i.name)+"\n "),s("span",{staticClass:"item-show-icons"},[i.coreLabel?t._e():s("Icon",{staticClass:"item-show-icons-edit",attrs:{custom:"bri bri-bianji"},on:{click:function(s){return s.stopPropagation(),t.clickEditIcon(i)}}})],1)])])}),t._v(" "),t.selfPropsObj._onlySelect?t._e():s("div",{staticClass:"btns"},[s("bri-button",{staticClass:"btns-add",attrs:{propsObj:{btnType:"default",icon:"md-add"}},nativeOn:{click:function(i){return i.stopPropagation(),t.clickAddItem.apply(null,arguments)}}},[t._v("添加选项")])],1)],2)]},proxy:!0}],null,!1,60612195)},[s("div",{class:Object.assign({},t.commonClass,{"BriLabels-edit":!0}),on:{click:t.clickInput}},[t.$isEmptyData(t.val)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:[s("dsh-tags",{staticClass:"overflow",attrs:{list:t.val,propsObj:{disabled:!t.finalCanEdit}},on:{delete:t.clickDeleteItem},scopedSlots:t._u([{key:"default",fn:function(i){var n=i.tagItem;return s("span",{},[t._v("\n "+t._s(n.name)+"\n ")])}}],null,!1,619489167)}),t._v(" "),s("Icon",{staticClass:"icon-default",attrs:{type:t.inputIcon}})]],2)])]:[s("bri-tooltip",{attrs:{content:t.showValStr,maxWidth:"200",transfer:!0}},[s("div",{class:Object.assign({},t.commonClass,{"BriLabels-show":!0})},[t.$isEmptyData(t.val)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:s("dsh-tags",{staticClass:"text",attrs:{list:t.val,propsObj:{closable:!1}},scopedSlots:t._u([{key:"default",fn:function(i){var n=i.tagItem;return s("span",{},[t._v("\n "+t._s(n.name)+"\n ")])}}],null,!1,1866558607)})],2)])]],2)},staticRenderFns:[]};i.a=n}});
1
+ webpackJsonpbri_components([5],{187:function(t,i,s){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=s(411),n=s(431),a=s(0)(e.a,n.a,!1,null,null,null);i.default=a.exports},411:function(t,i,s){"use strict";var e=s(3),n=s.n(e),a=s(1),c=s.n(a),l=s(2);i.a={name:"BriLabels",mixins:[l.default],data:function(){return{isHover:!1,listData:[],isVisible:!1,renderList:!1}},computed:{selfPropsObj:function(){return c()({_labelType:"entity",_onlySelect:!1,_originLabels:[]},this.propsObj,this.commonDealPropsObj)},labelType:function(){return this.selfPropsObj._labelType},onlySelect:function(){return this.selfPropsObj._onlySelect},originLabels:function(){return this.selfPropsObj._originLabels},inputIcon:function(){return this.isVisible?"ios-arrow-up":"ios-arrow-down"},showVal:function(){return this.$isEmptyData(this.curValList)?this.emptyShowVal:this.curValList.map(function(t){return t.name}).join("、")}},created:function(){},methods:{clickInput:function(){this.finalCanEdit&&(this.renderList||(this.isCore?this.listData=this.originLabels.map(function(t){return c()({},t,{isEdit:!1})}):this.getListData()),this.renderList=!0,this.isVisible=!this.isVisible)},clickEditInput:function(t){t.stopPropagation()},clickEditIcon:function(t){t.isEdit=!0,this.$forceUpdate()},clickConfirm:function(t){t.name&&(t.isEdit=!1,this.$forceUpdate())},clickItem:function(t){this.curValList.some(function(i){return i._key===t._key})?this.curValList=this.curValList.filter(function(i){return i._key!==t._key}):this.curValList=[].concat(n()(this.curValList),[t])},clickAddItem:function(){this.listData.push({_key:this.$randomB36("Labels"),isEdit:!0,name:"",labelType:this.labelType})},clickDeleteItem:function(t){this.curValList=this.curValList.filter(function(i){return i._key!==t._key})},clickClear:function(){this.curValList=[]},getListData:function(){var t=this;this.$https({url:{module:"sheet",name:"memberAll"},params:{search:{entityKey:this.entityKey,modKey:this.modKey,fieldKey:this.fieldKey,labelType:this.labelType},pagination:{page:1,pagesize:999}},callback:function(i){t.listData=i.list.map(function(t){return c()({},t,{isEdit:!1})})}})}}}},431:function(t,i,s){"use strict";var e={render:function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"BriLabels"},[t.canEdit?[s("Dropdown",{staticClass:"BriLabels-dropdown",attrs:{trigger:"custom",placement:"bottom-start",visible:t.isVisible,transfer:""},on:{"on-clickoutside":t.clickInput},scopedSlots:t._u([{key:"list",fn:function(){return[s("DropdownMenu",{staticClass:"BriLabels-dropdown-menu"},[t._l(t.listData,function(i){return s("DropdownItem",{key:i._key,class:{item:!0,"item-active":!!t.curValList.find(function(t){return t._key===i._key})},nativeOn:{click:function(s){return t.clickItem(i)}}},[i.isEdit?s("div",{staticClass:"item-edit"},[s("Input",{nativeOn:{click:function(i){return t.clickEditInput(i)}},scopedSlots:t._u([{key:"suffix",fn:function(){return[s("Icon",{attrs:{color:"#3DB8C5",custom:"bri bri-duigou"},nativeOn:{click:function(s){return s.stopPropagation(),t.clickConfirm(i)}}})]},proxy:!0}],null,!0),model:{value:i.name,callback:function(s){t.$set(i,"name",s)},expression:"listItem.name"}})],1):s("div",{staticClass:"item-show"},[t._v("\n "+t._s(i.name)+"\n "),s("span",{staticClass:"item-show-icons"},[i.coreLabel?t._e():s("Icon",{staticClass:"item-show-icons-edit",attrs:{custom:"bri bri-bianji"},on:{click:function(s){return s.stopPropagation(),t.clickEditIcon(i)}}})],1)])])}),t._v(" "),t.onlySelect?t._e():s("div",{staticClass:"btns"},[s("bri-button",{staticClass:"btns-add",attrs:{propsObj:{btnType:"default",icon:"md-add"}},nativeOn:{click:function(i){return i.stopPropagation(),t.clickAddItem.apply(null,arguments)}}},[t._v("添加选项")])],1)],2)]},proxy:!0}],null,!1,3071421276)},[s("div",{class:Object.assign({},t.commonClass,{"BriLabels-edit":!0}),on:{mouseenter:function(i){t.isHover=!0},mouseleave:function(i){t.isHover=!1},click:t.clickInput}},[t.$isEmptyData(t.curValList)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:[s("dsh-tags",{staticClass:"overflow",attrs:{list:t.curValList,propsObj:{disabled:!t.finalCanEdit},autoEllipsis:!0},on:{delete:t.clickDeleteItem}})],t._v(" "),[!t.$isEmptyData(t.curValList)&&t.selfPropsObj._clearable&&t.isHover?s("Icon",{staticClass:"icon-close",attrs:{type:"ios-close-circle"},on:{click:function(i){return i.stopPropagation(),t.clickClear.apply(null,arguments)}}}):s("Icon",{staticClass:"icon-default",attrs:{type:t.inputIcon}})]],2)])]:[s("bri-tooltip",{attrs:{content:t.showVal,maxWidth:"200",transfer:!0}},[s("div",{class:Object.assign({},t.commonClass,{"BriLabels-show":!0})},[t.$isEmptyData(t.curValList)?[t._v("\n "+t._s(t.emptyShowVal)+"\n ")]:s("dsh-tags",{staticClass:"text",attrs:{list:t.curValList}})],2)])]],2)},staticRenderFns:[]};i.a=e}});