Files
FBSAdminTool/build/static/js/6.e3c13f5e.chunk.js
2021-08-09 11:42:23 +05:30

2 lines
5.0 KiB
JavaScript

(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6],{680:function(e,t){e.exports=function(e,t,c,n){var o=new Blob("undefined"!==typeof n?[n,e]:[e],{type:c||"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)}}},692:function(e,t,c){"use strict";c.r(t);var n=c(637),o=c.n(n),a=c(638),i=c(636),r=c(1),s=c(632),l=c.n(s),d=c(630),j=c(629),u=c(17);c(680);t.default=function(){var e="https://natnats.mobilous.com/",t=new Date,c=t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear(),n=Object(r.useState)([]),s=Object(i.a)(n,2),b=s[0],h=s[1],m=Object(r.useState)(c),p=Object(i.a)(m,2),O=p[0],x=p[1],f=Object(r.useState)(""),v=Object(i.a)(f,2),w=v[0],g=v[1],k=Object(r.useState)(""),y=Object(i.a)(k,2),L=y[0],C=y[1],R=Object(r.useState)(!1),U=Object(i.a)(R,2),_=U[0],S=U[1];return Object(r.useEffect)((function(){function e(){return(e=Object(a.a)(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,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(u.jsxs)(d.K,{children:[Object(u.jsx)(d.k,{xs:"12",sm:"12",md:"12",children:Object(u.jsxs)(d.f,{children:[Object(u.jsx)(d.j,{children:"\u30ec\u30dd\u30fc\u30c8"}),Object(u.jsxs)(d.g,{children:[Object(u.jsxs)(d.L,{custom:!0,name:"cons_select",id:"cons_select",onChange:function(e){C(e.target.value)},children:['" ',Object(u.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),'"+',b.map((function(e,t){return Object(u.jsx)("option",{value:e.construction_id,children:e.construction_name},e.construction_id)}))]}),Object(u.jsxs)(d.f,{children:[Object(u.jsx)(d.g,{children:Object(u.jsxs)(d.s,{action:"",method:"post",encType:"multipart/form-data",className:"form-horizontal",children:[Object(u.jsxs)(d.t,{row:!0,children:[Object(u.jsx)(d.k,{md:"3",children:Object(u.jsxs)(d.H,{htmlFor:"date-input",children:["\u65e5\u4ed8 (",O,")"]})}),Object(u.jsx)(d.k,{xs:"12",md:"9",children:Object(u.jsx)(d.A,{type:"date",id:"date-input",name:"date-input",placeholder:"\u65e5\u4ed8",value:O,onChange:function(e){x(e.target.value)}})})]}),Object(u.jsxs)(d.t,{row:!0,children:[Object(u.jsx)(d.k,{md:"3",children:Object(u.jsx)(d.H,{htmlFor:"select",children:"\u9078\u629e"})}),Object(u.jsx)(d.k,{xs:"12",md:"9",children:Object(u.jsxs)(d.L,{custom:!0,name:"select",id:"select",onChange:function(e){g(e.target.value)},value:w,children:[Object(u.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),Object(u.jsx)("option",{value:"generateBoxDisplacement",children:"\u51fd\u4f53\u5909\u4f4d\u8868"}),Object(u.jsx)("option",{value:"generateMachineControl",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u30de\u30b7\u30f3\u7ba1\u7406\u65e5\u5831"}),Object(u.jsx)("option",{value:"generateMachineSheet",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u6a5f\u5909\u4f4d\u8868"}),Object(u.jsx)("option",{value:"generateMeasurement",children:"\u51fd\u5e95\u9ad8\u30fb\u504f\u4f4d\u91cf\u6e2c\u5b9a\u4e00\u89a7\u8868"}),Object(u.jsx)("option",{value:"generateCheckSheet",children:"\u5de5\u7a0b\u5185\u691c\u67fb\u8868"}),Object(u.jsx)("option",{value:"generateInjection",children:"\u88cf\u8fbc\u6ce8\u5165\u6750\u6599\u53d7\u6255\u3044\u7c3f"})]})})]}),"generateMachineControl"==w?Object(u.jsxs)(d.t,{variant:"checkbox",className:"checkbox",children:[Object(u.jsx)(d.B,{id:"checkbox1",name:"checkbox1",checked:_,value:"graph",onChange:function(e){S(e.target.checked)}}),Object(u.jsx)(d.H,{variant:"checkbox",className:"form-check-label",htmlFor:"checkbox1",children:"\u30b0\u30e9\u30d5\u306e\u6709\u7121"})]}):""]})}),Object(u.jsx)(d.h,{children:Object(u.jsxs)(d.e,{type:"submit",size:"sm",color:"primary",onClick:function(){if(""!=w&&""!=L){var t="";t=_?e+"/"+w+"?construction_id="+L+"&construction_date="+O+"&graph=true":e+"/"+w+"?construction_id="+L+"&construction_date="+O,console.log(t),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()}))}(t)}else alert("\u5efa\u8a2d\u3068\u30ec\u30dd\u30fc\u30c8\u306e\u4e21\u65b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044")},children:[Object(u.jsx)(j.a,{name:"cil-scrubber"})," \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9"]})})]})]})]})}),Object(u.jsx)(d.k,{xs:"1",sm:"1",md:"1"})]})}}}]);
//# sourceMappingURL=6.e3c13f5e.chunk.js.map