index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. <template>
  2. <div class="wrap">
  3. <div class="head">
  4. <div class="head-left">
  5. <div class="head-left-title">
  6. <span>营级单位排名</span>
  7. </div>
  8. <el-table
  9. :data="peopleList"
  10. :header-cell-style="{ background: '#0c2c50', color: 'white' }"
  11. style="width: 98%; background: #0c2c50; margin-left: 1%"
  12. height="88%"
  13. >
  14. <!-- <el-table-column type="selection" width="55" align="center" /> -->
  15. <el-table-column label="名次" align="center" type="index" />
  16. <!-- <el-table-column label="备用手机号" align="center" prop="id" /> -->
  17. <el-table-column label="单位" align="center" prop="name" />
  18. <el-table-column label="加分" align="center" prop="addscore">
  19. <template slot-scope="scope">
  20. <div style="color: rgb(2 255 2)">{{ scope.row.addscore }}</div>
  21. </template>
  22. </el-table-column>
  23. <el-table-column label="减分" align="center" prop="subscore">
  24. <template slot-scope="scope">
  25. <div style="color: rgb(255 106 0)">{{ scope.row.subscore }}</div>
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="总分" align="center" prop="zongfen" />
  29. </el-table>
  30. </div>
  31. <div class="head-right">
  32. <div class="head-left-title">
  33. <span>待处理及待验收问题</span>
  34. </div>
  35. <el-table
  36. :data="peopleList2"
  37. :header-cell-style="{ background: '#0c2c50', color: 'white' }"
  38. style="width: 98%; background: #0c2c50; margin-left: 1%"
  39. height="88%"
  40. @row-click="rowclick"
  41. >
  42. <!-- <el-table-column type="selection" width="55" align="center" /> -->
  43. <el-table-column label="序号" align="center" type="index" />
  44. <el-table-column
  45. label="受检单位"
  46. align="center"
  47. prop="inspectedUnit"
  48. />
  49. <el-table-column
  50. label="检查单位"
  51. align="center"
  52. prop="unitCheck"
  53. ></el-table-column>
  54. <el-table-column
  55. label="状态"
  56. align="center"
  57. prop="currentState"
  58. ></el-table-column>
  59. <el-table-column label="减分" align="center" prop="score">
  60. <template slot-scope="scope">
  61. <div style="color: rgb(255 106 0)">{{ scope.row.score }}</div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column
  65. label="事由"
  66. show-overflow-tooltip
  67. align="center"
  68. prop="question"
  69. />
  70. <el-table-column
  71. label="整改时间"
  72. align="center"
  73. prop="rectificationTime"
  74. width="180"
  75. >
  76. <template slot-scope="scope">
  77. <span>
  78. {{ parseTime(scope.row.rectificationTime, "{y}-{m}-{d}") }}
  79. </span>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. </div>
  84. </div>
  85. <div class="foot">
  86. <div class="foot-left">
  87. <div class="head-left-title">
  88. <span>整体状态完成比例</span>
  89. </div>
  90. <div id="foot-left-content"></div>
  91. </div>
  92. <div class="foot-right">
  93. <div class="head-left-title">
  94. <span>各单位</span>
  95. </div>
  96. <div class="foot-right-main" id="foot-right-main" ref="foot">
  97. <div class="block"></div>
  98. <div class="block"></div>
  99. <div class="block"></div>
  100. <div class="block"></div>
  101. <div class="block"></div>
  102. <div class="block"></div>
  103. <div class="block"></div>
  104. <div class="block"></div>
  105. <div class="block"></div>
  106. <div class="block"></div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </template>
  112. <script>
  113. import {
  114. unitrank,
  115. pendingacceptance,
  116. completeproportion,
  117. unitproportion,
  118. getRegularinfo,
  119. } from "@/api/bdglregular/regularcountinfo";
  120. import * as echarts from "echarts";
  121. import Cookies from "js-cookie";
  122. export default {
  123. data() {
  124. return {
  125. peopleList: [],
  126. peopleList2: [],
  127. peopleList3: [],
  128. };
  129. },
  130. created() {
  131. // if (Cookies.get("shuaxin") != "true") {
  132. // window.location.reload();
  133. // }
  134. // Cookies.set("shuaxin", "true");
  135. this.getlist();
  136. this.getlist2();
  137. },
  138. mounted() {
  139. this.getlist3();
  140. this.echarfun();
  141. },
  142. methods: {
  143. getlist() {
  144. unitrank().then((res) => {
  145. if (res.code == 200) {
  146. this.peopleList = res.data;
  147. this.peopleList.forEach((item) => {
  148. return (item.zongfen = item.zongfen.split(".")[0]);
  149. });
  150. this.peopleList.forEach((item) => {
  151. return (item.subscore = item.subscore.split(".")[0]);
  152. });
  153. this.peopleList.forEach((item) => {
  154. return (item.addscore = item.addscore.split(".")[0]);
  155. });
  156. }
  157. });
  158. },
  159. getlist2() {
  160. pendingacceptance().then((res) => {
  161. if (res.code == 200) {
  162. this.peopleList2 = res.data;
  163. }
  164. });
  165. },
  166. getlist3() {
  167. completeproportion().then((res) => {
  168. if (res.code == 200) {
  169. var myChart = echarts.init(
  170. document.getElementById("foot-left-content")
  171. );
  172. var option = {
  173. title: {
  174. text: "",
  175. subtext: "",
  176. left: "",
  177. },
  178. tooltip: {
  179. trigger: "item",
  180. formatter: "{a} <br/>{b} : {c} ({d}%)",
  181. },
  182. color: ["#5470c6", "#fac858", "#ee6666", "#91cc75"],
  183. legend: {
  184. orient: "vertical",
  185. right: "0",
  186. top: "10%",
  187. itemGap: 20,
  188. textStyle: {
  189. color: "#fff",
  190. },
  191. data: ["待处理", "待验收", "未通过", "已通过"],
  192. },
  193. series: [
  194. {
  195. name: "",
  196. type: "pie",
  197. radius: "80%",
  198. label: {
  199. normal: {
  200. show: true,
  201. position: "inner",
  202. formatter: "{c}", //\n({d}%)
  203. textStyle: {
  204. fontWeight: 300,
  205. fontSize: 16,
  206. color: "#fff",
  207. },
  208. },
  209. },
  210. data: [
  211. {
  212. value:
  213. res.data[0].daiyanshou == 0
  214. ? null
  215. : res.data[0].daiyanshou,
  216. name: "待验收",
  217. },
  218. {
  219. value:
  220. res.data[0].daichuli == 0 ? null : res.data[0].daichuli,
  221. name: "待处理",
  222. },
  223. {
  224. value:
  225. res.data[0].weitongguo == 0
  226. ? null
  227. : res.data[0].weitongguo,
  228. name: "未通过",
  229. },
  230. {
  231. value:
  232. res.data[0].yitongguo == 0 ? null : res.data[0].yitongguo,
  233. name: "已通过",
  234. },
  235. ],
  236. emphasis: {
  237. itemStyle: {
  238. shadowBlur: 10,
  239. shadowOffsetX: 0,
  240. shadowColor: "rgba(0, 0, 0, 0.5)",
  241. },
  242. },
  243. itemStyle: {
  244. normal: {
  245. //饼状图阴影,值越大阴影亮度越高
  246. shadowBlur: 5,
  247. shadowColor: "#93DDFF",
  248. },
  249. },
  250. },
  251. ],
  252. };
  253. if (
  254. res.data[0].daiyanshou == 0 &&
  255. res.data[0].daichuli == 0 &&
  256. res.data[0].weitongguo == 0 &&
  257. res.data[0].yitongguo == 0
  258. ) {
  259. option.color = ["#255F8A"];
  260. option.tooltip = {
  261. show: false,
  262. };
  263. option.series[0].data = [{ value: 0, name: "无" }];
  264. }
  265. myChart.setOption(option);
  266. myChart.on("click", this.eConsole1);
  267. }
  268. });
  269. },
  270. getlist4() {},
  271. echarfun() {
  272. unitproportion().then((res) => {
  273. if (res.code == 200) {
  274. this.peopleList3 = res.data;
  275. var roseCharts = document.getElementsByClassName("block");
  276. for (var i = 0; i < this.peopleList3.length; i++) {
  277. var myChart = echarts.init(roseCharts[i]);
  278. var option = {
  279. title: {
  280. text: this.peopleList3[i].name,
  281. subtext: "",
  282. // left: "",
  283. y: "bottom",
  284. x: "center",
  285. padding: 0,
  286. textStyle: {
  287. color: "#ffff",
  288. // fontSize: 12,
  289. fontStyle: "normal",
  290. fontWeight: "normal",
  291. },
  292. },
  293. color: ["#5470c6", "#fac858", "#ee6666", "#91cc75"],
  294. tooltip: {
  295. trigger: "item",
  296. formatter: "{a} <br/>{b} : {c} ({d}%)",
  297. },
  298. // legend: {
  299. // orient: "vertical",
  300. // right: "0",
  301. // top: "3%",
  302. // itemGap: 5,
  303. // textStyle: {
  304. // color: "#fff"
  305. // },
  306. // data: ["待处理", "待验收", "未通过", "已通过"]
  307. // },
  308. series: [
  309. {
  310. name: "",
  311. type: "pie",
  312. radius: "60%",
  313. center: ["50%", "50%"],
  314. label: {
  315. normal: {
  316. show: true,
  317. position: "inner",
  318. formatter: "{c}", //\n({d}%)
  319. textStyle: {
  320. fontWeight: 300,
  321. fontSize: 16,
  322. color: "#fff",
  323. },
  324. },
  325. },
  326. data: [
  327. {
  328. value:
  329. this.peopleList3[i].daiyanshou == 0
  330. ? null
  331. : this.peopleList3[i].daiyanshou,
  332. name: "待验收",
  333. id: this.peopleList3[i].deptId,
  334. },
  335. {
  336. value:
  337. this.peopleList3[i].daichuli == 0
  338. ? null
  339. : this.peopleList3[i].daichuli,
  340. name: "待处理",
  341. id: this.peopleList3[i].deptId,
  342. },
  343. {
  344. value:
  345. this.peopleList3[i].weitongguo == 0
  346. ? null
  347. : this.peopleList3[i].weitongguo,
  348. name: "未通过",
  349. id: this.peopleList3[i].deptId,
  350. },
  351. {
  352. value:
  353. this.peopleList3[i].yitongguo == 0
  354. ? null
  355. : this.peopleList3[i].yitongguo,
  356. name: "已通过",
  357. id: this.peopleList3[i].deptId,
  358. },
  359. ],
  360. emphasis: {
  361. itemStyle: {
  362. shadowBlur: 10,
  363. shadowOffsetX: 0,
  364. shadowColor: "rgba(0, 0, 0, 0.5)",
  365. },
  366. },
  367. itemStyle: {
  368. normal: {
  369. //饼状图阴影,值越大阴影亮度越高
  370. shadowBlur: 5,
  371. shadowColor: "#93DDFF",
  372. },
  373. },
  374. },
  375. ],
  376. };
  377. if (
  378. this.peopleList3[i].daiyanshou == 0 &&
  379. this.peopleList3[i].daichuli == 0 &&
  380. this.peopleList3[i].weitongguo == 0 &&
  381. this.peopleList3[i].yitongguo == 0
  382. ) {
  383. option.color = ["#255F8A"];
  384. option.tooltip = {
  385. show: false,
  386. };
  387. option.series[0].data = [{ value: 0, name: "无" }];
  388. }
  389. myChart.setOption(option);
  390. myChart.on("click", this.eConsole);
  391. }
  392. }
  393. });
  394. },
  395. rowclick(row) {
  396. this.$router
  397. .push({
  398. path: "/bdglregular/regularinfo",
  399. // query: { id: row.inspectedUnitId,inspectedUnitId:row.inspectedUnitId,currentState:currentState },
  400. query: { obj: row },
  401. })
  402. .catch(() => {});
  403. },
  404. //饼状图点击事件
  405. eConsole(param) {
  406. // console.log(param);
  407. if (param.data.id) {
  408. this.$router
  409. .push({
  410. path: "/bdglregular/regularinfo",
  411. query: { obj: param.data },
  412. })
  413. .catch(() => {});
  414. }
  415. },
  416. // 整体情况跳转
  417. eConsole1(param) {
  418. console.log(param);
  419. if (param.data.name != "无") {
  420. this.$router
  421. .push({
  422. path: "/bdglregular/regularinfo",
  423. query: { obj: param.data },
  424. })
  425. .catch(() => {});
  426. }
  427. },
  428. },
  429. };
  430. </script>
  431. <style scoped>
  432. .wrap {
  433. min-height: calc(100vh - 85px);
  434. width: 100%;
  435. position: relative;
  436. overflow: hidden;
  437. background-color: #103360;
  438. margin: 0;
  439. padding: 0;
  440. display: flex;
  441. flex-direction: column;
  442. }
  443. .head {
  444. width: 100%;
  445. /* height: 43.5vh; */
  446. flex: 1;
  447. display: flex;
  448. flex-direction: row;
  449. margin-top: 10px;
  450. margin-bottom: 10px;
  451. }
  452. .head-left {
  453. flex: 4;
  454. height: 44vh;
  455. background-image: url("../../../images/量化/底1.png");
  456. background-repeat: no-repeat;
  457. background-size: 100% 100%;
  458. margin-left: 10px;
  459. margin-right: 10px;
  460. }
  461. .head-right {
  462. flex: 6;
  463. height: 44vh;
  464. background-image: url("../../../images/量化/底2.png");
  465. background-repeat: no-repeat;
  466. background-size: 100% 100%;
  467. margin-right: 10px;
  468. }
  469. .head-left-title {
  470. width: 96%;
  471. height: 30px;
  472. font-size: 18px;
  473. color: #fff;
  474. background-image: url("../../../assets/images/组 21.png");
  475. background-repeat: no-repeat;
  476. margin-top: 9px;
  477. line-height: 30px;
  478. position: relative;
  479. margin-left: 1%;
  480. }
  481. .head-left-title span {
  482. position: absolute;
  483. left: 36px;
  484. }
  485. ::v-deep .el-table__empty-block {
  486. background-color: #0c2c50;
  487. }
  488. .foot {
  489. width: 100%;
  490. /* height: 45vh; */
  491. flex: 1;
  492. display: flex;
  493. flex-direction: row;
  494. margin-bottom: 10px;
  495. }
  496. .foot-left {
  497. flex: 4;
  498. height: 43.5vh;
  499. background-image: url("../../../images/量化/底1.png");
  500. background-repeat: no-repeat;
  501. background-size: 100% 100%;
  502. margin-left: 10px;
  503. margin-right: 10px;
  504. }
  505. .foot-right {
  506. flex: 6;
  507. height: 43.5vh;
  508. background-image: url("../../../images/量化/底2.png");
  509. background-repeat: no-repeat;
  510. background-size: 100% 100%;
  511. margin-right: 10px;
  512. }
  513. .foot-right-main {
  514. width: 100%;
  515. height: 100%;
  516. }
  517. .foot-right-main .block {
  518. width: 20%;
  519. height: 42%;
  520. margin: 0;
  521. display: inline-block;
  522. }
  523. #foot-left-content {
  524. width: 90%;
  525. height: 380px;
  526. }
  527. ::v-deep .el-table .el-table__cell.gutter {
  528. display: none;
  529. }
  530. </style>