2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[68056],{96278:function(D){D.exports={root:"root___7VXfh",colorWeak:"colorWeak___2fQ5G","ant-layout":"ant-layout___2lk2i",globalSpin:"globalSpin___3wjkL","ant-table":"ant-table___3MoMQ","ant-table-thead":"ant-table-thead___2F4eD","ant-table-tbody":"ant-table-tbody___1iFAX",formBox:"formBox___1MR6m",hrefModal:"hrefModal___GOUPi",shop:"shop___3KrmS"}},13334:function(D,T,l){"use strict";l.r(T),l.d(T,{default:function(){return q}});var $=l(77883),O=l(85986),ee=l(34792),F=l(48086),te=l(71194),S=l(50146),se=l(57663),W=l(71577),ae=l(47673),L=l(4107),le=l(63185),j=l(9676),ie=l(88983),M=l(47933),w=l(67294),H=l(49101),U=l(73218),V=l(8212),Z=l(67724),Y=l(8812),J=l(28216),Q=l(96278),b=l.n(Q),z=l(5283),ne=l.n(z),k=l(56173),de=l(41273),m=l(30672),e=l(85893),I,R,K=M.ZP.Group,G=j.Z.Group,X=L.Z.TextArea,q=(I=(0,J.$j)(B=>{var t=B.commondesign,d=B.globaldesign;return{commondesign:t,globaldesign:d}}),I(R=class extends w.PureComponent{constructor(){super(...arguments);this.state={visible:!1,list:[],marginLeft:0,checkedList:[],play:!0,playTime:4,changeTime:1.5,adapt:"sy",styleType:1,nav:!1,editModel:!1,editsrc:"",editHref:"",editdesc:"",edittarget:""},this.updataDomCallBack=t=>{var d=this.props.commondesign,r=d.Carousel,a=r.element,u=r.callback,o=r.callClose,E=(0,m.lw)((0,m.Kd)()),n=a.find(".box"),f="";n.css({"background-image":"url("+t.list[0].path+")"});var y="",p=t.list.length;if(t.nav){for(var _="",P=0,g=0;g<p;g++)g==0?_+='<li class="on"></li>':_+="<li ></li>";n.html('<div class="carouselNav"><ul style="width:'+p*45+'px;">'+_+"</ul></div>")}else n.html("");for(var C=0;C<p;C++){var A=t.list[C];y+='<img src="'+A.path+'"/><div style="background-image:url('+A.path+');"></div>'}a.find(".imgloadBox").length>0?a.find(".imgloadBox").html(y):a.prepend('<div style="display: none;" class="imgloadBox">'+y+"</div>"),n.attr("class","box "+t.adapt),a.attr("data-canousel",JSON.stringify(t))},this.show=t=>{t?(t=JSON.parse(t),this.setState({list:t.list,marginLeft:0,checkedList:t.checkedList,play:t.play,playTime:t.playTime,changeTime:t.changeTime,adapt:t.adapt,styleType:t.styleType,nav:!!t.nav})):this.setState({list:[],marginLeft:0,checkedList:[],play:!0,playTime:4,changeTime:1.5,adapt:"sy",styleType:1,nav:!1})},this.renderStyle=()=>{var t=this.state.styleType,d=r=>{r.target.classList[0]=="styleli"&&this.setState({styleType:r.target.dataset.type})};return(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"label",children:"\u98CE\u683C\uFF1A"}),(0,e.jsxs)("div",{className:"content",onClick:d,children:[(0,e.jsx)("div",{className:"styleli "+(t==1?"on":""),"data-type":1,style:{backgroundPosition:"-315px -650px"}}),""]})]})},this.renderEditModal=()=>{var t=this,d=this.props.dispatch,r=this.state,a=r.editModel,u=r.editsrc,o=r.editHref,E=r.editdesc,n=r.edittarget,f=r.list,y=(0,m.lw)((0,m.Kd)()),p=()=>{var i=f;i[this.index]={src:u,href:o||"",desc:E||"",target:n||""},this.setState({list:i,editModel:!1,editsrc:"",editHref:"",editdesc:"",edittarget:""})},_=()=>{this.setState({editModel:!1})},P=this.index==0,g=this.index==f.length-1,C=()=>{if(this.index>0){this.index--;var i=f[this.index];this.setState({editsrc:i.path,editHref:i.href||"",editdesc:i.desc||"",edittarget:i.target||""})}},A=()=>{if(this.index<f.length-1){this.index++;var i=f[this.index];this.setState({editsrc:i.path,editHref:i.href||"",editdesc:i.desc||"",edittarget:i.target||""})}},c=i=>{this.setState({editHref:i.target.value})},s=i=>{this.setState({editdesc:i.target.value})},h=()=>{d({type:"commondesign/setState",payload:{Href:{visible:!0,type:{course:!0,information:!0,link:!0,dialog:!0,page:!0,member:!0,shop:!0,forum:!0,question:!0},typex:!1,callback:i=>{var x=(0,k.wS)(i,t),N=x.url;t.setState({editHref:N||""})}}}})},v=i=>{var x=i.target.value;this.state.edittarget&&(x=""),this.setState({edittarget:x})};return(0,e.jsxs)(S.Z,{title:"\u7F16\u8F91\u56FE\u7247",visible:a,onOk:p,width:520,onCancel:_,maskClosable:!1,className:b().hrefModal,children:[(0,e.jsx)("div",{className:"editImgbox",children:(0,e.jsxs)("div",{className:"viewer-content",children:[(0,e.jsx)("div",{className:"leftbtn2 "+(P?"disabled":""),onClick:C}),(0,e.jsx)("img",{src:(0,k.Ho)(u)}),(0,e.jsx)("div",{className:"rightbtn2 "+(g?"disabled":""),onClick:A})]})}),(0,e.jsxs)("div",{className:"item-label",children:[(0,e.jsx)("div",{className:"labelName",children:"\u56FE\u7247\u94FE\u63A5\uFF1A"}),(0,e.jsxs)("div",{className:"itemContent",children:[(0,e.jsx)(L.Z,{style:{width:205,marginRight:10},value:o,onChange:c}),(0,e.jsx)(W.Z,{onClick:h,children:"\u8BBE\u7F6E\u94FE\u63A5"})]})]}),(0,e.jsxs)("div",{className:"item-label",children:[(0,e.jsx)("div",{className:"labelName",children:"\u56FE\u7247\u63CF\u8FF0\uFF1A"}),(0,e.jsx)("div",{className:"itemContent",children:(0,e.jsx)(X,{autosize:{minRows:3,maxRows:3},style:{width:303},value:E,onChange:s})})]}),(0,e.jsxs)("div",{className:"item-label",children:[(0,e.jsx)("div",{className:"labelName",children:"\u6253\u5F00\u65B9\u5F0F\uFF1A"}),(0,e.jsx)("div",{className:"itemContent",children:(0,e.jsx)(j.Z,{onChange:v,checked:n=="_blank",value:"_blank",children:"\u65B0\u7A97\u53E3"})})]})]})},this.renderSeletPictrue=()=>{var t=this,d=this.props.dispatch,r=this.state,a=r.list,u=r.marginLeft,o=(0,m.lw)((0,m.Kd)()),E=c=>{var s=this.refs.banliBox,h=s.currentStyle?s.currentStyle:window.getComputedStyle(s,null);if(parseInt(h.marginLeft)!=0){var v=parseInt(h.marginLeft)+733;v>0&&(v=0),this.setState({marginLeft:v}),s.style.marginLeft=v+"px"}},n=c=>{var s=this.refs.banliBox,h=s.currentStyle?s.currentStyle:window.getComputedStyle(s,null),v=733-s.offsetWidth;if(parseInt(s.style.marginLeft)!=v){var i=parseInt(h.marginLeft)-733;i<v&&(i=v),this.setState({marginLeft:i}),s.style.marginLeft=i+"px"}},f=a.length,y=u==0,p=u==733-a.length*148,_=()=>{var c=this.state.list;c.length>=15?F.ZP.info("\u6700\u591A\u4E0D\u8D85\u8FC715\u5F20\u56FE\u7247"):window.fileBoxApi.fileSelect({title:o.formatMessage({id:"explorer.selectImage"}),type:"file",single:!1,allowExt:"jpg,jpeg,png",callback:function(h){var v=h.data||{},i=v.selectIds.length?v.selectItems||[]:[],x=[...c,...i];t.setState({list:x.length<16?x:x.slice(0,15)})}})},P=c=>{var s=[...a];s.splice(c,1),this.setState({list:s})},g=(c,s)=>{var h=this.state,v=h.editModel,i=h.editsrc,x=h.editHref,N=h.editdesc,re=h.edittarget;this.index=s,this.setState({editModel:!0,editsrc:c.src,editHref:c.href||"",editdesc:c.desc||"",edittarget:c.target||""})},C=c=>{var s=a.splice(c,1)[0];a.splice(c-1,0,s),this.setState({list:[...a]})},A=c=>{var s=a.splice(c,1)[0];a.splice(c+1,0,s),this.setState({list:[...a]})};return(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"label",children:["\u6DFB\u52A0\uFF1A",a.length>0?(0,e.jsxs)("div",{className:"timsg",style:{right:"-832",bottom:"-14"},children:["\u56FE\u7247\u5DF2\u4E0A\u4F20 ",a.length," \u5F20\uFF0C( \u8F6E\u64AD\u65F6\u663E\u793A\u4E0D\u8D85\u8FC715\u5F20\u56FE\u7247 )\u3002"]}):""]}),(0,e.jsxs)("div",{className:"banContent",children:[a.length>5?(0,e.jsx)("div",{className:"leftBtn "+(y?"disabled":""),onClick:E}):"",(0,e.jsxs)("div",{className:"bannerBox",children:[(0,e.jsx)("div",{className:"add banli",onClick:_,style:a.length==0?{width:875}:{},children:(0,e.jsx)(H.Z,{})}),(0,e.jsx)("div",{className:"banul",children:(0,e.jsx)("div",{className:"banliBox",style:{width:a.length*148},ref:"banliBox",children:a.map((c,s)=>(0,e.jsxs)("div",{className:"banli",children:[(0,e.jsx)("img",{src:c.path}),(0,e.jsx)("div",{className:"close",onClick:h=>P(s),children:(0,e.jsx)(U.Z,{title:"\u5220\u9664"})}),(0,e.jsx)("div",{className:"edit",onClick:h=>g(c,s),children:(0,e.jsx)(V.Z,{title:"\u7F16\u8F91"})}),s!=0&&(0,e.jsx)(Z.Z,{onClick:h=>C(s),title:"\u5DE6\u79FB"}),s<f-1&&(0,e.jsx)(Y.Z,{onClick:h=>A(s),title:"\u53F3\u79FB"})]},s))})})]}),a.length>5?(0,e.jsx)("div",{className:"rightBtn "+(p?"disabled":""),onClick:n}):""]}),this.renderEditModal()]})},this.renderEffect=()=>{var t=this.state.checkedList,d=(0,m.lw)((0,m.Kd)()),r=[{label:"\u6DE1\u5165\u6DE1\u51FA",value:"fadeIn"},{label:"\u767E\u53F6\u7A97",value:"shades"},{label:"3D\u7279\u6548",value:"3DEffect"}],a=u=>{this.setState({checkedList:u})};return(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"label",children:"\u7279\u6548\uFF1A"}),(0,e.jsx)("div",{className:"content",children:(0,e.jsx)(G,{options:r,value:t,onChange:a})})]})},this.renderSetting=()=>{var t=this.props.differenceType,d=this.state,r=d.play,a=d.playTime,u=d.changeTime,o=d.adapt,E=d.nav,n=(0,m.lw)((0,m.Kd)()),f=g=>{this.setState({play:g.target.value})},y=g=>{this.setState({playTime:g})},p=g=>{this.setState({changeTime:g})},_=g=>{this.setState({adapt:g.target.value})},P=()=>{this.setState({nav:!this.state.nav})};return(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"label",children:[n.formatMessage({id:"menu.setting"}),"\uFF1A"]}),(0,e.jsxs)("div",{className:"content",children:[t==1&&(0,e.jsxs)(K,{onChange:f,value:r,style:{float:"left",width:210},children:[(0,e.jsx)(M.ZP,{value:!0,children:n.formatMessage({id:"mack.dsl.k"})}),(0,e.jsx)(M.ZP,{value:!1,children:n.formatMessage({id:"mack.dsl.l"})})]}),(0,e.jsxs)("div",{style:{float:"left",width:240,marginLeft:10},children:[n.formatMessage({id:"mack.dsl.m"}),"\uFF1A",(0,e.jsx)(j.Z,{onChange:P,checked:E})]}),(0,e.jsxs)("div",{style:{float:"left",marginRight:10},children:[n.formatMessage({id:"mack.dsl.n"}),"\uFF1A",(0,e.jsx)(O.Z,{min:2,max:10,step:1,value:a,onChange:y,style:{width:80,marginRight:10}}),n.formatMessage({id:"common.second"})]}),(0,e.jsxs)("div",{style:{float:"left"},children:[n.formatMessage({id:"mack.dsl.o"}),"\uFF1A",(0,e.jsx)(O.Z,{min:.3,max:5,step:.1,value:u,onChange:p,style:{width:80,marginRight:10}}),n.formatMessage({id:"common.second"})]})]}),(0,e.jsxs)("div",{className:"label",children:[n.formatMessage({id:"mack.dsl.p"}),"\uFF1A"]}),(0,e.jsx)("div",{className:"content",children:(0,e.jsxs)(K,{onChange:_,value:o,style:{float:"left",width:560},children:[(0,e.jsx)(M.ZP,{value:"tc",children:n.formatMessage({id:"mack.dse.g"})}),(0,e.jsx)(M.ZP,{value:"sy",children:n.formatMessage({id:"mack.dsl.q"})}),(0,e.jsx)(M.ZP,{value:"ls",children:n.formatMessage({id:"mack.dsl.r"})}),(0,e.jsx)(M.ZP,{value:"pp",children:n.formatMessage({id:"mack.dsl.s"})}),(0,e.jsx)(M.ZP,{value:"jz",children:n.formatMessage({id:"mack.dsl.t"})})]})})]})},this.cancelEvent=()=>{var t=this,d=this.props.dispatch;d({type:"commondesign/setState",payload:{Carousel:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var t=this.props.commondesign,d=t.Carousel,r=d.visible,a=d.element,u=d.callback,o=d.callClose;this.setState({visible:r});var E=a.attr("data-canousel");this.show(E)}render(){var t=this,d=this.props,r=d.commondesign,a=d.differenceType,u=r.Carousel.callback,o=this.state,E=o.visible,n=o.list,f=o.styleType,y=o.checkedList,p=o.play,_=o.playTime,P=o.changeTime,g=o.adapt,C=o.nav,A=(0,m.lw)((0,m.Kd)()),c=v=>{t.cancelEvent()},s=v=>{if(n.length>0){var i={list:n,styleType:f,checkedList:y,play:p,playTime:_,changeTime:P,adapt:g,nav:C};t.updataDomCallBack(i),u&&u(i),t.cancelEvent()}else F.ZP.error(A.formatMessage({id:"mack.dsl.j"}))},h=v=>{this.setState({type:v})};return(0,e.jsx)(S.Z,{title:A.formatMessage({id:"mack.dsc.f"}),visible:E,onOk:s,width:1e3,onCancel:c,maskClosable:!1,className:b().hrefModal,children:(0,e.jsxs)("div",{className:"divRow",children:[this.renderStyle(),this.renderSeletPictrue(),a==1&&this.renderEffect(),this.renderSetting()]})})}})||R)},5283:function(D){D.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAAA1CAYAAADMFIzKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAmNSURBVHhe7Vxrb9vIFb2k3rIVWXm6ceI63Y27yGKBFigK9GOBAv3F/dDv/dAWSLdB1tms83Kc2JIt62G9JVJkzxmSNiNRlOTokbg6wITkcPiYM+feuXcoR7MBWWFh0N3tCguCZkHhbdOSVt+SldRnCw0lpmuyHo1IhAesMyzLrvb6YlgruucB8K0IX4s6zkSnBzdXZM8NpLbvmyYV7Su65ws/v6tJc8FYEb5grAhfMFaELxgrwheMFeELhtbrW/ZZ13QPFwsmA1HNTcF86CF4bSPzvS5Io5/ZWETtL1XhpDqCVIwljtw3hRdLYMvs7LpiqYR3+rY0zT621kU25iW9SRAfv4bML5VwEyT3QDo5jsC1kGwd21REV+sPNMUAj/PZ4C3pyryyyHFd+qRJsg2Q3uKKpVuofJYuB8NV/CwRBcPrMV0yKNzG9cXRsHTCCSq9CaIbcC/+Mq+Jk5bEiZljSYX7F5fmjS+C8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