2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1418],{68161:function(Z,f,n){n.r(f);var O=n(26068),i=n.n(O),x=n(67825),v=n.n(x),T=n(90228),m=n.n(T),j=n(87999),c=n.n(j),A=n(48305),h=n.n(A),M=n(19869),p=n(50959),E=n(98984),b=n(16030),R=n(35384),P=n(49523),B=n(52495),d=n(11527),C=["type","defaultRender","formItemProps","fieldProps"],L=["type","defaultRender","formItemProps","fieldProps"],W=function(){var K=(0,p.useRef)(),U=(0,p.useState)([]),D=h()(U,2),g=D[0],S=D[1],F=(0,p.useState)(null),y=h()(F,2),Q=y[0],G=y[1],N=function(){var r=c()(m()().mark(function _(e){var a,u,s;return m()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,B.rb)({userId:e});case 2:a=o.sent,u=a.success,s=a.data,s.records.map(function(t){t.userName=t.userName+" "+t.phone}),S(s.records);case 7:case"end":return o.stop()}},_)}));return function(e){return r.apply(this,arguments)}}(),$=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u7528\u6237\u4FE1\u606F",dataIndex:"userId",valueType:"text",render:function(_,e){return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{children:["\u7528\u6237ID:",e==null?void 0:e.userId]}),(0,d.jsxs)("div",{children:["\u7528\u6237\u540D\uFF1A",e==null?void 0:e.userName]}),(0,d.jsxs)("div",{children:["\u624B\u673A\u53F7\uFF1A",e==null?void 0:e.phone]}),(0,d.jsxs)("div",{children:["\u7B49\u7EA7\uFF1A",e==null?void 0:e.level]})]})},renderFormItem:function(_,e,a){var u=e.type,s=e.defaultRender,l=e.formItemProps,o=e.fieldProps,t=v()(e,C);return(0,d.jsx)(E.Z,i()(i()({},o),{},{allowClear:!0,showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u6216\u624B\u673A\u53F7",style:{width:"100%"},filterOption:!1,onSearch:function(I){I&&N(I)},fieldNames:{label:"userName",value:"id"},options:g}))}},{title:"\u8BB0\u5F55\u540D\u79F0",dataIndex:"recordName",valueType:"text",search:!1},{title:"\u51BB\u7ED3\u4F59\u989D",dataIndex:"freezePoints",valueType:"text",search:!1},{title:"\u7C7B\u578B",dataIndex:"pointType",valueType:"text",search:!1,render:function(_,e){return _==1?"\u6536\u76CA":"\u4F59\u989D"}},{title:"\u8BB0\u5F55\u7C7B\u578B",dataIndex:"type",valueType:"text",search:!0,render:function(_,e){var a,u=P;return(a=u.find(function(s){return s.id==e.type}))===null||a===void 0?void 0:a.name},renderFormItem:function(_,e,a){var u=e.type,s=e.defaultRender,l=e.formItemProps,o=e.fieldProps,t=v()(e,L);return(0,d.jsx)(E.Z,i()(i()({},o),{},{allowClear:!0,style:{width:"100%"},filterOption:!1,fieldNames:{label:"name",value:"id"},options:P}))}},{title:"\u5907\u6CE8",dataIndex:"remarks",valueType:"text",search:!1},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",valueType:"dateRange",search:{transform:function(_){return{createTimeBegin:_[0],createTimeEnd:_[1]}}},render:function(_,e){return e==null?void 0:e.createTime}}];return(0,d.jsx)(b._z,{children:(0,d.jsx)("div",{style:{width:"100%",float:"right"},children:(0,d.jsx)(R.Z,{actionRef:K,rowKey:"id",search:{labelWidth:120,defaultCollapsed:!1},toolBarRender:function(){return[]},request:function(){var r=c()(m()().mark(function _(e,a,u){var s,l;return m()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return G(e),t.next=3,(0,M.xQ)(e);case 3:return s=t.sent,l=s.data,t.abrupt("return",{data:(l==null?void 0:l.records)||[],total:l==null?void 0:l.total});case 6:case"end":return t.stop()}},_)}));return function(_,e,a){return r.apply(this,arguments)}}(),columns:$},"logList")})})};f.default=W}}]);
|