1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3c4bcfaf"],{a6e9:function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return c}));var n=a("b775"),s=(a("4328"),"/api-web");function r(t){return Object(n["a"])({url:s+"/sysConfig/list",method:"get",params:t})}function c(t){return Object(n["a"])({url:s+"/sysConfig/batchUpdate",method:"post",data:t,headers:{"Content-Type":"application/json"}})}},a7ba:function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return c}));var n=a("829b"),s=function(t){return Object(n["a"])({url:"/api-web/sysTenantConfig/queryAll",params:t,method:"get"})},r=function(t){return Object(n["a"])({url:"/api-web/questionnaireTopic/queryPage",params:t,method:"get"})},c=function(t){return Object(n["a"])({url:"/api-web/sysTenantConfig/batchUpSet",data:t,method:"post",requestType:"json"})}},b6ab:function(t,e,a){},c815:function(t,e,a){"use strict";a("b6ab")},fbb0:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"m-core"},[a("el-form",{ref:"form",attrs:{inline:!0,model:t.form}},[a("el-alert",{staticClass:"alert",staticStyle:{margin:"20px 0"},attrs:{title:"网管课分部设置",closable:!1,type:"info"}}),t._v(" "),a("el-row",{staticClass:"row"},[t._v("\n 网管课可选分部\n "),a("select-all",{staticClass:"chioseOragn",attrs:{multiple:"","collapse-tags":"",clearable:"",filterable:"",placeholder:"请选择分部"},model:{value:t.organIdList,callback:function(e){t.organIdList=e},expression:"organIdList"}},t._l(t.selects.branchs,(function(t,e){return a("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1),t._v("\n 老师。\n ")],1),t._v(" "),a("el-row",{staticClass:"row"},[t._v("\n 网管课可预约声部\n "),a("select-all",{staticClass:"chioseOragn",attrs:{multiple:"","collapse-tags":"",clearable:"",filterable:"",placeholder:"请选择声部"},model:{value:t.subjectIdList,callback:function(e){t.subjectIdList=e},expression:"subjectIdList"}},t._l(t.selects.subjects,(function(t,e){return a("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1),t._v("。\n ")],1)],1)],1),t._v(" "),t.isPlatform?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sysConfig/batchUpdate_accompanyBaseConfig",expression:"'sysConfig/batchUpdate_accompanyBaseConfig'"}],staticClass:"saveBtn",attrs:{type:"primary"},on:{click:t.save}},[t._v("保存")]):a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"sysTenantConfig/batchUpSet_accompanyBaseConfig",expression:"'sysTenantConfig/batchUpSet_accompanyBaseConfig'"}],staticClass:"saveBtn",attrs:{type:"primary"},on:{click:t.save}},[t._v("保存")])],1)},s=[],r=(a("c5f6"),a("28a5"),a("75fc")),c=(a("ac6a"),a("c80c")),i=(a("96cf"),a("3b8d")),o=a("a7ba"),u=a("a6e9"),l={props:["isPlatform"],data:function(){return{form:{46:new Date(2016,9,10,18,40),47:new Date(2016,9,10,18,40)},questionList:[],rulesVisiable:!1,organIdList:[],subjectIdList:[]}},mounted:function(){var t=Object(i["a"])(Object(c["a"])().mark((function t(){return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$store.dispatch("setSubjects");case 2:return t.next=4,this.$store.dispatch("setBranchs");case 4:this.getRules();case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{getRules:function(){this.isPlatform?this.getPlatformRules():this.getInstitutionRules()},getPlatformRules:function(){var t=Object(i["a"])(Object(c["a"])().mark((function t(){var e,a=this;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(u["a"])({group:"DAYA_PRACTICE"});case 3:e=t.sent,e.data.forEach((function(t){"187"==t.id&&t.paranValue&&(a.organIdList=Object(r["a"])(t.paranValue.split(",").map((function(t){return Number(t)})))),"49"==t.id&&t.paranValue&&(a.subjectIdList=Object(r["a"])(t.paranValue.split(",").map((function(t){return Number(t)})))),a.$set(a.form,t.id,t.paranValue)})),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));function e(){return t.apply(this,arguments)}return e}(),getInstitutionRules:function(){var t=Object(i["a"])(Object(c["a"])().mark((function t(){var e,a=this;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(o["a"])({group:"DAYA_PRACTICE"});case 3:e=t.sent,e.data.forEach((function(t){"187"==t.id&&t.paranValue&&(a.organIdList=Object(r["a"])(t.paranValue.split(",").map((function(t){return Number(t)})))),"49"==t.id&&t.paranValue&&(a.subjectIdList=Object(r["a"])(t.paranValue.split(",").map((function(t){return Number(t)})))),a.$set(a.form,t.id,t.paranValue)})),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));function e(){return t.apply(this,arguments)}return e}(),savePlatform:function(){var t=this;this.$refs.form.validate(function(){var e=Object(i["a"])(Object(c["a"])().mark((function e(a){var n,s,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=14;break}for(s in n=[],t.form)r={id:s,paranValue:t.form[s]},"187"==s?(r.paranValue=t.organIdList.join(","),n.push(r)):"49"==s?(r.paranValue=t.subjectIdList.join(","),n.push(r)):n.push(r);return e.prev=3,e.next=6,Object(u["b"])(n);case 6:e.sent,t.$message.success("保存成功"),t.getRules(),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](3),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t){return e.apply(this,arguments)}}())},saveInstitution:function(){var t=this;this.$refs.form.validate(function(){var e=Object(i["a"])(Object(c["a"])().mark((function e(a){var n,s,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=14;break}for(s in n=[],t.form)r={id:s,paranValue:t.form[s]},"187"==s?(r.paranValue=t.organIdList.join(","),n.push(r)):"49"==s?(r.paranValue=t.subjectIdList.join(","),n.push(r)):n.push(r);return e.prev=3,e.next=6,Object(o["c"])(n);case 6:e.sent,t.$message.success("保存成功"),t.getRules(),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](3),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t){return e.apply(this,arguments)}}())},save:function(){this.isPlatform?this.savePlatform():this.saveInstitution()}}},p=l,f=(a("c815"),a("2877")),b=Object(f["a"])(p,n,s,!1,null,"377c7925",null);e["default"]=b.exports}}]);
|