chunk-3c4bcfaf.5a86018a.js 6.6 KB

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