index.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516
  1. <template>
  2. <div class="personView">
  3. <dv-full-screen-container>
  4. <div class="topView" style="width: 100%; height: 11%">
  5. <div class="jbd-title">
  6. <dv-decoration-8
  7. style="
  8. width: 20%;
  9. height: 50px;
  10. position: absolute;
  11. left: 0px;
  12. top: 0px;
  13. "
  14. />
  15. <div style="width: 100%">
  16. <div style="height: 40%; font-size: 22px; margin-top: 10px">
  17. 人员管理看板
  18. </div>
  19. <dv-decoration-5 style="width: 30%; height: 50%; margin: 0 auto" />
  20. </div>
  21. <dv-decoration-8
  22. :reverse="true"
  23. style="
  24. width: 20%;
  25. height: 50px;
  26. position: absolute;
  27. right: 0px;
  28. top: 0px;
  29. "
  30. />
  31. </div>
  32. <div class="contain">
  33. <dv-decoration-11 class="personNum" style="margin-left: 10%"
  34. ><i
  35. class="el-icon-user"
  36. style="color: #4ea5d6; margin-right: 3px"
  37. />
  38. 员工数量:{{ employeeNum }}人</dv-decoration-11
  39. >
  40. <dv-border-box-8
  41. class="date"
  42. style="margin-right: 2%; display: flex; align-items: center"
  43. >
  44. <!-- 部门选择 -->
  45. <SelectPositions :filter-group="true" @handleFunc="handleFunc" />
  46. <div style="width: 30%; display: inline-block; margin-right: 3px">
  47. 统计时间:
  48. </div>
  49. <el-date-picker
  50. v-model="monthValues"
  51. style="width: 75%"
  52. type="daterange"
  53. align="right"
  54. unlink-panels
  55. range-separator="至"
  56. start-placeholder="开始时间"
  57. end-placeholder="结束时间"
  58. :picker-options="pickerOptions"
  59. value-format="yyyy-MM-dd"
  60. @change="changeDate"
  61. />
  62. <div class="back" @click.prevent="goBack()">返回</div>
  63. </dv-border-box-8>
  64. </div>
  65. </div>
  66. <dv-border-box-1
  67. style="
  68. width: 100%;
  69. height: 89%;
  70. box-sizing: border-box;
  71. overflow: hidden;
  72. "
  73. >
  74. <div style="height: 3%" />
  75. <div class="botView">
  76. <div class="viewLeft">
  77. <div class="middleView">
  78. <div class="midViewLeft">
  79. <PieView :info="degreePieData" />
  80. </div>
  81. <dv-decoration-2
  82. :reverse="true"
  83. style="width: 2%; height: 100%"
  84. />
  85. <div class="midViewRight">
  86. <BarChart
  87. :info="PositionsDegreeOption"
  88. :config="{
  89. title: '部门学位学历信息统计',
  90. id: 'positionsId1'
  91. }"
  92. />
  93. </div>
  94. </div>
  95. <dv-decoration-10 style="height: 2%; width: 100%; margin: 0 auto" />
  96. <div class="middleView">
  97. <div class="midViewLeft">
  98. <RingChart :info="ranksPieData" />
  99. </div>
  100. <dv-decoration-2
  101. :reverse="true"
  102. style="width: 2%; height: 100%"
  103. />
  104. <div class="midViewRight">
  105. <BarChart
  106. :info="PositionsRanksOption"
  107. :config="{
  108. title: '部门职称信息统计',
  109. id: 'positionsId2'
  110. }"
  111. />
  112. </div>
  113. </div>
  114. </div>
  115. <dv-decoration-2 :reverse="true" style="width: 1%; height: 100%" />
  116. <div class="viewRight">
  117. <!-- <BarChart
  118. :info="optionPerson"
  119. :config="optionPersonConfig"
  120. /> -->
  121. <TrainingStatistics :config="optionTrainingStatisticsConfig" />
  122. <ExamStatistics :config="optionExamStatisticsConfig" />
  123. </div>
  124. </div>
  125. </dv-border-box-1>
  126. </dv-full-screen-container>
  127. </div>
  128. </template>
  129. <script>
  130. import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
  131. import CarouselTabl from '@/views/system/jbdHome/board/component/CarouselTabl'
  132. import SelectPositions from '@/views/component/selectPositions'
  133. import screenfull from 'screenfull'
  134. import { getUserStatisticList } from '@/api/platform/org/employee'
  135. export default {
  136. name: 'check-board1',
  137. components: {
  138. CarouselTabl,
  139. SelectPositions,
  140. RingChart: () => import('../personComcont/RingChart'),
  141. BarChart: () => import('../personComcont/BarChart'),
  142. PieView: () => import('../personComcont/GetPieView'),
  143. TrainingStatistics: () => import('../personComcont/TrainingStatistics'),
  144. ExamStatistics: () => import('../personComcont/ExamStatistics')
  145. },
  146. data() {
  147. const { level } = this.$store.getters
  148. const colorGroup1 = ['#d20962', '#f47721', '#00bce4', '#7552cc']
  149. const colorGroup2 = ['#00a78e', '#7d3f98', '#f85a40']
  150. return {
  151. depth3: '',
  152. level: level.second || level.first,
  153. first: level.first,
  154. monthValues: [],
  155. startDate: '',
  156. endDate: '',
  157. employeeNum: 0,
  158. // employeeInfo: [],
  159. otherPositions: [], // 用于其他图sql条件查询
  160. positions: [], // 用于部门统计信息sql条件查询
  161. // 查询出来的部门选择数据
  162. sqlPositionsDatasIni: [],
  163. // 轮询部门信息用
  164. positionIni: [],
  165. // 判断是否初步加载,1:已初步加载
  166. initOnLoad: 0,
  167. // 人员id
  168. personIds: '',
  169. // 部门数组
  170. positionsIdArr: [],
  171. // 日期选择配置
  172. pickerOptions: {
  173. shortcuts: [
  174. {
  175. text: '最近一周',
  176. onClick(picker) {
  177. const end = new Date()
  178. const start = new Date()
  179. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
  180. picker.$emit('pick', [start, end])
  181. }
  182. },
  183. {
  184. text: '最近一个月',
  185. onClick(picker) {
  186. const end = new Date()
  187. const start = new Date()
  188. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
  189. picker.$emit('pick', [start, end])
  190. }
  191. },
  192. {
  193. text: '最近三个月',
  194. onClick(picker) {
  195. const end = new Date()
  196. const start = new Date()
  197. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
  198. picker.$emit('pick', [start, end])
  199. }
  200. }
  201. ]
  202. },
  203. // 培训统计图配置
  204. optionTrainingStatisticsConfig: {
  205. dataZoom: [
  206. {
  207. type: 'inside'
  208. }
  209. ],
  210. title: {
  211. text: '部门培训统计',
  212. textStyle: {
  213. color: '#ffffff', // 设置标题文字颜色为白色
  214. fontSize: 14 // 设置标题文字字体大小
  215. }
  216. },
  217. tooltip: {
  218. trigger: 'axis',
  219. axisPointer: {
  220. type: 'shadow' // 鼠标悬停时的提示框阴影效果
  221. }
  222. },
  223. legend: {
  224. data: ['应参数', '实参数'],
  225. textStyle: {
  226. color: '#ffffff' // 图例文字颜色为白色
  227. }
  228. },
  229. xAxis: {
  230. data: [],
  231. type: 'category',
  232. axisLabel: {
  233. rotate: 50
  234. },
  235. axisLine: {
  236. lineStyle: {
  237. color: '#ffffff' // x 轴轴线颜色为白色
  238. }
  239. }
  240. },
  241. yAxis: [
  242. {
  243. axisLine: {
  244. lineStyle: {
  245. color: '#ffffff' // y 轴轴线颜色为白色
  246. }
  247. },
  248. type: 'value',
  249. name: '数量(次)',
  250. axisLabel: {
  251. formatter: '{value}'
  252. },
  253. minInterval: 1 // 人数最少为1 不能为小数
  254. }
  255. ],
  256. series: [
  257. {
  258. name: '应参数',
  259. type: 'bar',
  260. data: [],
  261. itemStyle: {
  262. color: colorGroup2[0] // 设置柱状图颜色为蓝色
  263. }
  264. },
  265. {
  266. name: '实参数',
  267. type: 'bar',
  268. data: [],
  269. itemStyle: {
  270. color: colorGroup2[1] // 设置柱状图颜色为蓝色
  271. }
  272. },
  273. {
  274. name: '参训率', // 单独添加一个 series 用于 tooltip 显示
  275. type: 'line',
  276. data: [],
  277. itemStyle: {
  278. opacity: 0 // 设置透明度为0,使柱状图不可见
  279. },
  280. lineStyle: {
  281. opacity: 0 // 设置折线透明度为0,使其在图表中不可见
  282. }
  283. }
  284. ]
  285. },
  286. // 考试统计图配置
  287. optionExamStatisticsConfig: {
  288. dataZoom: [
  289. {
  290. type: 'inside'
  291. }
  292. ],
  293. title: {
  294. text: '部门考试统计',
  295. textStyle: {
  296. color: '#ffffff', // 设置标题文字颜色为白色
  297. fontSize: 14 // 设置标题文字字体大小
  298. }
  299. },
  300. tooltip: {
  301. trigger: 'axis',
  302. axisPointer: {
  303. type: 'shadow' // 鼠标悬停时的提示框阴影效果
  304. }
  305. },
  306. legend: {
  307. data: ['参考数', '达标数'],
  308. textStyle: {
  309. color: '#ffffff' // 图例文字颜色为白色
  310. }
  311. },
  312. xAxis: {
  313. data: [],
  314. type: 'category',
  315. axisLabel: {
  316. rotate: 50
  317. },
  318. axisLine: {
  319. lineStyle: {
  320. color: '#ffffff' // x 轴轴线颜色为白色
  321. }
  322. }
  323. },
  324. yAxis: [
  325. {
  326. axisLine: {
  327. lineStyle: {
  328. color: '#ffffff' // y 轴轴线颜色为白色
  329. }
  330. },
  331. type: 'value',
  332. name: '数量(次)',
  333. axisLabel: {
  334. formatter: '{value}'
  335. },
  336. minInterval: 1 // 人数最少为1 不能为小数
  337. }
  338. ],
  339. series: [
  340. {
  341. name: '参考数',
  342. type: 'bar',
  343. data: [],
  344. itemStyle: {
  345. color: colorGroup1[0] // 设置柱状图颜色为蓝色
  346. }
  347. },
  348. {
  349. name: '达标数',
  350. type: 'bar',
  351. data: [],
  352. itemStyle: {
  353. color: colorGroup1[1] // 设置柱状图颜色为蓝色
  354. }
  355. },
  356. {
  357. name: '达标率', // 单独添加一个 series 用于 tooltip 显示
  358. type: 'line',
  359. data: [],
  360. itemStyle: {
  361. opacity: 0 // 设置透明度为0,使柱状图不可见
  362. },
  363. lineStyle: {
  364. opacity: 0 // 设置折线透明度为0,使其在图表中不可见
  365. }
  366. }
  367. ]
  368. },
  369. // 学位统计图配置
  370. degreePieData: {
  371. // 学位学历
  372. data: [
  373. {
  374. name: ' 大专',
  375. value: 0
  376. },
  377. {
  378. name: '本科',
  379. value: 0
  380. },
  381. {
  382. name: '硕士',
  383. value: 0
  384. },
  385. {
  386. name: '博士',
  387. value: 0
  388. }
  389. ],
  390. color: colorGroup1,
  391. config: { title: '学历学位统计', idSelector: 'degreeId' }
  392. },
  393. // 职称统计图配置
  394. ranksPieData: {
  395. // 职称
  396. data: [
  397. {
  398. name: '初级',
  399. value: 0
  400. },
  401. {
  402. name: '中级',
  403. value: 0
  404. },
  405. {
  406. name: '副高级',
  407. value: 0
  408. },
  409. {
  410. name: '高级',
  411. value: 0
  412. }
  413. ],
  414. color: colorGroup1,
  415. config: { title: '职称统计', idSelector: 'ranksid' }
  416. },
  417. // 部门学位学历信息统计配置表
  418. PositionsDegreeOption: {
  419. animation: true,
  420. tooltip: {
  421. trigger: 'axis',
  422. axisPointer: {
  423. type: 'shadow'
  424. }
  425. },
  426. legend: {
  427. textStyle: {
  428. color: '#fff'
  429. }
  430. },
  431. color: colorGroup1,
  432. grid: {
  433. left: '3%',
  434. right: '4%',
  435. bottom: '3%',
  436. containLabel: true
  437. },
  438. xAxis: [
  439. {
  440. type: 'category',
  441. data: [],
  442. nameTextStyle: {
  443. color: '#fff'
  444. },
  445. axisLabel: {
  446. textStyle: {
  447. color: '#fff'
  448. },
  449. interval: 0,
  450. rotate: 50
  451. }
  452. }
  453. ],
  454. yAxis: [
  455. {
  456. name: '个数(人)',
  457. type: 'value',
  458. nameTextStyle: {
  459. color: '#fff'
  460. },
  461. axisLabel: {
  462. textStyle: {
  463. color: '#fff'
  464. }
  465. }
  466. }
  467. ],
  468. // " 大专", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"
  469. series: [
  470. {
  471. name: ' 大专',
  472. type: 'bar',
  473. emphasis: {
  474. focus: 'series'
  475. },
  476. stack: 'Search Engine',
  477. data: [],
  478. label: {
  479. // 柱体上显示数值
  480. show: true, // 开启显示
  481. textStyle: {
  482. // 数值样式
  483. fontSize: '12px',
  484. color: '#fff'
  485. },
  486. formatter: function (name) {
  487. return name.value === 0 ? '' : '专:' + name.value
  488. }
  489. }
  490. },
  491. {
  492. name: '本科',
  493. type: 'bar',
  494. stack: 'Search Engine',
  495. emphasis: {
  496. focus: 'series'
  497. },
  498. data: [],
  499. label: {
  500. // 柱体上显示数值
  501. show: true, // 开启显示
  502. textStyle: {
  503. // 数值样式
  504. fontSize: '12px',
  505. color: '#fff'
  506. },
  507. formatter: function (name) {
  508. return name.value === 0 ? '' : '本:' + name.value
  509. }
  510. }
  511. },
  512. {
  513. name: '硕士',
  514. type: 'bar',
  515. stack: 'Search Engine',
  516. emphasis: {
  517. focus: 'series'
  518. },
  519. data: [],
  520. label: {
  521. // 柱体上显示数值
  522. show: true, // 开启显示
  523. textStyle: {
  524. // 数值样式
  525. fontSize: '12px',
  526. color: '#fff'
  527. },
  528. formatter: function (name) {
  529. return name.value === 0 ? '' : '硕:' + name.value
  530. }
  531. }
  532. },
  533. {
  534. name: '博士',
  535. type: 'bar',
  536. stack: 'Search Engine',
  537. emphasis: {
  538. focus: 'series'
  539. },
  540. data: [],
  541. label: {
  542. // 柱体上显示数值
  543. show: true, // 开启显示
  544. textStyle: {
  545. // 数值样式
  546. position: 'top',
  547. fontSize: '12px',
  548. color: '#fff'
  549. },
  550. formatter: function (name) {
  551. return name.value === 0 ? '' : '博:' + name.value
  552. }
  553. }
  554. }
  555. ],
  556. dataZoom: [
  557. {
  558. type: 'inside'
  559. }
  560. ]
  561. },
  562. // 部门职称信息统计配置表
  563. PositionsRanksOption: {
  564. animation: true,
  565. tooltip: {
  566. trigger: 'axis',
  567. axisPointer: {
  568. type: 'shadow'
  569. }
  570. },
  571. legend: {
  572. textStyle: {
  573. color: '#fff'
  574. }
  575. },
  576. color: colorGroup1,
  577. grid: {
  578. left: '3%',
  579. right: '4%',
  580. bottom: '3%',
  581. containLabel: true
  582. },
  583. xAxis: [
  584. {
  585. type: 'category',
  586. data: [],
  587. nameTextStyle: {
  588. color: '#fff'
  589. },
  590. axisLabel: {
  591. textStyle: {
  592. color: '#fff'
  593. },
  594. interval: 0,
  595. rotate: 50
  596. }
  597. }
  598. ],
  599. yAxis: [
  600. {
  601. name: '个数(人)',
  602. type: 'value',
  603. nameTextStyle: {
  604. color: '#fff'
  605. },
  606. axisLabel: {
  607. textStyle: {
  608. color: '#fff'
  609. }
  610. }
  611. }
  612. ],
  613. // "初级职称", "中级职称", "高级职称"
  614. series: [
  615. {
  616. name: '初级职称',
  617. type: 'bar',
  618. data: [],
  619. stack: 'Search Engine',
  620. emphasis: {
  621. focus: 'series'
  622. },
  623. label: {
  624. // 柱体上显示数值
  625. show: true, // 开启显示
  626. textStyle: {
  627. // 数值样式
  628. fontSize: '12px',
  629. color: 'rgba(251, 251, 251, 1)'
  630. },
  631. formatter: function (name) {
  632. return name.value === 0 ? '' : '初:' + name.value
  633. }
  634. }
  635. },
  636. {
  637. name: '中级职称',
  638. type: 'bar',
  639. stack: 'Search Engine',
  640. emphasis: {
  641. focus: 'series'
  642. },
  643. data: [],
  644. label: {
  645. // 柱体上显示数值
  646. show: true, // 开启显示
  647. textStyle: {
  648. // 数值样式
  649. fontSize: '12px',
  650. color: 'rgba(251, 251, 251, 1)'
  651. },
  652. formatter: function (name) {
  653. return name.value === 0 ? '' : '中:' + name.value
  654. }
  655. }
  656. },
  657. {
  658. name: '副高级职称',
  659. type: 'bar',
  660. stack: 'Search Engine',
  661. emphasis: {
  662. focus: 'series'
  663. },
  664. data: [],
  665. label: {
  666. // 柱体上显示数值
  667. show: true, // 开启显示
  668. textStyle: {
  669. // 数值样式
  670. fontSize: '12px',
  671. color: 'rgba(251, 251, 251, 1)'
  672. },
  673. formatter: function (name) {
  674. return name.value === 0 ? '' : '副高:' + name.value
  675. }
  676. }
  677. },
  678. {
  679. name: '高级职称',
  680. type: 'bar',
  681. stack: 'Search Engine',
  682. emphasis: {
  683. focus: 'series'
  684. },
  685. data: [],
  686. label: {
  687. // 柱体上显示数值
  688. show: true, // 开启显示
  689. position: 'top',
  690. textStyle: {
  691. // 数值样式
  692. fontSize: '12px',
  693. color: 'rgba(251, 251, 251, 1)'
  694. },
  695. formatter: function (name) {
  696. return name.value === 0 ? '' : '高:' + name.value
  697. }
  698. }
  699. }
  700. ],
  701. dataZoom: [
  702. {
  703. type: 'inside'
  704. }
  705. ]
  706. },
  707. // 任务事宜统计图配置
  708. optionPerson: {
  709. title: {
  710. text: ''
  711. },
  712. textAlign: 'left',
  713. tooltip: {
  714. trigger: 'axis',
  715. axisPointer: {
  716. type: 'shadow'
  717. }
  718. },
  719. legend: {
  720. // show: true,
  721. right: '0%',
  722. itemGap: 2,
  723. itemWidth: 16,
  724. textStyle: {
  725. color: '#fff'
  726. }
  727. },
  728. grid: {
  729. left: '2%',
  730. right: '15%',
  731. bottom: '3%',
  732. containLabel: true
  733. },
  734. xAxis: {
  735. type: 'value',
  736. name: '任务数量',
  737. nameTextStyle: {
  738. color: '#fff'
  739. },
  740. axisLabel: {
  741. formatter: function (v) {
  742. return parseInt(v) // 表示整数。其他数值类型以此类推
  743. },
  744. color: '#fff'
  745. }
  746. },
  747. yAxis: {
  748. type: 'category',
  749. name: '人员',
  750. data: [],
  751. axisLabel: {
  752. color: '#fff'
  753. },
  754. nameTextStyle: {
  755. color: '#fff'
  756. }
  757. },
  758. series: [
  759. {
  760. name: '待办事宜数',
  761. type: 'bar',
  762. data: [],
  763. barMaxWidth: '20%',
  764. label: {
  765. show: true,
  766. position: 'right',
  767. valueAnimation: true,
  768. fontSize: 12,
  769. color: '#00bce4',
  770. formatter: function (name) {
  771. return name.value === 0 ? '' : '' + name.value
  772. }
  773. }
  774. },
  775. {
  776. name: '已办事宜数',
  777. type: 'bar',
  778. data: [],
  779. barMaxWidth: '20%',
  780. label: {
  781. show: true,
  782. position: 'right',
  783. valueAnimation: true,
  784. fontSize: 12,
  785. color: '#00c16e',
  786. formatter: function (name) {
  787. return name.value === 0 ? '' : '' + name.value
  788. }
  789. }
  790. }
  791. ],
  792. dataZoom: [
  793. {
  794. type: 'inside',
  795. xAxisIndex: 0,
  796. filterMode: 'filter'
  797. },
  798. {
  799. type: 'inside',
  800. left: 'left',
  801. yAxisIndex: 0,
  802. filterMode: 'none'
  803. }
  804. ],
  805. color: ['#00bce4', '#00c16e']
  806. },
  807. optionPersonConfig: {
  808. title: '部门员工任务统计',
  809. id: 'taskMatters',
  810. state: '100'
  811. }
  812. }
  813. },
  814. watch: {
  815. depth3: {
  816. handler(newVal, oldVal) {
  817. this.positionsInfoData()
  818. this.degreeGradeInfoData()
  819. this.employeeInfoData()
  820. },
  821. deep: true,
  822. immediate: true
  823. }
  824. },
  825. created() {
  826. const initendDate = new Date()
  827. // this.endDate =
  828. // initendDate.getFullYear() +
  829. // '-' +
  830. // (initendDate.getMonth() + 1 > 9
  831. // ? initendDate.getMonth() + 1
  832. // : '0' + (initendDate.getMonth() + 1)) +
  833. // '-' +
  834. // (initendDate.getDate() > 9
  835. // ? initendDate.getDate()
  836. // : '0' + initendDate.getDate()) +
  837. // ' 23:59:59'
  838. // this.startDate = this.preDate(this.endDate, 60) + ' 00:00:00'
  839. // this.monthValues = [
  840. // new Date(this.startDate),
  841. // new Date(
  842. // initendDate.getFullYear() +
  843. // '-' +
  844. // (initendDate.getMonth() + 1) +
  845. // '-' +
  846. // initendDate.getDate()
  847. // )
  848. // ]
  849. if (screenfull.isEnabled && !screenfull.isFullscreen) {
  850. this.allView()
  851. }
  852. },
  853. mounted() {
  854. },
  855. beforeDestroy() {
  856. if (this.interval) {
  857. clearInterval(this.interval)
  858. }
  859. if (screenfull.isFullscreen) {
  860. screenfull.toggle()
  861. }
  862. },
  863. methods: {
  864. changeDate(value) {
  865. if (value && value.length) {
  866. this.startDate = value[0]
  867. this.endDate = value[1]
  868. } else {
  869. this.startDate = ''
  870. this.endDate = ''
  871. }
  872. this.getTrainingStatisticsData()
  873. this.getExamStatisticsData()
  874. },
  875. // 人员基本信息 轮播表数据
  876. async employeeInfoData() {
  877. let data = []
  878. this.optionPerson.yAxis.data = []
  879. const positionsWhere =
  880. this.otherPositions.length !== 0
  881. ? `(${this.otherPositions.join(' or ')} )`
  882. : `ee.positions_ = '没有选择部门'`
  883. // const sql = `select
  884. // ee.name_,
  885. // ee.jian_ding_zi_ge_z
  886. // FROM
  887. // (
  888. // SELECT
  889. // e.*
  890. // FROM
  891. // ibps_party_employee e
  892. // JOIN ibps_party_entity en ON FIND_IN_SET( en.id_, e.POSITIONS_ ) > 0
  893. // WHERE
  894. // en.PATH_ LIKE '%${this.depth3}%'
  895. // GROUP BY
  896. // e.id_
  897. // ) ee
  898. // WHERE
  899. // ee.name_ NOT LIKE '%系统%'
  900. // AND ee.STATUS_ = 'actived'
  901. // AND ee.name_ NOT LIKE '%金通%'
  902. // AND ee.name_ NOT LIKE '%管理%'
  903. // AND ee.id_ != '702117247933480960'`
  904. await curdPost('query', {
  905. key: 'ryglkbrscx',
  906. params: [this.depth3]
  907. }).then((res) => {
  908. data = res.variables.data
  909. })
  910. console.log(data, 'aaaaaa')
  911. this.employeeNum = data.length
  912. if (this.initOnLoad === 0) {
  913. this.initOnLoad = 1
  914. }
  915. const personIdsArr = []
  916. for (const it of data) {
  917. personIdsArr.push(it.parent_id_)
  918. this.optionPerson.yAxis.data.push(it.name_)
  919. }
  920. // this.personIds = personIdsArr.join(',')
  921. },
  922. // 饼图 环形图数据
  923. async degreeGradeInfoData() {
  924. this.degreePieData.data[0].value = 0
  925. this.degreePieData.data[1].value = 0
  926. this.degreePieData.data[2].value = 0
  927. this.degreePieData.data[3].value = 0
  928. this.ranksPieData.data[0].value = 0
  929. this.ranksPieData.data[1].value = 0
  930. this.ranksPieData.data[2].value = 0
  931. let data = []
  932. const positionsWhere =
  933. this.otherPositions.length !== 0
  934. ? `(${this.otherPositions.join(' or ')} )`
  935. : `ee.positions_ = '没有选择部门'`
  936. const a =
  937. 'SELECT 1 AS n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7'
  938. let sqlparty = `SELECT 1 AS n`
  939. this.$store.getters.deptList.forEach((it, i) => {
  940. sqlparty += ` UNION ALL SELECT ${i + 2} `
  941. })
  942. // const sql = `select
  943. // ( SELECT name_ FROM ibps_party_entity WHERE id_ = '${this.depth3}' ) AS enName,
  944. // IFNULL( sum( zui_gao_xue_li_x_ LIKE '%博士%' ), 0 ) AS boShi,
  945. // IFNULL( sum( zui_gao_xue_li_x_ LIKE '%硕士%' ), 0 ) AS shuoShi,
  946. // IFNULL( sum( zui_gao_xue_li_x_ = '本科' ), 0 ) AS benKe,
  947. // IFNULL( sum( zui_gao_xue_li_x_ = '大专' ), 0 ) AS daZhuan,
  948. // IFNULL( sum( zhi_cheng_deng_ji = '初级' ), 0 ) AS chuJi,
  949. // IFNULL( sum( zhi_cheng_deng_ji = '中级' ), 0 ) AS zhongJi,
  950. // IFNULL( sum( zhi_cheng_deng_ji = '高级' ), 0 ) AS gaoJi,
  951. // IFNULL( sum( zhi_cheng_deng_ji = '副高' ), 0 ) AS fuGao
  952. // FROM
  953. // t_ryjbqk
  954. // WHERE
  955. // parent_id_ IN (
  956. // select
  957. // ee.id_ as bid
  958. // FROM
  959. // (
  960. // SELECT
  961. // e.*
  962. // FROM
  963. // ibps_party_employee e
  964. // JOIN ibps_party_entity en ON FIND_IN_SET( en.id_, e.POSITIONS_ ) > 0
  965. // WHERE
  966. // en.PATH_ LIKE '%${this.depth3}%'
  967. // GROUP BY
  968. // e.id_
  969. // ) ee
  970. // WHERE
  971. // ee.name_ NOT LIKE '%系统%'
  972. // AND ee.STATUS_ = 'actived'
  973. // AND ee.name_ NOT LIKE '%金通%'
  974. // AND ee.name_ NOT LIKE '%管理%'
  975. // AND ee.id_ != '702117247933480960')`
  976. await curdPost('query', {
  977. key: 'ryglkbbtsjcx',
  978. params: [this.depth3]
  979. }).then((res) => {
  980. data = res.variables.data
  981. })
  982. if (data.length === 0 || data[0] == null) {
  983. return
  984. }
  985. this.degreePieData.data[0].value = data[0].daZhuan ? data[0].daZhuan : 0
  986. this.degreePieData.data[1].value = data[0].benKe ? data[0].benKe : 0
  987. this.degreePieData.data[2].value = data[0].shuoShi ? data[0].shuoShi : 0
  988. this.degreePieData.data[3].value = data[0].boShi ? data[0].boShi : 0
  989. this.ranksPieData.data[0].value = data[0].chuJi ? data[0].chuJi : 0
  990. this.ranksPieData.data[1].value = data[0].zhongJi ? data[0].zhongJi : 0
  991. this.ranksPieData.data[3].value = data[0].gaoJi ? data[0].gaoJi : 0
  992. this.ranksPieData.data[2].value = data[0].fuGao ? data[0].fuGao : 0
  993. },
  994. // 部门信息统计
  995. async positionsInfoData() {
  996. // const positionsWhere =
  997. // this.positions.length !== 0
  998. // ? `(${this.positions.join(' or ')} )`
  999. // : `en.path_ = '没有选择部门'`
  1000. // const sql = `select jh.*from (select en.id_ ,en.name_ AS enName,
  1001. // sum(gy.zui_gao_xue_li_x_ like '%博士%') as boShi,
  1002. // sum(gy.zui_gao_xue_li_x_ like '%硕士%') as shuoShi,
  1003. // sum(gy.zui_gao_xue_li_x_ = '本科') as benKe,
  1004. // sum(gy.zui_gao_xue_li_x_ = '大专') as daZhuan,
  1005. // sum(gy.zhi_cheng_deng_ji = '初级') AS chuJi,
  1006. // sum(gy.zhi_cheng_deng_ji = '中级') AS zhongJi,
  1007. // sum(gy.zhi_cheng_deng_ji = '高级') AS gaoJi FROM (SELECT
  1008. // ee.id_ AS eeID,ee.name_ AS eeName,ee.positions_,ry.zui_gao_xue_li_x_,ry.zhi_cheng_deng_ji
  1009. // FROM t_ryjbqk AS ry JOIN ibps_party_employee AS ee ON ry.parent_id_= ee.id_
  1010. // )gy LEFT JOIN ibps_party_entity en ON FIND_IN_SET(en.id_,gy.positions_) where ${positionsWhere} and en.id_!='1166373874003083264' and en.name_ not like '%综合%' GROUP BY enName) jh`
  1011. const a =
  1012. 'SELECT 1 AS n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7'
  1013. let sqlparty = `SELECT 1 AS n`
  1014. this.$store.getters.deptList.forEach((it, i) => {
  1015. sqlparty += ` UNION ALL SELECT ${i + 2} `
  1016. })
  1017. // const sql = `select
  1018. // jh.enName,
  1019. // IFNULL( jh.boShi, 0 ) AS boShi,
  1020. // IFNULL( jh.shuoShi, 0 ) AS shuoShi,
  1021. // IFNULL( jh.benKe, 0 ) AS benKe,
  1022. // IFNULL( jh.daZhuan, 0 ) AS daZhuan,
  1023. // IFNULL( jh.chuJi, 0 ) AS chuJi,
  1024. // IFNULL( jh.zhongJi, 0 ) AS zhongJi,
  1025. // IFNULL( jh.gaoJi, 0 ) AS gaoJi,
  1026. // IFNULL( jh.fuGao, 0 ) AS fuGao
  1027. // FROM
  1028. // (
  1029. // SELECT
  1030. // en.id_,
  1031. // en.name_ AS enName,
  1032. // sum( gy.zui_gao_xue_li_x_ LIKE '%博士%' ) AS boShi,
  1033. // sum( gy.zui_gao_xue_li_x_ LIKE '%硕士%' ) AS shuoShi,
  1034. // sum( gy.zui_gao_xue_li_x_ = '本科' ) AS benKe,
  1035. // sum( gy.zui_gao_xue_li_x_ = '大专' ) AS daZhuan,
  1036. // sum( gy.zhi_cheng_deng_ji = '初级' ) AS chuJi,
  1037. // sum( gy.zhi_cheng_deng_ji = '中级' ) AS zhongJi,
  1038. // sum( gy.zhi_cheng_deng_ji = '高级' ) AS gaoJi,
  1039. // sum( gy.zhi_cheng_deng_ji = '副高' ) AS fuGao
  1040. // FROM
  1041. // (
  1042. // SELECT
  1043. // ee.id_ AS eeID,
  1044. // ee.name_ AS eeName,
  1045. // ee.positions_,
  1046. // ry.zui_gao_xue_li_x_,
  1047. // ry.zhi_cheng_deng_ji
  1048. // FROM
  1049. // t_ryjbqk AS ry
  1050. // JOIN ibps_party_employee AS ee ON ry.parent_id_ = ee.id_ where ee.name_ not like '%系统%' AND ee.STATUS_ = 'actived' and ee.name_ not like '%金通%' and ee.name_ not like '%管理%' and ee.id_ != '702117247933480960'
  1051. // ) gy
  1052. // RIGHT JOIN ibps_party_entity en ON FIND_IN_SET( en.id_, gy.positions_ )
  1053. // WHERE
  1054. // en.DEPTH_ LIKE '%4%'
  1055. // AND en.PARENT_ID_ LIKE '%${this.depth3}%'
  1056. // AND en.id_ != '1166373874003083264'
  1057. // AND en.name_ NOT LIKE '%综合%'
  1058. // GROUP BY
  1059. // en.id_
  1060. // ) jh UNION
  1061. // SELECT
  1062. // ( SELECT name_ FROM ibps_party_entity WHERE id_ = '${this.depth3}' ) AS enName,
  1063. // IFNULL( sum( zui_gao_xue_li_x_ LIKE '%博士%' ), 0 ) AS boShi,
  1064. // IFNULL( sum( zui_gao_xue_li_x_ LIKE '%硕士%' ), 0 ) AS shuoShi,
  1065. // IFNULL( sum( zui_gao_xue_li_x_ = '本科' ), 0 ) AS benKe,
  1066. // IFNULL( sum( zui_gao_xue_li_x_ = '大专' ), 0 ) AS daZhuan,
  1067. // IFNULL( sum( zhi_cheng_deng_ji = '初级' ), 0 ) AS chuJi,
  1068. // IFNULL( sum( zhi_cheng_deng_ji = '中级' ), 0 ) AS zhongJi,
  1069. // IFNULL( sum( zhi_cheng_deng_ji = '高级' ), 0 ) AS gaoJi,
  1070. // IFNULL( sum( zhi_cheng_deng_ji = '副高' ), 0 ) AS fuGao
  1071. // FROM
  1072. // t_ryjbqk
  1073. // WHERE
  1074. // parent_id_ IN (
  1075. // select
  1076. // ee.id_ as bid
  1077. // FROM
  1078. // (
  1079. // SELECT
  1080. // e.*
  1081. // FROM
  1082. // ibps_party_employee e
  1083. // JOIN ibps_party_entity en ON FIND_IN_SET( en.id_, e.POSITIONS_ ) > 0
  1084. // WHERE
  1085. // en.PATH_ LIKE '%${this.depth3}%'
  1086. // GROUP BY
  1087. // e.id_
  1088. // ) ee
  1089. // WHERE
  1090. // ee.name_ NOT LIKE '%系统%'
  1091. // AND ee.STATUS_ = 'actived'
  1092. // AND ee.name_ NOT LIKE '%金通%'
  1093. // AND ee.name_ NOT LIKE '%管理%'
  1094. // AND ee.id_ != '702117247933480960'
  1095. // )`
  1096. await curdPost('query', {
  1097. key: 'ryglkbfzzztsjcx',
  1098. params: [this.depth3]
  1099. }).then((res) => {
  1100. const data = res.variables.data
  1101. // 组装数据集,以学历职称为列,以部门为行:{" 大专":['1','2','3']}
  1102. const degreeSeriesDatas = this.PositionsDegreeOption.series
  1103. const ranksSeriesDatas = this.PositionsRanksOption.series
  1104. this.PositionsDegreeOption.xAxis[0].data = []
  1105. this.PositionsRanksOption.xAxis[0].data = []
  1106. this.PositionsDegreeOption.series[0].data = []
  1107. this.PositionsDegreeOption.series[1].data = []
  1108. this.PositionsDegreeOption.series[2].data = []
  1109. this.PositionsDegreeOption.series[3].data = []
  1110. this.PositionsRanksOption.series[0].data = []
  1111. this.PositionsRanksOption.series[1].data = []
  1112. this.PositionsRanksOption.series[2].data = []
  1113. if (data.length !== 0) {
  1114. // 跟《部门信息统计配置表》排列顺序一致
  1115. const shuZuList = [
  1116. 'daZhuan',
  1117. 'benKe',
  1118. 'shuoShi',
  1119. 'boShi',
  1120. 'chuJi',
  1121. 'zhongJi',
  1122. 'fuGao',
  1123. 'gaoJi'
  1124. ]
  1125. for (let t = 0; t < data.length; t++) {
  1126. this.PositionsDegreeOption.xAxis[0].data.push(data[t].enName)
  1127. this.PositionsRanksOption.xAxis[0].data.push(data[t].enName)
  1128. for (let i = 0; i < degreeSeriesDatas.length; i++) {
  1129. degreeSeriesDatas[i].data[t] = data[t][shuZuList[i]]
  1130. }
  1131. for (let i = 0; i < ranksSeriesDatas.length; i++) {
  1132. ranksSeriesDatas[i].data[t] = data[t][shuZuList[i + 4]]
  1133. }
  1134. }
  1135. this.PositionsDegreeOption.series = degreeSeriesDatas
  1136. this.PositionsRanksOption.series = ranksSeriesDatas
  1137. }
  1138. })
  1139. },
  1140. preDate(dateParameter, num) {
  1141. // 往前推算日期
  1142. var translateDate = ''
  1143. var dateString = ''
  1144. var monthString = ''
  1145. var dayString = ''
  1146. translateDate = dateParameter.replace('-', '/').replace('-', '/')
  1147. var newDate = new Date(translateDate)
  1148. newDate = newDate.valueOf()
  1149. newDate = newDate - num * 24 * 60 * 60 * 1000 // 备注 如果是往前计算日期则为减号 否则为加号
  1150. newDate = new Date(newDate) // 如果月份长度少于2,则前加 0 补位
  1151. if ((newDate.getMonth() + 1).toString().length === 1) {
  1152. monthString = 0 + '' + (newDate.getMonth() + 1).toString()
  1153. } else {
  1154. monthString = (newDate.getMonth() + 1).toString()
  1155. }
  1156. if (newDate.getDate().toString().length === 1) {
  1157. // 如果天数长度少于2,则前加 0 补位
  1158. dayString = 0 + '' + newDate.getDate().toString()
  1159. 0
  1160. } else {
  1161. dayString = newDate.getDate().toString()
  1162. }
  1163. dateString = newDate.getFullYear() + '-' + monthString + '-' + dayString
  1164. return dateString
  1165. },
  1166. // 简化部门信息
  1167. simplifyPosition(v) {
  1168. this.positions = [] // 用于sql条件查询
  1169. this.otherPositions = []
  1170. for (let i = 0; i < v.length; i++) {
  1171. this.positions.push(`en.path_ like '%${v[i][v[i].length - 1]}%'`)
  1172. this.otherPositions.push(
  1173. `ee.positions_ like '%${v[i][v[i].length - 1]}%'`
  1174. )
  1175. }
  1176. },
  1177. handleAllGetFunc() {
  1178. this.employeeInfoData()
  1179. if (this.initOnLoad === 0) {
  1180. this.positionsInfoData()
  1181. this.degreeGradeInfoData()
  1182. }
  1183. },
  1184. // 通过部门 id 获取部门人员
  1185. getPositionPeopleIds(positionId) {
  1186. const { userList } = this.$store.getters
  1187. // return userList.filter(user => user.positionId.indexOf(positionId) > -1)
  1188. return userList.filter(
  1189. (user) =>
  1190. user.positionId.indexOf(positionId) > -1 &&
  1191. user.userId !== '702117247933480960' &&
  1192. !user.userName.includes('系统') &&
  1193. !user.userName.includes('金通') &&
  1194. !user.userName.includes('管理')
  1195. )
  1196. },
  1197. // 根据部门和时间获取考试统计数据
  1198. async getExamStatisticsData() {
  1199. //if (this.positionsIdArr.length) {
  1200. let users = this.getPositionPeopleIds(this.positionsIdArr[0])
  1201. if(this.depth3){
  1202. users = this.getPositionPeopleIds(this.depth3)
  1203. }
  1204. const userIds = users.map((user) => user.userId)
  1205. const renyuan =
  1206. userIds.map((i) => `'${i}'`).join(',') !== ''
  1207. ? `and examinee in (${userIds.map((i) => `${i}`).join(',')})`
  1208. : ''
  1209. const sql = `select * from v_examination where paperState = '已完成' and examType!='自主考核' ${renyuan} GROUP BY examinee,examId ORDER BY createTime asc `
  1210. const parm1 = { key: 'ryglkbkswrytjsjcx', params: [null] }
  1211. const parm2 = {
  1212. key: 'ryglkbksyrytjsjcx',
  1213. params: [userIds.map((i) => `${i}`).join(',')]
  1214. }
  1215. const parm =
  1216. userIds.map((i) => `'${i}'`).join(',') !== '' ? parm2 : parm1
  1217. let {
  1218. variables: { data }
  1219. } = await this.$common.request('query', parm)
  1220. if (this.startDate && this.endDate) {
  1221. data = data.filter((item) => {
  1222. return (
  1223. new Date(item.startDate).getTime() >=
  1224. new Date(this.startDate).getTime() &&
  1225. new Date(item.startDate).getTime() <=
  1226. new Date(this.endDate).getTime()
  1227. )
  1228. })
  1229. }
  1230. const resultData = users.map((user) => {
  1231. let count = 0
  1232. let passCount = 0
  1233. data.forEach((item) => {
  1234. if (item.examinee === user.userId) {
  1235. count++
  1236. if (
  1237. +(item.scoringType === '平均分'
  1238. ? item.averageScore
  1239. : item.scoringType === '最高分'
  1240. ? item.maxScore
  1241. : item.recentScore) *
  1242. 100 >=
  1243. +item.totalScore * +item.qualifiedRadio
  1244. ) {
  1245. passCount++
  1246. }
  1247. }
  1248. })
  1249. return {
  1250. ...user,
  1251. count,
  1252. passCount,
  1253. passRate:
  1254. (count === 0 ? 0 : ((passCount / count) * 100).toFixed(2)) + '%'
  1255. }
  1256. })
  1257. resultData.sort((a, b) => {
  1258. return a.userId - b.userId
  1259. })
  1260. // 格式化统计图需要的数据
  1261. this.optionExamStatisticsConfig.xAxis.data = resultData.map(
  1262. (item) => item.userName
  1263. )
  1264. this.optionExamStatisticsConfig.series[0].data = resultData.map(
  1265. (item) => item.count
  1266. )
  1267. this.optionExamStatisticsConfig.series[1].data = resultData.map(
  1268. (item) => item.passCount
  1269. )
  1270. this.optionExamStatisticsConfig.series[2].data = resultData.map(
  1271. (item) => item.passRate
  1272. )
  1273. //}
  1274. },
  1275. // 根据部门和时间获取培训统计数据
  1276. async getTrainingStatisticsData() {
  1277. const params = { diDian: this.level }
  1278. if (this.startDate && this.endDate) {
  1279. params.startTime = this.startDate
  1280. params.endTime = this.endDate
  1281. }
  1282. if (this.depth3) {
  1283. params.deptId = this.depth3
  1284. }else{
  1285. if (this.positionsIdArr.length) {
  1286. params.deptId = this.positionsIdArr[0]
  1287. }
  1288. }
  1289. const { data } = await getUserStatisticList(params)
  1290. data.sort((a, b) => {
  1291. return a.id_ - b.id_
  1292. })
  1293. const dArr = data.filter(
  1294. (d) =>
  1295. !d.name_.includes('系统') &&
  1296. !d.name_.includes('金通') &&
  1297. !d.name_.includes('管理')
  1298. )
  1299. // 格式化统计图需要的数据
  1300. this.optionTrainingStatisticsConfig.xAxis.data = dArr.map(
  1301. (item) => item.name_
  1302. )
  1303. this.optionTrainingStatisticsConfig.series[0].data = dArr.map(
  1304. (item) => item.planedjoin
  1305. )
  1306. this.optionTrainingStatisticsConfig.series[1].data = dArr.map(
  1307. (item) => item.truejoin
  1308. )
  1309. this.optionTrainingStatisticsConfig.series[2].data = dArr.map(
  1310. (item) => item.participationRate
  1311. )
  1312. },
  1313. handleFunc(e) {
  1314. // console.log(e, 'eeeeeeeeee')
  1315. const { selection, selectionDept, filterDept } = e
  1316. if (selection) {
  1317. this.depth3 = selection
  1318. }else{
  1319. this.depth3 = filterDept.filter((i) => i.depth === 3)[0].positionId
  1320. }
  1321. this.sqlPositionsDatasIni = filterDept
  1322. const arr = selectionDept.path.split('.')
  1323. const selArr =
  1324. selectionDept.depth === 4
  1325. ? [arr[arr.length - 2], arr[arr.length - 1]]
  1326. : [arr[arr.length - 1]]
  1327. this.positionIni = selArr
  1328. this.simplifyPosition(selArr)
  1329. this.handleAllGetFunc()
  1330. // clearInterval(this.interval)
  1331. // this.intervalHandle()
  1332. if (selArr.length >= 2) {
  1333. this.positionsIdArr = selection
  1334. }
  1335. this.getTrainingStatisticsData()
  1336. this.getExamStatisticsData()
  1337. },
  1338. handleInt(e) {
  1339. // 找到对应id的部门信息
  1340. const obj = this.sqlPositionsDatasIni.find(
  1341. (item) => item.ID_ === e[0][e[0].length - 1]
  1342. )
  1343. if (obj === undefined) {
  1344. this.optionPersonConfig.title = `部门(/)员工任务统计`
  1345. } else {
  1346. this.optionPersonConfig.title = `部门(${obj.NAME_})员工任务统计`
  1347. }
  1348. this.simplifyPosition(e)
  1349. this.employeeInfoData()
  1350. },
  1351. // 定时任务调用接口,一分钟一次
  1352. intervalHandle() {
  1353. let cishu = 0 // 记录所选择的部门个数,即需要轮询多少次
  1354. this.interval = setInterval(() => {
  1355. if (this.positionIni.length === 0) {
  1356. return
  1357. }
  1358. if (cishu > this.positionIni.length - 1) {
  1359. cishu = 0
  1360. this.handleInt([this.positionIni[0]])
  1361. } else {
  1362. this.handleInt([this.positionIni[cishu]])
  1363. cishu++
  1364. }
  1365. }, 10000)
  1366. },
  1367. allView() {
  1368. // 默认显示全屏
  1369. screenfull.request()
  1370. },
  1371. // 返回
  1372. goBack() {
  1373. this.$router.back(-1)
  1374. }
  1375. }
  1376. }
  1377. </script>
  1378. <style lang="less" scoped>
  1379. .personView {
  1380. width: 100%;
  1381. // height: calc(100vh - 100px);
  1382. height: 100%;
  1383. // background-image: url("~@/assets/images/screen/bg.png");
  1384. z-index: 999;
  1385. #dv-full-screen-container {
  1386. background-image: url('~@/assets/images/screen/bg.png');
  1387. background-size: 100% 100%;
  1388. box-shadow: 0 0 3px blue;
  1389. display: flex;
  1390. flex-direction: column;
  1391. }
  1392. }
  1393. .topView {
  1394. overflow: hidden;
  1395. box-sizing: border-box;
  1396. .jbd-title {
  1397. text-align: center;
  1398. font-weight: bold;
  1399. // background-color: rgb(249, 255, 255);
  1400. width: 100%;
  1401. color: white;
  1402. font-size: 18px;
  1403. height: 50%;
  1404. }
  1405. .contain {
  1406. width: 100%;
  1407. height: 50%;
  1408. display: flex;
  1409. justify-content: space-between;
  1410. border-left: 1px solid #dfdcdc;
  1411. color: white;
  1412. .personNum {
  1413. margin-left: 20px;
  1414. width: 250px;
  1415. }
  1416. .date {
  1417. text-align: right;
  1418. // padding-right: 20px;
  1419. display: flex;
  1420. width: 750px;
  1421. height: 80%;
  1422. .dv-border-svg-container {
  1423. width: 750px;
  1424. }
  1425. }
  1426. .back {
  1427. width: 15%;
  1428. margin-right: 10px;
  1429. }
  1430. /deep/.dv-border-box-8 .border-box-content {
  1431. display: flex;
  1432. align-items: center;
  1433. padding: 0px 2px;
  1434. }
  1435. /deep/ .el-range-input {
  1436. color: #fcfcfc;
  1437. background-color: #00083e;
  1438. }
  1439. /deep/ .el-range-separator {
  1440. color: #fcfcfc;
  1441. }
  1442. /deep/.el-input__inner {
  1443. background-color: #00083e;
  1444. border: 1px solid #4ea5d6;
  1445. }
  1446. }
  1447. }
  1448. .botView {
  1449. height: 95%;
  1450. width: 98%;
  1451. margin: 0 auto;
  1452. display: flex;
  1453. justify-content: left;
  1454. overflow: hidden;
  1455. box-sizing: border-box;
  1456. .viewLeft {
  1457. width: 58%;
  1458. height: 100%;
  1459. overflow: hidden;
  1460. box-sizing: border-box;
  1461. }
  1462. // .viewCenter {
  1463. // width: 28%;
  1464. // height: 100%;
  1465. // overflow: hidden;
  1466. // box-sizing: border-box;
  1467. // }
  1468. .viewRight {
  1469. display: flex;
  1470. flex-direction: column;
  1471. justify-content: space-between;
  1472. width: 40%;
  1473. height: 100%;
  1474. overflow: hidden;
  1475. // padding-bottom: 10px;
  1476. box-sizing: border-box;
  1477. .taskMatters {
  1478. width: 49%;
  1479. height: 100%;
  1480. }
  1481. }
  1482. }
  1483. .middleView {
  1484. width: 100%;
  1485. margin: 0 auto;
  1486. height: 50%;
  1487. overflow: hidden;
  1488. box-sizing: border-box;
  1489. display: flex;
  1490. .midViewLeft {
  1491. width: 40%;
  1492. height: 100%;
  1493. overflow: hidden;
  1494. box-sizing: border-box;
  1495. }
  1496. .midViewRight {
  1497. width: 60%;
  1498. height: 100%;
  1499. overflow: hidden;
  1500. box-sizing: border-box;
  1501. }
  1502. }
  1503. </style>