1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-325005db"],{"09f4":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,n,a){return e/=a/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var a=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 o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,n){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);r(o),s<t?a(e):n&&"function"===typeof n&&n()};l()}},"333d":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},r=[],o=(n("c5f6"),n("09f4")),i={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(o["a"])(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(o["a"])(0,800)}}},u=i,c=(n("c0b9"),n("2877")),s=Object(c["a"])(u,a,r,!1,null,"31cb099a",null);t["a"]=s.exports},6433:function(e,t,n){},"6b7b":function(e,t,n){"use strict";var a=n("6433"),r=n.n(a);r.a},"78ff":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"m-container"},[e._m(0),e._v(" "),n("div",{staticClass:"m-core"},[n("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(" "),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:"areaName",label:"城市"}}),e._v(" "),n("el-table-column",{attrs:{align:"center",prop:"address",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("formatTimer")(t.row.registerDate))+"\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:"organization/update",expression:"'organization/update'"}],attrs:{type:"text"},on:{click:function(n){return e.onBranchOperation("update",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.branchStatus,width:"500px"},on:{"update:visible":function(t){e.branchStatus=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",t)},expression:"form.name"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"城市",required:"","label-width":e.formLabelWidth}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"province"}},[n("el-select",{on:{change:e.onChangeProvince},model:{value:e.form.province,callback:function(t){e.$set(e.form,"province",t)},expression:"form.province"}},e._l(e.provinceList,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"city"}},[n("el-select",{model:{value:e.form.city,callback:function(t){e.$set(e.form,"city",t)},expression:"form.city"}},e._l(e.cityList,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),e._v(" "),n("el-form-item",{attrs:{label:"分部地址",prop:"address","label-width":e.formLabelWidth}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"成立时间",prop:"registerDate","label-width":e.formLabelWidth}},[n("el-date-picker",{attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:e.form.registerDate,callback:function(t){e.$set(e.form,"registerDate",t)},expression:"form.registerDate"}})],1)],1),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.branchStatus=!1}}},[e._v("取 消")]),e._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onBranchSubmit("ruleForm")}}},[e._v("确 定")])],1)],1)],1)},r=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("h2",[n("div",{staticClass:"squrt"}),e._v("分部设置\n ")])}],o=(n("7f7f"),n("ac6a"),n("333d")),i=n("d349"),u=(n("4360"),{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 n=this;e=e||0,Object(i["a"])({parentId:e}).then((function(a){if(200==a.code&&a.data){var r=[];a.data.forEach((function(e){r.push({label:e.name,value:e.id})})),e?n.cityList=r:n.provinceList=r,t&&"function"==typeof t&&t()}}))},onChangeProvince:function(e){this.form.city=null,this.getAreaList(e)},onBranchOperation:function(e,t){var n=this;this.formActionTitle=e,this.branchStatus=!0,"update"==e&&Object(i["m"])({id:t.areaId}).then((function(e){200==e.code&&e.data&&n.getAreaList(e.data.id,(function(){n.form={id:t.id,name:t.name,province:e.data.id,city:t.areaId,address:t.address,registerDate:t.registerDate}}))}))}}}),c=u,s=(n("6b7b"),n("2877")),l=Object(s["a"])(c,a,r,!1,null,"025afb0e",null);t["default"]=l.exports},c0b9:function(e,t,n){"use strict";var a=n("de4e"),r=n.n(a);r.a},d349:function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"m",(function(){return d})),n.d(t,"r",(function(){return f})),n.d(t,"s",(function(){return p})),n.d(t,"f",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"e",(function(){return h})),n.d(t,"l",(function(){return b})),n.d(t,"p",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"o",(function(){return O})),n.d(t,"q",(function(){return _})),n.d(t,"h",(function(){return w})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return z})),n.d(t,"g",(function(){return T}));var a=n("b775"),r=n("4328"),o=n.n(r),i="/api-web";function u(e){return Object(a["a"])({url:i+"/organization/queryPage",method:"get",params:e})}function c(e){return Object(a["a"])({url:i+"/organization/add",method:"post",data:o.a.stringify(e)})}function s(e){return Object(a["a"])({url:i+"/organization/update",method:"post",data:o.a.stringify(e)})}function l(e){return Object(a["a"])({url:i+"/area/queryChild",method:"get",params:e})}function d(e){return Object(a["a"])({url:i+"/area/getParentArea/".concat(e.id),method:"get"})}function f(e){return Object(a["a"])({url:i+"/subject/queryPageTree",method:"get",params:e})}function p(e){return Object(a["a"])({url:i+"/subject/upset",method:"post",data:e})}function m(e){return Object(a["a"])({url:i+"/chargeType/queryPage",method:"get",params:e})}function g(e){return Object(a["a"])({url:i+"/chargeType/upSet",method:"post",data:e})}function h(e){return Object(a["a"])({url:i+"/chargeType/del/".concat(e),method:"post"})}function b(e){return Object(a["a"])({url:i+"/courseHomeworkTemplate/queryPage",method:"post",data:e})}function v(e){return Object(a["a"])({url:i+"/courseHomeworkTemplate/update",method:"post",data:o.a.stringify(e)})}function y(e){return Object(a["a"])({url:i+"/courseHomeworkTemplate/add",method:"post",data:o.a.stringify(e)})}function O(e){return Object(a["a"])({url:i+"/courseHomeworkTemplate/del/".concat(e),method:"post"})}function _(e){return Object(a["a"])({url:i+"/courseScheduleRewards/queryOrganIdList",method:"get",params:e})}function w(e){return Object(a["a"])({url:i+"/chargeTypeOrganizationFee/add",method:"post",data:o.a.stringify(e)})}function j(e){return Object(a["a"])({url:i+"/chargeTypeOrganizationFee/delete",method:"post",data:o.a.stringify(e)})}function z(e){return Object(a["a"])({url:i+"/chargeTypeOrganizationFee/update",method:"post",data:o.a.stringify(e)})}function T(e){return Object(a["a"])({url:i+"/chargeTypeOrganizationFee/queryPage",method:"get",params:e})}},de4e:function(e,t,n){}}]);
|