webpackJsonp([126],{"5bd/":function(e,t,n){"use strict";t.a={apps:function(){var e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(t){var n=t.group,r=void 0===n?[]:n;"sceneServiceType"===t.typeCode&&r.forEach(function(t){var n=t.service,r=void 0===n?[]:n;e=e.concat(r)})}),e},baseApps:function(){var e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(t){var n=t.group,r=void 0===n?[]:n;"baseServiceType"===t.typeCode&&r.forEach(function(t){var n=t.service,r=void 0===n?[]:n;e=e.concat(r)})}),e},checkedBaseApps:function(e){var t=[];return e.forEach(function(e){var n=e.group,r=void 0===n?[]:n;"baseServiceType"===e.typeCode&&r.forEach(function(e){t=t.concat(e.checkedCodes)})}),t},checkedApps:function(e){var t=[];return e.forEach(function(e){var n=e.group,r=void 0===n?[]:n;"sceneServiceType"===e.typeCode&&r.forEach(function(e){t=t.concat(e.checkedCodes)})}),t}}},CGyt:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"",""])},kOmy:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"\n[data-v-41d19cf6] .el-checkbox + .el-checkbox {\n margin-left: 0px;\n margin-right: 30px;\n}\n[data-v-41d19cf6] .el-checkbox__label {\n white-space: normal;\n vertical-align: middle;\n}\n[data-v-41d19cf6] .el-checkbox {\n margin-right: 30px;\n width: 100px;\n}\n",""])},o4Nh:function(e,t,n){var r=n("kOmy");"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n("rjj0")("61fddb92",r,!0)},pM9o:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("Dd8w"),a=n.n(r),o=n("Xxa5"),i=n.n(o),c=n("exGp"),s=n.n(c),l=n("BO1k"),d=n.n(l),u=n("Gu7T"),p=n.n(u),f=n("lHA8"),h=n.n(f),m=n("c/Tr"),v=n.n(m),C=(n("yfAY"),n("rRm/")),b=n("zvdG"),k=n("Y4FN"),g=n.n(k),x=n("5bd/"),y={components:{choose:b.a},data:function(){return{curType:1,forbidden:!1,isShowEmail:!this.$route.query.id&&g.a.get("emailEnable"),editId:this.$route.query.id,createdLoading:!1,activeApp:"first",baseApps:[],allApps:[],checkBaseAll:!1,checkSceneAll:!1,isIndeterminateBase:!1,isIndeterminateScene:!1,form:{corpName:null,name:null,corpCode:null,loginName:null,telephone:null,email:null,serviceCodes:[]}}},computed:{ifEdit:function(){return this.editId},msg:function(){return this.editId?"更新成功":"添加成功"}},created:function(){this.init()},methods:{handleCheckBaseAllChange:function(e){var t=this;if(e)this.form.serviceCodes=v()(new h.a([].concat(p()(this.baseApps.map(function(e){return e.serviceCode})),p()(this.form.serviceCodes))));else{var n=function(e){var n=t.form.serviceCodes.findIndex(function(t){return t===e});-1!==n&&t.form.serviceCodes.splice(n,1)},r=!0,a=!1,o=void 0;try{for(var i,c=d()(this.baseApps.map(function(e){return e.serviceCode}));!(r=(i=c.next()).done);r=!0){n(i.value)}}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}}this.isIndeterminateBase=!1},handleCheckedBaseChange:function(e){var t=0,n=this.baseApps.map(function(e){return e.serviceCode}),r=function(e){n.find(function(t){return t===e})&&(t+=1)},a=!0,o=!1,i=void 0;try{for(var c,s=d()(e);!(a=(c=s.next()).done);a=!0){r(c.value)}}catch(e){o=!0,i=e}finally{try{!a&&s.return&&s.return()}finally{if(o)throw i}}this.checkBaseAll=t===this.baseApps.length,this.isIndeterminateBase=t>0&&t0&&t0}),t=this.sceneList.some(function(e){return e.service&&e.service.length>0});return this.loaded&&!e&&!t}},created:function(){this.fetchData()},components:{cGroup:c.a},methods:{fetchCurrent:function(){var e=[];return this.baseList.forEach(function(t){e=e.concat(t.checkedCodes)}),this.sceneList.forEach(function(t){e=e.concat(t.checkedCodes)}),e},fetchData:function(){var e=this;return i()(a.a.mark(function t(){var n,r,o;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.apps(e.id);case 2:(n=t.sent).length>1&&(r=n[0].group,o=n[1].group,e.id||(o.forEach(function(e){e.checkedCodes=[]}),r.forEach(function(e){e.checkedCodes=[]})),e.baseList=r,e.sceneList=o,e.loaded=!0,e.noApps&&e.$emit("noApp"));case 4:case"end":return t.stop()}},t,e)}))()}}},d={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-tabs",{model:{value:e.activeApp,callback:function(t){e.activeApp=t},expression:"activeApp"}},[n("el-tab-pane",{attrs:{label:"基础应用",name:"first"}},[e._l(e.baseList,function(t,r){return[n("cGroup",{key:r,attrs:{config:{title:t.groupName,key:"name",value:"serviceCode"},optionData:t.service,showCheckAll:"",showToggle:""},model:{value:t.checkedCodes,callback:function(n){e.$set(t,"checkedCodes",n)},expression:"item.checkedCodes"}})]})],2),e._v(" "),n("el-tab-pane",{attrs:{label:"场景应用",name:"second"}},[e._l(e.sceneList,function(t,r){return[n("cGroup",{key:r,attrs:{config:{title:t.groupName,key:"name",value:"serviceCode"},optionData:t.service,showCheckAll:"",showToggle:""},model:{value:t.checkedCodes,callback:function(n){e.$set(t,"checkedCodes",n)},expression:"item.checkedCodes"}})]})],2)],1)],1)},staticRenderFns:[]};var u=n("VU/8")(l,d,!1,function(e){n("vuLS")},"data-v-442a278c",null);t.a=u.exports}});