/
home
/
henzagold
/
admin_report
/
js
/
File Upload :
llllll
Current File: /home/henzagold/admin_report/js/chunk-0a070514.08171a46.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a070514"],{"1d7b":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"page-user-view"}},[e("div",{attrs:{id:"user-data"}},[e("a-form",{attrs:{form:t.form,"label-col":{span:5},"wrapper-col":{span:12}},on:{submit:t.handleSubmit}},[e("ASpin",{attrs:{type:"loading",spinning:t.loading}},[e("vx-card",{staticClass:"mb-base",attrs:{title:"ویرایش دسته بندی"}},[e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col flex-1",attrs:{id:"account-info-col-1"}},[e("a-form-item",{attrs:{label:"عنوان"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"لطفا مقدار را وارد کنید"}]}],expression:"['title', { rules: [{ required: true, message: 'لطفا مقدار را وارد کنید' }] }]"}]})],1),e("a-form-item",{attrs:{label:"توضیحات"}},[e("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["body_html",{}],expression:"['body_html', {}]"}],attrs:{placeholder:""}})],1)],1)]),e("div",{staticClass:"vx-col w-full flex mt-4",attrs:{id:"account-manage-buttons"}},[e("vs-button",{staticClass:"mr-4",attrs:{"icon-pack":"feather"},on:{click:t.handleSubmit}},[t.id?e("span",[t._v(" ویرایش دسته بندی")]):e("span",[t._v(" ثبت دسته بندی")])])],1)])],1)],1)],1)])},i=[],n=(a("96cf"),a("1da1")),s=a("bb36"),o=a("04c5"),c={components:{FeatherIcon:o["a"]},data:function(){return{thumb:void 0,thumb_id:void 0,data:{},uploadUrl:s["a"]+"config/image",formLayout:"horizontal",form:this.$form.createForm(this,{name:"coordinated"})}},computed:{loading:{get:function(){return this.$store.state.category.loading},set:function(t){this.$store.commit("category/LOADING",t)}},id:function(){return this.$router.history.current.params.id}},methods:{removeThumb:function(){this.thumb=void 0,this.thumb_id=void 0},getData:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.id){t.next=18;break}return t.prev=1,this.loading=!0,t.next=5,s["b"].get("category/".concat(this.id));case 5:e=t.sent,a=e.data,this.form.setFieldsValue(a),this.data=a,t.next=15;break;case 11:t.prev=11,t.t0=t["catch"](1),console.log("e ==> ",t.t0),this.$ntGetError();case 15:return t.prev=15,this.loading=!1,t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[1,11,15,18]])})));function e(){return t.apply(this,arguments)}return e}(),handleSubmit:function(t){var e=this;t.preventDefault(),this.form.validateFields(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a,r){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=20;break}return i=r,i.id=e.id,i.image_id=e.thumb_id,i.usage=1,t.prev=5,e.$vs.loading(),t.next=9,e.$store.dispatch("category/save",i);case 9:e.$router.push({name:"category"}),e.$ntSet(),t.next=17;break;case 13:t.prev=13,t.t0=t["catch"](5),console.log("e ==> ",t.t0),e.$ntSetError();case 17:return t.prev=17,e.$vs.loading.close(),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[5,13,17,20]])})));return function(e,a){return t.apply(this,arguments)}}())},handleChangeThumb:function(t){t.fileList[0].response&&(this.thumb=t.fileList[0].response,this.thumb_id=t.fileList[0].response.id)}},created:function(){this.getData()}},u=c,d=(a("6d7a"),a("2877")),l=Object(d["a"])(u,r,i,!1,null,null,null);e["default"]=l.exports},"34bb":function(t,e,a){},"6d7a":function(t,e,a){"use strict";a("34bb")}}]); //# sourceMappingURL=chunk-0a070514.08171a46.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure