update for downloaded file
This commit is contained in:
2
build/static/js/6.09d60206.chunk.js
Normal file
2
build/static/js/6.09d60206.chunk.js
Normal file
@ -0,0 +1,2 @@
|
||||
(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6],{688:function(e,t,c){"use strict";c.r(t);var n=c(657),s=c.n(n),o=c(658),a=c(678),i=c(1),r=c(659),l=c.n(r),j=c(631),u=c(629),d=c(20);c(677);t.default=function(){var e=new Date,t=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear(),c=Object(i.useState)([]),n=Object(a.a)(c,2),r=n[0],h=n[1],b=Object(i.useState)(t),O=Object(a.a)(b,2),m=O[0],p=O[1],x=Object(i.useState)(""),f=Object(a.a)(x,2),g=f[0],v=f[1],k=Object(i.useState)(""),w=Object(a.a)(k,2),y=w[0],C=w[1];return Object(i.useEffect)((function(){function e(){return(e=Object(o.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l()("https://natnats.mobilous.com/getConstructionList");case 2:t=e.sent,h(t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),Object(d.jsxs)(j.J,{children:[Object(d.jsx)(j.k,{xs:"12",sm:"12",md:"12",children:Object(d.jsxs)(j.f,{children:[Object(d.jsx)(j.j,{children:"\u30ec\u30dd\u30fc\u30c8"}),Object(d.jsxs)(j.g,{children:[Object(d.jsxs)(j.K,{custom:!0,name:"cons_select",id:"cons_select",onChange:function(e){C(e.target.value)},children:['" ',Object(d.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),'"+',r.map((function(e,t){return Object(d.jsx)("option",{value:e.construction_id,children:e.construction_name},e.construction_id)}))]}),Object(d.jsxs)(j.f,{children:[Object(d.jsx)(j.g,{children:Object(d.jsxs)(j.t,{action:"",method:"post",encType:"multipart/form-data",className:"form-horizontal",children:[Object(d.jsxs)(j.u,{row:!0,children:[Object(d.jsx)(j.k,{md:"3",children:Object(d.jsxs)(j.G,{htmlFor:"date-input",children:["\u65e5\u4ed8 (",m,")"]})}),Object(d.jsx)(j.k,{xs:"12",md:"9",children:Object(d.jsx)(j.B,{type:"date",id:"date-input",name:"date-input",placeholder:"\u65e5\u4ed8",value:m,onChange:function(e){p(e.target.value)}})})]}),Object(d.jsxs)(j.u,{row:!0,children:[Object(d.jsx)(j.k,{md:"3",children:Object(d.jsx)(j.G,{htmlFor:"select",children:"\u9078\u629e"})}),Object(d.jsx)(j.k,{xs:"12",md:"9",children:Object(d.jsxs)(j.K,{custom:!0,name:"select",id:"select",onChange:function(e){v(e.target.value)},value:g,children:[Object(d.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),Object(d.jsx)("option",{value:"generateBoxDisplacement",children:"\u51fd\u4f53\u5909\u4f4d\u8868"}),Object(d.jsx)("option",{value:"generateMachineControl",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u30de\u30b7\u30f3\u7ba1\u7406\u65e5\u5831"}),Object(d.jsx)("option",{value:"generateMachineSheet",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u6a5f\u5909\u4f4d\u8868"}),Object(d.jsx)("option",{value:"generateMeasurement",children:"\u51fd\u5e95\u9ad8\u30fb\u504f\u4f4d\u91cf\u6e2c\u5b9a\u4e00\u89a7\u8868"}),Object(d.jsx)("option",{value:"generateCheckSheet",children:"\u5de5\u7a0b\u5185\u691c\u67fb\u8868"}),Object(d.jsx)("option",{value:"generateInjection",children:"\u88cf\u8fbc\u6ce8\u5165\u6750\u6599\u53d7\u6255\u3044\u7c3f"})]})})]})]})}),Object(d.jsx)(j.h,{children:Object(d.jsxs)(j.e,{type:"submit",size:"sm",color:"primary",onClick:function(){if(""!=g&&""!=y){var e="https://natnats.mobilous.com//"+g+"?construction_id="+y+"&construction_date="+m;console.log(y),console.log(m),console.log(g),function(e){l()({url:e,method:"GET",responseType:"blob"}).then((function(e){var t=window.URL.createObjectURL(new Blob([e.data])),c=document.createElement("a");c.href=t,c.setAttribute("download","file.xlsx"),document.body.appendChild(c),c.click()}))}(e)}else alert("\u5efa\u8a2d\u3068\u30ec\u30dd\u30fc\u30c8\u306e\u4e21\u65b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044")},children:[Object(d.jsx)(u.a,{name:"cil-scrubber"})," \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9"]})})]})]})]})}),Object(d.jsx)(j.k,{xs:"1",sm:"1",md:"1"})]})}}}]);
|
||||
//# sourceMappingURL=6.09d60206.chunk.js.map
|
||||
Reference in New Issue
Block a user