您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

p__Information__Section__index.c1fa4349.async.js 10KB

1 个月前
1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[284],{86615:function(ce,R,e){var M=e(1413),m=e(45987),n=e(22270),j=e(78045),C=e(62435),k=e(28614),l=e(34176),I=e(86074),E=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],x=C.forwardRef(function(s,S){var y=s.fieldProps,v=s.options,H=s.radioType,U=s.layout,t=s.proFieldProps,V=s.valueEnum,w=(0,m.Z)(s,E);return(0,I.jsx)(l.Z,(0,M.Z)((0,M.Z)({valueType:H==="button"?"radioButton":"radio",ref:S,valueEnum:(0,n.h)(V,void 0)},w),{},{fieldProps:(0,M.Z)({options:v,layout:U},y),proFieldProps:t,filedConfig:{customLightMode:!0}}))}),B=C.forwardRef(function(s,S){var y=s.fieldProps,v=s.children;return(0,I.jsx)(j.ZP,(0,M.Z)((0,M.Z)({},y),{},{ref:S,children:v}))}),ee=(0,k.G)(B,{valuePropName:"checked",ignoreWidth:!0}),o=ee;o.Group=x,o.Button=j.ZP.Button,o.displayName="ProFormComponent",R.Z=o},67119:function(ce,R,e){var M=e(5574),m=e.n(M),n=e(62435),j=e(59530),C=e(55375),k=e(42075),l=e(68872),I=e(98163),E=e(32443),x=e(86074),B=function(o){var s=o.onUploadComplete,S=o.uploadTxt,y=o.image_type,v=o.form_name,H=o.image_length,U=o.multiple,t=o.imageUrl,V=function(W){W&&s(W)},w=(0,n.useState)(t),A=m()(w,2),X=A[0],te=A[1];return(0,n.useEffect)(function(){te(t)},[t]),(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(k.Z,{children:[(0,x.jsx)(E.Z,{label:S,name:v,icon:null,title:S,fieldProps:{maxCount:H,multiple:U,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(W){var P=new FormData;P.append("image",W.file),console.log(P),(0,j.request)(C.FH+"/common/image/upload?imgtype="+y,{method:"post",data:P,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(J){te(J.data.filename),V(J.data.filename)}).catch(function(J){console.log(J),l.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}}),X&&(0,x.jsx)(I.Z,{src:"".concat(C.VO).concat(X),width:102,height:102,style:{borderRadius:8}})]})})};R.Z=B},60624:function(ce,R,e){e.r(R),e.d(R,{default:function(){return ve}});var M=e(5574),m=e.n(M),n=e(62435),j=e(59530),C=e(28459),k=e(15009),l=e.n(k),I=e(99289),E=e.n(I),x=e(95338),B=e(97269),ee=e(98163),o=e(14726),s=e(17788),S=e(86738),y=e(68872),v=e(39680),H=e(55375),U=e(67119),t=e(86074),V=function(r){var F=r.dispatch,L=r.openModel,K=r.getId,u=(0,n.useRef)(),Q=(0,n.useState)([]),Z=m()(Q,2),b=Z[0],ae=Z[1],_=(0,n.useState)(0),ne=m()(_,2),oe=ne[0],z=ne[1],G=(0,n.useState)(1),re=m()(G,2),Y=re[0],N=re[1],$=(0,n.useState)(10),le=m()($,2),p=le[0],d=le[1],a=function(f){K(f)};(0,n.useEffect)(function(){if(!L.openModal){var h;(h=u.current)===null||h===void 0||h.reload()}},[L.openModal]);var c=(0,n.useState)(""),ue=m()(c,2),se=ue[0],g=ue[1],ge=(0,n.useRef)(""),Ee=function(f){g(f)};return(0,n.useEffect)(function(){ge.current=se},[se]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(C.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,t.jsx)(x.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:u,dataSource:b,search:{span:8,labelWidth:"auto"},rowSelection:{type:"checkbox"},columns:[{title:"ID",dataIndex:"id",width:200,search:!1},{title:"\u680F\u76EE\u540D\u79F0",dataIndex:"name",width:200},{title:"\u680F\u76EE\u7F16\u7801",dataIndex:"code",width:200},{title:"\u53EF\u89C1",dataIndex:"display",width:200,valueEnum:{0:{text:"\u5168\u90E8"},1:{text:"\u53EF\u89C1",status:"Processing"},2:{text:"\u4E0D\u53EF\u89C1",status:"Error"}}},{title:"\u5C01\u9762\u56FE",dataIndex:"cover_img",search:!1,width:200,render:function(f,i){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(ee.Z,{src:"".concat(H.VO).concat(i.cover_img),width:40,height:40})})}},{title:"\u63CF\u8FF0",dataIndex:"description",width:200,search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(f,i,Pe){return[(0,t.jsx)(o.ZP,{type:"link",onClick:function(){a(i),F({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,t.jsx)(o.ZP,{size:"small",type:"link",onClick:function(){s.Z.confirm({title:"\u66F4\u6362\u56FE\u7247",content:(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(B.A,{submitter:{render:!1},children:(0,t.jsx)(U.Z,{multiple:!1,form_name:"photo",image_length:1,uploadTxt:"\u66F4\u6362\u56FE\u7247",image_type:3,imageUrl:i.photo,onUploadComplete:Ee})})}),onOk:function(){return E()(l()().mark(function pe(){var T;return l()().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:(T=u.current)===null||T===void 0||T.reload();case 1:case"end":return de.stop()}},pe)}))()},onCancel:function(){console.log("Cancel")},okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",centered:!0})},children:"\u66F4\u6362\u56FE\u7247"}),(0,t.jsx)(o.ZP,{type:"link",onClick:function(){i.nextlevel=i.id,a(i),F({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u4E0B\u7EA7\u680F\u76EE"},"1"),(0,t.jsx)(S.Z,{title:"\u662F\u5426\u5220\u9664",onConfirm:function(q){(0,v.WOH)({id:i.id}).then(function(pe){var T;y.ZP.success("\u5220\u9664\u6210\u529F"),(T=u.current)===null||T===void 0||T.reload()})},okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",children:(0,t.jsx)(o.ZP,{danger:!0,type:"link",children:"\u5220\u9664"})})]}}],rowKey:"id",pagination:{current:Y,pageSize:p,showSizeChanger:!0,total:oe,pageSizeOptions:[9,18,27,99],onChange:function(f,i){N(f),d(i)},onShowSizeChange:function(f,i){N(f),d(i)}},request:E()(l()().mark(function h(){var f,i=arguments;return l()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return f=i.length>0&&i[0]!==void 0?i[0]:{},O.abrupt("return",(0,v.DGC)({page:Y,pagesize:p,sort:"id",sortby:"desc",keyword:f.name}).then(function(q){ae(q.data.sections),z(q.data.total)}));case 2:case"end":return O.stop()}},h)})),headerTitle:"\u680F\u76EE/\u9891\u9053",toolBarRender:function(){return[(0,t.jsx)(o.ZP,{type:"primary",onClick:function(){F({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u680F\u76EE/\u9891\u9053"})]},expandable:{childrenColumnName:"childs"}})})})},w=(0,j.connect)(function(D){var r=D.openModel;return{openModel:r}})(V),A=e(5966),X=e(86615),te=e(86250),ie=e(42075),W=e(71230),P=e(15746),J={label:"name",value:"id"},me=function(r){var F=r.dispatch,L=r.dictModel,K=r.openModel,u=r.id,Q=(0,n.useRef)(),Z=(0,n.useState)(!1),b=m()(Z,2),ae=b[0],_=b[1],ne=(0,n.useState)(null),oe=m()(ne,2),z=oe[0],G=oe[1];(0,n.useEffect)(function(){_(K.openModal)},[K.openModal]);var re=(0,n.useState)(""),Y=m()(re,2),N=Y[0],$=Y[1],le=function(d){$(d)};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(C.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,t.jsx)(s.Z,{open:ae,title:u?"\u7F16\u8F91\u680F\u76EE/\u9891\u9053":"\u6DFB\u52A0\u680F\u76EE/\u9891\u9053",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){F({type:"openModel/getOpenModal",payload:!1})},children:(0,t.jsx)(B.A,{formRef:Q,request:E()(l()().mark(function p(){var d;return l()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!u){c.next=15;break}if(!u.nextlevel){c.next=7;break}return G(null),$(""),c.abrupt("return",{name:"",code:"",cover_img:"",parent_id:u.nextlevel,description:"",display:1,park:2});case 7:return c.next=9,(0,v.PoI)({id:u.id});case 9:return d=c.sent,$(d.data.cover_img),G(d.data),c.abrupt("return",d.data);case 13:c.next=18;break;case 15:return G(null),$(""),c.abrupt("return",{name:"",code:"",cover_img:"",parent_id:-1,description:"",display:1,park:2});case 18:case"end":return c.stop()}},p)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(d,a){return(0,t.jsxs)(te.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(ie.Z,{children:a})]})},onReset:function(){G(null),_(!1)}},onFinish:function(){var p=E()(l()().mark(function d(a){var c,ue;return l()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(u.nextlevel?a.parent_id=u.nextlevel:z&&z.id?a.parent_id=z.parent_id:a.parent_id=-1,a.cover_img=N||"",console.log(a),!z){g.next=12;break}return a.id=u.id,g.next=7,(0,v.$nt)(a);case 7:c=g.sent,y.ZP.success("\u63D0\u4EA4\u6210\u529F"),F({type:"openModel/getOpenModal",payload:!1}),g.next=17;break;case 12:return g.next=14,(0,v.qGV)(a);case 14:ue=g.sent,y.ZP.success("\u63D0\u4EA4\u6210\u529F"),F({type:"openModel/getOpenModal",payload:!1});case 17:case"end":return g.stop()}},d)}));return function(d){return p.apply(this,arguments)}}(),children:(0,t.jsxs)(W.Z,{gutter:[16,16],children:[(0,t.jsx)(P.Z,{span:24,children:(0,t.jsx)(U.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,imageUrl:N,onUploadComplete:le})}),(0,t.jsx)(P.Z,{span:8,children:(0,t.jsx)(A.Z,{label:"\u680F\u76EE\u540D\u79F0",name:"name",placeholder:"\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u680F\u76EE\u540D\u79F0"}]})}),(0,t.jsx)(P.Z,{span:16,children:(0,t.jsx)(A.Z,{label:"\u680F\u76EE\u7F16\u7801\uFF0C\u7528\u82F1\u6587\u5B57\u6BCD\u8868\u793A\uFF0C\u4E0D\u53EF\u91CD\u590D",name:"code",placeholder:"\u680F\u76EE\u7F16\u7801\uFF0C\u7528\u82F1\u6587\u5B57\u6BCD\u8868\u793A\uFF0C\u4E0D\u53EF\u91CD\u590D",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u680F\u76EE\u7F16\u7801\uFF0C\u7528\u82F1\u6587\u5B57\u6BCD\u8868\u793A\uFF0C\u4E0D\u53EF\u91CD"}]})}),(0,t.jsx)(P.Z,{span:8,children:(0,t.jsx)(A.Z,{name:"description",label:"\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0"}]})}),(0,t.jsx)(P.Z,{span:8,children:(0,t.jsx)(X.Z.Group,{name:"display",label:"\u662F\u5426\u663E\u793A",request:E()(l()().mark(function p(){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return a.stop()}},p)}))})}),(0,t.jsx)(P.Z,{span:8,children:(0,t.jsx)(X.Z.Group,{name:"park",label:"\u662F\u5426\u662F\u79D1\u521B\u56ED\u680F\u76EE",request:E()(l()().mark(function p(){return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return a.stop()}},p)}))})})]})})})})})},fe=(0,j.connect)(function(D){var r=D.dictModel,F=D.openModel;return{dictModel:r,openModel:F}})(me),he=function(r){var F=r.dispatch,L=r.openModel,K=(0,n.useState)(0),u=m()(K,2),Q=u[0],Z=u[1],b=function(_){Z(_)};return(0,n.useEffect)(function(){L.openModal||Z(0)},[L.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(C.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,t.jsx)(w,{getId:b}),(0,t.jsx)(fe,{id:Q})]})})},ve=(0,j.connect)(function(D){var r=D.openModel;return{openModel:r}})(he)}}]);