|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[451],{81445:function(M,j,t){"use strict";t.r(j),t.d(j,{default:function(){return Y}});var Q=t(71194),R=t(50146),U=t(47673),F=t(4107),X=t(57663),S=t(71577),w=t(62350),T=t(24565),b=t(34792),i=t(48086),d=t(39428),y=t(3182),k=t(9715),p=t(55843),x=t(2824),g=t(67294),A=t(49101),B=t(28790),z=t(16894),m=t(48971),h=t(96690);function D(s){return(0,m.WY)((0,h.zr)()+"/api/appid/getappidpage",{method:"post",data:s})}function $(s){return(0,m.WY)((0,h.zr)()+"/api/appid/add",{method:"post",data:s})}function E(s){return(0,m.WY)((0,h.zr)()+"/api/appid/delete",{method:"post",data:s})}function O(s){return(0,m.WY)((0,h.zr)()+"/api/appid/update",{method:"post",data:s})}var e=t(85893),W=function(){var v=(0,g.useRef)(),V=p.Z.useForm(),G=(0,x.Z)(V,1),Z=G[0],J=(0,g.useState)(!1),C=(0,x.Z)(J,2),K=C[0],f=C[1],N=(0,g.useState)({}),I=(0,x.Z)(N,2),q=I[0],H=I[1],L=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684key",hideInSearch:!0,hideInTable:!0},{title:"APPID",dataIndex:"appId",valueType:"textarea",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",width:300,render:function(l,n){return[(0,e.jsx)("a",{onClick:(0,y.Z)((0,d.Z)().mark(function o(){return(0,d.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:Z.setFieldsValue(n),H(n),f(!0);case 3:case"end":return a.stop()}},o)})),children:"\u66F4\u65B0"},n.id),(0,e.jsx)(T.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:function(){var r=[n.id];E(r).then(function(a){a.data?(i.default.success("\u5220\u9664\u6210\u529F"),v.current.reloadAndRest()):i.default.error("\u5220\u9664\u5931\u8D25")})},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsx)("a",{children:"\u5220\u9664"},n.id)})]}}];return(0,e.jsxs)(B.ZP,{header:{title:"",breadcrumb:{}},children:[(0,e.jsx)(z.ZP,{toolBarRender:function(){return(0,e.jsxs)(S.Z,{type:"primary",onClick:function(){Z.resetFields(),f(!0)},children:[(0,e.jsx)(A.Z,{})," \u65B0\u5EFA"]},"primary")},headerTitle:"",actionRef:v,rowKey:"id",search:!1,request:function(){var u=(0,y.Z)((0,d.Z)().mark(function l(n){var o,r;return(0,d.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=[],r=0,c.next=4,D(JSON.stringify(n)).then(function(P){o=P.data.data,r=P.data.total});case 4:return c.abrupt("return",{data:o,success:!0,total:r});case 5:case"end":return c.stop()}},l)}));return function(l){return u.apply(this,arguments)}}(),columns:L,pagination:{defaultPageSize:10}}),(0,e.jsx)(R.Z,{open:K,onOk:function(){Z.submit()},onCancel:function(){f(!1)},children:(0,e.jsxs)(p.Z,{form:Z,preserve:!1,layout:"horizontal",labelCol:{span:4},onFinish:function(){var u=(0,y.Z)((0,d.Z)().mark(function l(n){return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n.id?O(n).then(function(a){a.data?(i.default.success("\u4FEE\u6539\u6210\u529F"),f(!1),v.current.reloadAndRest()):i.default.error(a.errors||"\u4FEE\u6539\u5931\u8D25")}):$(n).then(function(a){a.data?(i.default.success("\u6DFB\u52A0\u6210\u529F"),f(!1),v.current.reloadAndRest()):i.default.error(a.errors||"\u6DFB\u52A0\u5931\u8D25")});case 1:case"end":return r.stop()}},l)}));return function(l){return u.apply(this,arguments)}}(),children:[(0,e.jsx)(p.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(F.Z,{})}),(0,e.jsx)("br",{}),(0,e.jsx)(p.Z.Item,{name:"appId",label:"APPID",rules:[{required:!0,max:500}],children:(0,e.jsx)(F.Z,{placeholder:"\u8BF7\u8F93\u5165appid"})})]})})]})},Y=W}}]);
|