2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[5],{661:function(e,t,n){e.exports=n(382)},679:function(e,t){e.exports=function(e,t,n,c){var o=new Blob("undefined"!==typeof c?[c,e]:[e],{type:n||"application/octet-stream"});if("undefined"!==typeof window.navigator.msSaveBlob)window.navigator.msSaveBlob(o,t);else{var a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(o):window.webkitURL.createObjectURL(o),i=document.createElement("a");i.style.display="none",i.href=a,i.setAttribute("download",t),"undefined"===typeof i.download&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),setTimeout((function(){document.body.removeChild(i),window.URL.revokeObjectURL(a)}),200)}}},691:function(e,t,n){"use strict";n.r(t);var c=n(661),o=n.n(c);function a(e,t,n,c,o,a,i){try{var r=e[a](i),s=r.value}catch(l){return void n(l)}r.done?t(s):Promise.resolve(s).then(c,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var i=e.apply(t,n);function r(e){a(i,c,o,r,s,"next",e)}function s(e){a(i,c,o,r,s,"throw",e)}r(void 0)}))}}var r=n(647),s=n(1),l=n(638),d=n.n(l),u=n(630),j=n(629),b=n(17);n(679);t.default=function(){var e="https://natnats.mobilous.com/",t=new Date,n=t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear(),c=Object(s.useState)([]),a=Object(r.a)(c,2),l=a[0],h=a[1],m=Object(s.useState)(n),p=Object(r.a)(m,2),x=p[0],O=p[1],f=Object(s.useState)(""),v=Object(r.a)(f,2),w=v[0],g=v[1],k=Object(s.useState)(""),y=Object(r.a)(k,2),L=y[0],C=y[1],R=Object(s.useState)(!1),U=Object(r.a)(R,2),_=U[0],S=U[1];return Object(s.useEffect)((function(){function e(){return(e=i(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d()("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(b.jsxs)(u.K,{children:[Object(b.jsx)(u.k,{xs:"12",sm:"12",md:"12",children:Object(b.jsxs)(u.f,{children:[Object(b.jsx)(u.j,{children:"\u30ec\u30dd\u30fc\u30c8"}),Object(b.jsxs)(u.g,{children:[Object(b.jsxs)(u.L,{custom:!0,name:"cons_select",id:"cons_select",onChange:function(e){C(e.target.value)},children:['" ',Object(b.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),'"+',l.map((function(e,t){return Object(b.jsx)("option",{value:e.construction_id,children:e.construction_name},e.construction_id)}))]}),Object(b.jsxs)(u.f,{children:[Object(b.jsx)(u.g,{children:Object(b.jsxs)(u.s,{action:"",method:"post",encType:"multipart/form-data",className:"form-horizontal",children:[Object(b.jsxs)(u.t,{row:!0,children:[Object(b.jsx)(u.k,{md:"3",children:Object(b.jsxs)(u.H,{htmlFor:"date-input",children:["\u65e5\u4ed8 (",x,")"]})}),Object(b.jsx)(u.k,{xs:"12",md:"9",children:Object(b.jsx)(u.A,{type:"date",id:"date-input",name:"date-input",placeholder:"\u65e5\u4ed8",value:x,onChange:function(e){O(e.target.value)}})})]}),Object(b.jsxs)(u.t,{row:!0,children:[Object(b.jsx)(u.k,{md:"3",children:Object(b.jsx)(u.H,{htmlFor:"select",children:"\u9078\u629e"})}),Object(b.jsx)(u.k,{xs:"12",md:"9",children:Object(b.jsxs)(u.L,{custom:!0,name:"select",id:"select",onChange:function(e){g(e.target.value)},value:w,children:[Object(b.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),Object(b.jsx)("option",{value:"generateBoxDisplacement",children:"\u51fd\u4f53\u5909\u4f4d\u8868"}),Object(b.jsx)("option",{value:"generateMachineControl",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u30de\u30b7\u30f3\u7ba1\u7406\u65e5\u5831"}),Object(b.jsx)("option",{value:"generateMachineSheet",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u6a5f\u5909\u4f4d\u8868"}),Object(b.jsx)("option",{value:"generateMeasurement",children:"\u51fd\u5e95\u9ad8\u30fb\u504f\u4f4d\u91cf\u6e2c\u5b9a\u4e00\u89a7\u8868"}),Object(b.jsx)("option",{value:"generateCheckSheet",children:"\u5de5\u7a0b\u5185\u691c\u67fb\u8868"}),Object(b.jsx)("option",{value:"generateInjection",children:"\u88cf\u8fbc\u6ce8\u5165\u6750\u6599\u53d7\u6255\u3044\u7c3f"})]})})]}),"generateMachineControl"==w?Object(b.jsxs)(u.t,{variant:"checkbox",className:"checkbox",children:[Object(b.jsx)(u.B,{id:"checkbox1",name:"checkbox1",checked:_,value:"graph",onChange:function(e){S(e.target.checked)}}),Object(b.jsx)(u.H,{variant:"checkbox",className:"form-check-label",htmlFor:"checkbox1",children:"\u30b0\u30e9\u30d5\u306e\u6709\u7121"})]}):""]})}),Object(b.jsx)(u.h,{children:Object(b.jsxs)(u.e,{type:"submit",size:"sm",color:"primary",onClick:function(){if(""!=w&&""!=L){var t="";t=_?e+"/"+w+"?construction_id="+L+"&construction_date="+x+"&graph=true":e+"/"+w+"?construction_id="+L+"&construction_date="+x,console.log(t),function(e){d()({url:e,method:"GET",responseType:"blob"}).then((function(e){var t=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=t,n.setAttribute("download","file.xlsx"),document.body.appendChild(n),n.click()}))}(t)}else alert("\u5efa\u8a2d\u3068\u30ec\u30dd\u30fc\u30c8\u306e\u4e21\u65b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044")},children:[Object(b.jsx)(j.a,{name:"cil-scrubber"})," \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9"]})})]})]})]})}),Object(b.jsx)(u.k,{xs:"1",sm:"1",md:"1"})]})}}}]);
|
|
//# sourceMappingURL=5.f92d0105.chunk.js.map
|