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