chunk-509abf9b.e6c724a1.js 2.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-509abf9b","chunk-2d207803"],{3610:function(e,t,o){},"657d":function(e,t,o){"use strict";o("3610")},a196:function(e,t,o){"use strict";o.r(t),o.d(t,"chooseImgMixin",(function(){return i}));const i={data(){return{currentFiled:"",imgVisible:!1}},methods:{handleImg(e){this.currentFiled=e,this.imgVisible=!0},imgConfirm(e){this.form[this.currentFiled]=e.imageList[e.imageList.length-1].url,this.imgVisible=!1}}}},d23a:function(e,t,o){"use strict";o.r(t);var i=o("7a23");const a=Object(i["withScopeId"])("data-v-1911d4ec");Object(i["pushScopeId"])("data-v-1911d4ec");const l={class:"ele-body"};Object(i["popScopeId"])();const s=a((e,t,o,s,n,r)=>{const d=Object(i["resolveComponent"])("a-input"),m=Object(i["resolveComponent"])("a-form-item"),c=Object(i["resolveComponent"])("a-form"),b=Object(i["resolveComponent"])("imageSelector"),u=Object(i["resolveComponent"])("a-modal");return Object(i["openBlock"])(),Object(i["createBlock"])(u,{"wrap-class-name":"ele-modal-movable ele-modal-resizable ele-modal-resizable",visible:n.modalShow,closable:"",keyboard:"",title:n.form.id?"编辑":"新增",width:600,onCancel:t[3]||(t[3]=e=>n.modalShow=!1),onOk:r.submit,confirmLoading:n.loading,bodyStyle:n.modalBodyStyle},{default:a(()=>[Object(i["createVNode"])("div",l,[Object(i["createVNode"])(c,{ref:"form",model:n.form,rules:n.rules,style:{"max-width":"800px",margin:"0 auto"},"label-col":{md:{span:6},sm:{span:24}},"wrapper-col":{md:{span:18},sm:{span:24}}},{default:a(()=>[Object(i["createVNode"])(m,{label:"分类名称:",name:"title"},{default:a(()=>[Object(i["createVNode"])(d,{value:n.form.title,"onUpdate:value":t[1]||(t[1]=e=>n.form.title=e),placeholder:"请填写分类名称","allow-clear":""},null,8,["value"])]),_:1})]),_:1},8,["model","rules"])]),Object(i["createVNode"])(b,{onConfirm:e.imgConfirm,visible:e.imgVisible,"onUpdate:visible":t[2]||(t[2]=t=>e.imgVisible=t)},null,8,["onConfirm","visible"])]),_:1},8,["visible","title","onOk","confirmLoading","bodyStyle"])});var n=o("9e53"),r=o("a196"),d={mixins:[r["chooseImgMixin"]],components:{imageSelector:n["a"]},name:"addEdit",data(){return{modalShow:!1,loading:!1,agentOptions:[],modalBodyStyle:{maxHeight:"68vh",overflowY:"auto"},form:{},rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],image:[{required:!0,message:"请选择图片",trigger:"blur"}]}}},methods:{openDetail(e){if(e){const t=Object.assign({},e);t.bili=Number(t.bili),this.form=t}else this.form={title:"",pic:""};this.modalShow=!0},submit(){this.$refs.form.validate().then(()=>{this.loading=!0;let e=Object.assign({},this.form),t="";t=e.id?"/manager/shopCate/edit":"/manager/shopCate/add",this.$post(t,e).then(()=>{this.$message.success("操作成功!"),this.$emit("reload"),this.modalShow=!1})}).finally(()=>{this.loading=!1})}}},m=(o("657d"),o("6b0d")),c=o.n(m);const b=c()(d,[["render",s],["__scopeId","data-v-1911d4ec"]]);t["default"]=b}}]);