filesbox/web/dist/10492.8dc854d8.async.js
2024-07-26 14:10:54 +08:00

32 lines
11 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[10492],{12108:function(Q,A,n){"use strict";n.r(A),n.d(A,{default:function(){return G}});var X=n(71194),K=n(50146),q=n(13062),W=n(71230),ee=n(89032),I=n(15746),se=n(63185),j=n(9676),te=n(77883),L=n(85986),le=n(36877),k=n(18480),ne=n(34792),w=n(48086),H=n(67294),J=n(28216),V=n(30381),x=n.n(V),F=n(96278),Y=n.n(F),Z=n(5283),ae=n.n(Z),$=n(87269),ie=n.n($),z=n(54870),re=n.n(z),ce=n(41273),o=n(85893),R,U,G=(R=(0,J.$j)(S=>{var e=S.commondesign,l=S.page;return{commondesign:e,page:l}}),R(U=class extends H.PureComponent{constructor(){super(...arguments);this.state={visible:!1,styleType:"xtwlb",classify:[],startNum:1,endNum:10,list:[],options:[],loading:!1,sTeacher:0,sNum:0,sDate:0,sTitle:0,sborder:0,isAll:!1},this.listAllSetting=()=>{var e=this.props.dispatch;e({type:"page/listAllSetting",callback:l=>{this.setState({visible:!0,options:l.data})}})},this.updataDomCallBack=e=>{var l=this,r=this.props.differenceType;r==1?l.pcDom(e):l.mobileDom2(e)},this.pcDom=e=>{var l=this.props.commondesign,r=l.ShortVideo,h=r.visible,t=r.element,v=r.callback,_=r.callClose,a="",f,P=0,c=e.list.length,u=e.list[0],m=""+(u.computerPicPath?JSON.parse(u.computerPicPath).sourcePath||JSON.parse(u.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg");t.css("height","auto");var E=e.sTeacher,T=e.sDate,y=e.sNum,N=e.sTitle,C=s=>"/information/".concat(s.infoID,".shtml"),D=s=>E?'<span class="realName">'.concat(s.realName,"</span>"):"",O=s=>T?'<span class="sDate">'.concat(x()(s.gmtCreate).format("YYYY-MM-DD"),"</span>"):"",M=s=>y?'<span class="sNum"><i class="iconfont icon-eye"></i>'.concat(s.viewCount,"</span>"):"",B=s=>N?'<span class="title moreTitle">'.concat(s.title,"</span>"):'<p><span class="title">'.concat(s.title,'</span></p><p class="introduce">').concat(s.introduce,"</p>");switch(e.styleType){case"xtwlb":t.css({width:"100%",left:0}),a='<ul class="xtwlb newxtwlb">',f=s=>`<li>
<a href="`.concat(C(s),`">
<div class="coverBox">
<div class="maskBox">
<img src="`).concat(s.computerPicPath,`"/>
<div class="playerIcon"></div>
</div>
</div>
<div class="infoBox">
<p class="title">`).concat(s.title,`</p>
<p class="introduce" style="height: 32px;">`).concat(s.introduce,`</p>
<p class="introduce"> `).concat(D(s)," ").concat(O(s),`</p>
</div>
</a>
</li>`);break}for(var d=document.createElement("div"),g=P,i=c;g<i;g++){var p=e.list[g];p.computerPicPath=""+(p.computerPicPath?JSON.parse(p.computerPicPath).sourcePath||JSON.parse(p.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg"),d.innerHTML=p.detail,p.detail=d.innerText,a+=f(p,g)}a+="</ul>";var b=t.find(".boxHtml");b.length>0?b.html(a):t.html('<div class="boxHtml">'+a+"</div>"),t.css({backgroundColor:"#fff"}),t.attr("data-shortvideo",JSON.stringify({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,sTeacher:e.sTeacher,sNum:e.sNum,sTitle:e.sTitle,sborder:e.sborder,sDate:e.sDate,isAll:e.isAll}))},this.mobileDom2=e=>{var l=this.props.commondesign,r=l.ShortVideo,h=r.visible,t=r.element,v=r.callback,_=r.callClose,a="",f,P=0,c=e.list.length,u=e.list[0],m=""+(u.computerPicPath?JSON.parse(u.computerPicPath).sourcePath||JSON.parse(u.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg");t.css("height","auto");var E=e.sTeacher,T=e.sDate,y=e.sNum,N=e.sTitle,C=s=>"/information/".concat(s.infoID,".shtml"),D=s=>E?'<span class="realName">'.concat(s.realName,"</span>"):"",O=s=>T?'<span class="sDate">'.concat(x()(s.gmtCreate).format("YYYY-MM-DD"),"</span>"):"",M=s=>y?'<span class="sNum"><i class="iconfont icon-eye"></i>'.concat(s.viewCount,"</span>"):"",B=s=>N?'<span class="title moreTitle">'.concat(s.title,"</span>"):'<p><span class="title">'.concat(s.title,'</span></p><p class="introduce">').concat(s.introduce,"</p>");switch(e.styleType){case"xtwlb":t.css({width:"100%",left:0}),a='<ul class="xtwlb newxtwlb">',f=s=>`<li>
<a href="`.concat(C(s),`">
<div class="infoBox">
<p class="title">`).concat(s.title,`</p>
</div>
<div class="coverBox">
<div class="maskBox">
<img src="`).concat(s.computerPicPath,`"/>
<div class="playerIcon"></div>
</div>
</div>
<div class="infoBox">
<p class="introduce" style="height: 32px;">`).concat(s.introduce,`</p>
<p class="introduce"> `).concat(D(s)," ").concat(O(s),`</p>
</div>
</a>
</li>`);break}for(var d=document.createElement("div"),g=P,i=c;g<i;g++){var p=e.list[g];p.computerPicPath=""+(p.computerPicPath?JSON.parse(p.computerPicPath).sourcePath||JSON.parse(p.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg"),d.innerHTML=p.detail,p.detail=d.innerText,a+=f(p,g)}a+="</ul>";var b=t.find(".boxHtml");b.length>0?b.html(a):t.html('<div class="boxHtml">'+a+"</div>"),t.css({backgroundColor:"#fff"}),t.attr("data-shortvideo",JSON.stringify({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,sTeacher:e.sTeacher,sNum:e.sNum,sTitle:e.sTitle,sborder:e.sborder,sDate:e.sDate,isAll:e.isAll}))},this.mobileDom=e=>{var l=this,r=this.props,h=r.commondesign,t=r.differenceType,v=h.ShortVideo,_=v.visible,a=v.element,f=v.callback,P=v.callClose,c="",u;a.css({height:"auto"});var m=e.sDate,E=e.sNum,T=e.sTitle,y=i=>"/pubinfo/".concat(i.infoID,".shtml"),N=i=>m?'<span class="teacher">'+x()(i.gmtCreate).format("YYYY-MM-DD")+"</span>":"",C=i=>E?'<span class="curren">'+i.viewCount+"</span>":"",D=i=>T?'<span class="title moreTitle">'+i.title+"</span>":'<span class="title">'+i.title+'</span><span class="introduce" >'+i.introduce+"</span>";switch(e.styleType){case"xtwlb":a.css({width:"100%",left:0}),c='<ul class="xtwlb">',u=i=>'<li><a href="'+y(i)+'"><img src="'+i.computerSinglePicPath+'"/><span class="title">'+i.title+"</span>"+N(i)+C(i)+"</a></li>";break;case"twlb":a.css({width:"100%",left:0}),c='<ul class="twlb">',u=i=>'<li><a href="'+y(i)+'"><span class="rser">'+D(i)+N(i)+C(i)+'</span><img src="'+i.computerSinglePicPath+'"/></a></li>';break;case"btrqlb":a.css({width:"100%",left:0}),c='<ul class="btrqlb">',u=i=>'<li><a href="'+y(i)+'">'+D(i)+N(i)+C(i)+"</a></li>";break}for(var O=document.createElement("div"),M=0,B=e.list.length;M<B;M++){var d=e.list[M];d.computerPicPath=d.computerPicPath?JSON.parse(d.computerPicPath):"/design/designstatic/common/image/information/defult.jpg",d.computerSinglePicPath=""+(d.computerPicPath?d.computerPicPath.sourcePath||d.computerPicPath[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg"),O.innerHTML=d.detail,d.detail=O.innerText,c+=u(d,M)}c+="</ul>";var g=a.find(".boxHtml");g.length>0?g.html(c):a.html('<div class="boxHtml">'+c+"</div>"),a.css({backgroundColor:"#fff"}),a.attr("data-shortvideo",JSON.stringify({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,isAll:e.isAll,sNum:e.sNum,sTitle:e.sTitle||0,sDate:e.sDate}))},this.show=e=>{e?(e=JSON.parse(e),this.setState({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,sTeacher:e.sTeacher,sNum:e.sNum,sTitle:e.sTitle||0,sDate:e.sDate,isAll:e.isAll=="1"})):this.setState({styleType:"xtwlb",classify:[],startNum:1,endNum:10,sTeacher:0,sNum:0,sTitle:0,sDate:0,isAll:!1})},this.renderStyle=()=>{var e=this.state.styleType,l=(h,t)=>{this.setState({styleType:t})},r=[{type:"xtwlb",image:""},{type:"twlb",image:""},{type:"btrqlb",image:""}];return(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"label",children:"\u98CE\u683C\uFF1A"}),(0,o.jsx)("div",{className:"content",children:r.map(h=>{var t=h.type==e?"on":"";return(0,o.jsx)("div",{kay:h.type,className:"styleli ".concat(h.type," ").concat(t),onClick:v=>l(v,h.type),style:h.image?{backgroundImage:"url(".concat(h.image,")")}:{},children:" "})})})]})},this.carryCallBack=e=>{var l=this,r=this.props.commondesign,h=r.ShortVideo.callback,t=this.state,v=t.visible,_=t.styleType,a=t.classify,f=t.startNum,P=t.endNum,c=t.sTeacher,u=t.sNum,m=t.sTitle,E=t.sDate,T=t.isAll;if(e.length>0){var y={list:e,styleType:_,classify:a,startNum:f,endNum:P,sTeacher:c,sNum:u,sTitle:m,sDate:E,isAll:T?"1":"0"};l.updataDomCallBack(y),h&&h(y),l.cancelEvent()}else w.ZP.error("\u5F53\u524D\u5206\u7C7B\u4E0B\u6682\u65E0\u77ED\u89C6\u9891\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9");this.setState({loading:!1})},this.cancelEvent=()=>{var e=this,l=this.props.dispatch;l({type:"commondesign/setState",payload:{ShortVideo:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var e=this.props.commondesign,l=e.ShortVideo,r=l.visible,h=l.element,t=l.callback,v=l.callClose;this.setState({visible:r}),this.listAllSetting();var _=h.attr("data-shortvideo");this.show(_)}renderClassify(){var e=this.state,l=e.classify,r=e.startNum,h=e.endNum,t=e.options,v=e.isAll,_=c=>{this.setState({classify:c})},a=c=>{this.setState({startNum:c||0})},f=c=>{this.setState({endNum:c||r})},P=c=>{this.setState({isAll:c.target.checked})};return(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"label",children:"\u5206\u7C7B\uFF1A"}),(0,o.jsx)("div",{className:"content",children:(0,o.jsx)(k.Z,{value:l,fieldNames:{label:"typeName",value:"infoTypeID",children:"children"},changeOnSelect:!0,options:t,onChange:_,placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",style:{width:440}})}),(0,o.jsx)("div",{className:"label",children:"\u8BFB\u53D6\uFF1A"}),(0,o.jsxs)("div",{className:"content",style:{marginBottom:50},children:[(0,o.jsx)(L.Z,{value:r,onChange:a,min:1,style:{width:210}}),(0,o.jsx)("span",{style:{width:20,display:"inline-block",textAlign:"center"},children:"~"}),(0,o.jsx)(L.Z,{value:h,onChange:f,min:r,max:r+99,style:{width:210}})]}),(0,o.jsx)("div",{className:"label",children:"\u8BBE\u7F6E\uFF1A"}),this.renderSetting()]})}renderSetting(){var e=this.props.differenceType,l=this.state,r=l.sDate,h=l.sNum,t=l.sTitle,v=l.sTeacher,_=l.styleType,a=m=>parseInt(m),f=m=>{this.setState({sDate:m.target.checked?1:0})},P=m=>{this.setState({sTeacher:m.target.checked?1:0})},c=m=>{this.setState({sNum:m.target.checked?1:0})},u=m=>{this.setState({sTitle:m.target.checked?1:0})};return(0,o.jsx)("div",{className:"content",style:{marginBottom:30,lineHeight:"34px"},children:(0,o.jsxs)(W.Z,{children:[(0,o.jsxs)(I.Z,{children:[" ",(0,o.jsx)(j.Z,{onChange:P,checked:a(v)==1,style:{marginRight:52},children:"\u5C55\u793A\u53D1\u5E03\u8005 "})," "]}),(0,o.jsxs)(I.Z,{children:[" ",(0,o.jsx)(j.Z,{onChange:f,checked:a(r)==1,style:{marginRight:52},children:"\u5C55\u793A\u53D1\u5E03\u65E5\u671F "})," "]})]})})}render(){var e=this.state,l=e.visible,r=e.styleType,h=e.classify,t=e.startNum,v=e.endNum,_=e.isAll,a=e.loading,f=this.props.dispatch,P=u=>{this.cancelEvent()},c=u=>{this.setState({loading:!0}),f({type:"page/firstHomepageDetail",payload:{isAll:_?"1":"0",infoType:1,InfoTypeId:h[h.length-1],beginNum:t,endNum:v},callback:m=>{m.success&&this.carryCallBack(m.data)}})};return(0,o.jsx)(K.Z,{title:"\u77ED\u89C6\u9891",visible:l,onOk:a?()=>{}:c,width:600,confirmLoading:a,onCancel:P,maskClosable:!1,className:Y().hrefModal,children:(0,o.jsxs)("div",{className:"divRow",children:[!1,this.renderClassify()]})})}})||U)}}]);