|
1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[325],{64082:function(G,M,e){e.d(M,{Z:function(){return o}});var r=e(87462),n=e(62435),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},p=a,c=e(84089),E=function(f,l){return n.createElement(c.Z,(0,r.Z)({},f,{ref:l,icon:p}))},d=n.forwardRef(E),o=d},64317:function(G,M,e){var r=e(1413),n=e(45987),a=e(22270),p=e(62435),c=e(66758),E=e(34176),d=e(86074),o=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],h=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],f=function(s,F){var T=s.fieldProps,B=s.children,C=s.params,U=s.proFieldProps,_=s.mode,O=s.valueEnum,L=s.request,W=s.showSearch,D=s.options,R=(0,n.Z)(s,o),b=(0,p.useContext)(c.Z);return(0,d.jsx)(E.Z,(0,r.Z)((0,r.Z)({valueEnum:(0,a.h)(O),request:L,params:C,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,r.Z)({options:D,mode:_,showSearch:W,getPopupContainer:b.getPopupContainer},T),ref:F,proFieldProps:U},R),{},{children:B}))},l=p.forwardRef(function(i,s){var F=i.fieldProps,T=i.children,B=i.params,C=i.proFieldProps,U=i.mode,_=i.valueEnum,O=i.request,L=i.options,W=(0,n.Z)(i,h),D=(0,r.Z)({options:L,mode:U||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},F),R=(0,p.useContext)(c.Z);return(0,d.jsx)(E.Z,(0,r.Z)((0,r.Z)({valueEnum:(0,a.h)(_),request:O,params:B,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,r.Z)({getPopupContainer:R.getPopupContainer},D),ref:s,proFieldProps:C},W),{},{children:T}))}),v=p.forwardRef(f),t=l,P=v;P.SearchSelect=t,P.displayName="ProFormComponent",M.Z=P},52688:function(G,M,e){var r=e(1413),n=e(45987),a=e(62435),p=e(34176),c=e(86074),E=["fieldProps","unCheckedChildren","checkedChildren","proFieldProps"],d=a.forwardRef(function(o,h){var f=o.fieldProps,l=o.unCheckedChildren,v=o.checkedChildren,t=o.proFieldProps,P=(0,n.Z)(o,E);return(0,c.jsx)(p.Z,(0,r.Z)({valueType:"switch",fieldProps:(0,r.Z)({unCheckedChildren:l,checkedChildren:v},f),ref:h,valuePropName:"checked",proFieldProps:t,filedConfig:{valuePropName:"checked",ignoreWidth:!0,customLightMode:!0}},P))});M.Z=d},80876:function(G,M,e){var r=e(1413),n=e(64082),a=e(28459),p=e(2058),c=e(62435),E=e(9105),d=e(28614),o=e(86074),h=c.forwardRef(function(l,v){var t=l.fieldProps,P=l.title,i=P===void 0?"\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u8FDB\u884C\u4E0A\u4F20":P,s=l.icon,F=s===void 0?(0,o.jsx)(n.Z,{}):s,T=l.description,B=T===void 0?"\u652F\u6301\u5355\u6B21\u6216\u6279\u91CF\u4E0A\u4F20":T,C=l.action,U=l.accept,_=l.onChange,O=l.value,L=l.children,W=l.max,D=l.proFieldProps,R=(0,c.useContext)(a.ZP.ConfigContext),b=(0,c.useContext)(E.A),$=(D==null?void 0:D.mode)||b.mode||"edit",k=R.getPrefixCls("upload"),pe=(W===void 0||!O||(O==null?void 0:O.length)<W)&&$!=="read"&&(D==null?void 0:D.readonly)!==!0;return(0,o.jsxs)(p.Z.Dragger,(0,r.Z)((0,r.Z)({ref:v,name:"files",action:C,accept:U,fileList:O},t),{},{onChange:function(q){_==null||_(q),t!=null&&t.onChange&&(t==null||t.onChange(q))},style:(0,r.Z)((0,r.Z)({},t==null?void 0:t.style),{},{display:pe?void 0:"none"}),children:[(0,o.jsx)("p",{className:"".concat(k,"-drag-icon"),children:F}),(0,o.jsx)("p",{className:"".concat(k,"-text"),children:i}),(0,o.jsx)("p",{className:"".concat(k,"-hint"),children:B}),L?(0,o.jsx)("div",{className:"".concat(k,"-extra"),style:{padding:16},children:L}):null]}))}),f=(0,d.G)(h,{getValueFromEvent:function(v){return v.fileList}});M.Z=f},57759:function(G,M,e){var r=e(59530),n=e(55375),a=e(68872),p=e(80876),c=e(86074),E=function(o){var h=o.onUploadComplete,f=o.uploadTxt,l=o.form_name,v=function(P){h&&h(P)};return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(p.Z,{label:f,name:l,icon:null,fieldProps:{fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(P){var i=new FormData;i.append("doc",P.file),console.log(i),(0,r.request)(n.FH+"/common/doc/upload?doctype=1",{method:"post",data:i,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(s){v(s.data.filename)}).catch(function(s){console.log(s),a.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\uFF0C\u5982\u6709\u7591\u95EE\uFF0C\u8BF7\u54A8\u8BE2\u7BA1\u7406\u5458")})}}})})};M.Z=E},67562:function(G,M,e){var r=e(5574),n=e.n(r),a=e(71167),p=e.n(a),c=e(40190),E=e(62435),d=e(86492),o=e.n(d),h=e(86074),f=function(v){var t=v.defaultValue,P=v.placeholder,i=v.onChange,s=(0,E.useState)(t&&o().decode(t)),F=n()(s,2),T=F[0],B=F[1],C=function(_){B(_),i(_)};return(0,E.useEffect)(function(){if(t){var U=t.replace(/<[^>]*>/g,"");C(U?t:"")}},[t]),(0,h.jsx)("div",{children:(0,h.jsx)(p(),{bounds:document.body,modules:{toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{align:[]}],["clean"],["link","image","video"]]},value:T,onChange:C,theme:"snow",placeholder:P})})};M.Z=f},67119:function(G,M,e){var r=e(5574),n=e.n(r),a=e(62435),p=e(59530),c=e(55375),E=e(42075),d=e(68872),o=e(98163),h=e(32443),f=e(86074),l=function(t){var P=t.onUploadComplete,i=t.uploadTxt,s=t.image_type,F=t.form_name,T=t.image_length,B=t.multiple,C=t.imageUrl,U=function(R){R&&P(R)},_=(0,a.useState)(C),O=n()(_,2),L=O[0],W=O[1];return(0,a.useEffect)(function(){W(C)},[C]),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(E.Z,{children:[(0,f.jsx)(h.Z,{label:i,name:F,icon:null,title:i,fieldProps:{maxCount:T,multiple:B,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(R){var b=new FormData;b.append("image",R.file),console.log(b),(0,p.request)(c.FH+"/common/image/upload?imgtype="+s,{method:"post",data:b,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function($){W($.data.filename),U($.data.filename)}).catch(function($){console.log($),d.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}}),L&&(0,f.jsx)(o.Z,{src:"".concat(c.VO).concat(L),width:102,height:102,style:{borderRadius:8}})]})})};M.Z=l},95151:function(G,M,e){e.r(M),e.d(M,{default:function(){return Ue}});var r=e(5574),n=e.n(r),a=e(62435),p=e(59530),c=e(28459),E=e(15009),d=e.n(E),o=e(99289),h=e.n(o),f=e(95338),l=e(14726),v=e(39680),t=e(86074),P=function(u){var j=u.dispatch,X=u.getId,V=u.openModel,S=(0,a.useRef)(),J=(0,a.useState)([]),z=n()(J,2),w=z[0],re=z[1],te=(0,a.useState)(0),se=n()(te,2),de=se[0],Q=se[1],fe=(0,a.useState)(1),ie=n()(fe,2),ae=ie[0],N=ie[1],Pe=(0,a.useState)(10),ne=n()(Pe,2),ue=ne[0],oe=ne[1],ce=function(Z){X(Z)};return(0,a.useEffect)(function(){V.openModal||S.current.reload()},[V.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(c.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,t.jsx)(f.Z,{size:"small",scroll:{y:480,x:"auto"},bordered:!0,actionRef:S,dataSource:w,search:{span:8,labelWidth:"auto"},columns:[{title:"\u7528\u6237",dataIndex:"name"},{title:"\u90AE\u7BB1",dataIndex:"email"},{title:"\u6D88\u606F\u5185\u5BB9",dataIndex:"content"},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(Z,I,Ee){return[(0,t.jsx)(l.ZP,{type:"link",onClick:function(){ce(I.id),j({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,t.jsx)(l.ZP,{type:"link",onClick:function(){},children:"\u5220\u9664"},"2")]}}],rowKey:"id",pagination:{current:ae,pageSize:ue,showSizeChanger:!0,total:de,pageSizeOptions:[9,18,27,99],onChange:function(Z,I){N(Z),oe(I)},onShowSizeChange:function(Z,I){N(Z),oe(I)}},request:h()(d()().mark(function Y(){var Z,I=arguments;return d()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return Z=I.length>0&&I[0]!==void 0?I[0]:{},H.abrupt("return",(0,v.ofO)({page:ae,pagesize:ue,sort:"id",sortby:"desc",keyword:Z.name,customer_id:Z.customer_id}).then(function(me){re(me.data.feedbacks),Q(me.data.total)}));case 2:case"end":return H.stop()}},Y)})),headerTitle:"\u53CD\u9988\u5217\u8868"})})})},i=(0,p.connect)(function(K){var u=K.dictModel,j=K.openModel;return{dictModel:u,openModel:j}})(P),s=e(97269),F=e(5966),T=e(52688),B=e(64317),C=e(19109),U=e(97462),_=e(1413),O=e(45987),L=e(34176),W=["fieldProps","request","params","proFieldProps"],D=function(u,j){var X=u.fieldProps,V=u.request,S=u.params,J=u.proFieldProps,z=(0,O.Z)(u,W);return(0,t.jsx)(L.Z,(0,_.Z)({valueType:"segmented",fieldProps:X,ref:j,request:V,params:S,filedConfig:{customLightMode:!0},proFieldProps:J},z))},R=a.forwardRef(D),b=R,$=e(17788),k=e(86250),pe=e(42075),he=e(68872),q=e(71230),ee=e(15746),ve=e(98163),xe=e(22015),_e=e(23323),le=e(55375),Me=e(67119),Oe=e(57759),De=e(67562),Fe={label:"name",value:"id"},je=function(u){var j=u.dispatch,X=u.dictModel,V=u.openModel,S=u.id,J=(0,a.useRef)(),z=(0,a.useState)(!1),w=n()(z,2),re=w[0],te=w[1],se=(0,a.useState)(null),de=n()(se,2),Q=de[0],fe=de[1];(0,a.useEffect)(function(){te(V.openModal)},[V.openModal]);var ie=(0,a.useState)(""),ae=n()(ie,2),N=ae[0],Pe=ae[1],ne=function(g){Pe(g)},ue=(0,a.useState)(!1),oe=n()(ue,2),ce=oe[0],Y=oe[1],Z=(0,a.useState)(""),I=n()(Z,2),Ee=I[0],H=I[1],me=function(g){H(g)},Re=(0,a.useState)(""),Ce=n()(Re,2),Ae=Ce[0],Ze=Ce[1];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)($.Z,{open:re,title:S?"\u7F16\u8F91\u6587\u7AE0":"\u6DFB\u52A0\u6587\u7AE0",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){j({type:"openModel/getOpenModal",payload:!1})},children:(0,t.jsxs)(s.A,{formRef:J,request:h()(d()().mark(function x(){var g;return d()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(!S){A.next=7;break}return A.next=3,(0,v.USp)({id:S});case 3:return g=A.sent,A.abrupt("return",g.data);case 7:return A.abrupt("return",{title:"",cover_img:"",doc_url:"",section_id:null,content:"",stick_top:0,hot:0,author:""});case 8:case"end":return A.stop()}},x)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(g,m){return(0,t.jsxs)(k.Z,{justify:"flex-end",children:[" ",(0,t.jsx)(pe.Z,{children:m})]})},onReset:function(){fe(null),j({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var x=h()(d()().mark(function g(m){var A,ge;return d()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(m.cover_img=N||"",console.log(m),!S){y.next=11;break}return m.id=S,y.next=6,(0,v.XcO)(m);case 6:A=y.sent,he.ZP.success("\u63D0\u4EA4\u6210\u529F"),j({type:"openModel/getOpenModal",payload:!1}),y.next=16;break;case 11:return y.next=13,(0,v.qMy)(m);case 13:ge=y.sent,he.ZP.success("\u63D0\u4EA4\u6210\u529F"),j({type:"openModel/getOpenModal",payload:!1});case 16:case"end":return y.stop()}},g)}));return function(g){return x.apply(this,arguments)}}(),children:[(0,t.jsx)(F.Z,{label:"\u6587\u7AE0\u6807\u9898",name:"title",placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u6807\u9898",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u7AE0\u6807\u9898"}]}),(0,t.jsxs)(q.Z,{gutter:[16,16],children:[Q?(0,t.jsx)(ee.Z,{span:4,children:(0,t.jsx)(Me.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:1,onUploadComplete:ne})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(ee.Z,{span:4,children:(0,t.jsx)(Me.Z,{multiple:!1,form_name:"cover_img",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:1,onUploadComplete:ne})})}),Q?(0,t.jsx)(ee.Z,{span:4,children:N?(0,t.jsx)(ve.Z,{src:"".concat(le.VO).concat(N),style:{marginBottom:"16px",width:"100px",height:"100px"}}):(0,t.jsx)(ve.Z,{src:"".concat(le.VO).concat(Q==null?void 0:Q.cover_img),style:{marginTop:"16px",width:"200px",height:"200px"}})}):(0,t.jsx)(t.Fragment,{children:N?(0,t.jsxs)(ee.Z,{span:4,children:[" ",(0,t.jsx)(ve.Z,{src:"".concat(le.VO).concat(N),style:{marginTop:"32px",width:"100px",height:"100px"}})," "]}):""})]}),(0,t.jsx)(T.Z,{fieldProps:{checked:ce,checkedChildren:"\u5173\u95ED\u4E0A\u4F20\u6587\u4EF6",unCheckedChildren:"\u5F00\u542F\u4E0A\u4F20\u6587\u4EF6",onChange:function(g){Y(g)}}}),ce&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Oe.Z,{form_name:"doc_url",uploadTxt:"\u4E0A\u4F20\u6587\u4EF6",onUploadComplete:me}),(0,t.jsxs)(xe.Z.Paragraph,{copyable:!0,children:["\u94FE\u63A5\uFF1A","".concat(le.VO).concat(Ee)]})]}),(0,t.jsx)(B.Z,{showSearch:!0,name:"section_id",label:"\u680F\u76EE/\u9891\u9053",placeholder:"\u8BF7\u9009\u62E9\u680F\u76EE/\u9891\u9053",fieldProps:{fieldNames:Fe},request:function(g){return(0,v.DGC)({page:1,pagesize:100,keyword:g.keyWords}).then(function(m){return m.data.sections})}}),(0,t.jsx)(q.Z,{gutter:[16,16],children:(0,t.jsx)(ee.Z,{span:24,children:(0,t.jsx)(_e.Z.Item,{name:"content",label:"\u6587\u7AE0\u5185\u5BB9",rules:[{required:!0}],children:(0,t.jsx)(C.i$,{children:function(){return(0,t.jsx)(U.Z,{name:["content"],children:function(m,A){var ge=m.content;return(0,t.jsx)(De.Z,{placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u5185\u5BB9",defaultValue:ge,onChange:function(y){Ze(y),A.formRef.current.setFieldsValue({content:y})}})}})}})})})}),(0,t.jsx)(b,{name:"stick_top",label:"\u662F\u5426\u7F6E\u9876",request:h()(d()().mark(function x(){return d()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return m.stop()}},x)})),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876"}]}),(0,t.jsx)(b,{name:"hot",label:"\u6210\u4E3A\u70ED\u95E8",request:h()(d()().mark(function x(){return d()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",[{label:"\u666E\u901A",value:1},{label:"\u70ED\u95E8\u63A8\u8350",value:2}]);case 1:case"end":return m.stop()}},x)})),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u6210\u4E3A\u70ED\u95E8"}]}),(0,t.jsx)(F.Z,{name:"author",label:"\u4F5C\u8005",placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005"})]})})})})},Se=(0,p.connect)(function(K){var u=K.dictModel,j=K.openModel;return{dictModel:u,openModel:j}})(je),Te=function(u){var j=u.dispatch,X=u.openModel,V=(0,a.useState)(0),S=n()(V,2),J=S[0],z=S[1],w=function(te){z(te)};return(0,a.useEffect)(function(){X.openModal||z(0)},[X.openModal]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(c.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,t.jsx)(i,{getId:w}),(0,t.jsx)(Se,{id:J})]})})},Ue=(0,p.connect)(function(K){var u=K.openModel;return{openModel:u}})(Te)}}]);
|