forked from wuranxu/pity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp__Config__Address.ef0f932b.async.js
1 lines (1 loc) · 15.4 KB
/
p__Config__Address.ef0f932b.async.js
1
"use strict";(self.webpackChunkpity=self.webpackChunkpity||[]).push([[9722],{51042:function(ne,Z,n){var S=n(1413),C=n(67294),O=n(42110),d=n(84089),b=function(L,P){return C.createElement(d.Z,(0,S.Z)((0,S.Z)({},L),{},{ref:P,icon:O.Z}))};b.displayName="PlusOutlined",Z.Z=C.forwardRef(b)},646:function(ne,Z,n){var S=n(86738),C=n(85893);Z.Z=function(O){var d=O.title,b=O.text,c=O.onConfirm;return(0,C.jsx)(S.Z,{title:d,onConfirm:c,children:(0,C.jsx)("a",{children:b})})}},84298:function(ne,Z,n){var S=n(97857),C=n.n(S),O=n(5574),d=n.n(O),b=n(67294),c=n(58131),L=n(69400),P=n(15746),A=n(76081),F=n(85893),Q=c.Z.Item,N=function(h){var w=h.title,R=h.width,k=h.left,z=h.right,q=h.formName,$=h.record,Y=h.onFinish,K=h.loading,_=h.fields,e=h.open,g=h.onCancel,m=h.offset,t=m===void 0?0:m,o=h.children,s=h.Footer,r=h.onTest,l=c.Z.useForm(),u=d()(l,1),i=u[0],a=function(){i.validateFields().then(function(j){Y(j)})};(0,b.useEffect)(function(){i.resetFields(),i.setFieldsValue($)},[$]);var v={labelCol:{span:k},wrapperCol:{span:z}};return(0,F.jsxs)(L.Z,{style:{marginTop:t},confirmLoading:K,footer:s!==void 0?(0,F.jsx)(s,{onOk:a,onCancel:g,onTest:function(){i.validateFields().then(function(j){r(j)})}}):void 0,title:w,width:R,open:e,onOk:a,onCancel:g,children:[o||null,(0,F.jsx)(c.Z,C()(C()({form:i},v),{},{name:q,initialValues:$,onFinish:Y,children:_.map(function(f,j){return(0,F.jsx)(P.Z,{span:f.span||24,children:(0,F.jsx)(Q,{label:f.label,colon:f.colon||!0,initialValue:f.initialValue,rules:[{required:f.required,message:f.message}],name:f.name,valuePropName:f.valuePropName||"value",children:(0,A.Z)(f.type,f.placeholder,f.component)})},j)})}))]})};Z.Z=N},76081:function(ne,Z,n){var S=n(96365),C=n(72269),O=n(67294),d=n(85893),b=S.Z.TextArea,c=function(P,A){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return F||(P==="input"?(0,d.jsx)(S.Z,{placeholder:A}):P==="textarea"?(0,d.jsx)(b,{placeholder:A}):P==="switch"?(0,d.jsx)(C.Z,{}):null)};Z.Z=c},66815:function(ne,Z,n){n.r(Z),n.d(Z,{default:function(){return l}});var S=n(97857),C=n.n(S),O=n(15009),d=n.n(O),b=n(99289),c=n.n(b),L=n(5574),P=n.n(L),A=n(67294),F=n(58841),Q=n(94171),N=n(34041),I=n(58131),h=n(51904),w=n(96074),R=n(4393),k=n(71230),z=n(15746),q=n(71577),$=n(96365),Y=n(64240),K=n(19478),_=n(83062),e=n(85893),g=function(u){var i=u.icon,a=u.title,v=u.font,f=u.style,j=u.text,U=u.onClick;return(0,e.jsx)(_.Z,{title:a,children:(0,e.jsxs)("span",{onClick:U,style:C()({cursor:"pointer",fontSize:v},f),children:[i," ",j]})})},m=n(51042),t=n(84298),o=n(646),s=N.Z.Option,r=function(i){var a=i.loading,v=i.gconfig,f=i.dispatch,j=I.Z.useForm(),U=P()(j,1),H=U[0],W=v.envList,ee=v.envMap,T=v.addressList,V=(0,A.useState)(!1),te=P()(V,2),re=te[0],B=te[1],ae=(0,A.useState)({}),oe=P()(ae,2),p=oe[0],x=oe[1],M=function(){f({type:"gconfig/fetchEnvList",payload:{page:1,size:1e3,exactly:!0}})},J=function(){var D=H.getFieldsValue();f({type:"gconfig/fetchAddress",payload:D})},se=a.effects["gconfig/fetchAddress"]||a.effects["gconfig/fetchEnvList"]||a.effects["gconfig/updateAddress"]||a.effects["gconfig/insertAddress"]||a.effects["gconfig/deleteAddress"];(0,A.useEffect)(function(){M(),J()},[]);var ie=[{title:"\u73AF\u5883",key:"env",dataIndex:"env",render:function(D){return(0,e.jsx)(h.Z,{children:ee[D]})}},{title:"\u540D\u79F0",key:"name",dataIndex:"name"},{title:(0,e.jsx)(g,{title:"\u5730\u5740\u4E00\u822C\u662F\u670D\u52A1\u7684\u57FA\u7840\u5730\u5740\uFF0C\u6BD4\u5982https://api.baidu.com, \u7528\u4F8B\u4E2D\u7684\u5730\u5740\u7B80\u5199\u5373\u53EF",text:"\u5730\u5740"}),key:"gateway",dataIndex:"gateway",render:function(D){return(0,e.jsx)("a",{href:D,children:D})},ellipsis:!0},{title:"\u64CD\u4F5C",key:"operation",render:function(D,X){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{onClick:function(){x(X),B(!0)},children:"\u7F16\u8F91"}),(0,e.jsx)(w.Z,{type:"vertical"}),(0,e.jsx)(o.Z,{text:"\u5220\u9664",title:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u5730\u5740\u5417?",onConfirm:c()(d()().mark(function G(){return d()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,ue(X);case 2:case"end":return y.stop()}},G)}))})]})}}],ce=[{name:"env",label:"\u73AF\u5883",required:!0,message:"\u8BF7\u9009\u62E9\u5BF9\u5E94\u73AF\u5883",type:"select",component:(0,e.jsx)(N.Z,{placeholder:"\u8BF7\u9009\u62E9\u5BF9\u5E94\u73AF\u5883",children:W.map(function(E){return(0,e.jsx)(s,{value:E.id,children:E.name},E.id)})})},{name:"name",label:"\u5730\u5740\u540D\u79F0",required:!0,message:"\u8BF7\u8F93\u5165\u5730\u5740\u540D\u79F0",type:"input",placeholder:"\u8BF7\u8F93\u5165\u5730\u5740\u540D\u79F0"},{name:"gateway",label:"\u670D\u52A1\u5730\u5740",required:!0,message:"\u8BF7\u8F93\u5165\u670D\u52A1\u5730\u5740",type:"input",placeholder:"\u8BF7\u8F93\u5165\u670D\u52A1\u5730\u5740"}],ue=function(){var E=c()(d()().mark(function D(X){var G;return d()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,f({type:"gconfig/deleteAddress",payload:{id:X.id}});case 2:G=y.sent,G&&J();case 4:case"end":return y.stop()}},D)}));return function(X){return E.apply(this,arguments)}}(),de=function(){var E=c()(d()().mark(function D(X){var G;return d()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!p.id){y.next=6;break}return y.next=3,f({type:"gconfig/updateAddress",payload:C()(C()({},X),{},{id:p.id})});case 3:G=y.sent,y.next=9;break;case 6:return y.next=8,f({type:"gconfig/insertAddress",payload:X});case 8:G=y.sent;case 9:G&&(B(!1),J());case 10:case"end":return y.stop()}},D)}));return function(X){return E.apply(this,arguments)}}();return(0,e.jsx)(F._z,{breadcrumb:null,title:"\u8BF7\u6C42\u5730\u5740\u7BA1\u7406",children:(0,e.jsxs)(R.Z,{children:[(0,e.jsx)(t.Z,{open:re,fields:ce,title:p.id?"\u4FEE\u6539\u5730\u5740":"\u6DFB\u52A0\u5730\u5740",left:6,right:18,record:p,onFinish:de,onCancel:function(){return B(!1)}}),(0,e.jsx)(I.Z,C()(C()({form:H},K.Z.LAYOUT),{},{onValuesChange:J,children:(0,e.jsxs)(k.Z,{gutter:12,children:[(0,e.jsx)(z.Z,{span:3,children:(0,e.jsx)(I.Z.Item,{children:(0,e.jsxs)(q.ZP,{type:"primary",onClick:function(){B(!0),x({})},children:[(0,e.jsx)(m.Z,{}),"\u6DFB\u52A0\u5730\u5740"]})})}),(0,e.jsx)(z.Z,{span:7,children:(0,e.jsx)(I.Z.Item,{label:"\u73AF\u5883",name:"env",children:(0,e.jsx)(N.Z,{allowClear:!0,showSearch:!0,placeholder:"\u9009\u62E9\u5BF9\u5E94\u7684\u73AF\u5883",children:W.map(function(E){return(0,e.jsx)(s,{value:E.id,children:E.name},E.id)})})})}),(0,e.jsx)(z.Z,{span:7,children:(0,e.jsx)(I.Z.Item,{label:"\u540D\u79F0",name:"name",children:(0,e.jsx)($.Z,{placeholder:"\u8F93\u5165\u5BF9\u5E94\u7684\u5730\u5740\u540D\u79F0"})})}),(0,e.jsx)(z.Z,{span:7,children:(0,e.jsx)(I.Z.Item,{label:"\u5730\u5740",name:"gateway",children:(0,e.jsx)($.Z,{placeholder:"\u8F93\u5165\u5BF9\u5E94\u7684\u5730\u5740"})})})]})})),(0,e.jsx)(Y.Z,{columns:ie,loading:se,rowKey:function(D){return D.id},dataSource:T})]})})},l=(0,Q.connect)(function(u){var i=u.gconfig,a=u.user,v=u.loading;return{gconfig:i,user:a,loading:v}})((0,A.memo)(r))},86738:function(ne,Z,n){n.d(Z,{Z:function(){return m}});var S=n(26702),C=n(94184),O=n.n(C),d=n(21770),b=n(15105),c=n(67294),L=n(98423),P=n(53124),A=n(55241),F=n(96159),Q=n(71577),N=n(87149),I=n(86743),h=n(74342),w=n(24457),R=n(81643),k=n(60590),z=n(67968);const q=t=>{const{componentCls:o,iconCls:s,zIndexPopup:r,colorText:l,colorWarning:u,marginXS:i,fontSize:a,fontWeightStrong:v,lineHeight:f}=t;return{[o]:{zIndex:r,[`${o}-inner-content`]:{color:l},[`${o}-message`]:{position:"relative",marginBottom:i,color:l,fontSize:a,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${o}-message-icon ${s}`]:{color:u,fontSize:a,flex:"none",lineHeight:1,paddingTop:(Math.round(a*f)-a)/2},"&-title":{flex:"auto",marginInlineStart:i},"&-title-only":{fontWeight:v}},[`${o}-description`]:{position:"relative",marginInlineStart:a+i,marginBottom:i,color:l,fontSize:a},[`${o}-buttons`]:{textAlign:"end",button:{marginInlineStart:i}}}}};var $=(0,z.Z)("Popconfirm",t=>q(t),t=>{const{zIndexPopupBase:o}=t;return{zIndexPopup:o+60}}),Y=function(t,o){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.indexOf(r)<0&&(s[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(t);l<r.length;l++)o.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(t,r[l])&&(s[r[l]]=t[r[l]]);return s};const K=t=>{const{prefixCls:o,okButtonProps:s,cancelButtonProps:r,title:l,description:u,cancelText:i,okText:a,okType:v="primary",icon:f=c.createElement(S.Z,null),showCancel:j=!0,close:U,onConfirm:H,onCancel:W}=t,{getPrefixCls:ee}=c.useContext(P.E_);return c.createElement(h.Z,{componentName:"Popconfirm",defaultLocale:w.Z.Popconfirm},T=>c.createElement("div",{className:`${o}-inner-content`},c.createElement("div",{className:`${o}-message`},f&&c.createElement("span",{className:`${o}-message-icon`},f),c.createElement("div",{className:O()(`${o}-message-title`,{[`${o}-message-title-only`]:!!u})},(0,R.Z)(l))),u&&c.createElement("div",{className:`${o}-description`},(0,R.Z)(u)),c.createElement("div",{className:`${o}-buttons`},j&&c.createElement(Q.ZP,Object.assign({onClick:W,size:"small"},r),i!=null?i:T.cancelText),c.createElement(I.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,N.n)(v)),s),actionFn:H,close:U,prefixCls:ee("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},a!=null?a:T.okText))))};function _(t){const{prefixCls:o,placement:s,className:r,style:l}=t,u=Y(t,["prefixCls","placement","className","style"]),{getPrefixCls:i}=c.useContext(P.E_),a=i("popconfirm",o),[v]=$(a);return v(c.createElement(k.ZP,{placement:s,className:O()(a,r),style:l,content:c.createElement(K,Object.assign({prefixCls:a},u))}))}var e=function(t,o){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.indexOf(r)<0&&(s[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(t);l<r.length;l++)o.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(t,r[l])&&(s[r[l]]=t[r[l]]);return s};const g=c.forwardRef((t,o)=>{const{getPrefixCls:s}=c.useContext(P.E_),[r,l]=(0,d.Z)(!1,{value:t.open,defaultValue:t.defaultOpen}),u=(p,x)=>{var M;l(p,!0),(M=t.onOpenChange)===null||M===void 0||M.call(t,p,x)},i=p=>{u(!1,p)},a=p=>{var x;return(x=t.onConfirm)===null||x===void 0?void 0:x.call(void 0,p)},v=p=>{var x;u(!1,p),(x=t.onCancel)===null||x===void 0||x.call(void 0,p)},f=p=>{p.keyCode===b.Z.ESC&&r&&u(!1,p)},j=p=>{const{disabled:x=!1}=t;x||u(p)},{prefixCls:U,placement:H="top",trigger:W="click",okType:ee="primary",icon:T=c.createElement(S.Z,null),children:V,overlayClassName:te}=t,re=e(t,["prefixCls","placement","trigger","okType","icon","children","overlayClassName"]),B=s("popconfirm",U),ae=O()(B,te),[oe]=$(B);return oe(c.createElement(A.Z,Object.assign({},(0,L.Z)(re,["title"]),{trigger:W,placement:H,onOpenChange:j,open:r,ref:o,overlayClassName:ae,content:c.createElement(K,Object.assign({okType:ee,icon:T},t,{prefixCls:B,close:i,onConfirm:a,onCancel:v})),"data-popover-inject":!0}),(0,F.Tm)(V,{onKeyDown:p=>{var x,M;c.isValidElement(V)&&((M=V==null?void 0:(x=V.props).onKeyDown)===null||M===void 0||M.call(x,p)),f(p)}})))});g._InternalPanelDoNotUseOrYouWillBeFired=_;var m=g},51904:function(ne,Z,n){n.d(Z,{Z:function(){return _}});var S=n(62208),C=n(94184),O=n.n(C),d=n(67294),b=n(53124),c=n(98787),L=n(45353),P=n(67968),A=n(45503);function F(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}var Q=n(63443),N=n(14747);const I=(e,g,m)=>{const t=F(m);return{[`${e.componentCls}-${g}`]:{color:e[`color${m}`],background:e[`color${t}Bg`],borderColor:e[`color${t}Border`]}}},h=e=>(0,Q.j)(e,(g,m)=>{let{textColor:t,lightBorderColor:o,lightColor:s,darkColor:r}=m;return{[`${e.componentCls}-${g}`]:{color:t,background:s,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:r,borderColor:r}}}}),w=e=>{const{paddingXXS:g,lineWidth:m,tagPaddingHorizontal:t,componentCls:o}=e,s=t-m,r=g-m;return{[o]:Object.assign(Object.assign({},(0,N.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:s,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${o}-close-icon`]:{marginInlineStart:r,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:s}})}};var R=(0,P.Z)("Tag",e=>{const{fontSize:g,lineHeight:m,lineWidth:t,fontSizeIcon:o}=e,s=Math.round(g*m),r=e.fontSizeSM,l=s-t*2,u=e.colorFillAlter,i=e.colorText,a=(0,A.TS)(e,{tagFontSize:r,tagLineHeight:l,tagDefaultBg:u,tagDefaultColor:i,tagIconSize:o-2*t,tagPaddingHorizontal:8});return[w(a),h(a),I(a,"success","Success"),I(a,"processing","Info"),I(a,"error","Error"),I(a,"warning","Warning")]}),k=function(e,g){var m={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&g.indexOf(t)<0&&(m[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)g.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(m[t[o]]=e[t[o]]);return m},q=e=>{var{prefixCls:g,className:m,checked:t,onChange:o,onClick:s}=e,r=k(e,["prefixCls","className","checked","onChange","onClick"]);const{getPrefixCls:l}=d.useContext(b.E_),u=j=>{o==null||o(!t),s==null||s(j)},i=l("tag",g),[a,v]=R(i),f=O()(i,{[`${i}-checkable`]:!0,[`${i}-checkable-checked`]:t},m,v);return a(d.createElement("span",Object.assign({},r,{className:f,onClick:u})))},$=function(e,g){var m={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&g.indexOf(t)<0&&(m[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)g.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(m[t[o]]=e[t[o]]);return m};const Y=(e,g)=>{var{prefixCls:m,className:t,style:o,children:s,icon:r,color:l,onClose:u,closeIcon:i,closable:a=!1}=e,v=$(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]);const{getPrefixCls:f,direction:j}=d.useContext(b.E_),[U,H]=d.useState(!0);d.useEffect(()=>{"visible"in v&&H(v.visible)},[v.visible]);const W=(0,c.o2)(l)||(0,c.yT)(l),ee=Object.assign({backgroundColor:l&&!W?l:void 0},o),T=f("tag",m),[V,te]=R(T),re=O()(T,{[`${T}-${l}`]:W,[`${T}-has-color`]:l&&!W,[`${T}-hidden`]:!U,[`${T}-rtl`]:j==="rtl"},t,te),B=J=>{J.stopPropagation(),u==null||u(J),!J.defaultPrevented&&H(!1)},ae=()=>a?i?d.createElement("span",{className:`${T}-close-icon`,onClick:B},i):d.createElement(S.Z,{className:`${T}-close-icon`,onClick:B}):null,oe=typeof v.onClick=="function"||s&&s.type==="a",p=r||null,x=p?d.createElement(d.Fragment,null,p,d.createElement("span",null,s)):s,M=d.createElement("span",Object.assign({},v,{ref:g,className:re,style:ee}),x,ae());return V(oe?d.createElement(L.Z,null,M):M)},K=d.forwardRef(Y);K.CheckableTag=q;var _=K}}]);