2 lines
7.8 KiB
JavaScript
2 lines
7.8 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[11016],{73171:function(y,B,s){"use strict";s.d(B,{Z:function(){return g}});var P=s(28991),v=s(67294),E={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},I=E,f=s(27029),C=function(x,R){return v.createElement(f.Z,(0,P.Z)((0,P.Z)({},x),{},{ref:R,icon:I}))};C.displayName="DeleteOutlined";var g=v.forwardRef(C)},89762:function(y){y.exports={root:"root___DeDDU",colorWeak:"colorWeak___3xgHK","ant-layout":"ant-layout___1UM8l",globalSpin:"globalSpin___2_3uL","ant-table":"ant-table___2LUmT","ant-table-thead":"ant-table-thead___lMCHK","ant-table-tbody":"ant-table-tbody___JDLLz",formBox:"formBox___2WDcf",AssemblyBox:"AssemblyBox___3RPnf",groupBox:"groupBox___3zqpw"}},11016:function(y,B,s){"use strict";s.r(B);var P=s(13254),v=s(14277),E=s(11849),I=s(34792),f=s(48086),C=s(77883),g=s(85986),U=s(47673),x=s(4107),R=s(71194),A=s(50146),Q=s(9715),j=s(55843),k=s(18106),K=s(95562),b=s(67294),Z=s(28216),N=s(24616),z=s(99165),H=s(73171),S=s(19755),G=s.n(S),J=s(89762),p=s.n(J),D=s(37226),w=s(56173),$=s(41273),e=s(85893),W,F,q=K.Z.TabPane,m=j.Z.Item,V=A.Z.confirm,X=(W=(0,Z.$j)(O=>{var l=O.globaldesign,n=O.page,i=O.commondesign;return{globaldesign:l,page:n,commondesign:i}}),W(F=class extends b.Component{constructor(){super(...arguments);this.state={editModel:!1},this.formRef=b.createRef()}componentDidMount(){this.getGroupList()}shouldComponentUpdate(){return!window.startMouseMove}getGroupList(){var l=this.props.dispatch;l({type:"page/getAssemblyList",payload:{clientType:1,designType:1,type:2}})}getConver(l){for(var n=0,i=l.length;n<i;n++){var d=l[n];d.content=d.detail}return l}renderSettingModel(){var l=this.state.editModel,n=this.props.dispatch,i=()=>{var u=self.formRef.current;u.validateFields().then(o=>{u.resetFields();var c=o.pageName,_=o.pageWidth,h=o.pageHeight;n({type:"page/editDesignAssembly",payload:{assemblyId:this.item.assemblyId,title:c,size:_+"|"+h},callback:M=>{M.success&&(this.setState({editModel:!1}),this.getGroupList())}})})},d=()=>{this.setState({editModel:!1})};return(0,e.jsx)(A.Z,{visible:l,onOk:i,onCancel:d,className:p().pageModel,title:"\u7F16\u8F91\u7EC4\u5408",children:(0,e.jsxs)(j.Z,{ref:this.formRef,hideRequiredMark:!0,className:p().formBox,children:[(0,e.jsx)(m,{label:"\u540D\u79F0",name:"pageName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7EC4\u5408\u540D\u79F0"},{max:6,message:"\u7EC4\u5408\u540D\u79F0\u4E0D\u5F97\u8D85\u8FC76\u4E2A\u5B57"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u7EC4\u5408\u540D\u79F0"}],children:(0,e.jsx)(x.Z,{placeholder:"\u8BF7\u8F93\u5165\u7EC4\u5408\u540D\u79F0"})}),(0,e.jsxs)("div",{className:"rowBox",children:[(0,e.jsx)("div",{className:"colBox",children:(0,e.jsx)(m,{label:"\u5C3A\u5BF8",name:"pageWidth",rules:[{required:!0,message:"\u8BF7\u8BBE\u7F6E\u5BBD\u5EA6"}],children:(0,e.jsx)(g.Z,{min:100,max:1440,style:{width:"100%"},disabled:!0,placeholder:"\u8BF7\u8BBE\u7F6E\u5BBD\u5EA6"})})}),(0,e.jsx)("div",{className:"colBox",style:{marginLeft:"4%"},children:(0,e.jsx)(m,{name:"pageHeight",rules:[{required:!0,message:"\u8BF7\u8BBE\u7F6E\u9AD8\u5EA6"}],children:(0,e.jsx)(g.Z,{min:100,style:{width:"100%"},disabled:!0,placeholder:"\u8BF7\u8BBE\u7F6E\u9AD8\u5EA6"})})})]})]})})}renderCopyModel(){var l=this.state.copyModel,n=this.props.dispatch,i=()=>{var u=self.formRef.current;u.validateFields().then(o=>{u.resetFields();var c=o.pageName,_=o.pageWidth,h=o.pageHeight;n({type:"page/addDesignAssembly",payload:{clientType:1,designType:1,type:2,title:c,size:_+"|"+h,detail:this.item.detail},callback:M=>{M.success&&(this.setState({copyModel:!1}),this.getGroupList())}})})},d=()=>{this.setState({copyModel:!1})};return(0,e.jsx)(A.Z,{visible:l,onOk:i,onCancel:d,className:p().pageModel,title:"\u590D\u5236\u7EC4\u5408",children:(0,e.jsxs)(j.Z,{hideRequiredMark:!0,className:p().formCol,children:[(0,e.jsx)(m,{label:"\u540D\u79F0",name:"pageName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7EC4\u5408\u540D\u79F0"},{max:6,message:"\u7EC4\u5408\u540D\u79F0\u4E0D\u5F97\u8D85\u8FC76\u4E2A\u5B57"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u7EC4\u5408\u540D\u79F0"}],children:(0,e.jsx)(x.Z,{placeholder:"\u8BF7\u8F93\u5165\u7EC4\u5408\u540D\u79F0"})}),(0,e.jsxs)("div",{className:"rowBox",children:[(0,e.jsx)("div",{className:"colBox",children:(0,e.jsx)(m,{label:"\u5C3A\u5BF8",name:"pageWidth",rules:[{required:!0,message:"\u8BF7\u8BBE\u7F6E\u5BBD\u5EA6"}],children:(0,e.jsx)(g.Z,{min:100,max:1440,disabled:!0,style:{width:"100%"},placeholder:"\u8BF7\u8BBE\u7F6E\u5BBD\u5EA6"})})}),(0,e.jsx)("div",{className:"colBox",style:{marginLeft:"4%"},children:(0,e.jsx)(m,{name:"pageHeight",rules:[{required:!0,message:"\u8BF7\u8BBE\u7F6E\u9AD8\u5EA6"}],children:(0,e.jsx)(g.Z,{min:100,disabled:!0,style:{width:"100%"},placeholder:"\u8BF7\u8BBE\u7F6E\u9AD8\u5EA6"})})})]})]})})}renderComponentList(){var l=this,n=this.props,i=n.dispatch,d=n.globaldesign,u=n.page,o=n.parent,c=u.groupList,_={setting:(a,t)=>{a.stopPropagation(),this.item=t,this.setState({editModel:!0},()=>{var r=l.formRef.current;r.setFieldsValue({pageName:t.title,pageWidth:t.size&&parseInt(t.size.split("|")[0])||375,pageHeight:t.size&&parseInt(t.size.split("|")[1])||667})})},copy:(a,t)=>{a.stopPropagation(),this.item=t;var r=l.formRef.current;r.setFieldsValue({pageWidth:t.size&&parseInt(t.size.split("|")[0])||375,pageHeight:t.size&&parseInt(t.size.split("|")[1])||667}),this.setState({copyModel:!0})},delete:(a,t)=>{a.stopPropagation(),V({title:"\u5220\u9664\u7EC4\u5408",content:"\u5C06\u8981\u5220\u9664"+t.title+", \u662F\u5426\u7EE7\u7EED\uFF1F",onOk(){i({type:"page/deleteDesignAssembly",payload:{assemblyId:t.assemblyId},callback:r=>{r.success&&l.getGroupList()}})},onCancel(){f.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")}})}},h=a=>{var t=parseInt(a.size.split("|")[0]),r=parseInt(a.size.split("|")[1]),L={width:t,height:r,transform:"translate(-50%, -50%) "+(t<r?"scale(".concat(90/r,")"):"scale(".concat(120/t,")"))};return L},M=a=>({key:a.assemblyId,className:"libox",onMouseDown:t=>{var r=G()(t.target),L=r.parents(".libox"),Y=L.find(".salceBox").html();if(r.hasClass("hoverbgcon")||r.hasClass("gtitle")){var T=D.rJ.group[0];T.content=Y,(0,$.q4)({data:T,x:t.pageX,y:t.pageY},l)}}});return(0,e.jsx)("div",{className:p().groupBox,children:c.length>0?this.getConver(c).map(a=>(0,e.jsxs)("div",(0,E.Z)((0,E.Z)({},M(a)),{},{children:[(0,e.jsxs)("div",{className:"gconHtm",children:[(0,e.jsx)("div",{className:"salceBox",style:h(a),dangerouslySetInnerHTML:{__html:a.detail}}),(0,e.jsxs)("div",{className:"hoverbgcon",children:[(0,e.jsx)(N.Z,{onClick:t=>_.setting(t,a),theme:"outlined",title:"\u8BBE\u7F6E"}),(0,e.jsx)(z.Z,{onClick:t=>_.copy(t,a),theme:"outlined",title:"\u590D\u5236"}),(0,e.jsx)(H.Z,{onClick:t=>_.delete(t,a),theme:"outlined",title:"\u5220\u9664"})]})]}),(0,e.jsx)("p",{className:"gtitle",children:a.title})]}))):(0,e.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE,description:(0,e.jsx)("div",{style:{margin:"0 18px"},children:(0,e.jsxs)("p",{children:["\u7A7A\u7A7A\u5982\u4E5F!",(0,e.jsx)("br",{}),"\u5FEB\u521B\u5EFA\u4E00\u4E2A\u5C5E\u4E8E\u4F60\u7684\u7EC4\u5408\u5427\uFF01",(0,e.jsx)("br",{}),"\u5728\u7EC4\u5408\u4E0A\u53F3\u952E\u9009\u62E9\u300E\u6DFB\u52A0\u5230\u81EA\u5B9A\u4E49\u7EC4\u5408\u300F"]})})})})}render(){var l=this,n=this.props,i=n.globaldesign,d=n.closeEvent,u=D.rJ.often,o=D.rJ.basics,c=D.rJ.senior,_=D.rJ.school,h={className:p().AssemblyBox};return(0,e.jsxs)("div",(0,E.Z)((0,E.Z)({},h),{},{children:[this.renderComponentList(),this.renderSettingModel(),this.renderCopyModel()]}))}})||F);B.default=X}}]);
|