/
home
/
maktab
/
admin
/
js
/
File Upload :
llllll
Current File: /home/maktab/admin/js/chunk-a163c3f2.902e196a.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a163c3f2","chunk-699a1914"],{1092:function(e,t,r){"use strict";r.r(t);r("7f7f");var a=function(){var e=this,t=e._self._c;return t("a-spin",{attrs:{spinning:e.loading},on:{submit:e.handleSubmit}},[t("vx-card",{attrs:{title:"افزودن مکتب"}},[t("a-form",{attrs:{form:e.form}},[t("div",{staticClass:"grid grid-cols-1 md:grid-cols-3 gap-2"},[t("a-form-item",{attrs:{label:"عنوان"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:e.inputFa("title"),expression:"inputFa('title')"}]})],1),t("a-form-item",{attrs:{label:"تعداد دانش آموز"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:e.input("count_student"),expression:"input('count_student')"}],attrs:{type:"number"}})],1),t("a-form-item",{attrs:{label:"سال تاسیس"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:e.input("year_establish"),expression:"input('year_establish')"}],staticClass:"numhov",attrs:{type:"number"}})],1),t("a-form-item",{attrs:{label:"کلونی"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:e.input("cloony_id"),expression:"input('cloony_id')"}],staticStyle:{width:"100%",direction:"rtl !important"},attrs:{"show-search":""}},e._l(e.cloony,(function(r,a){return t("a-select-option",{key:r.id},[e._v("\n "+e._s(r.title)+"\n ")])})),1)],1),t("a-form-item",{attrs:{label:"روز فعالیت"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:e.input("day_active"),expression:"input('day_active')"}],staticStyle:{width:"100%",direction:"rtl !important"},attrs:{"show-search":""}},e._l(e.week_days,(function(r,a){return t("a-select-option",{key:r.name},[e._v("\n "+e._s(r.name)+"\n ")])})),1)],1),t("a-form-item",{attrs:{label:"وضعیت فعال بودن"}},[t("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:e.inputSwitch("active"),expression:"inputSwitch('active')"}]},[t("a-icon",{attrs:{slot:"checkedChildren",type:"check"},slot:"checkedChildren"}),t("a-icon",{attrs:{slot:"unCheckedChildren",type:"close"},slot:"unCheckedChildren"})],1)],1),t("a-form-item",{staticClass:"md:col-span-3",attrs:{label:"آدرس"}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:e.input("address"),expression:"input('address')"}]})],1)],1),t("a-button",{staticStyle:{"margin-top":"3em"},attrs:{type:"primary","html-type":"submit"}},[e._v("\n "+e._s(e.id?"ویرایش مکتب":"ثبت مکتب")+"\n ")])],1)],1)],1)},n=[],i=(r("96cf"),r("1da1")),s=r("bb36"),o=r("8855"),c=r("a632"),u=r.n(c),l={name:"Add",data:function(){return{loading:!1,form:this.$form.createForm(this,{name:"coordinated"}),masters:void 0,cloony:void 0,master_id:void 0,year_establish:void 0,year_establish_hasVal:!0,inputSwitch:o["c"],inputFa:o["b"],input:o["a"],week_days:[{name:"شنبه"},{name:"یک شنبه"},{name:"دو شنبه"},{name:"سه شنبه"},{name:"چهار شنبه"},{name:"پنج شنبه"},{name:"جمعه"}]}},components:{datepicker:u.a},computed:{id:function(){return this.$route.params.id}},methods:{handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r,a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=38;break}if(a.master_id=t.master_id,t.year_establish&&(a.year_establish=t.year_establish),!t.id){e.next=22;break}return e.prev=4,t.loading=!0,e.next=8,s["b"].put("/admin/maktab/".concat(t.id),a);case 8:return t.$message.success("اطلاعات با موفقیت به روز رسانی شد"),e.next=11,t.$router.push({name:"maktab-list"});case 11:e.next=17;break;case 13:e.prev=13,e.t0=e["catch"](4),console.log(e.t0),t.$message.error("خطا در ثبت اطلاعات");case 17:return e.prev=17,t.loading=!1,e.finish(17);case 20:e.next=38;break;case 22:return e.prev=22,t.loading=!0,e.next=26,s["b"].post("/admin/maktab",a);case 26:return t.$message.success("اطلاعات با موفقیت ثبت شد"),e.next=29,t.$router.push({name:"maktab-list"});case 29:e.next=35;break;case 31:e.prev=31,e.t1=e["catch"](22),console.log(e.t1),t.$message.error("خطا در ثبت اطلاعات");case 35:return e.prev=35,t.loading=!1,e.finish(35);case 38:case"end":return e.stop()}}),e,null,[[4,13,17,20],[22,31,35,38]])})));return function(t,r){return e.apply(this,arguments)}}())},getMasters:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s["b"].get("/admin/list/master");case 3:t=e.sent,r=t.data,this.masters=r,e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:return e.prev=11,e.finish(11);case 13:case"end":return e.stop()}}),e,this,[[0,8,11,13]])})));function t(){return e.apply(this,arguments)}return t}(),getCloony:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s["b"].get("/admin/list/cloony");case 3:t=e.sent,r=t.data,this.cloony=r,e.next=12;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0),this.$message.error("خطا در دریافت کلونی");case 12:return e.prev=12,e.finish(12);case 14:case"end":return e.stop()}}),e,this,[[0,8,12,14]])})));function t(){return e.apply(this,arguments)}return t}(),fetchEdit:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["b"].get("/admin/maktab/".concat(t));case 2:r=e.sent,a=r.data,this.form.setFieldsValue(a);case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},created:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,this.getCloony();case 3:if(!this.id){e.next=6;break}return e.next=6,this.fetchEdit(this.id);case 6:this.loading=!1;case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},d=l,m=(r("ee83"),r("2877")),p=Object(m["a"])(d,a,n,!1,null,"4357d898",null);t["default"]=p.exports},"7e57":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("editMaktab")},n=[],i=r("1092"),s={name:"edit",components:{editMaktab:i["default"]}},o=s,c=r("2877"),u=Object(c["a"])(o,a,n,!1,null,"1c72a14c",null);t["default"]=u.exports},8855:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o}));var a=r("2b0e");function n(e,t){return[e,{rules:[{required:void 0===t||t,message:"لطفا مقدار را وارد کنید"},{pattern:/^([\u0600-\u06FF\uFB8A\u067E\u0686\u06AF\u200C ])+$/,message:" مقدار وارد شده باید فارسی باشد "}]}]}function i(e,t){return[e,{rules:[{required:void 0===t||t,message:"لطفا مقدار را وارد کنید"}]}]}function s(e,t){var r;return r=t||!1,[e,{initialValue:!1,valuePropName:"checked",rules:[{required:r}]}]}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nav.header-navbar.navbar.navbar-shadow",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,a=document.querySelector(t),n=63+r;a&&(n=a.getBoundingClientRect().height+r);var i=document.getElementById(e);i&&window.scrollTo({top:i.getBoundingClientRect().top-n,left:0,behavior:"smooth"})}a["default"].prototype.$myrules="salam"},9417:function(e,t,r){},ee83:function(e,t,r){"use strict";r("9417")}}]); //# sourceMappingURL=chunk-a163c3f2.902e196a.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure