1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[194],{86615:function(re,W,e){var M=e(1413),l=e(45987),u=e(22270),T=e(78045),S=e(62435),V=e(28614),f=e(34176),L=e(86074),C=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],p=S.forwardRef(function(n,j){var R=n.fieldProps,D=n.options,Z=n.radioType,a=n.layout,r=n.proFieldProps,m=n.valueEnum,P=(0,l.Z)(n,C);return(0,L.jsx)(f.Z,(0,M.Z)((0,M.Z)({valueType:Z==="button"?"radioButton":"radio",ref:j,valueEnum:(0,u.h)(m,void 0)},P),{},{fieldProps:(0,M.Z)({options:D,layout:a},R),proFieldProps:r,filedConfig:{customLightMode:!0}}))}),O=S.forwardRef(function(n,j){var R=n.fieldProps,D=n.children;return(0,L.jsx)(T.ZP,(0,M.Z)((0,M.Z)({},R),{},{ref:j,children:D}))}),H=(0,V.G)(O,{valuePropName:"checked",ignoreWidth:!0}),c=H;c.Group=p,c.Button=T.ZP.Button,c.displayName="ProFormComponent",W.Z=c},5966:function(re,W,e){var M=e(97685),l=e(1413),u=e(45987),T=e(21770),S=e(23323),V=e(55241),f=e(97435),L=e(62435),C=e(34176),p=e(86074),O=["fieldProps","proFieldProps"],H=["fieldProps","proFieldProps"],c="text",n=function(a){var r=a.fieldProps,m=a.proFieldProps,P=(0,u.Z)(a,O);return(0,p.jsx)(C.Z,(0,l.Z)({valueType:c,fieldProps:r,filedConfig:{valueType:c},proFieldProps:m},P))},j=function(a){var r=(0,T.Z)(a.open||!1,{value:a.open,onChange:a.onOpenChange}),m=(0,M.Z)(r,2),P=m[0],K=m[1];return(0,p.jsx)(S.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(Q){var x,X=Q.getFieldValue(a.name||[]);return(0,p.jsx)(V.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(t){return t&&t.parentNode?t.parentNode:t},onOpenChange:function(t){return K(t)},content:(0,p.jsxs)("div",{style:{padding:"4px 0"},children:[(x=a.statusRender)===null||x===void 0?void 0:x.call(a,X),a.strengthText?(0,p.jsx)("div",{style:{marginTop:10},children:(0,p.jsx)("span",{children:a.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},a.popoverProps),{},{open:P,children:a.children}))}})},R=function(a){var r=a.fieldProps,m=a.proFieldProps,P=(0,u.Z)(a,H),K=(0,L.useState)(!1),J=(0,M.Z)(K,2),Q=J[0],x=J[1];return r!=null&&r.statusRender&&P.name?(0,p.jsx)(j,{name:P.name,statusRender:r==null?void 0:r.statusRender,popoverProps:r==null?void 0:r.popoverProps,strengthText:r==null?void 0:r.strengthText,open:Q,onOpenChange:x,children:(0,p.jsx)("div",{children:(0,p.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,f.Z)(r,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(s){var t;r==null||(t=r.onBlur)===null||t===void 0||t.call(r,s),x(!1)},onClick:function(s){var t;r==null||(t=r.onClick)===null||t===void 0||t.call(r,s),x(!0)}}),proFieldProps:m,filedConfig:{valueType:c}},P))})}):(0,p.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:r,proFieldProps:m,filedConfig:{valueType:c}},P))},D=n;D.Password=R,D.displayName="ProFormComponent",W.Z=D},84618:function(re,W,e){e.r(W),e.d(W,{default:function(){return X}});var M=e(5574),l=e.n(M),u=e(62435),T=e(59530),S=e(28459),V=e(15009),f=e.n(V),L=e(99289),C=e.n(L),p=e(95338),O=e(14726),H=e(86738),c=e(39680),n=e(86074),j=function(t){var F=t.dispatch,U=t.openModel,b=t.getId,i=(0,u.useRef)(),Y=(0,u.useState)([]),A=l()(Y,2),z=A[0],k=A[1],G=(0,u.useState)(0),_=l()(G,2),w=_[0],N=_[1],$=(0,u.useState)(1),g=l()($,2),E=g[0],o=g[1],d=(0,u.useState)(10),q=l()(d,2),ee=q[0],h=q[1],ae=function(B){b(B)};return(0,u.useEffect)(function(){if(!U.openModal){var y;(y=i.current)===null||y===void 0||y.reload()}},[U.openModal]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(S.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,n.jsx)(p.Z,{size:"small",search:!1,scroll:{y:480,x:"auto"},bordered:!0,actionRef:i,dataSource:z,columns:[{title:"ID",dataIndex:"id"},{title:"\u5B57\u5178\u540D",dataIndex:"name"},{title:"\u5B57\u5178\u6807\u8BC6\u540D",dataIndex:"code"},{title:"\u5B57\u5178\u4EE3\u7801\u503C",dataIndex:"value"},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(B,v,oe){return[(0,n.jsx)(O.ZP,{type:"link",onClick:function(){ae(v),F({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,n.jsx)(O.ZP,{type:"link",onClick:function(){v.nextlevel=v.id,ae(v),F({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u4E0B\u7EA7\u5B57\u5178"},"1"),(0,n.jsx)(H.Z,{title:"\u662F\u5426\u5220\u9664",onConfirm:function(ne){PostActivityaddressDel({id:v.id}).then(function(le){var te;message.success("\u5220\u9664\u6210\u529F"),(te=i.current)===null||te===void 0||te.reload()})},okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",children:(0,n.jsx)(O.ZP,{danger:!0,type:"link",children:"\u5220\u9664"})})]}}],rowKey:"id",pagination:{current:E,pageSize:ee,showSizeChanger:!0,total:w,pageSizeOptions:[9,18,27,99],onChange:function(B,v){o(B),h(v)},onShowSizeChange:function(B,v){o(B),h(v)}},request:C()(f()().mark(function y(){var B,v=arguments;return f()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return B=v.length>0&&v[0]!==void 0?v[0]:{},I.abrupt("return",(0,c.ONw)({page:E,pagesize:ee,sort:"id",sortby:"desc",keyword:B.name,parent_id:-1,show_childs:!0}).then(function(ne){k(ne.data.dicts),N(ne.data.total)}));case 2:case"end":return I.stop()}},y)})),headerTitle:"\u5B57\u5178\u5217\u8868",toolBarRender:function(){return[(0,n.jsx)(O.ZP,{type:"primary",onClick:function(){F({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u5B57\u5178"})]},expandable:{childrenColumnName:"children"}})})})},R=(0,T.connect)(function(s){var t=s.openModel;return{openModel:t}})(j),D=e(97269),Z=e(5966),a=e(86615),r=e(17788),m=e(86250),P=e(42075),K=e(68872),J=function(t){var F=t.dispatch,U=t.dictModel,b=t.openModel,i=t.id,Y=(0,u.useRef)(),A=(0,u.useState)(!1),z=l()(A,2),k=z[0],G=z[1],_=(0,u.useState)(null),w=l()(_,2),N=w[0],$=w[1];return(0,u.useEffect)(function(){G(b.openModal)},[b.openModal]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(S.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,n.jsx)(r.Z,{open:k,title:i?"\u7F16\u8F91\u5B57\u5178":"\u6DFB\u52A0\u5B57\u5178",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:600,onCancel:function(){F({type:"openModel/getOpenModal",payload:!1})},children:(0,n.jsxs)(D.A,{formRef:Y,request:C()(f()().mark(function g(){var E;return f()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!i){d.next=13;break}if(!i.nextlevel){d.next=6;break}return $(null),d.abrupt("return",{code:"",parent_id:i.nextlevel,name:"",value:"",display:"S",childs:null});case 6:return d.next=8,(0,c.dBj)({id:i.id});case 8:return E=d.sent,$(E.data),d.abrupt("return",E.data);case 11:d.next=15;break;case 13:return $(null),d.abrupt("return",{code:"",parent_id:-1,name:"",value:"",display:"S",childs:null});case 15:case"end":return d.stop()}},g)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(E,o){return(0,n.jsxs)(m.Z,{justify:"flex-end",children:[" ",(0,n.jsx)(P.Z,{children:o})]})},onReset:function(){$(null),G(!1)}},onFinish:function(){var g=C()(f()().mark(function E(o){var d,q;return f()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(i.nextlevel?o.parent_id=i.nextlevel:N&&N.id?o.parent_id=N.parent_id:o.parent_id=-1,o.childs=null,console.log(o),!N){h.next=12;break}return o.id=i.id,h.next=7,(0,c.GFC)(o);case 7:d=h.sent,K.ZP.success("\u63D0\u4EA4\u6210\u529F"),F({type:"openModel/getOpenModal",payload:!1}),h.next=17;break;case 12:return h.next=14,(0,c.K4V)(o);case 14:q=h.sent,K.ZP.success("\u63D0\u4EA4\u6210\u529F"),F({type:"openModel/getOpenModal",payload:!1});case 17:case"end":return h.stop()}},E)}));return function(E){return g.apply(this,arguments)}}(),children:[(0,n.jsx)(Z.Z,{label:"\u5B57\u5178\u540D",name:"name",placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D"}]}),(0,n.jsx)(Z.Z,{label:"\u5B57\u5178\u6807\u8BC6\u540D,\u5B57\u5178\u6807\u8BC6\u540D\u4E3A\u6570\u5B57\uFF0C\u5E26\u4E0A\u4E0A\u7EA7\u7684\u6807\u8BC6\u540D\uFF0C\u4E00\u822C\u9876\u7EA7\u4E3A\u56DB\u4F4D\u6570\u5B57\uFF0C\u4F8B\u5982\uFF1A2009\uFF0C\u4E00\u7EA7\u4E3A\u516B\u4F4D\uFF0C\u4F8B\u5982\uFF1A20090001\uFF0C20090002\uFF0C\u4EE5\u6B64\u7C7B\u63A8",name:"code",placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u8BC6\u540D",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u8BC6\u540D"}]}),(0,n.jsx)(Z.Z,{label:"\u5B57\u5178\u4EE3\u7801\u503C",name:"value",placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u4EE3\u7801\u503C"}),(0,n.jsx)(a.Z.Group,{name:"display",label:"\u662F\u5426\u663E\u793A",request:C()(f()().mark(function g(){return f()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",[{label:"\u662F",value:"S"},{label:"\u5426",value:"H"}]);case 1:case"end":return o.stop()}},g)})),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u663E\u793A"}]})]})})})})},Q=(0,T.connect)(function(s){var t=s.dictModel,F=s.openModel;return{dictModel:t,openModel:F}})(J),x=function(t){var F=t.dispatch,U=t.openModel,b=(0,u.useState)(0),i=l()(b,2),Y=i[0],A=i[1],z=function(G){A(G)};return(0,u.useEffect)(function(){U.openModal||A(0)},[U.openModal]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(S.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,n.jsx)(R,{getId:z}),(0,n.jsx)(Q,{id:Y})]})})},X=(0,T.connect)(function(s){var t=s.openModel;return{openModel:t}})(x)}}]);
|