You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
32 KiB
2 lines
32 KiB
6 months ago
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[792],{27389:function(Ft,ce,m){m.r(ce),m.d(ce,{default:function(){return Zt}});var je=m(15009),$=m.n(je),be=m(97857),B=m.n(be),ye=m(99289),ee=m.n(ye),xe=m(5574),P=m.n(xe),x=m(67294),ae=m(84485),G=m(12461),V=m(59652),W=m(26713),z=m(71577),te=m(91756),Ie=m(33859),J=m(88593),Qe=m(72004),le=m.n(Qe),Be=m(12444),re=m.n(Be),Nt=null;function Lt(c,t,i){return Request("/category",_objectSpread({method:"PUT",params:_objectSpread({},c),data:_objectSpread({},t)},i||{}))}var Tt=null;function Rt(c,t,i){return Request("/category",_objectSpread({method:"POST",params:_objectSpread({},c),data:_objectSpread({},t)},i||{}))}var Jt=null;function kt(c,t,i){return Request("/category",_objectSpread({method:"DELETE",params:_objectSpread({},c),data:_objectSpread({},t)},i||{}))}var Ze=m(9783),Y=m.n(Ze),wt=le()(function c(){re()(this,c),Y()(this,"id",void 0)});function Pe(c,t){return(0,J.request)("/category/breadcrumb",B()({method:"GET",params:B()({},c),data:{}},t||{}))}var Ht=le()(function c(){re()(this,c),Y()(this,"name",void 0),Y()(this,"pid",void 0)});function De(c,t){return(0,J.request)("/category/category-list",B()({method:"GET",params:B()({},c),data:{}},t||{}))}var Gt=null;function Ut(c,t){return Request("/category/category-tree",_objectSpread({method:"GET",params:_objectSpread({},c),data:{}},t||{}))}var $t=null;function Mt(c,t){return Request("/category/list",_objectSpread({method:"GET",params:_objectSpread({},c),data:{}},t||{}))}var ge=m(29526),X=m(79915),M=m(69677),k=m(81579),Fe=m(13769),Ne=m.n(Fe),q=m(77916),oe=m(79216),ie=m(24969),e=m(85893),Le=["disabled","onChange","defaultFileList"],Te=(0,e.jsxs)("div",{children:[(0,e.jsx)(ie.Z,{}),(0,e.jsx)("div",{style:{marginTop:8},children:"\u4E0A\u4F20"})]});function Re(c){var t=c.disabled,i=c.onChange,g=c.defaultFileList,h=g===void 0?[]:g,r=Ne()(c,Le),p=(0,x.useState)(!1),S=P()(p,2),E=S[0],A=S[1],Z=(0,x.useState)(""),Q=P()(Z,2),D=Q[0],C=Q[1];return console.log(h),console.log(h==null?void 0:h.map(function(d,a){return B()(B()({},d),{},{uid:"_".concat(a,"_").concat((Math.random()*1e3).toFixed(2),"_").concat(new Date().getTime()),status:"done"})})),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(q.Z,B()(B()({maxCount:10,listType:"picture-card",accept:".jpg,.jpeg,.png,.gif",action:"/bkbupload/hw/upload",onPreview:function(a){console.log(a),C(a.url||a.thumbUrl),A(!0)},onChange:function(a){var l=a.fileList;console.log(l);for(var u=0;u<l.length;u++){var s=l[u];(s==null?void 0:s.status)==="error"&&G.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u4E0A\u4F20")}if(i){var o;i((o=l.map(function(v){var n,f;return(v==null||(n=v.response)===null||n===void 0||(f=n.data)===null||f===void 0?void 0:f.file)||v.url||""}))===null||o===void 0?void 0:o.join(","))}},showUploadList:{showPreviewIcon:!0,showRemoveIcon:!t},defaultFileList:h==null?void 0:h.map(function(d,a){return B()(B()({},d),{},{uid:"_".concat(a,"_").concat((Math.random()*1e3).toFixed(2),"_").concat(new Date().getTime()),status:"done"})}),beforeUpload:function(a){var l,u;if(r!=null&&r.value&&(r==null||(l=r.value)===null||l===void 0||(u=l.split(","))===null||u===void 0?void 0:u.length)>=10)return q.Z.LIST_IGNORE;var s=a.size/1024/1024;return console.log(s),s>5&&G.ZP.error("\u56FE\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC75M"),s<=5||q.Z.LIST_IGNORE}},r),{},{children:t?null:Te})),(0,e.jsx)(oe.Z,{width:200,style:{display:"none"},src:D,preview:{visible:E,src:D,onVisibleChange:function(a){A(a)}}})]})}var Je=m(19632),L=m.n(Je),he=m(20550),fe=m(84908),ke=function(t){var i=t.value,g=t.onChange;console.log(i);var h=(0,x.useState)([]),r=P()(h,2),p=r[0],S=r[1],E=(0,x.useState)(!1),A=P()(E,2),Z=A[0],Q=A[1],D=(0,x.useState)(""),C=P()(D,2),d=C[0],a=C[1],l=(0,x.useState)(-1),u=P()(l,2),s=u[0],o=u[1],v=(0,x.useState)(""),n=P()(v,2),f=n[0],j=n[1],b=(0,x.useRef)(null),y=(0,x.useRef)(null);(0,x.useEffect)(function(){S(i?i==null?void 0:i.split(","):[])},[i]),(0,x.useEffect)(function(){if(Z){var I;(I=b.current)===null||I===void 0||I.focus()}},[Z]),(0,x.useEffect)(function(){var I;(I=y.current
|