1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14275101"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,r,n){return e/=n/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var n=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 o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,r){var i=o(),u=e-i,c=20,s=0;t="undefined"===typeof t?500:t;var l=function e(){s+=c;var o=Math.easeInOutQuad(s,i,u,t);a(o),s<t?n(e):r&&"function"===typeof r&&r()};l()}},"66f4":function(e,t,r){"use strict";var n=r("766a"),a=r.n(n);a.a},"766a":function(e,t,r){},"78ff":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[e._m(0),e._v(" "),r("div",{staticClass:"m-core"},[r("div",{directives:[{name:"permission",rawName:"v-permission",value:"organization/add",expression:"'organization/add'"}],staticClass:"newBand",on:{click:function(t){return e.onBranchOperation("create")}}},[e._v("添加")]),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",prop:"id",label:"分部编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"name",label:"分部名称"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"areaName",label:"城市"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"address",label:"分部地址"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"成立时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimer")(t.row.registerDate))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"organization/update",expression:"'organization/update'"}],attrs:{type:"text"},on:{click:function(r){return e.onBranchOperation("update",t.row)}}},[e._v("修改")])]}}])})],1),e._v(" "),r("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(" "),r("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.branchStatus,width:"500px"},on:{"update:visible":function(t){e.branchStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[r("el-form-item",{attrs:{label:"分部名称",prop:"name","label-width":e.formLabelWidth}},[r("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(" "),r("el-form-item",{attrs:{label:"城市",required:"","label-width":e.formLabelWidth}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{prop:"province"}},[r("el-select",{attrs:{filterable:"",clearable:""},on:{change:e.onChangeProvince},model:{value:e.form.province,callback:function(t){e.$set(e.form,"province","string"===typeof t?t.trim():t)},expression:"form.province"}},e._l(e.provinceList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{prop:"city"}},[r("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.form.city,callback:function(t){e.$set(e.form,"city","string"===typeof t?t.trim():t)},expression:"form.city"}},e._l(e.cityList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"分部地址",prop:"address","label-width":e.formLabelWidth}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address","string"===typeof t?t.trim():t)},expression:"form.address"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"成立时间",prop:"registerDate","label-width":e.formLabelWidth}},[r("el-date-picker",{attrs:{type:"date","value-format":"yyyy-MM-dd","picker-options":{firstDayOfWeek:1},placeholder:"选择日期"},model:{value:e.form.registerDate,callback:function(t){e.$set(e.form,"registerDate","string"===typeof t?t.trim():t)},expression:"form.registerDate"}})],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.branchStatus=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onBranchSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("分部设置\n ")])}],o=(r("7f7f"),r("ac6a"),r("333d")),i=r("d349"),u=(r("4360"),{name:"branchSetting",components:{pagination:o["a"]},data:function(){return{tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},organId:null,formActionTitle:"create",formTitle:{create:"添加分部",update:"修改分部"},formLabelWidth:"100px",branchStatus:!1,provinceList:[],cityList:[],form:{name:null,province:null,city:null,address:null,registerDate:null},rules:{name:[{required:!0,message:"请输入分部名称",trigger:"blur"}],province:[{required:!0,message:"请选择省",trigger:"change"}],city:[{required:!0,message:"请选择市",trigger:"change"}],address:[{required:!0,message:"请输入分部地址",trigger:"blur"}],registerDate:[{required:!0,message:"请选择成立时间",trigger:"change"}]}}},mounted:function(){this.getList(),this.getAreaList()},methods:{onBranchSubmit:function(e){var t=this;this.$refs[e].validate((function(e){e&&(t.form.areaId=t.form.city,"create"==t.formActionTitle?(t.form.id&&delete t.form.id,Object(i["b"])(t.form).then((function(e){t.messageTips("添加",e)}))):"update"==t.formActionTitle&&Object(i["d"])(t.form).then((function(e){t.messageTips("修改",e)})))}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.branchStatus=!1,this.getList()):this.$message.error(t.msg)},getList:function(){var e=this;Object(i["c"])({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.$refs[e].resetFields()},getAreaList:function(e,t){var r=this;e=e||0,Object(i["a"])({parentId:e}).then((function(n){if(200==n.code&&n.data){var a=[];n.data.forEach((function(e){a.push({label:e.name,value:e.id})})),e?r.cityList=a:r.provinceList=a,t&&"function"==typeof t&&t()}}))},onChangeProvince:function(e){this.form.city=null,this.getAreaList(e)},onBranchOperation:function(e,t){var r=this;this.formActionTitle=e,this.branchStatus=!0,"update"==e&&Object(i["n"])({id:t.areaId}).then((function(e){200==e.code&&e.data&&r.getAreaList(e.data.id,(function(){r.form={id:t.id,name:t.name,province:e.data.id,city:t.areaId,address:t.address,registerDate:t.registerDate}}))}))}}}),c=u,s=(r("66f4"),r("2877")),l=Object(s["a"])(c,n,a,!1,null,"05c0c116",null);t["default"]=l.exports},d349:function(e,t,r){"use strict";r.d(t,"c",(function(){return u})),r.d(t,"b",(function(){return c})),r.d(t,"d",(function(){return s})),r.d(t,"a",(function(){return l})),r.d(t,"n",(function(){return d})),r.d(t,"r",(function(){return f})),r.d(t,"s",(function(){return m})),r.d(t,"f",(function(){return p})),r.d(t,"k",(function(){return g})),r.d(t,"e",(function(){return b})),r.d(t,"l",(function(){return h})),r.d(t,"q",(function(){return v})),r.d(t,"o",(function(){return y})),r.d(t,"p",(function(){return O})),r.d(t,"h",(function(){return _})),r.d(t,"i",(function(){return w})),r.d(t,"j",(function(){return T})),r.d(t,"g",(function(){return j})),r.d(t,"m",(function(){return k}));var n=r("b775"),a=r("4328"),o=r.n(a),i="/api-web";function u(e){return Object(n["a"])({url:i+"/organization/queryPage",method:"get",params:e})}function c(e){return Object(n["a"])({url:i+"/organization/add",method:"post",data:o.a.stringify(e)})}function s(e){return Object(n["a"])({url:i+"/organization/update",method:"post",data:o.a.stringify(e)})}function l(e){return Object(n["a"])({url:i+"/area/queryChild",method:"get",params:e})}function d(e){return Object(n["a"])({url:i+"/area/getParentArea/".concat(e.id),method:"get"})}function f(e){return Object(n["a"])({url:i+"/subject/queryPageTree",method:"get",params:e})}function m(e){return Object(n["a"])({url:i+"/subject/upset",method:"post",data:e})}function p(e){return Object(n["a"])({url:i+"/chargeType/queryPage",method:"get",params:e})}function g(e){return Object(n["a"])({url:i+"/chargeType/upSet",method:"post",data:e})}function b(e){return Object(n["a"])({url:i+"/chargeType/del/".concat(e),method:"post"})}function h(e){return Object(n["a"])({url:i+"/courseHomeworkTemplate/queryPage",method:"post",data:e})}function v(e){return Object(n["a"])({url:i+"/courseHomeworkTemplate/update",method:"post",data:o.a.stringify(e)})}function y(e){return Object(n["a"])({url:i+"/courseHomeworkTemplate/add",method:"post",data:o.a.stringify(e)})}function O(e){return Object(n["a"])({url:i+"/courseHomeworkTemplate/del/".concat(e),method:"post"})}function _(e){return Object(n["a"])({url:i+"/chargeTypeOrganizationFee/add",method:"post",data:o.a.stringify(e)})}function w(e){return Object(n["a"])({url:i+"/chargeTypeOrganizationFee/delete",method:"post",data:o.a.stringify(e)})}function T(e){return Object(n["a"])({url:i+"/chargeTypeOrganizationFee/update",method:"post",data:o.a.stringify(e)})}function j(e){return Object(n["a"])({url:i+"/chargeTypeOrganizationFee/queryPage",method:"get",params:e})}function k(e){return Object(n["a"])({url:i+"/employee/findEducationTeacher",method:"get",params:e})}}}]);
|