(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[55763],{50219:function(D){D.exports={tagmodalbox:"tagmodalbox___13hRu",colorUl:"colorUl___3gXI3",ColorSpopover:"ColorSpopover___2UxI_"}},55763:function(D,S,l){"use strict";l.r(S),l.d(S,{default:function(){return ae}});var te=l(34792),z=l(48086),le=l(20136),R=l(55241),se=l(57663),L=l(71577),re=l(47673),P=l(4107),G=l(11849),K=l(34895),A=l(28991),Z=l(67294),V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]},name:"tag",theme:"outlined"},X=V,J=l(27029),B=function(o,a){return Z.createElement(J.Z,(0,A.Z)((0,A.Z)({},o),{},{ref:a,icon:X}))};B.displayName="TagOutlined";var O=Z.forwardRef(B),Q=l(28612),W=l(19675),Y=l(54549),k=l(28216),q=l(51964),_=l.n(q),U=l(30672),ee=l(50219),N=l.n(ee),e=l(85893),w,E,oe=["grey-light","red-light","orange-light","yellow-light","green-light","cyan-light","blue-light","purple-light","pink-light","grey-normal","red-normal","orange-normal","yellow-normal","green-normal","cyan-normal","blue-normal","purple-normal","pink-normal","grey-deep","red-deep","orange-deep","yellow-deep","green-deep","cyan-deep","blue-deep","purple-deep","pink-deep"],b=["rgb(247, 247, 247)","rgb(252, 219, 217)","rgb(253, 227, 207)","rgb(255, 243, 207)","rgb(167, 225, 196)","rgb(207, 237, 240)","rgb(210, 234, 251)","rgb(228, 226, 250)","rgb(253, 216, 231)","rgb(191, 191, 191)","rgb(244, 110, 101)","rgb(247, 142, 61)","rgb(255, 206, 61)","rgb(61, 189, 125)","rgb(61, 184, 193)","rgb(16, 142, 233)","rgb(148, 138, 236)","rgb(247, 98, 158)","rgb(90, 90, 90)","rgb(189, 38, 54)","rgb(185, 54, 0)","rgb(193, 117, 0)","rgb(0, 123, 67)","rgb(0, 112, 127)","rgb(12, 96, 170)","rgb(83, 62, 180)","rgb(193, 28, 123)"],F=["rgb(227, 227, 227)","rgb(249, 183, 179)","rgb(251, 204, 168)","rgb(255, 233, 166)","rgb(137, 215, 176)","rgb(176, 225, 230)","rgb(173, 217, 248)","rgb(196, 191, 244)","rgb(251, 177, 207)","rgb(171, 171, 171)","rgb(241, 74, 63)","rgb(245, 119, 22)","rgb(255, 196, 20)","rgb(51, 158, 105)","rgb(51, 154, 162)","rgb(13, 119, 195)","rgb(116, 103, 230)","rgb(245, 59, 134)","rgb(70, 70, 70)","rgb(155, 31, 44)","rgb(144, 42, 0)","rgb(152, 92, 0)","rgb(0, 82, 45)","rgb(0, 76, 86)","rgb(9, 74, 132)","rgb(69, 52, 150)","rgb(157, 23, 100)"],ae=(w=(0,k.$j)(M=>{var o=M.common;return{common:o}}),w(E=class extends Z.PureComponent{constructor(){super(...arguments);this.state={modelZindex:100,colorshow:!1,colorIndex:0,tagvalue:"",activeId:0},this.getTagList=()=>{var o=this,a=o.props,s=a.dispatch,r=a.common;s({type:"common/getTagList",payload:{}})},this.getList=o=>{var a=this,s=a.props,r=s.dispatch,g=s.common,h=g.getParams;r({payload:(0,G.Z)({},o||h),type:"common/getListPath"})},this.addTag=()=>{var o,a=this,s=a.props,r=s.dispatch,g=s.common,h=s.open,T=s.setOpenModel,C=s.videoOption,j=g.sourceID,p=g.tagList,c=p===void 0?[]:p,n=this.state,v=n.modelZindex,f=n.fileInfo,x=f===void 0?{}:f,I=n.colorshow,m=n.colorIndex,u=n.tagvalue,y=(o=a.ztreeDom)===null||o===void 0?void 0:o.getNodeByParam("xxicon","tag",null);r({type:"common/addTag",payload:{labelName:u,style:b[m]},callback:i=>{if(i.success){var t;(t=a.ztreeDom)===null||t===void 0||t.reAsyncChildNodes(y,"refresh",!1),a.getTagList(),a.getList("")}}})},this.editTag=()=>{var o,a=this,s=a.props,r=s.dispatch,g=s.common,h=s.open,T=s.setOpenModel,C=s.videoOption,j=g.sourceID,p=g.tagList,c=p===void 0?[]:p,n=this.state,v=n.modelZindex,f=n.fileInfo,x=f===void 0?{}:f,I=n.colorshow,m=n.colorIndex,u=n.tagvalue,y=n.activeId,i=(o=a.ztreeDom)===null||o===void 0?void 0:o.getNodeByParam("xxicon","tag",null);r({type:"common/editTag",payload:{labelName:u,style:b[m],labelId:y},callback:t=>{if(t.success){var d;(d=a.ztreeDom)===null||d===void 0||d.reAsyncChildNodes(i,"refresh",!1),a.getTagList(),a.getList(""),a.setState({activeId:0,tagvalue:""})}}})},this.delTag=o=>{var a,s=this,r=s.props,g=r.dispatch,h=r.common,T=r.open,C=r.setOpenModel,j=r.videoOption,p=h.sourceID,c=h.tagList,n=c===void 0?[]:c,v=this.state,f=v.modelZindex,x=v.fileInfo,I=x===void 0?{}:x,m=v.colorshow,u=v.colorIndex,y=v.tagvalue,i=(a=s.ztreeDom)===null||a===void 0?void 0:a.getNodeByParam("xxicon","tag",null);g({type:"common/delTag",payload:{labelId:o},callback:t=>{if(t.success){var d;(d=s.ztreeDom)===null||d===void 0||d.reAsyncChildNodes(i,"refresh",!1),s.getTagList(),s.getList("")}}})}}componentDidMount(){var o,a=this;a.ztreeDom=(o=window.$.fn.zTree)===null||o===void 0?void 0:o.getZTreeObj($(".netdiskZtree div.ztree").attr("id"))}render(){var o=this,a=o.props,s=a.dispatch,r=a.common,g=a.open,h=a.setOpenModel,T=a.videoOption,C=r.sourceID,j=r.tagList,p=j===void 0?[]:j,c=this.state,n=c.modelZindex,v=c.fileInfo,f=v===void 0?{}:v,x=c.colorshow,I=c.colorIndex,m=c.tagvalue,u=c.activeId,y=t=>{o.setState({modelZindex:t})},i=(0,U.lw)((0,U.Kd)());return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(K.Z,{open:g,modelZindex:n,setOpenModel:h,setModelZindex:y,type:"tag",title:(0,e.jsxs)("span",{children:[" ",(0,e.jsx)(O,{})," ",i.formatMessage({id:"explorer.tag.edit"})]}),children:(0,e.jsxs)("div",{className:N().tagmodalbox,children:[(0,e.jsxs)(P.Z.Group,{compact:!0,children:[(0,e.jsx)(P.Z,{style:{width:"calc(100% - 70px)"},placeholder:i.formatMessage({id:"explorer.tag.inputHolder"}),maxLength:"16",value:m,onChange:t=>{o.setState({tagvalue:t.target.value})},defaultValue:""}),(0,e.jsx)(R.Z,{overlayClassName:N().ColorSpopover,placement:"bottomLeft",trigger:"click",arrow:!1,open:x,onOpenChange:t=>{o.setState({colorshow:t})},content:(0,e.jsx)("div",{className:N().colorUl,children:oe.map((t,d)=>(0,e.jsx)("div",{onClick:()=>{o.setState({colorIndex:d,colorshow:!1})},className:"colorli"+(I===d?" active":""),children:(0,e.jsx)("div",{className:"colori color"+t,style:{background:b[d],border:"1px solid ".concat(F[d])}})}))}),children:(0,e.jsx)(L.Z,{onClick:()=>{o.setState({colorshow:!x})},children:(0,e.jsxs)("div",{className:"colorSelectBox",children:[(0,e.jsx)("div",{className:"colorActive",style:{background:b[I],border:"1px solid ".concat(F[I])}}),(0,e.jsx)("div",{className:"iconbox",children:x?(0,e.jsx)(Q.Z,{}):(0,e.jsx)(W.Z,{})})]})})})]}),(0,e.jsx)("div",{style:{paddingLeft:12,marginTop:8},children:u?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(L.Z,{icon:(0,e.jsx)(O,{}),type:"primary",onClick:()=>{m&&o.editTag()},children:i.formatMessage({id:"common.saveEdit"})}),(0,e.jsx)(L.Z,{style:{marginLeft:12},onClick:()=>{o.setState({activeId:0})},children:i.formatMessage({id:"common.cancel"})})]}):(0,e.jsx)(L.Z,{icon:(0,e.jsx)(O,{}),type:"primary",onClick:()=>{var t=p.findIndex(d=>d.labelName==m&&m)>-1;t?z.ZP.warning(i.formatMessage({id:"explorer.tag.tagnamecf"})):m?o.addTag():z.ZP.warning(i.formatMessage({id:"explorer.tag.inputHolder"}))},children:i.formatMessage({id:"explorer.tag.add"})})}),(0,e.jsx)("div",{className:"tagListbox",children:(0,e.jsx)(_(),{children:(0,e.jsxs)("div",{className:"tagListUl",children:[" ",p.map((t,d)=>(0,e.jsxs)("div",{onClick:()=>{o.setState({activeId:t.labelId,tagvalue:t.labelName,colorIndex:b.indexOf(t.style)>-1?b.indexOf(t.style):0})},className:"tagListLi"+(u==t.labelId?" tagActive":""),children:[(0,e.jsx)("div",{className:"colori",style:{background:t.style}}),(0,e.jsx)("div",{className:"tagname",children:t.labelName}),(0,e.jsx)("div",{onClick:H=>{H.preventDefault(),H.stopPropagation(),o.delTag(t.labelId)},className:"action",children:(0,e.jsx)(Y.Z,{})})]}))]})})})]})})})}})||E)}}]);