1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[539],{67119:function(ae,C,a){var W=a(59530),m=a(55375),s=a(68872),j=a(32443),v=a(86074),G=function(E){var F=E.onUploadComplete,b=E.uploadTxt,S=E.image_type,B=E.form_name,O=E.image_length,f=E.multiple,e=function(D){F&&F(D)};return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(j.Z,{label:b,name:B,icon:null,title:b,fieldProps:{maxCount:O,multiple:f,fileList:[],listType:"picture-card",showUploadList:!1,customRequest:function(D){var R=new FormData;R.append("image",D.file),console.log(R),(0,W.request)(m.FH+"/common/image/upload?imgtype="+S,{method:"post",data:R,Headers:{Authorization:sessionStorage.getItem("token"),"X-Requested-With":null}}).then(function(U){e(U.data.filename)}).catch(function(U){console.log(U),s.ZP.error("\u4E0A\u4F20\u5931\u8D25")})}}})})};C.Z=G},55375:function(ae,C,a){a.d(C,{FH:function(){return v},VO:function(){return j}});var W="Umi Max",m="/web",s="/common";console.log("production");var j="https://admin1.jcjob.cn/img/",v="https://admin1.jcjob.cn/api"},652:function(ae,C,a){a.r(C),a.d(C,{default:function(){return ge}});var W=a(5574),m=a.n(W),s=a(62435),j=a(59530),v=a(28459),G=a(15009),c=a.n(G),E=a(99289),F=a.n(E),b=a(67211),S=a(64317),B=a(66309),O=a(14726),f=a(39680),e=a(86074),Q={label:"full_name",value:"id"},D={label:"name",value:"id"},R=function(o){var g=o.dispatch,A=o.openModel,Z=o.getId,h=(0,s.useRef)(),w=(0,s.useState)([]),P=m()(w,2),T=P[0],$=P[1],z=(0,s.useState)(0),k=m()(z,2),K=k[0],I=k[1],V=(0,s.useState)(1),H=m()(V,2),L=H[0],y=H[1],X=(0,s.useState)(10),N=m()(X,2),i=N[0],l=N[1],u=function(t){Z(t)};return(0,s.useEffect)(function(){A.openModal||h.current.reload()},[A.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(v.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,e.jsx)(b.Z,{size:"small",bordered:!0,scroll:{x:1300},actionRef:h,dataSource:T,columns:[{title:"ID",dataIndex:"id",width:100,search:!1},{title:"\u6295\u653E\u6807\u9898",dataIndex:"title",width:240},{title:"\u6295\u653E\u4F4D\u7F6E",dataIndex:"area_name",search:!1},{title:"\u6295\u653E\u4F4D\u7F6E",dataIndex:"area_id",hidden:!0,valueType:"select",renderFormItem:function(){return(0,e.jsx)(S.Z,{width:"lg",fieldProps:{fieldNames:D},request:function(){var t=F()(c()().mark(function r(d){return c()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,f.sXE)({page:1,pagesize:100,keyword:d.keyWords}).then(function(ee){return ee.data.advertareas}));case 1:case"end":return p.stop()}},r)}));return function(r){return t.apply(this,arguments)}}(),placeholder:"\u8BF7\u9009\u62E9\u6295\u653E\u4F4D\u7F6E"})}},{title:"\u6295\u653E\u63CF\u8FF0",dataIndex:"ad_description",search:!1},{title:"\u4F01\u4E1A",dataIndex:"company_name",search:!1},{title:"\u4F01\u4E1A",dataIndex:"company_id",hidden:!0,valueType:"select",renderFormItem:function(){return(0,e.jsx)(S.Z,{showSearch:!0,fieldProps:{fieldNames:Q},request:function(){var t=F()(c()().mark(function r(d){return c()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,f.m_v)({page:1,pagesize:100,keyword:d.keyWords}).then(function(ee){return ee.data.list}));case 1:case"end":return p.stop()}},r)}));return function(r){return t.apply(this,arguments)}}(),placeholder:"\u8BF7\u9009\u62E9\u4F01\u4E1A"})}},{title:"\u6295\u653E\u72B6\u6001",dataIndex:"hide_ad",render:function(t,r){return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(e.Fragment,{children:[r.hide_ad===0&&(0,e.jsx)(B.Z,{children:"\u672A\u8BBE\u7F6E"}),r.hide_ad===1&&(0,e.jsx)(B.Z,{children:"\u9690\u85CF"}),r.hide_ad===2&&(0,e.jsx)(B.Z,{color:"green",children:"\u663E\u793A"})]})})},valueType:"select",valueEnum:{0:{text:"\u5168\u90E8"},1:{text:"\u9690\u85CF\u5E7F\u544A"},2:{text:"\u663E\u793A\u5E7F\u544A"}}},{title:"\u64CD\u4F5C",width:300,key:"option",valueType:"option",fixed:"right",render:function(t,r,d){return[(0,e.jsx)(O.ZP,{type:"link",onClick:function(){u(r.id),g({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,e.jsx)(O.ZP,{type:"link",onClick:function(){},children:"\u5220\u9664"},"2")]}}],rowKey:"id",pagination:{current:L,pageSize:i,showSizeChanger:!0,total:K,pageSizeOptions:[9,18,27,99],onChange:function(t,r){y(t),l(r)},onShowSizeChange:function(t,r){y(t),l(r)}},request:F()(c()().mark(function n(){var t,r=arguments;return c()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return t=r.length>0&&r[0]!==void 0?r[0]:{},M.abrupt("return",(0,f.E_$)({page:L,pagesize:i,sort:"id",sortby:"desc",keyword:t.title,hide_ad:t.hide_ad?t.hide_ad:0,company_id:t.company_id,area_id:t.area_id}).then(function(p){$(p.data.advertschedules),I(p.data.total)}));case 2:case"end":return M.stop()}},n)})),headerTitle:"\u5E7F\u544A\u4F4D\u7F6E\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(O.ZP,{type:"primary",onClick:function(){g({type:"openModel/getOpenModal",payload:!0})},children:"\u6295\u653E\u5E7F\u544A"})]}})})})},U=(0,j.connect)(function(x){var o=x.openModel;return{openModel:o}})(R),re=a(97269),J=a(5966),ue=a(31199),le=a(21134),oe=a(17788),se=a(86250),de=a(42075),te=a(68872),ie=a(71230),Y=a(15746),q=a(98163),_=a(55375),ne=a(67119),ce={label:"name",value:"id"},pe={label:"full_name",value:"id"},me=function(o){var g=o.dispatch,A=o.dictModel,Z=o.openModel,h=o.id,w=(0,s.useRef)(),P=(0,s.useState)(!1),T=m()(P,2),$=T[0],z=T[1],k=(0,s.useState)(null),K=m()(k,2),I=K[0],V=K[1];(0,s.useEffect)(function(){z(Z.openModal)},[Z.openModal]);var H=(0,s.useState)(""),L=m()(H,2),y=L[0],X=L[1],N=function(l){X(l)};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(v.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,e.jsx)(oe.Z,{open:$,title:h?"\u7F16\u8F91\u6295\u653E":"\u6DFB\u52A0\u6295\u653E",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){g({type:"openModel/getOpenModal",payload:!1})},children:(0,e.jsxs)(re.A,{formRef:w,request:F()(c()().mark(function i(){var l;return c()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!h){n.next=9;break}return n.next=3,(0,f.wZ4)({id:h});case 3:return l=n.sent,X(l.data.image_url),V(l.data),n.abrupt("return",l.data);case 9:return n.abrupt("return",{area_id:null,title:"",image_url:"",ad_description:"",target_url:"",show_order:0,valid_date:"",hide_ad:0,company_id:null});case 10:case"end":return n.stop()}},i)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(l,u){return(0,e.jsxs)(se.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(de.Z,{children:u})]})},onReset:function(){V(null),g({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var i=F()(c()().mark(function l(u){var n,t;return c()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(u.image_url=y||"",console.log(u),!h){d.next=11;break}return u.id=h,d.next=6,(0,f.ls$)(u);case 6:n=d.sent,te.ZP.success("\u63D0\u4EA4\u6210\u529F"),g({type:"openModel/getOpenModal",payload:!1}),d.next=16;break;case 11:return d.next=13,(0,f.pQi)(u);case 13:t=d.sent,te.ZP.success("\u63D0\u4EA4\u6210\u529F"),g({type:"openModel/getOpenModal",payload:!1});case 16:case"end":return d.stop()}},l)}));return function(l){return i.apply(this,arguments)}}(),children:[(0,e.jsx)(J.Z,{label:"\u5E7F\u544A\u6807\u9898",name:"title",placeholder:"\u8BF7\u8F93\u5165\u5E7F\u544A\u6807\u9898",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E7F\u544A\u6807\u9898"}]}),(0,e.jsx)(S.Z,{showSearch:!0,name:"area_id",label:"\u6295\u653E\u4F4D\u7F6E",placeholder:"\u8BF7\u9009\u62E9\u6295\u653E\u4F4D\u7F6E",fieldProps:{fieldNames:ce},request:function(l){return(0,f.sXE)({page:1,pagesize:100,keyword:l.keyWords}).then(function(u){return u.data.advertareas})},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6295\u653E\u4F4D\u7F6E"}]}),(0,e.jsx)(ie.Z,{gutter:[16,16],children:I?(0,e.jsxs)(Y.Z,{span:24,style:{display:"flex"},children:[(0,e.jsx)(ne.Z,{multiple:!1,form_name:"image_url",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,onUploadComplete:N}),y?(0,e.jsx)(q.Z,{src:"".concat(_.VO).concat(y),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}}):(0,e.jsx)(q.Z,{src:"".concat(_.VO).concat(I==null?void 0:I.image_url),style:{marginLeft:"16px",marginTop:"32px",width:"100px",height:"100px"}})]}):(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(Y.Z,{span:24,style:{display:"flex"},children:[(0,e.jsx)(ne.Z,{multiple:!1,form_name:"image_url",image_length:1,uploadTxt:"\u4E0A\u4F20\u5C01\u9762\u56FE",image_type:3,onUploadComplete:N}),y?(0,e.jsxs)(Y.Z,{span:8,children:[" ",(0,e.jsx)(q.Z,{src:"".concat(_.VO).concat(y),style:{marginTop:"32px",width:"100px",height:"100px"}})," "]}):""]})})}),(0,e.jsx)(J.Z,{label:"\u8BF4\u660E",name:"ad_description",placeholder:"\u8BF7\u8F93\u5165\u8BF4\u660E",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BF4\u660E"}]}),(0,e.jsx)(J.Z,{label:"\u8DF3\u8F6C\u7F51\u5740",name:"target_url",placeholder:"\u8BF7\u8F93\u5165\u8DF3\u8F6C\u7F51\u5740",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8DF3\u8F6C\u7F51\u5740"}]}),(0,e.jsx)(ue.Z,{label:"\u6B64\u5E7F\u544A\u5C55\u793A\u987A\u5E8F",placeholder:"\u8BF7\u8F93\u5165\u6B64\u5E7F\u544A\u5C55\u793A\u987A\u5E8F,\u8BF7\u8F93\u5165\u4F18\u5148\u7EA7\u7684\u6570\u5B57",name:"show_order",min:1,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B64\u5E7F\u544A\u5C55\u793A\u987A\u5E8F,\u8BF7\u8F93\u5165\u4F18\u5148\u7EA7\u7684\u6570\u5B57"}]}),(0,e.jsx)(le.Z,{name:"hide_ad",label:"\u662F\u5426\u9690\u85CF\u5E7F\u544A",request:F()(c()().mark(function i(){return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",[{label:"\u662F",value:1},{label:"\u5426",value:2}]);case 1:case"end":return u.stop()}},i)})),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u9690\u85CF\u5E7F\u544A"}]}),(0,e.jsx)(S.Z,{showSearch:!0,name:"company_id",label:"\u9009\u62E9\u4F01\u4E1A",placeholder:"\u8BF7\u9009\u62E9\u4F01\u4E1A",fieldProps:{fieldNames:pe},request:function(l){return(0,f.m_v)({page:1,pagesize:100,keyword:l.keyWords}).then(function(u){return u.data.list})}})]})})})})},he=(0,j.connect)(function(x){var o=x.dictModel,g=x.openModel;return{dictModel:o,openModel:g}})(me),fe=function(o){var g=o.dispatch,A=o.openModel,Z=(0,s.useState)(0),h=m()(Z,2),w=h[0],P=h[1],T=function(z){P(z)};return(0,s.useEffect)(function(){A.openModal||P(0)},[A.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(v.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,e.jsx)(U,{getId:T}),(0,e.jsx)(he,{id:w})]})})},ge=(0,j.connect)(function(x){var o=x.openModel;return{openModel:o}})(fe)}}]);
|