|
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-440c"],{"1coe":function(e,t,i){"use strict";var n=i("2K0R");i.n(n).a},"2K0R":function(e,t,i){},A9HQ:function(e,t,i){},M1nL:function(e,t,i){"use strict";i.r(t);var n=i("KTTK"),l=i("jVVe"),a={name:"RelateEmpoyee",components:{XhUserCell:i("8GhS").p},mixins:[],props:{visible:{type:Boolean,required:!0,default:!1},roleId:[Number,String]},data:function(){return{loading:!0,selectUsers:[]}},computed:{},watch:{visible:function(e){e&&(this.selectUsers=[])}},mounted:function(){},methods:{handleCancel:function(){this.$emit("update:visible",!1)},changeCheckout:function(e){this.selectUsers=e.value},handleConfirm:function(){var e=this;0==this.selectUsers.length?this.$message.error("请选择员工"):Object(l.c)({users:this.selectUsers.map(function(e){return e.id}),groups:[this.roleId]}).then(function(t){e.$message.success("操作成功"),e.$emit("save")}).catch(function(){})}}},o=(i("hrDL"),i("KHd+")),s=Object(o.a)(a,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{visible:e.visible,"append-to-body":!0,"close-on-click-modal":!1,title:"关联员工",width:"600px"},on:{close:e.handleCancel}},[i("div",{staticClass:"handle-box"},[i("flexbox",{staticClass:"handle-item",attrs:{align:"stretch"}},[i("div",{staticClass:"handle-item-name",staticStyle:{"margin-top":"8px"}},[e._v("选择员工:")]),e._v(" "),i("xh-user-cell",{staticClass:"handle-item-content",attrs:{radio:!1,value:e.selectUsers},on:{"value-change":e.changeCheckout}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{nativeOn:{click:function(t){return e.handleCancel(t)}}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},nativeOn:{click:function(t){return e.handleConfirm(t)}}},[e._v("保存")])],1)])},[],!1,null,"382714aa",null);s.options.__file="RelateEmpoyee.vue";var r=s.exports,c=i("ZoMv"),d={name:"FieldSetDialog",components:{},mixins:[],props:{label:[String,Number],roleId:[String,Number],visible:{type:Boolean,required:!0,default:!1}},data:function(){return{loading:!1,list:[],grant_id:""}},computed:{title:function(){return c.a.convertTypeToName(this.label)+"字段授权"}},watch:{visible:{handler:function(){this.visible&&this.getFieldList()},immediate:!0}},mounted:function(){},methods:{getFieldList:function(){var e=this;this.list=[],this.loading=!0,Object(l.i)({label:this.label,role_id:this.roleId,module:"crm",column:c.a.typeToKeyData[this.label]}).then(function(t){e.loading=!1;var i=t.data.content||[];e.grant_id=t.data.grant_id,i.forEach(function(e){e.canCheck=1==e.read,e.canEdit=1==e.write}),e.list=t.data.content||[]}).catch(function(){e.loading=!1})},handleCancel:function(){this.$emit("update:visible",!1)},getCanOpreateRead:function(e){return 1==e||2==e},getCanOpreateEdit:function(e){return 1==e||3==e},handleConfirm:function(){var e=this;this.loading=!0,this.list.forEach(function(e){e.canCheck?e.read=1:e.read=0,e.canEdit?e.write=1:e.write=0}),this.list.forEach(function(e){e.hasOwnProperty("acuthLevel")&&delete e.acuthLevel,e.hasOwnProperty("canCheck")&&delete e.canCheck,e.hasOwnProperty("canEdit")&&delete e.canEdit}),Object(l.j)({grant_id:this.grant_id,content:this.list}).then(function(t){e.loading=!1,e.$message.success("操作成功"),e.handleCancel()}).catch(function(){e.loading=!1})},editCheckboxChange:function(e){e.canEdit&&this.$set(e,"canCheck",!0)},checkCheckboxChange:function(e){!e.canCheck&&e.canEdit&&this.$set(e,"canEdit",!1)}}},u=(i("wRx7"),Object(o.a)(d,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.visible,"append-to-body":!0,"close-on-click-modal":!1,title:e.title,width:"700px"},on:{close:e.handleCancel}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"field-set-dialog"},[i("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list,height:"50vh",border:""}},[i("el-table-column",{attrs:{label:"字<EFBFBD><EFBFBD>
|