Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

p__Feedback__index.7720fabc.async.js 7.5KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[325],{90672:function(ne,y,e){var B=e(1413),o=e(45987),l=e(62435),T=e(34176),D=e(86074),A=["fieldProps","proFieldProps"],c=function(i,d){var Z=i.fieldProps,W=i.proFieldProps,m=(0,o.Z)(i,A);return(0,D.jsx)(T.Z,(0,B.Z)({ref:d,valueType:"textarea",fieldProps:Z,proFieldProps:W},m))};y.Z=l.forwardRef(c)},5966:function(ne,y,e){var B=e(97685),o=e(1413),l=e(45987),T=e(21770),D=e(23323),A=e(55241),c=e(97435),k=e(62435),i=e(34176),d=e(86074),Z=["fieldProps","proFieldProps"],W=["fieldProps","proFieldProps"],m="text",L=function(r){var t=r.fieldProps,M=r.proFieldProps,v=(0,l.Z)(r,Z);return(0,d.jsx)(i.Z,(0,o.Z)({valueType:m,fieldProps:t,filedConfig:{valueType:m},proFieldProps:M},v))},n=function(r){var t=(0,T.Z)(r.open||!1,{value:r.open,onChange:r.onOpenChange}),M=(0,B.Z)(t,2),v=M[0],K=M[1];return(0,d.jsx)(D.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(U){var g,z=U.getFieldValue(r.name||[]);return(0,d.jsx)(A.Z,(0,o.Z)((0,o.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:function(a){return K(a)},content:(0,d.jsxs)("div",{style:{padding:"4px 0"},children:[(g=r.statusRender)===null||g===void 0?void 0:g.call(r,z),r.strengthText?(0,d.jsx)("div",{style:{marginTop:10},children:(0,d.jsx)("span",{children:r.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},r.popoverProps),{},{open:v,children:r.children}))}})},Y=function(r){var t=r.fieldProps,M=r.proFieldProps,v=(0,l.Z)(r,W),K=(0,k.useState)(!1),V=(0,B.Z)(K,2),U=V[0],g=V[1];return t!=null&&t.statusRender&&v.name?(0,d.jsx)(n,{name:v.name,statusRender:t==null?void 0:t.statusRender,popoverProps:t==null?void 0:t.popoverProps,strengthText:t==null?void 0:t.strengthText,open:U,onOpenChange:g,children:(0,d.jsx)("div",{children:(0,d.jsx)(i.Z,(0,o.Z)({valueType:"password",fieldProps:(0,o.Z)((0,o.Z)({},(0,c.Z)(t,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(F){var a;t==null||(a=t.onBlur)===null||a===void 0||a.call(t,F),g(!1)},onClick:function(F){var a;t==null||(a=t.onClick)===null||a===void 0||a.call(t,F),g(!0)}}),proFieldProps:M,filedConfig:{valueType:m}},v))})}):(0,d.jsx)(i.Z,(0,o.Z)({valueType:"password",fieldProps:t,proFieldProps:M,filedConfig:{valueType:m}},v))},b=L;b.Password=Y,b.displayName="ProFormComponent",y.Z=b},32572:function(ne,y,e){e.r(y),e.d(y,{default:function(){return F}});var B=e(5574),o=e.n(B),l=e(62435),T=e(59530),D=e(28459),A=e(15009),c=e.n(A),k=e(99289),i=e.n(k),d=e(95338),Z=e(14726),W=e(86738),m=e(68872),L=e(39680),n=e(86074),Y=function(s){var f=s.dispatch,$=s.getId,S=s.openModel,p=(0,l.useRef)(),N=(0,l.useState)([]),O=o()(N,2),R=O[0],H=O[1],G=(0,l.useState)(0),Q=o()(G,2),X=Q[0],ae=Q[1],_=(0,l.useState)(1),x=o()(_,2),j=x[0],u=x[1],w=(0,l.useState)(10),q=o()(w,2),E=q[0],re=q[1],oe=function(P){$(P)};return(0,l.useEffect)(function(){if(!S.openModal){var C;(C=p.current)===null||C===void 0||C.reload()}},[S.openModal]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(D.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,n.jsx)(d.Z,{size:"small",scroll:{y:480,x:"auto"},bordered:!0,actionRef:p,dataSource:R,search:{span:8,labelWidth:"auto"},columns:[{title:"\u7528\u6237",dataIndex:"name",search:!1},{title:"\u90AE\u7BB1",dataIndex:"email",search:!1},{title:"\u6D88\u606F\u5185\u5BB9",dataIndex:"content",search:!1},{title:"\u5904\u7406\u7ED3\u679C",dataIndex:"feed_back",search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(P,h,le){return[(0,n.jsx)(Z.ZP,{type:"link",onClick:function(){oe(h),f({type:"openModel/getOpenModal",payload:!0})},children:"\u5904\u7406\u7ED3\u679C"},"1"),(0,n.jsx)(W.Z,{title:"\u662F\u5426\u5220\u9664",onConfirm:function(ee){(0,L.$J2)({id:h.id}).then(function(se){var te;m.ZP.success("\u5220\u9664\u6210\u529F"),(te=p.current)===null||te===void 0||te.reload()})},okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",children:(0,n.jsx)(Z.ZP,{danger:!0,type:"link",children:"\u5220\u9664"})})]}}],rowKey:"id",pagination:{current:j,pageSize:E,showSizeChanger:!0,total:X,pageSizeOptions:[9,18,27,99],onChange:function(P,h){u(P),re(h)},onShowSizeChange:function(P,h){u(P),re(h)}},request:i()(c()().mark(function C(){var P,h=arguments;return c()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return P=h.length>0&&h[0]!==void 0?h[0]:{},I.abrupt("return",(0,L.ofO)({page:j,pagesize:E,sort:"id",sortby:"desc",keyword:P.name,customer_id:P.customer_id,origin:"admin"}).then(function(ee){H(ee.data.feedbacks),ae(ee.data.total)}));case 2:case"end":return I.stop()}},C)})),headerTitle:"\u53CD\u9988\u5217\u8868"})})})},b=(0,T.connect)(function(a){var s=a.dictModel,f=a.openModel;return{dictModel:s,openModel:f}})(Y),J=e(97269),r=e(5966),t=e(90672),M=e(17788),v=e(86250),K=e(42075),V={label:"name",value:"id"},U=function(s){var f=s.dispatch,$=s.dictModel,S=s.openModel,p=s.id,N=(0,l.useRef)(),O=(0,l.useState)(!1),R=o()(O,2),H=R[0],G=R[1],Q=(0,l.useState)(null),X=o()(Q,2),ae=X[0],_=X[1];return(0,l.useEffect)(function(){G(S.openModal)},[S.openModal]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(D.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,n.jsx)(M.Z,{open:H,title:"\u5904\u7406\u53CD\u9988\u7ED3\u679C",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){f({type:"openModel/getOpenModal",payload:!1})},children:(0,n.jsxs)(J.A,{formRef:N,request:i()(c()().mark(function x(){return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!p.id){u.next=4;break}return u.abrupt("return",p);case 4:return u.abrupt("return",{name:"",address:"",telephone:"",fax:"",postal:"",email:"",content:"",feed_back:""});case 5:case"end":return u.stop()}},x)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(j,u){return(0,n.jsxs)(v.Z,{justify:"flex-end",children:[" ",(0,n.jsx)(K.Z,{children:u})]})},onReset:function(){_(null),f({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var x=i()(c()().mark(function j(u){var w;return c()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(!p){E.next=7;break}return u.id=p.id,E.next=4,(0,L.bDZ)(u);case 4:w=E.sent,m.ZP.success("\u63D0\u4EA4\u6210\u529F"),f({type:"openModel/getOpenModal",payload:!1});case 7:case"end":return E.stop()}},j)}));return function(j){return x.apply(this,arguments)}}(),children:[(0,n.jsx)(r.Z,{name:"name",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",fieldProps:{disabled:!0}}),(0,n.jsx)(r.Z,{name:"telephone",label:"\u7535\u8BDD",placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD",fieldProps:{disabled:!0}}),(0,n.jsx)(r.Z,{name:"email",label:"\u7535\u5B50\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165\u7535\u5B50\u90AE\u7BB1",fieldProps:{disabled:!0}}),(0,n.jsx)(t.Z,{name:"content",label:"\u53CD\u9988\u5185\u5BB9",placeholder:"\u8BF7\u8F93\u5165\u53CD\u9988\u5185\u5BB9",fieldProps:{disabled:!0}}),(0,n.jsx)(t.Z,{name:"feed_back",label:"\u5904\u7406\u7ED3\u679C",placeholder:"\u8BF7\u8F93\u5165\u5904\u7406\u7ED3\u679C",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5904\u7406\u7ED3\u679C"}]})]})})})})},g=(0,T.connect)(function(a){var s=a.dictModel,f=a.openModel;return{dictModel:s,openModel:f}})(U),z=function(s){var f=s.dispatch,$=s.openModel,S=(0,l.useState)(0),p=o()(S,2),N=p[0],O=p[1],R=function(G){O(G)};return(0,l.useEffect)(function(){$.openModal||O(0)},[$.openModal]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(D.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,n.jsx)(b,{getId:R}),(0,n.jsx)(g,{id:N})]})})},F=(0,T.connect)(function(a){var s=a.openModel;return{openModel:s}})(z)}}]);