1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c1d7df6"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,n,o){return e/=o/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,n){var i=s(),r=e-i,l=20,u=0;t="undefined"===typeof t?500:t;var c=function e(){u+=l;var s=Math.easeInOutQuad(u,i,r,t);a(s),u<t?o(e):n&&"function"===typeof n&&n()};c()}},"7ca9":function(e,t,n){"use strict";n("f0ea")},f0ea:function(e,t,n){},f946:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"m-container"},[n("div",{staticClass:"m-core"},[n("div",{directives:[{name:"permission",rawName:"v-permission",value:"chargeType/upSet",expression:"'chargeType/upSet'"}],staticClass:"newBand",on:{click:function(t){return e.openTypes("create")}}},[e._v("添加")]),e._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"name",label:"收费类型"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"声部组合"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("joinArray")(t.row.subjectName,","))+"\n ")]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"chargeType/upSet",expression:"'chargeType/upSet'"}],attrs:{type:"text"},on:{click:function(n){return e.openTypes("update",t.row)}}},[e._v("修改")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"chargeType/del",expression:"'chargeType/del'"}],attrs:{type:"text"},on:{click:function(n){return e.onTypesDel(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),n("pagination",{attrs:{total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1)]),e._v(" "),n("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.typeStatus,width:"500px"},on:{"update:visible":function(t){e.typeStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[n("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[n("el-form-item",{attrs:{label:"收费类型",prop:"name","label-width":e.formLabelWidth}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1),e._v(" "),"MIX"!=e.form.classGroupType?n("el-form-item",{attrs:{label:"声部选择",prop:"subjectIds","label-width":e.formLabelWidth}},[n("el-select",{attrs:{filterable:"",clearable:"",multiple:""},model:{value:e.form.subjectIds,callback:function(t){e.$set(e.form,"subjectIds","string"===typeof t?t.trim():t)},expression:"form.subjectIds"}},e._l(e.subjectList,(function(t){return n("el-option-group",{key:t.label,attrs:{label:t.label}},e._l(t.options,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)})),1)],1):e._e()],1),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.typeStatus=!1}}},[e._v("取 消")]),e._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onTypesSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)},a=[],s=(n("7f7f"),n("ac6a"),n("333d")),i=n("d349"),r={name:"typesManager",components:{pagination:s["a"]},data:function(){return{tableList:[],subjectList:[],formActionTitle:"create",formTitle:{create:"添加收费类型",update:"修改收费类型"},typeStatus:!1,formLabelWidth:"100px",form:{name:null,subjectIds:[]},rules:{name:[{required:!0,message:"请输入类型名称",trigger:"blur"}],subjectIds:[{required:!0,message:"请选择声部组合",trigger:"change"}]},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.getList(),this.getSubjectTree()},methods:{onTypesSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;"create"==t.formActionTitle?(t.form.id&&delete t.form.id,Object(i["k"])(t.form).then((function(e){t.messageTips("添加",e)}))):"update"==t.formActionTitle&&Object(i["k"])(t.form).then((function(e){t.messageTips("修改",e)}))}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.typeStatus=!1,this.getList()):this.$message.error(t.msg)},onTypesDel:function(e){var t=this;Object(i["e"])(e.id).then((function(e){t.messageTips("删除",e)}))},getList:function(){var e=this;Object(i["f"])({rows:this.pageInfo.limit,page:this.pageInfo.page}).then((function(t){var n=t.data;200==t.code&&(n.rows.forEach((function(e){var t=[],n=[];e.subjects.forEach((function(e){t.push(e.name),n.push(e.id)})),e.subjectName=t,e.subjectIds=n})),e.tableList=n.rows,e.pageInfo.total=n.total)}))},openTypes:function(e,t){this.typeStatus=!0,this.formActionTitle=e,"update"==e&&(this.form={id:t.id,name:t.name,subjectIds:t.subjectIds})},onFormClose:function(e){this.form={name:null,subjectIds:[]},this.$refs[e].resetFields()},getSubjectTree:function(){var e=this;Object(i["r"])({delFlag:0,rows:9999}).then((function(t){var n=t.data;if(200==t.code){var o=[];n.rows.forEach((function(e,t){var n=[];e.subjects&&e.subjects.forEach((function(e){n.push({value:e.id,label:e.name})})),o[t]={label:e.name,options:n}})),e.subjectList=o}}))}}},l=r,u=(n("7ca9"),n("2877")),c=Object(u["a"])(l,o,a,!1,null,"e0868ac8",null);t["default"]=c.exports}}]);
|