You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

p__Advertisement__List__index.c9276c4f.async.js 8.5KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[924],{50384:function(oe,z,u){u.r(z),u.d(z,{default:function(){return ae}});var H=u(5574),f=u.n(H),s=u(62435),O=u(59530),T=u(28459),J=u(15009),c=u.n(J),N=u(99289),C=u.n(N),Q=u(95338),G=u(42075),v=u(26412),D=u(14726),b=u(39680),e=u(86074),U=function(a){var h=a.dispatch,j=a.openModel,A=a.getId,i=(0,s.useRef)(),y=(0,s.useState)([]),g=f()(y,2),M=g[0],B=g[1],S=(0,s.useState)(0),P=f()(S,2),R=P[0],K=P[1],I=(0,s.useState)(1),r=f()(I,2),l=r[0],n=r[1],o=(0,s.useState)(10),w=f()(o,2),L=w[0],d=w[1],re=function(t){A(t)};(0,s.useEffect)(function(){j.openModal||i.current.reload()},[j.openModal]);var se=function(t){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(G.Z,{direction:"vertical",style:{width:"100%"},children:(0,e.jsxs)(v.Z,{title:"\u57FA\u672C\u4FE1\u606F",bordered:!0,column:3,contentStyle:{fontWeight:"bold"},labelStyle:{width:180},children:[(0,e.jsx)(v.Z.Item,{label:"\u9650\u5236\u663E\u793A\u5E7F\u544A\u6570",children:t.ad_num}),(0,e.jsx)(v.Z.Item,{label:"\u663E\u793A\u5217\u6570",children:t.cols}),(0,e.jsx)(v.Z.Item,{label:"\u5E7F\u544A\u663E\u793A\u5BBD\u5EA6",children:t.width}),(0,e.jsx)(v.Z.Item,{label:"\u5E7F\u544A\u663E\u793A\u9AD8\u5EA6",children:t.height}),(0,e.jsx)(v.Z.Item,{label:"\u5217\u95F4\u8DDD",children:t.col_padding}),(0,e.jsx)(v.Z.Item,{label:"\u884C\u95F4\u8DDD",children:t.row_padding})]})})})};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(T.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,e.jsx)(Q.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:i,dataSource:M,search:{span:8,labelWidth:"auto"},rowSelection:{type:"checkbox"},expandable:{expandedRowRender:se},columns:[{title:"ID",dataIndex:"id",search:!1},{title:"\u5E7F\u544A\u4F4D\u7F6E",dataIndex:"name"},{title:"\u5E7F\u544A\u4F4D\u7F6E\u4EE3\u7801",dataIndex:"code",search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(t,m,le){return[(0,e.jsx)(D.ZP,{type:"link",onClick:function(){re(m.id),h({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,e.jsx)(D.ZP,{type:"link",onClick:function(){},children:"\u5220\u9664"},"2")]}}],rowKey:"id",pagination:{current:l,pageSize:L,showSizeChanger:!0,total:R,pageSizeOptions:[9,18,27,99],onChange:function(t,m){n(t),d(m)},onShowSizeChange:function(t,m){n(t),d(m)}},request:C()(c()().mark(function E(){var t,m=arguments;return c()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return t=m.length>0&&m[0]!==void 0?m[0]:{},Z.abrupt("return",(0,b.sXE)({page:l,pagesize:L,sort:"id",sortby:"desc",keyword:t.name}).then(function(X){B(X.data.advertareas),K(X.data.total)}));case 2:case"end":return Z.stop()}},E)})),headerTitle:"\u5E7F\u544A\u4F4D\u7F6E\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(D.ZP,{type:"primary",onClick:function(){},children:"\u6279\u91CF\u5220\u9664"}),(0,e.jsx)(D.ZP,{type:"primary",onClick:function(){h({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u5E7F\u544A\u4F4D\u7F6E"})]}})})})},V=(0,O.connect)(function(F){var a=F.openModel;return{openModel:a}})(U),Y=u(97269),k=u(5966),x=u(31199),$=u(86615),q=u(17788),_=u(86250),W=u(68872),ee=u(71230),p=u(15746),ue=function(a){var h=a.dispatch,j=a.dictModel,A=a.openModel,i=a.id,y=(0,s.useRef)(),g=(0,s.useState)(!1),M=f()(g,2),B=M[0],S=M[1],P=(0,s.useState)(null),R=f()(P,2),K=R[0],I=R[1];return(0,s.useEffect)(function(){S(A.openModal)},[A.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(T.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,e.jsx)(q.Z,{open:B,title:i?"\u7F16\u8F91\u5E7F\u544A\u4F4D\u7F6E":"\u6DFB\u52A0\u5E7F\u544A\u4F4D\u7F6E",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){h({type:"openModel/getOpenModal",payload:!1})},children:(0,e.jsx)(Y.A,{formRef:y,request:C()(c()().mark(function r(){var l;return c()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!i){o.next=8;break}return o.next=3,(0,b.pFh)({id:i});case 3:return l=o.sent,I(l.data),o.abrupt("return",l.data);case 8:return o.abrupt("return",{title:"",cover_img:"",doc_url:"",section_id:null,content:"",stick_top:0,hot:0,author:"",random_show:1,disabled_status:1});case 9:case"end":return o.stop()}},r)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(l,n){return(0,e.jsxs)(_.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(G.Z,{children:n})]})},onReset:function(){I(null),h({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var r=C()(c()().mark(function l(n){var o,w;return c()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(console.log(n),!i){d.next=10;break}return n.id=i,d.next=5,(0,b.fAF)(n);case 5:o=d.sent,W.ZP.success("\u63D0\u4EA4\u6210\u529F"),h({type:"openModel/getOpenModal",payload:!1}),d.next=15;break;case 10:return d.next=12,(0,b.Gy5)(n);case 12:w=d.sent,W.ZP.success("\u63D0\u4EA4\u6210\u529F"),h({type:"openModel/getOpenModal",payload:!1});case 15:case"end":return d.stop()}},l)}));return function(l){return r.apply(this,arguments)}}(),children:(0,e.jsxs)(ee.Z,{gutter:[16,16],children:[(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(k.Z,{label:"\u5E7F\u544A\u4F4D\u7F6E\uFF0C\u6309\u7167\u8BE5\u683C\u5F0F\uFF1A\u6765\u6E90\u9875\u9762\u5E7F\u544A\u4F4D\u540D",name:"name",placeholder:"\u8BF7\u8F93\u5165\u5E7F\u544A\u4F4D\u7F6E,\u5982\uFF1A\u5C0F\u7A0B\u5E8F\u9996\u9875\u8F6E\u64AD\u56FE\uFF1B\u5C0F\u7A0B\u5E8F\u9996\u9875\u4F01\u4E1ALOGO\u56FE",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E7F\u544A\u4F4D\u7F6E,\u5982\uFF1A\u5C0F\u7A0B\u5E8F\u9996\u9875\u8F6E\u64AD\u56FE\uFF1B\u5C0F\u7A0B\u5E8F\u9996\u9875\u4F01\u4E1ALOGO\u56FE"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(k.Z,{label:"\u5E7F\u544A\u4F4D\u7F6E\u4EE3\u7801\uFF0C\u4F7F\u7528\u62FC\u97F3\u7F29\u5199\uFF0C\u4E0D\u8981\u8D85\u8FC7\u5341\u4E2A\u5B57\u6BCD",name:"code",placeholder:"\u8BF7\u8F93\u5165\u5E7F\u544A\u4F4D\u7F6E\u4EE3\u7801\uFF0C\u4F7F\u7528\u62FC\u97F3\u7F29\u5199\uFF0C\u4E0D\u8981\u8D85\u8FC7\u5341\u4E2A\u5B57\u6BCD",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E7F\u544A\u4F4D\u7F6E\u4EE3\u7801\uFF0C\u4F7F\u7528\u62FC\u97F3\u7F29\u5199\uFF0C\u4E0D\u8981\u8D85\u8FC7\u5341\u4E2A\u5B57\u6BCDs"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(x.Z,{label:"\u9650\u5236\u663E\u793A\u5E7F\u544A\u6570",name:"ad_num",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9650\u5236\u663E\u793A\u5E7F\u544A\u6570"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(x.Z,{label:"\u663E\u793A\u5217\u6570",name:"cols",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u663E\u793A\u5217\u6570"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(x.Z,{label:"\u5E7F\u544A\u5BBD\u5EA6",name:"width",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E7F\u544A\u5BBD\u5EA6"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(x.Z,{label:"\u5E7F\u544A\u9AD8\u5EA6",name:"height",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E7F\u544A\u9AD8\u5EA6"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(x.Z,{label:"\u5217\u95F4\u8DDD",name:"col_padding",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u95F4\u8DDD"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)(x.Z,{label:"\u884C\u95F4\u8DDD",name:"row_padding",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u95F4\u8DDD"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)($.Z.Group,{name:"random_show",label:"\u968F\u673A\u663E\u793A",request:C()(c()().mark(function r(){return c()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",[{label:"\u968F\u673A",value:1},{label:"\u4E0D\u968F\u673A",value:2}]);case 1:case"end":return n.stop()}},r)})),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u968F\u673A\u663E\u793A"}]})}),(0,e.jsx)(p.Z,{span:12,children:(0,e.jsx)($.Z.Group,{name:"disabled_status",label:"\u7981\u7528\u72B6\u6001",request:C()(c()().mark(function r(){return c()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",[{label:"\u6B63\u5E38",value:1},{label:"\u7981\u7528",value:2}]);case 1:case"end":return n.stop()}},r)})),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7981\u7528\u72B6\u6001"}]})})]})})})})})},ne=(0,O.connect)(function(F){var a=F.dictModel,h=F.openModel;return{dictModel:a,openModel:h}})(ue),te=function(a){var h=a.dispatch,j=a.openModel,A=(0,s.useState)(0),i=f()(A,2),y=i[0],g=i[1],M=function(S){g(S)};return(0,s.useEffect)(function(){j.openModal||g(0)},[j.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(T.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,e.jsx)(V,{getId:M}),(0,e.jsx)(ne,{id:y})]})})},ae=(0,O.connect)(function(F){var a=F.openModel;return{openModel:a}})(te)}}]);