chunk-0660d835.d66a4f95.js 9.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0660d835"],{"0110":function(e,t,n){},"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 r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function a(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,n){var i=a(),u=e-i,s=20,l=0;t="undefined"===typeof t?500:t;var c=function e(){l+=s;var a=Math.easeInOutQuad(l,i,u,t);r(a),l<t?o(e):n&&"function"===typeof n&&n()};c()}},"135b":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:"courseHomeworkTemplate/add",expression:"'courseHomeworkTemplate/add'"}],staticClass:"newBand",on:{click:function(t){return e.openJob("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",prop:"classGroupTypeName",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(t.row.subjectName?t.row.subjectName:"无")+"\n ")]}}])}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"content",label:"模板内容"}}),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:"courseHomeworkTemplate/update",expression:"'courseHomeworkTemplate/update'"}],attrs:{type:"text"},on:{click:function(n){return e.openJob("update",t.row)}}},[e._v("修改")]),e._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"courseHomeworkTemplate/del",expression:"'courseHomeworkTemplate/del'"}],attrs:{type:"text"},on:{click:function(n){return e.onJobDel(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.jobStatus,width:"500px"},on:{"update:visible":function(t){e.jobStatus=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(" "),n("el-form-item",{attrs:{label:"对应课程类型",prop:"classGroupType","label-width":e.formLabelWidth}},[n("el-radio-group",{attrs:{disabled:"update"==e.formActionTitle},model:{value:e.form.classGroupType,callback:function(t){e.$set(e.form,"classGroupType","string"===typeof t?t.trim():t)},expression:"form.classGroupType"}},[n("el-radio",{attrs:{label:"NORMAL"}},[e._v("单技课")]),e._v(" "),n("el-radio",{attrs:{label:"MIX"}},[e._v("合奏课")])],1)],1),e._v(" "),"MIX"!=e.form.classGroupType?n("el-form-item",{attrs:{label:"声部选择",prop:"subjectId","label-width":e.formLabelWidth}},[n("el-select",{attrs:{clearable:"",filterable:""},model:{value:e.form.subjectId,callback:function(t){e.$set(e.form,"subjectId","string"===typeof t?t.trim():t)},expression:"form.subjectId"}},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(),e._v(" "),n("el-form-item",{attrs:{label:"作业内容",prop:"content","label-width":e.formLabelWidth}},[n("el-input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"请输入内容"},model:{value:e.form.content,callback:function(t){e.$set(e.form,"content","string"===typeof t?t.trim():t)},expression:"form.content"}})],1)],1),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.jobStatus=!1}}},[e._v("取 消")]),e._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onJobSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)])},r=[],a=(n("ac6a"),n("7f7f"),n("333d")),i=n("d349"),u={components:{pagination:a["a"]},name:"jobTemplateSetting",data:function(){return{tableList:[],subjectList:[],formActionTitle:"create",formTitle:{create:"添加作业模板",update:"修改作业模板"},jobStatus:!1,formLabelWidth:"120px",form:{name:null,classGroupType:null,subjectId:null,content:null},rules:{name:[{required:!0,message:"请输入作业模板名称",trigger:"blur"}],classGroupType:[{required:!0,message:"请选择对应课程类型",trigger:"change"}],subjectId:[{required:!0,message:"请选择声部",trigger:"change"}],content:[{required:!0,message:"请输入作业内容",trigger:"blur"}]},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.getList(),this.getSubjectTree()},methods:{onJobSubmit: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["o"])(t.form).then(function(e){t.messageTips("添加",e)})):"update"==t.formActionTitle&&("MIX"==t.form.classGroupType&&(t.form.subjectId=""),Object(i["q"])(t.form).then(function(e){t.messageTips("修改",e)}))})},openJob:function(e,t){this.jobStatus=!0,this.formActionTitle=e,"update"==e&&(this.form={id:t.id,name:t.name,classGroupType:t.classGroupType,subjectId:t.subjectId,content:t.content})},onJobDel:function(e){var t=this;Object(i["p"])(e.id).then(function(e){t.messageTips("删除",e)})},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.jobStatus=!1,this.getList()):this.$message.error(t.msg)},getList:function(){var e=this;Object(i["l"])({delFlag:0,rows:this.pageInfo.limit,page:this.pageInfo.page}).then(function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)})},onFormClose:function(e){this.form={name:null,classGroupType:null,subjectId:null,content:null},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.forEach(function(e){n.push({value:e.id,label:e.name})}),o[t]={label:e.name,options:n}}),e.subjectList=o}})}}},s=u,l=(n("2873"),n("2877")),c=Object(l["a"])(s,o,r,!1,null,"65befa4a",null);t["default"]=c.exports},2873:function(e,t,n){"use strict";var o=n("0110"),r=n.n(o);r.a},d349:function(e,t,n){"use strict";n.d(t,"c",function(){return u}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c}),n.d(t,"n",function(){return m}),n.d(t,"r",function(){return d}),n.d(t,"s",function(){return p}),n.d(t,"f",function(){return f}),n.d(t,"k",function(){return b}),n.d(t,"e",function(){return g}),n.d(t,"l",function(){return h}),n.d(t,"q",function(){return v}),n.d(t,"o",function(){return j}),n.d(t,"p",function(){return y}),n.d(t,"h",function(){return T}),n.d(t,"i",function(){return w}),n.d(t,"j",function(){return O}),n.d(t,"g",function(){return _}),n.d(t,"m",function(){return k});var o=n("b775"),r=n("4328"),a=n.n(r),i="/api-web";function u(e){return Object(o["a"])({url:i+"/organization/queryPage",method:"get",params:e})}function s(e){return Object(o["a"])({url:i+"/organization/add",method:"post",data:a.a.stringify(e)})}function l(e){return Object(o["a"])({url:i+"/organization/update",method:"post",data:a.a.stringify(e)})}function c(e){return Object(o["a"])({url:i+"/area/queryChild",method:"get",params:e})}function m(e){return Object(o["a"])({url:i+"/area/getParentArea/".concat(e.id),method:"get"})}function d(e){return Object(o["a"])({url:i+"/subject/queryPageTree",method:"get",params:e})}function p(e){return Object(o["a"])({url:i+"/subject/upset",method:"post",data:e})}function f(e){return Object(o["a"])({url:i+"/chargeType/queryPage",method:"get",params:e})}function b(e){return Object(o["a"])({url:i+"/chargeType/upSet",method:"post",data:e})}function g(e){return Object(o["a"])({url:i+"/chargeType/del/".concat(e),method:"post"})}function h(e){return Object(o["a"])({url:i+"/courseHomeworkTemplate/queryPage",method:"post",data:e})}function v(e){return Object(o["a"])({url:i+"/courseHomeworkTemplate/update",method:"post",data:a.a.stringify(e)})}function j(e){return Object(o["a"])({url:i+"/courseHomeworkTemplate/add",method:"post",data:a.a.stringify(e)})}function y(e){return Object(o["a"])({url:i+"/courseHomeworkTemplate/del/".concat(e),method:"post"})}function T(e){return Object(o["a"])({url:i+"/chargeTypeOrganizationFee/add",method:"post",data:a.a.stringify(e)})}function w(e){return Object(o["a"])({url:i+"/chargeTypeOrganizationFee/delete",method:"post",data:a.a.stringify(e)})}function O(e){return Object(o["a"])({url:i+"/chargeTypeOrganizationFee/update",method:"post",data:a.a.stringify(e)})}function _(e){return Object(o["a"])({url:i+"/chargeTypeOrganizationFee/queryPage",method:"get",params:e})}function k(e){return Object(o["a"])({url:i+"/employee/findEducationTeacher",method:"get",params:e})}}}]);