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
31 KiB

6 months ago
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[792],{58906:function(Pn,ce,h){h.r(ce),h.d(ce,{default:function(){return Dn}});var je=h(15009),$=h.n(je),be=h(97857),B=h.n(be),xe=h(99289),ee=h.n(xe),Ie=h(5574),D=h.n(Ie),I=h(67294),ae=h(84485),G=h(12461),V=h(59652),W=h(26713),z=h(71577),ne=h(91756),ye=h(33859),R=h(88593),Qe=h(72004),le=h.n(Qe),Be=h(12444),oe=h.n(Be),Ze=h(9783),Y=h.n(Ze),Ln=le()(function E(){oe()(this,E),Y()(this,"id",void 0)});function De(E,n){return(0,R.request)("/category/breadcrumb",B()({method:"GET",params:B()({},E),data:{}},n||{}))}var Tn=le()(function E(){oe()(this,E),Y()(this,"name",void 0),Y()(this,"pid",void 0)});function Fe(E,n){return(0,R.request)("/category/category-list",B()({method:"GET",params:B()({},E),data:{}},n||{}))}var Jn=null;function Rn(E,n){return Request("/category/category-tree",_objectSpread({method:"GET",params:_objectSpread({},E),data:{}},n||{}))}var ge=h(31821),X=h(79915),M=h(69677),w=h(81579),Ne=h(13769),Pe=h.n(Ne),q=h(77916),re=h(79216),ie=h(24969),e=h(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 Je(E){var n=E.disabled,i=E.onChange,c=E.defaultFileList,g=c===void 0?[]:c,o=Pe()(E,Le),C=(0,I.useState)(!1),p=D()(C,2),S=p[0],A=p[1],Z=(0,I.useState)(""),Q=D()(Z,2),F=Q[0],m=Q[1];return console.log(g),console.log(g==null?void 0:g.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),m(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 r;i((r=l.map(function(v){var t,f;return(v==null||(t=v.response)===null||t===void 0||(f=t.data)===null||f===void 0?void 0:f.file)||v.url||""}))===null||r===void 0?void 0:r.join(","))}},showUploadList:{showPreviewIcon:!0,showRemoveIcon:!n},defaultFileList:g==null?void 0:g.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(o!=null&&o.value&&(o==null||(l=o.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}},o),{},{children:n?null:Te})),(0,e.jsx)(re.Z,{width:200,style:{display:"none"},src:F,preview:{visible:S,src:F,onVisibleChange:function(a){A(a)}}})]})}var Re=h(19632),L=h.n(Re),fe=h(20550),he=h(84908),we=function(n){var i=n.value,c=n.onChange;console.log(i);var g=(0,I.useState)([]),o=D()(g,2),C=o[0],p=o[1],S=(0,I.useState)(!1),A=D()(S,2),Z=A[0],Q=A[1],F=(0,I.useState)(""),m=D()(F,2),d=m[0],a=m[1],l=(0,I.useState)(-1),u=D()(l,2),s=u[0],r=u[1],v=(0,I.useState)(""),t=D()(v,2),f=t[0],j=t[1],b=(0,I.useRef)(null),x=(0,I.useRef)(null);(0,I.useEffect)(function(){p(i?i==null?void 0:i.split(","):[])},[i]),(0,I.useEffect)(function(){if(Z){var y;(y=b.current)===null||y===void 0||y.focus()}},[Z]),(0,I.useEffect)(function(){var y;(y=x.current)===null||y===void 0||y.focus()},[d]);var N=function(P){var J=C.filter(function(te){return te!==P});console.log(J),p(J),c(J!=null&&J.length?J==null?void 0:J.join(","):"")},T=function(){Q(!0)},H=function(P){a(P.target.value)},k=function(){if(d&&C.indexOf(d)===-1){var P,J;p([].concat(L()(C),[d])),c((P=[].concat(L()(C),[d]))!==null&&P!==void 0&&P.length?(J=[].concat(L()(C),[d]))===null||J===void 0?void 0:J.join(","):"")}Q(!1),a("")},U=function(P){j(P.target.value)},O=function(){var P=L()(C);P[s]=f,p(P),c(P!=null&&P.length?P==null?void 0:P.join(","):""),r(-1),a("")};return(0,