filesbox/web/dist/48954.289236ee.async.js

162 lines
19 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[48954],{66717:function(X){X.exports={root:"root___2GQGR",colorWeak:"colorWeak___2rEQZ","ant-layout":"ant-layout___7Urmk",globalSpin:"globalSpin___8Btav","ant-table":"ant-table___3eTCa","ant-table-thead":"ant-table-thead___2begL","ant-table-tbody":"ant-table-tbody___3TUF7",formBox:"formBox___trJQD",menu:"menu___CxHsC"}},44943:function(){},48954:function(X,N,a){"use strict";a.r(N),a.d(N,{default:function(){return r}});var F=a(71194),P=a(50146),H=a(57663),D=a(71577),Y=a(34792),q=a(48086),c=a(88983),A=a(47933),S=a(67294),ee=a(28216),G=a(66717),J=a.n(G),I=a(41273),w=a(7861),g=a(85893),C,m,r=(C=(0,ee.$j)(p=>{var o=p.globaldesign,n=p.commondesign,v=p.page;return{globaldesign:o,commondesign:n,page:v}}),C(m=class extends S.PureComponent{constructor(){super(...arguments);this.state={visible:!1,width:880,selectValue:"",loadingOk:!1},this.show=o=>{var n=o.attr("data-formid")||"",v=this.props.dispatch;v({type:"globaldesign/changeState",payload:{formId:""}}),n&&this.setState({selectValue:parseInt(n)})},this.renderHtml=o=>{var n=JSON.parse(o),v=n.title,u=v===void 0?{}:v,_=n.desc,d=n.body,x=n.itemList,K=u.headHeight,L=u.headImg,y=u.value,b='<div style="height: '.concat(K,"px; background-image: url(").concat(L,`);">
<div style="position: relative;text-align: center;font-size: 36px;height: 50px;top: 15px;">`).concat(y,`</div>
<div style="top: 15px;position: relative;text-align: center;line-height: 30px;">`).concat(_.value,`</div>
</div>`),e="";x.map(l=>{var t=l.type,s=l.formType,h=l.title,f=l.description,O=l.placeholder,R=l.optionList,k=R===void 0?[]:R,T=l.thumb,M=l.filePath,U="";switch(k.map(j=>{var Q=j.content,z=j.imagePath;s=="checkbox"?U+='<li><span class="checkBtn"></span><span class="checkName">'.concat(Q,"</span></li>"):U+='<li><span class="radioBtn"></span><span class="radioName"><p>'.concat(Q,'</p></span><img style="width: 100%;display: block;" src="').concat(z,'"/></li>')}),t){case"02":e+=`<div class='module formModule' data-type="02" data-form-type='textarea'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent"><textarea placeholder="`).concat(O,`" rows="1" cols="20"></textarea></div>
</div></div>`);break;case"06":e+=`<div class='module formModule' data-type="06" data-form-type='number'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent" data-unit="num">
<input placeholder="`).concat(O,`"/>
<div class="rightText"></div>
</div>
</div></div>`);break;case"03":e+=`<div class='module formModule' data-type="03" data-form-type='radio'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent">
<div class="radioBox">
`).concat(U,`
</div>
</div>
</div></div>`);break;case"04":e+=`<div class='module formModule' data-type="04" data-form-type='checkbox'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent">
<div class="checkBox">
`).concat(U,`
</div>
</div>
</div></div>`);break;case"05":e+=`<div class='module formModule' data-type="05" data-form-type='select'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent">
<div class="selectBox">
<div class="selectValue">
<p class="value"></p>
<p class="placeholder">`).concat(O,`</p>
<div class="selectArrow"></div>
</div>
<div class="optionBox">
<li>\u9009\u98791</li>
<li>\u9009\u98792</li>
<li>\u9009\u98793</li>
</div>
</div>
</div>
</div></div>`);break;case"61":e+=`<div class='module formModule' data-type="61" data-form-type='pictureupload' style="color:#999;">
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent">
<div class="pictureBox">
<img class="tip" src="`).concat("",`/designschool/form/image/picupload.png"/>
<p>\u70B9\u51FB\u9009\u62E9\u56FE\u7247<br/>
(\u9700\u5C0F\u4E8E10M\uFF09</p>
</div>
</div>
</div></div>`);break;case"62":e+=`<div class='module formModule' data-type="62" data-form-type='fileupload' style="color:#999;">
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent">
<div class="fileBox">
<span style="color:#999;font-size: 22px;float: left;margin-right: 7px;">+</span>\u4E0A\u4F20(\u9700\u5C0F\u4E8E20M\uFF09
</div>
</div>
</div></div>`);break;case"08":e+=`<div class='module formModule' data-type="08" data-form-type='score'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent" data-iconNum='1' data-maxVal='5' data-defaultVal='0'>
<div class="scoreBox">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</div>
</div>
</div></div>`);break;case"12":e+=`<div class='module formModule' data-type="12" data-form-type='date'>
<div class="contentBox">
<div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent formIcon">
<div class="dateBox"></div>
<img class="inputIcon" src="`).concat("",`/designschool/form/Assembly/icon/12.svg"/>
</div>
</div>
</div>`);break;case"34":e+=`<div class='module formModule' data-type="34" data-form-type='name'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent formIcon">
<input/>
<img class="inputIcon" src="`).concat("",`/designschool/form/Assembly/icon/34.svg"/>
</div>
</div></div>`);break;case"35":e+=`<div class='module formModule' data-type="35" data-form-type='mobile'>
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent formIcon" data-check="1" data-checktype="mobile">
<input/>
<img class="inputIcon" src="`).concat("",`/designschool/form/Assembly/icon/35.svg"/>
</div>
</div></div>`);break;case"81":e+=`<div class='module formModule' data-type="81" data-form-type='desc'>
<div class="contentBox"><div class="labelbox">
<div class="desc">`.concat(f,`</div>
</div>
</div></div>`);break;case"84":e+=`<div class='module formModule formShowModule' data-show-type="picture" data-type="81" data-form-type='desc'>
<div class="contentBox">
<div class="formContent">
<div style="background: #fff url(`.concat("",`/designschool/form/image/noPicture.png) no-repeat center;height: 50px; background-size: 32px;"></div>
</div>
</div>
</div>`);break;case"85":e+=`<div class='module formModule formShowModule' data-show-type="video" data-type="85" data-form-type='desc'>
<div class="contentBox">
<div class="formContent">
`.concat(T?'<img src="'.concat(T,'" style="width: 100%;" />'):'<div style="background: #fff url(${cdnPath}/designschool/form/image/noAudio.png) no-repeat center;height: 50px; background-size: 32px;"></div>',`
</div>
</div>
</div>`);break;case"86":e+=`<div class='module formModule formShowModule' data-show-type="audio" data-type="81" data-form-type='desc'>
<div class="contentBox">
<div class="formContent">
`.concat(M?'<audio src="'.concat(M,'">\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002</audio>'):'<div style="background: #fff url(${cdnPath}/designschool/form/image/noAudio.png) no-repeat center;height: 50px; background-size: 32px;"></div>',`
</div>
</div>
</div>`);break;case"83":e+=`<div class='module formModule formShowModule' data-show-type="file" data-type="81" data-form-type='desc' style="color:#999;">
<div class="contentBox"><div class="labelbox">
<div class="label"><span>`.concat(h,`</span></div>
<div class="desc">`).concat(f,`</div>
</div>
<div class="formContent">
<div class="fileBox">
\u8BF7\u6DFB\u52A0\u9644\u4EF6
</div>
</div>
</div></div>`);break}});var i=`<div>
`.concat(b,`
<div id="mainForm">
`).concat(e,`
</div>
<div class="bottomBtnBox" style="clear: both;"><div class="submit">\u63D0\u4EA4</div></div>
</div>`);return i},this.updataDomCallBack=(o,n)=>{var v=this,u=v.state.selectValue,_=this.props,d=_.commondesign,x=_.globaldesign,K=_.dispatch,L=x.isMobile,y=d.PageForm,b=y.element,e=y.callback,i=y.callClose;b.attr("data-formid",u),b.removeClass("onModule"),v.getFindForm(u,(l,t)=>{l?b.html('<div id="formHeightBox">'+v.renderHtml(t)+"</div>"):b.html('<div id="formHeightBox">'+t+"</div>"),b.css({left:0,height:$("#formHeightBox").height()}),n&&n(),setTimeout(()=>{(0,w.U7)(v)},500)})},this.cancelEvent=()=>{var o=this,n=this.props.dispatch;n({type:"commondesign/setState",payload:{PageForm:{visible:!1,callback:()=>{},callClose:()=>{}}}})},this.getFindForm=(o,n)=>{var v=this,u=this.props.dispatch,_=d=>{var x=d.itemJsonSavePath,K=d.referenceSavePath,L=x?1:0;$.ajax({type:"get",url:x||K,dataType:"html",success:function(b){b&&n&&n(L,b)}})};u({type:"page/getFindForm",payload:{formId:o},callback:d=>{var x=d.data.formInfo;_(x)}})},this.getFormPage=()=>{var o=this,n=this.props,v=n.dispatch,u=n.page,_=n.typeId,d=u.formList;d.length<1&&v({type:"page/findFormPageList",payload:{status:"1",currentPage:1,pageSize:1e3}})}}componentDidMount(){var o=this.props,n=o.visible,v=o.element,u=o.callback,_=o.callClose,d=o.commondesign;this.setState({visible:n,callback:u}),this.getFormPage(),this.show(v)}renderContent(){var o=this,n=this.props.page,v=n.formList,u=this.state.selectValue,_=d=>{o.setState({selectValue:d.target.value})};return(0,g.jsx)("div",{children:(0,g.jsx)("div",{className:"main",children:(0,g.jsx)(A.ZP.Group,{onChange:_,value:u,children:v.map(d=>(0,g.jsx)("div",{className:"pageList",id:d.formId,children:(0,g.jsx)(A.ZP,{value:d.formId,children:d.title})},d.formId))})})})}render(){var o=this,n=this.state,v=n.width,u=n.selectValue,_=n.loadingOk,d=this.props,x=d.commondesign,K=d.element,L=d.dispatch,y=d.visible,b=d.globaldesign,e=x.PageForm.callback,i=()=>{if(!u){q.ZP.warning("\u8BF7\u9009\u62E9\u8868\u5355");return}o.setState({loadingOk:!0});var t={};o.updataDomCallBack(t,()=>{e&&e(t),o.cancelEvent()})},l=()=>{o.cancelEvent(),o.setState({loadingOk:!1})};return(0,g.jsxs)(P.Z,{title:"\u8868\u5355",visible:y,onOk:i,width:v,onCancel:l,maskClosable:!1,className:J().menu,footer:null,children:[o.renderContent(),(0,g.jsxs)("div",{className:"footer",children:[(0,g.jsx)(D.Z,{onClick:i,type:"primary",children:"\u786E\u5B9A"}),(0,g.jsx)(D.Z,{onClick:l,children:"\u53D6\u6D88"})]})]})}})||m)},47933:function(X,N,a){"use strict";a.d(N,{ZP:function(){return b}});var F=a(22122),P=a(96156),H=a(28481),D=a(94184),Y=a.n(D),q=a(21770),c=a(67294),A=a(53124),S=a(97647),ee=a(5467),G=c.createContext(null),J=G.Provider,I=G,w=c.createContext(null),g=w.Provider,C=a(50132),m=a(42550),r=a(98866),p=a(65223),o=function(e,i){var l={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&i.indexOf(t)<0&&(l[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,t=Object.getOwnPropertySymbols(e);s<t.length;s++)i.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(l[t[s]]=e[t[s]]);return l},n=function(i,l){var t,s=c.useContext(I),h=c.useContext(w),f=c.useContext(A.E_),O=f.getPrefixCls,R=f.direction,k=c.useRef(),T=(0,m.sQ)(l,k),M=(0,c.useContext)(p.aM),U=M.isFormItemInput,j=function(se){var V,W;(V=i.onChange)===null||V===void 0||V.call(i,se),(W=s==null?void 0:s.onChange)===null||W===void 0||W.call(s,se)},Q=i.prefixCls,z=i.className,ae=i.children,oe=i.style,te=i.disabled,le=o(i,["prefixCls","className","children","style","disabled"]),ne=O("radio",Q),Z=((s==null?void 0:s.optionType)||h)==="button"?"".concat(ne,"-button"):ne,B=(0,F.Z)({},le),ie=c.useContext(r.Z);B.disabled=te||ie,s&&(B.name=s.name,B.onChange=j,B.checked=i.value===s.value,B.disabled=B.disabled||s.disabled);var de=Y()("".concat(Z,"-wrapper"),(t={},(0,P.Z)(t,"".concat(Z,"-wrapper-checked"),B.checked),(0,P.Z)(t,"".concat(Z,"-wrapper-disabled"),B.disabled),(0,P.Z)(t,"".concat(Z,"-wrapper-rtl"),R==="rtl"),(0,P.Z)(t,"".concat(Z,"-wrapper-in-form-item"),U),t),z);return c.createElement("label",{className:de,style:oe,onMouseEnter:i.onMouseEnter,onMouseLeave:i