????
Current Path : C:/inetpub/vhost/qlhncn.gdtsolutions.vn/www/assets/ |
Current File : C:/inetpub/vhost/qlhncn.gdtsolutions.vn/www/assets/index-c22004d4.js |
import{r as s,C as E,j as e}from"./index-63f91612.js";import{R as c,C as h,d as x,h as K,e as v,O as V,f as q}from"./reactstrap.modern-db56c8a4.js";import{A as _}from"./AddressComponent-dcc84d83.js";import{B as R}from"./Button-414de42d.js";import{B as I}from"./DataSelect-e63eac9d.js";import"./ButtonClose-c34d5952.js";import{F as M,C as F,I as A}from"./Form-cb88e45c.js";import{T as j}from"./QLLD_DM_TinhTrangViecLamEndpoint-1930e69f.js";import{F as G}from"./FontAwesome4-d45b4e7a.js";import"./FormControl-1241e33f.js";import"./Required-d6f950f1.js";import"./InputNumber-bbb3e938.js";import"./InputTime-7fc0744c.js";import"./createClass-ba011f43.js";import"./useTheme-88c8fc58.js";import"./TextArea-ca01d8ce.js";import"./DropdownList-84c9fae1.js";import"./Select-7eb08d2a.js";import"./classCallCheck-22a738c0.js";import"./Icon-8a6fd507.js";import"./withStyles-8b7f6946.js";import"./capitalize-7bd4806a.js";import"./DataTable-f53a5ff2.js";import"./OdataUtils-b4c5a51c.js";import"./SelectPanelMulti-840dd9be.js";import"./DialogCustomize-5c5d912b.js";import"./HTMLElementType-ee7a24b5.js";import"./TransitionGroup-0c42f737.js";import"./refType-b95f6af7.js";import"./function-f31ac6e8.js";import"./BodyDialog-a84bcf80.js";import"./debounce-b2775af4.js";import"./TabsBasic-696a6c3d.js";import"./QuickSearch-f2b7424f.js";import"./Service-d4f3f4ee.js";const D=new Date().getFullYear(),H=Array.from({length:40},(t,i)=>i).reduce((t,i)=>(t.push({Id:D-i,Name:D-i}),t),[]),L=14,d=4,u=[],C=11;for(let t=0;t<C;t++){const i=t===0?L+1:u[t-1].Id+d+1;t===C-1?u.push({Id:i,Name:`${i}+`}):u.push({Id:i,Name:`${i} - ${i+d}`})}const O={NhuCau:{field_name:"NhuCau",title:"Nhu cầu",type:"data-select",rules:{required:"Vui lòng chọn"},dataSelect:{options:[{value:1,label:"Nhu cầu học nghề"},{value:2,label:"Nhu cầu chuyển đổi học nghề"},{value:3,label:"Không có nhu cầu"},{value:4,label:"Tất cả"}],value_field:"value",text_field:"label",placeholder:"Chọn..."}},Nam:{field_name:"Nam",title:"Năm",type:"data-select",dataSelect:{options:H,value_field:"Id",text_field:"Name",placeholder:"Chọn..."},rules:{required:"Vui lòng nhập"}},NhomTuois:{field_name:"NhomTuois",title:"Nhóm tuổi",type:"data-select",dataSelect:{isMulti:!0,options:u,value_field:"Id",text_field:"Name",placeholder:"Chọn..."}},IsMen:{field_name:"IsMen",title:"Giới tính",type:"data-select",dataSelect:{url:"QLLD_DM_GioiTinh",value_field:"Id",text_field:"Name",placeholder:"Chọn..."}}},$=[{title:"Họ và tên",field:"HoVaTen",type:"string"},{title:"Ngày sinh",field:"NgayThangNamSinh",type:"date"},{title:"Giới tính",field:"GioiTinh",type:"string"},{title:"CMND/CCCD",field:"CCCD",type:"string"},{title:"SĐT",field:"SDT",type:"string"},{title:"Dân tộc",field:"DanToc",type:"string"},{title:"Nơi ở hiện tại",field:"NoiOHienTai",type:"string"},{title:"Đối tượng ưu tiên",field:"DoiTuongUuTien",type:"string"},{title:"Trình độ ",field:"TrinhDoHV",type:"string"},{title:"Trình độ CMKT",field:"TrinhDoCMKT",type:"string"},{title:"Nhu cầu chuyển đổi",field:"NhuCauChuyenDoi",type:"string"},{title:"Tên nghề nhu cầu",field:"TenNghe",type:"string"},{title:"Trình độ đào tạo",field:"TrinhDoDaoTao",type:"string"}];function Se(t){const[i,N]=s.useState("1"),[g,b]=s.useState({Report:0,NhuCau:4,Nam:new Date().getFullYear(),NhomTuois:[]}),[k,U]=s.useState($),p=s.useRef(),f=s.useRef(),T=s.useRef(),w=o=>{i===o?N():N(o)},S=s.useCallback((o,n)=>{b(a=>({...a,[o]:n}))},[]),l=s.useCallback(o=>{const n=f.current.getData();return{...o,...n,NhomTuois:o.NhomTuois.map(r=>({Min:r,Max:r+d}))}},[]),y=s.useCallback(o=>{try{const n=l(o);p.current.reload(n)}catch{}},[l]),B=s.useCallback(async o=>{try{const n=l(o),a=await j.getDataReport(n,{responseType:"blob"}),r=URL.createObjectURL(a);let m=document.createElement("a");m.href=r,m.download="Báo cáo nhu cầu theo khu vực",m.click()}catch(n){E(n.Message||"Thao tác không thành công!")}},[l]);return e.jsxDEV(M,{ref:T,onSubmit:y,children:e.jsxDEV(c,{children:[e.jsxDEV(h,{lg:4,children:e.jsxDEV(x,{children:[e.jsxDEV(K,{className:"d-flex justify-content-between",children:e.jsxDEV(c,{className:"w-100 ms-0",children:e.jsxDEV(h,{md:"4",children:"Bộ lọc"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:88,columnNumber:17},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:87,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:86,columnNumber:13},this),e.jsxDEV(v,{children:[e.jsxDEV(c,{children:e.jsxDEV(h,{md:"12",children:[e.jsxDEV(_,{ref:f},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:94,columnNumber:19},this),Object.entries(O).map(([o,n],a)=>!n.notMap&&e.jsxDEV(F,{colLabel:"4",colValue:"8",data:n,rules:n.rules,name:o,defaultValue:g&&g[o],onChange:S},a,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:98,columnNumber:25},this))]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:93,columnNumber:17},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:92,columnNumber:15},this),e.jsxDEV(V,{open:i,toggle:w},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:113,columnNumber:15},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:91,columnNumber:13},this),e.jsxDEV(q,{className:"d-flex justify-content-end",children:[e.jsxDEV(I,{onClick:()=>{B({...T.current.getData(),Mode:"download_excel"})},size:"sm",color:"success",children:"Xuất Excel"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:116,columnNumber:15},this),e.jsxDEV(R,{type:"submit",color:"danger",children:[e.jsxDEV(G,{style:{marginRight:"0.5rem"},fa:"file-pdf-o"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:126,columnNumber:17},this),"Xuất PDF"]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:125,columnNumber:15},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:115,columnNumber:13},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:85,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:84,columnNumber:9},this),e.jsxDEV(h,{lg:8,children:e.jsxDEV(x,{children:e.jsxDEV(v,{style:{borderRadius:"1rem"},children:e.jsxDEV(A,{title:"Danh sách nhu cầu theo khu vực",ref:p,url:"NhuCauHocNghes/KetXuatBaoCao",endpoint:j,columns:k,...t},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:135,columnNumber:15},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:134,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:133,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:132,columnNumber:9},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:83,columnNumber:7},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/BaoCaoThongKe/DanSoTheoNhomTuoi/index.jsx",lineNumber:82,columnNumber:5},this)}export{Se as default};