staffContractStatisticsList.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
  2. <%@include file="/context/mytags.jsp" %>
  3. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  4. <style>
  5. select {
  6. width: 120px;
  7. }
  8. </style>
  9. <link rel="stylesheet" type="text/css" href="css/commoncss.css"/>
  10. <div class="easyui-layout" fit="true">
  11. <div region="center" style="padding:0px;border:0px">
  12. <t:datagrid name="staffContractStatisticsList" checkbox="false"
  13. pagination="false" fitColumns="true" title="员工劳动关系统计" onLoadSuccess="onLoadSuccess2"
  14. actionUrl="personnelBaseArchivesManageController.do?staffContractStatisticsListDatagrid"
  15. idField="id" fit="true"
  16. queryMode="group">
  17. <t:dgCol title="id" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  18. <t:dgCol title="数据总计" field="sumData" hidden="true" queryMode="single" width="120"></t:dgCol>
  19. <t:dgCol title="部门集合" field="departNameList" hidden="true" queryMode="single" width="120"></t:dgCol>
  20. <t:dgCol title="员工性质集合" field="natureNameList" hidden="true" queryMode="single" width="120"></t:dgCol>
  21. <t:dgCol title="员工性别集合" field="genderList" hidden="true" queryMode="single" width="120"></t:dgCol>
  22. </t:datagrid>
  23. <%--显示图片区域--%>
  24. <div class="showDataBox">
  25. </div>
  26. </div>
  27. </div>
  28. <script type="text/javascript">
  29. //table请求返回对象暂存对象
  30. var initData = []
  31. function onLoadSuccess2(obj) {
  32. // 初始化完成后要清空showDataBox
  33. $('.showDataBox').empty();
  34. var sumData = {};
  35. var departNameList = [];
  36. var natureNameList = [];
  37. var genderList = [];
  38. if (obj.rows && obj.rows.length > 0) {
  39. initData = obj.rows[0];
  40. if (initData) {
  41. sumData = initData["sumData"];
  42. departNameList = initData["departNameList"];
  43. natureNameList = initData["natureNameList"];
  44. genderList = initData["genderList"];
  45. // console.log('员工合同到期管理页面初始化请求数据All:',departNameList,natureNameList,genderList,sumData);
  46. var showHtml = `<div class="showDataMain"><div><div>所属公司部门</div>`
  47. var thHtmlItem = ``;
  48. //循环所有的员工性质集合
  49. natureNameList.forEach(item => {
  50. thHtmlItem += `<div class="flex_direction_column"><div>` + item + `</div><div class="flex_direction">`
  51. //循环性别集合
  52. genderList.forEach(item2 => {
  53. thHtmlItem += `<div>` + item2 + `</div>`;
  54. })
  55. thHtmlItem += `</div></div>`
  56. })
  57. thHtmlItem += `<div>合计</div></div>`;
  58. showHtml += thHtmlItem;
  59. var trHtmlItem = ``;
  60. // 数据清洗
  61. var sumHtmlList = {};
  62. departNameList.forEach(item => {
  63. trHtmlItem += `<div><div>` + item + `</div>`;
  64. var totalNumber = 0;
  65. natureNameList.forEach(item2 => {
  66. trHtmlItem += `<div class="flex_direction">`;
  67. genderList.forEach(item3 => {
  68. if ((item + item2 + item3) in sumData) {
  69. totalNumber += sumData[item + item2 + item3];
  70. trHtmlItem += `<div>` + sumData[item + item2 + item3] + `</div>`;
  71. } else {
  72. trHtmlItem += `<div style="color:#cccccc;">0</div>`;
  73. }
  74. if((item2+item3) in sumHtmlList){
  75. // 存在
  76. sumHtmlList[item2+item3] += (item + item2 + item3) in sumData ? sumData[item + item2 + item3] : 0;
  77. }else{
  78. // 不存在
  79. sumHtmlList[item2+item3] = (item + item2 + item3) in sumData ? sumData[item + item2 + item3] : 0;
  80. }
  81. })
  82. trHtmlItem += `</div>`;
  83. })
  84. trHtmlItem += `<div>` + totalNumber + `</div></div>`;
  85. })
  86. showHtml += trHtmlItem;
  87. var totalHtml = ``;
  88. totalHtml += `<div><div>合计</div>`;
  89. var sumNumber = 0;
  90. natureNameList.forEach(item2=>{
  91. totalHtml += `<div class="flex_direction">`;
  92. genderList.forEach(item3=>{
  93. if((item2+item3) in sumHtmlList){
  94. sumNumber += sumHtmlList[item2 + item3];
  95. totalHtml += `<div>` + sumHtmlList[item2 + item3] + `</div>`;
  96. }else{
  97. totalHtml += `<div style="color:#cccccc;">0</div>`;
  98. }
  99. })
  100. totalHtml += `</div>`;
  101. })
  102. totalHtml += `<div>` + sumNumber + `</div></div>`;
  103. showHtml += totalHtml;
  104. showHtml += `</div>`;
  105. $('.showDataBox').append(showHtml);
  106. }
  107. } else {
  108. var noData = `<div class="no_data"><div class="no_data_title">暂无数据</div><div class="no_data_info"><span class="refresh_btu" onclick="refreshPage()"><i class="fa fa-refresh"/>刷新一下</span>或者过一段时间再试试吧!</div></div>`;
  109. $('.showDataBox').append(noData);
  110. }
  111. };
  112. //发送请求
  113. function lockuploadify(url) {
  114. $.ajax({
  115. async: false,
  116. cache: false,
  117. type: 'POST',
  118. url: url,
  119. error: function () {
  120. },
  121. success: function (data) {
  122. var d = data;
  123. if (d.success) {
  124. var msg = d.msg;
  125. tip(msg);
  126. $('#staffContractStatisticsList').datagrid('reload');
  127. }
  128. }
  129. });
  130. }
  131. //刷新页面
  132. function refreshPage() {
  133. $('#staffContractStatisticsList').datagrid('reload');
  134. };
  135. </script>
  136. <style>
  137. <%-- 最外层的box--%>
  138. .showDataBox {
  139. height: calc(100vh - 40px);
  140. margin: auto;
  141. display: flex;
  142. align-content: flex-start;
  143. flex-wrap: wrap;
  144. overflow-y: scroll !important;
  145. }
  146. .showDataMain {
  147. width: 100%;
  148. display: flex;
  149. flex-direction: column;
  150. align-items: self-start;
  151. align-self: self-start;
  152. justify-content: space-evenly;
  153. }
  154. .showDataMain > div {
  155. width: 100%;
  156. display: flex;
  157. justify-content: space-around;
  158. }
  159. .showDataMain > div * {
  160. width: 100%;
  161. display: flex;
  162. justify-content: space-around;
  163. overflow: hidden;
  164. white-space: nowrap;
  165. text-overflow: ellipsis;
  166. }
  167. .flex_direction_column {
  168. display: flex;
  169. flex-direction: column;
  170. align-items: center;
  171. align-self: center;
  172. }
  173. .flex_direction_column > div:nth-child(1) {
  174. width: 100%;
  175. text-align: center;
  176. border-bottom: 1px solid #CCC;
  177. font-size: 18px;
  178. font-weight: 600;
  179. color: #606266;
  180. }
  181. .flex_direction {
  182. width: 100%;
  183. display: flex;
  184. align-items: center;
  185. align-self: center;
  186. padding: 5px;
  187. justify-content: space-around;
  188. }
  189. .showDataMain > div > div {
  190. padding: 5px;
  191. width: 100%;
  192. display: flex;
  193. justify-content: space-around;
  194. align-items: center;
  195. border: 1px solid #CCC;
  196. }
  197. /*表格中间的第一列和最后一列样式*/
  198. .showDataMain > div > div:nth-last-child(1), .showDataMain > div > div:nth-child(1) {
  199. font-size: 18px;
  200. font-weight: 600;
  201. color: #909399;
  202. }
  203. /*头部的第一列样式和最后一列样式*/
  204. .showDataMain > div:nth-child(1) > div:nth-last-child(1), .showDataMain > div:nth-child(1) > div:nth-child(1) {
  205. font-size: 20px;
  206. font-weight: bold;
  207. color: #303133;
  208. }
  209. /*结尾的总计第一列样式和最后一列样式*/
  210. .showDataMain > div:nth-last-child(1) > div {
  211. font-size: 18px;
  212. font-weight: bold;
  213. color: #303133;
  214. }
  215. .showDataMain > div:not(:nth-child(1)):hover{
  216. background-color: #409EFF16;
  217. }
  218. /*头部背景*/
  219. .showDataMain > div:nth-child(1) {
  220. background-color: #DCDFE6;
  221. }
  222. /*男*/
  223. .flex_direction > div:nth-child(1) {
  224. font-size: 16px;
  225. color: #409EFF;
  226. }
  227. /*女*/
  228. .flex_direction > div:nth-child(2) {
  229. font-size: 16px;
  230. color: #F56C6C;
  231. }
  232. /*单个item的box*/
  233. .imageItemBox {
  234. width: calc(20% - 30px);
  235. min-width: 220px;
  236. height: 290px;
  237. background-color: #FFF;
  238. box-shadow: 2px 2px 9px 4px #ccc;
  239. border-radius: 5px;
  240. margin: 15px;
  241. position: relative;
  242. }
  243. /*单个item中img的样式*/
  244. .imageItemImg {
  245. margin: 10px;
  246. width: calc(100% - 20px);
  247. height: 200px;
  248. border-radius: 5px;
  249. box-shadow: inherit;
  250. }
  251. /*蒙版图层显示*/
  252. .imageItemBox:hover .opt_button_box {
  253. height: 30px;
  254. }
  255. /*蒙版图层*/
  256. .opt_button_box {
  257. position: absolute;
  258. top: 10px;
  259. left: 10px;
  260. width: calc(100% - 20px);
  261. height: 0px;
  262. z-index: 10;
  263. border-radius: 5px;
  264. display: flex;
  265. justify-content: space-around;
  266. overflow: hidden;
  267. transition: all 0.3s;
  268. }
  269. .opt_button_box::before {
  270. content: "";
  271. position: absolute;
  272. width: 100%;
  273. background-color: rgba(0, 0, 0, 1);
  274. height: 30px;
  275. filter: blur(20px);
  276. z-index: -1;
  277. }
  278. /*蒙版按钮*/
  279. .opt_button_text {
  280. padding-top: 5px;
  281. width: 25%;
  282. height: 100%;
  283. display: flex;
  284. justify-content: space-around;
  285. align-items: flex-start;
  286. overflow: hidden;
  287. }
  288. /*蒙版按钮鼠标移入样式*/
  289. .opt_text:hover {
  290. cursor: pointer;
  291. text-decoration: underline;
  292. text-shadow: 1px 1px 15px;
  293. }
  294. /*蒙版按钮鼠标点击样式*/
  295. .opt_text:active {
  296. text-shadow: 1px 1px 5px #000000;
  297. }
  298. /*蒙版按钮icon*/
  299. .opt_icon {
  300. padding-right: 5px;
  301. }
  302. /*蒙版按钮文字*/
  303. .opt_text {
  304. font-weight: bold;
  305. font-size: 16px;
  306. text-shadow: 1px 1px 1px #000000;
  307. }
  308. /*蒙版预览按钮*/
  309. .opt_search {
  310. color: #409EFF;
  311. }
  312. /*蒙版添加按钮*/
  313. .opt_add {
  314. color: #67C23A;
  315. }
  316. /*蒙版删除按钮*/
  317. .opt_del {
  318. color: #F56C6C;
  319. }
  320. /*蒙版下载按钮*/
  321. .opt_download {
  322. color: #67C23A;
  323. }
  324. /*车辆信息文字描述*/
  325. .car_info_no {
  326. padding: 0 10px;
  327. color: #409EFF;
  328. font-weight: bold;
  329. }
  330. /*拍摄时间文字描述*/
  331. .car_info_time {
  332. padding: 0 10px;
  333. color: #909399;
  334. }
  335. /*拍摄地点文字描述*/
  336. .car_info_position {
  337. padding: 0 10px;
  338. color: #303133;
  339. font-size: 15px;
  340. }
  341. /*文字描述*/
  342. .text_info {
  343. white-space: nowrap;
  344. overflow: hidden;
  345. text-overflow: ellipsis;
  346. -moz-user-select: none; /* Firefox私有属性 */
  347. -webkit-user-select: none; /* WebKit内核私有属性 */
  348. -ms-user-select: none; /* IE私有属性(IE10及以后) */
  349. -khtml-user-select: none; /* KHTML内核私有属性 */
  350. -o-user-select: none; /* Opera私有属性 */
  351. user-select: none; /* CSS3属性 */
  352. }
  353. /*车辆类型文字描述*/
  354. .car_info_type {
  355. color: #303133;
  356. padding: 0 5px;
  357. }
  358. /*摄像头位置文字描述*/
  359. .car_info_camera {
  360. color: #67C23A;
  361. }
  362. /*预览窗口*/
  363. .imagePreviewBox {
  364. position: fixed;
  365. width: 100vw;
  366. height: 100vh;
  367. overflow-x: hidden;
  368. background-color: rgba(0, 0, 0, 0.5);
  369. z-index: 99999;
  370. display: flex;
  371. justify-content: center;
  372. align-items: center;
  373. }
  374. /*预览弹窗关闭按钮样式*/
  375. .imagePreviewRemoveBtu {
  376. position: fixed;
  377. right: calc(29vw + 10px);
  378. top: calc(50vh - 14vw + 10px);
  379. color: #FFFFFF;
  380. font-size: 20px;
  381. padding: 10px;
  382. }
  383. /*预览弹窗关闭按钮鼠标移入样式*/
  384. .imagePreviewRemoveBtu:hover {
  385. color: #F56C6C;
  386. }
  387. /*预览弹窗图片样式*/
  388. .imagePreviewItem {
  389. width: 42vw;
  390. min-width: 600px;
  391. height: 28vw;
  392. min-height: 400px;
  393. margin: auto;
  394. }
  395. /*卡片选择按钮提示BOX*/
  396. .car_info_checkbox {
  397. position: absolute;
  398. bottom: 10px;
  399. right: 10px;
  400. transition: all 0.3s;
  401. }
  402. /*卡片选择按钮icon*/
  403. .checkbox_icon {
  404. color: #DCDFE6;
  405. padding: 10px;
  406. }
  407. /*卡片选择按钮icon鼠标移入样式*/
  408. .checkbox_icon:hover {
  409. color: #E4E7ED;
  410. cursor: pointer;
  411. }
  412. /*卡片选择按钮icon选中样式*/
  413. .selected_car {
  414. color: #409EFF;
  415. }
  416. /*卡片选择按钮icon选中状态鼠标移入样式*/
  417. .selected_car:hover {
  418. color: #409EFF;
  419. cursor: pointer;
  420. }
  421. /*表格隐藏*/
  422. .datagrid-view {
  423. display: none;
  424. }
  425. /*暂无数据字体样式*/
  426. .no_data {
  427. width: 100%;
  428. height: 100%;
  429. display: flex;
  430. flex-flow: column;
  431. justify-content: center;
  432. align-items: center;
  433. flex-wrap: wrap;
  434. -moz-user-select: none; /* Firefox私有属性 */
  435. -webkit-user-select: none; /* WebKit内核私有属性 */
  436. -ms-user-select: none; /* IE私有属性(IE10及以后) */
  437. -khtml-user-select: none; /* KHTML内核私有属性 */
  438. -o-user-select: none; /* Opera私有属性 */
  439. user-select: none; /* CSS3属性 */
  440. }
  441. .no_data_title {
  442. color: #C0C4CC;
  443. font-size: 60px;
  444. font-weight: bold;
  445. text-shadow: 2px 2px 0px #909399, 3px 3px 3px #e6a23c;
  446. letter-spacing: 50px;
  447. line-height: 100px;
  448. font-family: 华文彩云;
  449. }
  450. .no_data_info {
  451. color: #e6a23c;
  452. font-size: 14px;
  453. letter-spacing: 3px;
  454. font-family: "Hiragino Sans GB", STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", "Droid Sans", "wenquanyi micro hei", Helvetica, Tahoma, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;
  455. }
  456. /*刷新按钮样式*/
  457. .refresh_btu {
  458. cursor: pointer;
  459. color: #409EFF;
  460. }
  461. .refresh_btu:hover {
  462. text-decoration: underline;
  463. text-shadow: 0px 1px 3px #CCCCCC;
  464. }
  465. /*上传时间范围查询~样式*/
  466. .datagrid-toolbar form > span:nth-last-child(1) > span:nth-last-child(2) {
  467. width: 8px !important;
  468. }
  469. </style>