1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4a5c76d0"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),Math.easeInOutQuad=function(t,e,n,r){return t/=r/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function a(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,n){var i=o(),c=t-i,u=20,s=0;e="undefined"===typeof e?500:e;var l=function t(){s+=u;var o=Math.easeInOutQuad(s,i,c,e);a(o),s<e?r(t):n&&"function"===typeof n&&n()};l()}},"11e9":function(t,e,n){var r=n("52a7"),a=n("4630"),o=n("6821"),i=n("6a99"),c=n("69a8"),u=n("c69a"),s=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?s:function(t,e){if(t=o(t),e=i(e,!0),u)try{return s(t,e)}catch(n){}if(c(t,e))return a(!r.f.call(t,e),t[e])}},"2a45":function(t,e,n){},"333d":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("el-pagination",t._b({attrs:{"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},a=[],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(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&Object(o["a"])(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&Object(o["a"])(0,800)}}},c=i,u=(n("c0b9"),n("2877")),s=Object(u["a"])(c,r,a,!1,null,"31cb099a",null);e["a"]=s.exports},"5dbc":function(t,e,n){var r=n("d3f4"),a=n("8b97").set;t.exports=function(t,e,n){var o,i=e.constructor;return i!==n&&"function"==typeof i&&(o=i.prototype)!==n.prototype&&r(o)&&a&&a(t,o),t}},"60c4":function(t,e,n){"use strict";var r=n("2a45"),a=n.n(r);a.a},"78ff":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"m-container"},[n("h2",[t._v("分部设置")]),t._v(" "),n("div",{staticClass:"m-core"},[n("div",{staticClass:"newBand",on:{click:function(e){return t.onBranchOperation("create")}}},[t._v("添加")]),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"name",label:"分部名称"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"areaName",label:"城市"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"address",label:"分部地址"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"registerDate",label:"成立时间"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onBranchOperation("update",e.row)}}},[t._v("修改")])]}}])})],1),t._v(" "),n("pagination",{attrs:{total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1)]),t._v(" "),n("el-dialog",{attrs:{title:t.formTitle[t.formActionTitle],visible:t.branchStatus,width:"500px"},on:{"update:visible":function(e){t.branchStatus=e},close:function(e){return t.onFormClose("ruleForm")}}},[n("el-form",{ref:"ruleForm",attrs:{model:t.form,rules:t.rules}},[n("el-form-item",{attrs:{label:"分部名称",prop:"name","label-width":t.formLabelWidth}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"城市",required:"","label-width":t.formLabelWidth}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"province"}},[n("el-select",{on:{change:t.onChangeProvince},model:{value:t.form.province,callback:function(e){t.$set(t.form,"province",e)},expression:"form.province"}},t._l(t.provinceList,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{prop:"city"}},[n("el-select",{model:{value:t.form.city,callback:function(e){t.$set(t.form,"city",e)},expression:"form.city"}},t._l(t.cityList,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"分部地址",prop:"address","label-width":t.formLabelWidth}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"成立时间",prop:"registerDate","label-width":t.formLabelWidth}},[n("el-date-picker",{attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:t.form.registerDate,callback:function(e){t.$set(t.form,"registerDate",e)},expression:"form.registerDate"}})],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.branchStatus=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onBranchSubmit("ruleForm")}}},[t._v("确 定")])],1)],1)],1)},a=[],o=(n("7f7f"),n("ac6a"),n("333d")),i=n("d349"),c=n("4360"),u={components:{pagination:o["a"]},name:"adminManager",data:function(){return{tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},organId:c["a"].getters.organ,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(t){var e=this;this.$refs[t].validate((function(t){t&&(e.form.areaId=e.form.city,"create"==e.formActionTitle?(e.form.id&&delete e.form.id,Object(i["b"])(e.form).then((function(t){e.messageTips("添加",t)}))):"update"==e.formActionTitle&&Object(i["d"])(e.form).then((function(t){e.messageTips("修改",t)})))}))},messageTips:function(t,e){200==e.code?(this.$message({message:t+"成功",type:"success"}),this.branchStatus=!1,this.getList()):this.$message.error(e.msg)},getList:function(){var t=this;Object(i["c"])({rows:this.pageInfo.limit,page:this.pageInfo.page}).then((function(e){200==e.code&&e.data&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},onFormClose:function(t){this.$refs[t].resetFields()},getAreaList:function(t,e){var n=this;t=t||0,Object(i["a"])({parentId:t}).then((function(r){if(200==r.code&&r.data){var a=[];r.data.forEach((function(t){a.push({label:t.name,value:t.id})})),t?n.cityList=a:n.provinceList=a,e&&"function"==typeof e&&e()}}))},onChangeProvince:function(t){this.form.city=null,this.getAreaList(t)},onBranchOperation:function(t,e){var n=this;this.formActionTitle=t,this.branchStatus=!0,"update"==t&&Object(i["i"])({id:e.areaId}).then((function(t){200==t.code&&t.data&&n.getAreaList(t.data.id,(function(){n.form={id:e.id,name:e.name,province:t.data.id,city:e.areaId,address:e.address,registerDate:e.registerDate}}))}))}}},s=u,l=(n("60c4"),n("2877")),f=Object(l["a"])(s,r,a,!1,null,"209b5494",null);e["default"]=f.exports},"8b97":function(t,e,n){var r=n("d3f4"),a=n("cb7c"),o=function(t,e){if(a(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(a){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},9093:function(t,e,n){var r=n("ce10"),a=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,a)}},aa77:function(t,e,n){var r=n("5ca1"),a=n("be13"),o=n("79e5"),i=n("fdef"),c="["+i+"]",u="
",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t,e,n){var a={},c=o((function(){return!!i[t]()||u[t]()!=u})),s=a[t]=c?e(d):i[t];n&&(a[n]=s),r(r.P+r.F*c,"String",a)},d=f.trim=function(t,e){return t=String(a(t)),1&e&&(t=t.replace(s,"")),2&e&&(t=t.replace(l,"")),t};t.exports=f},c0b9:function(t,e,n){"use strict";var r=n("de4e"),a=n.n(r);a.a},c5f6:function(t,e,n){"use strict";var r=n("7726"),a=n("69a8"),o=n("2d95"),i=n("5dbc"),c=n("6a99"),u=n("79e5"),s=n("9093").f,l=n("11e9").f,f=n("86cc").f,d=n("aa77").trim,p="Number",m=r[p],g=m,h=m.prototype,b=o(n("2aeb")(h))==p,v="trim"in String.prototype,y=function(t){var e=c(t,!1);if("string"==typeof e&&e.length>2){e=v?e.trim():d(e,3);var n,r,a,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+e}for(var i,u=e.slice(2),s=0,l=u.length;s<l;s++)if(i=u.charCodeAt(s),i<48||i>a)return NaN;return parseInt(u,r)}}return+e};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof m&&(b?u((function(){h.valueOf.call(n)})):o(n)!=p)?i(new g(y(e)),n,m):y(e)};for(var _,O=n("9e1e")?s(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),I=0;O.length>I;I++)a(g,_=O[I])&&!a(m,_)&&f(m,_,l(g,_));m.prototype=h,h.constructor=m,n("2aba")(r,p,m)}},d349:function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return l})),n.d(e,"i",(function(){return f})),n.d(e,"m",(function(){return d})),n.d(e,"n",(function(){return p})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return g})),n.d(e,"e",(function(){return h})),n.d(e,"h",(function(){return b})),n.d(e,"l",(function(){return v})),n.d(e,"j",(function(){return y})),n.d(e,"k",(function(){return _}));var r=n("b775"),a=n("4328"),o=n.n(a),i="/api-web";function c(t){return Object(r["a"])({url:i+"/organization/queryPage",method:"get",params:t})}function u(t){return Object(r["a"])({url:i+"/organization/add",method:"post",data:o.a.stringify(t)})}function s(t){return Object(r["a"])({url:i+"/organization/update",method:"post",data:o.a.stringify(t)})}function l(t){return Object(r["a"])({url:i+"/area/queryChild",method:"get",params:t})}function f(t){return Object(r["a"])({url:i+"/area/getParentArea/".concat(t.id),method:"get"})}function d(t){return Object(r["a"])({url:i+"/subject/queryPageTree",method:"get",params:t})}function p(t){return Object(r["a"])({url:i+"/subject/upset",method:"post",data:t})}function m(t){return Object(r["a"])({url:i+"/chargeType/queryPage",method:"get",params:t})}function g(t){return Object(r["a"])({url:i+"/chargeType/upSet",method:"post",data:t})}function h(t){return Object(r["a"])({url:i+"/chargeType/del/".concat(t),method:"post"})}function b(t){return Object(r["a"])({url:i+"/courseHomeworkTemplate/queryPage",method:"post",data:t})}function v(t){return Object(r["a"])({url:i+"/courseHomeworkTemplate/update",method:"post",data:o.a.stringify(t)})}function y(t){return Object(r["a"])({url:i+"/courseHomeworkTemplate/add",method:"post",data:o.a.stringify(t)})}function _(t){return Object(r["a"])({url:i+"/courseHomeworkTemplate/del/".concat(t),method:"post"})}},de4e:function(t,e,n){},fdef:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"}}]);
|