terminalDataDialog.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <template>
  2. <div class="c1" @mouseleave="leaveFun">
  3. <div style="display: flex;justify-content: center;width: 100%;flex-wrap: wrap">
  4. <div style="position: relative;height: 38px">
  5. <div class="overTitle">资源台账</div>
  6. <img src="@/assets/images/main/cont_title_bg.png" width="284" alt="" class="Img">
  7. </div>
  8. <div class="c1_bg">
  9. <div class="c1_title"></div>
  10. <div class="c1_body">
  11. <div style="display: flex;justify-content: center;align-items: center;margin-bottom: 10px">
  12. <img src="../../../assets/zhang/publicCar/car.png" width="68" style="margin-right: 20px">
  13. <div class="carNum" v-for="(it, index) in resourceData.totalCarNum.split('')">
  14. <span v-if="index < resourceData.cd" style="color: rgba(0,255,255,0.3)">{{ it }}</span>
  15. <span v-if="index >= resourceData.cd">{{ it }}</span>
  16. </div>
  17. <div class="carText">辆</div>
  18. </div>
  19. <div class="c1_titleText"></div>
  20. <div style="display: flex;justify-content: center;align-items: center;margin-bottom: 20px">
  21. <div class="carTypeNumBox" v-for="(it, index) in carTypeNum">
  22. <div style="display: flex;width: 100%;height: 25px">
  23. <img src="../../../assets/zhang/publicCar/miniCar.png" width="18" style="object-fit: cover">
  24. <div style="color: white;font-size: 15px">{{ it.type }}</div>
  25. </div>
  26. <div style="width: 100%;height: 25px;color: #00FFFF;display: flex">
  27. <div style="font-size: 25px;font-family: 'electronicFont'">{{ it.num }}</div>
  28. <div style="font-size: 10px;height: 100%;display: flex;align-items: end">辆</div>
  29. </div>
  30. </div>
  31. </div>
  32. <div style="display: flex;width: 100%;">
  33. <div style="width: 50%">
  34. <div class="c1_titleText_half1"></div>
  35. <div style="display: flex;align-items: center;margin-bottom: 10px;padding-left: 30px">
  36. <div style="height: 50px;margin-right: 15px" v-for="(it, index) in carUseNum">
  37. <div style="display: flex;width: 100%;height: 25px;align-items: center">
  38. <img src="../../../assets/zhang/publicCar/miniCar.png" width="30" style="object-fit: cover">
  39. <div style="color: white;font-size: 13px">{{ it.type }}</div>
  40. </div>
  41. <div style="width: 100%;height: 25px;color: #00FFFF;display: flex;margin-left: 10px">
  42. <div style="font-size: 25px;font-family: 'electronicFont'">{{ it.num }}</div>
  43. <div style="font-size: 10px;height: 100%;display: flex;align-items: end">辆</div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <div style="width: 50%">
  49. <div class="c1_titleText_half2"></div>
  50. <div style="display: flex;align-items: center;margin-bottom: 10px;padding-left: 30px">
  51. <div style="height: 50px;margin-right: 15px" v-for="(it, index) in carActivationNum">
  52. <div style="display: flex;width: 100%;height: 25px;align-items: center">
  53. <img src="../../../assets/zhang/publicCar/miniCar.png" width="30" style="object-fit: cover">
  54. <div style="color: white;font-size: 13px">{{ it.type }}</div>
  55. </div>
  56. <div style="width: 100%;height: 25px;color: #00FFFF;display: flex;margin-left: 10px">
  57. <div style="font-size: 25px;font-family: 'electronicFont'">{{ it.num }}</div>
  58. <div style="font-size: 10px;height: 100%;display: flex;align-items: end">辆</div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <div style="display: flex;width: 100%;flex-wrap: wrap;margin-top: 10px">
  66. <div style="width: 50%;margin-bottom: 10px">
  67. <div class="c1_title_half">
  68. <div style="position: absolute;left: 20px;top: -5px;">公务车编制数</div>
  69. </div>
  70. <div style="display: flex;align-items: center">
  71. <img src="../../../assets/zhang/public_car.png" width="58" style="margin: 10px 5px 0 33px">
  72. <div style="width: 108px;height: 24px;color: #00FFFF;font-size: 34px;margin-bottom: 10px">
  73. <span style="font-family: 'electronicFont'">{{ resourceData.establishmentsCarNum }}</span>
  74. <span style="width: 15px;height: 24px;font-size: 14px;align-content: end">辆</span>
  75. </div>
  76. </div>
  77. </div>
  78. <div style="width: 50%;margin-bottom: 10px">
  79. <div class="c1_title_half">
  80. <div style="position: absolute;left: 20px;top: -5px;">公务车缺编率</div>
  81. </div>
  82. <div style="display: flex;align-items: center">
  83. <div style="position: relative">
  84. <img src="../../../assets/zhang/publicCar/arcBlueEx.png" width="90" style="margin: 20px 5px 0 33px">
  85. <div style="position: absolute;color: #00FFFF;width: 158px;top: 5px;font-size: 34px;font-family: 'electronicFont';text-align: center">
  86. {{ Number.isNaN(resourceData.percentageLack) ? 0 : resourceData.percentageLack }}<span style="font-size: 12px">%</span>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <div style="width: 50%;margin-bottom: 10px">
  92. <div class="c1_title_half">
  93. <div style="position: absolute;left: 20px;top: -5px;">公务车占编率</div>
  94. </div>
  95. <div style="display: flex;align-items: center">
  96. <div style="position: relative">
  97. <img src="../../../assets/zhang/publicCar/arcBlueEx.png" width="90" style="margin: 20px 5px 0 33px">
  98. <div style="position: absolute;color: #00FFFF;width: 158px;top: 5px;font-size: 34px;font-family: 'electronicFont';text-align: center">{{ Number.isNaN(resourceData.percentagePosess) ? 0 : resourceData.percentagePosess }}<span style="font-size: 12px">%</span></div>
  99. </div>
  100. </div>
  101. </div>
  102. <div style="width: 50%;margin-bottom: 10px">
  103. <div class="c1_title_half">
  104. <div style="position: absolute;left: 20px;top: -5px;">2025年度公务车车辆数</div>
  105. </div>
  106. <div style="display: flex;align-items: center;margin-bottom: 20px">
  107. <div style="position: relative;cursor: pointer" @click="chooseX">
  108. <img src="../../../assets/zhang/publicCar/arcBlue.png" width="97" style="margin: 10px 5px 0 33px">
  109. <div style="position: absolute;width: 48px;color: #00FFFF;top: 5px;left: 55px;font-size: 12px;text-align: center">年度增加车辆数</div>
  110. </div>
  111. <div style="width: 108px;height: 24px;color: #00FFFF;font-size: 34px;margin-bottom: 20px">
  112. <span style="font-family: 'electronicFont'">{{ resourceData.yearAddNum }}</span>
  113. <span style="width: 15px;height: 24px;font-size: 10px;align-content: end">万辆</span>
  114. </div>
  115. </div>
  116. <div style="display: flex;align-items: center">
  117. <div style="position: relative;cursor: pointer" @click="chooseY">
  118. <img src="../../../assets/zhang/publicCar/arcOrange.png" width="97" style="margin: 10px 5px 0 33px">
  119. <div style="position: absolute;width: 48px;color: #FEC72F;top: 5px;left: 55px;font-size: 12px;text-align: center">年度减少车辆数</div>
  120. </div>
  121. <div style="width: 108px;height: 24px;color: #FEC72F;font-size: 34px;margin-bottom: 20px">
  122. <span style="font-family: 'electronicFont'">{{ resourceData.yearReduceNum }}</span>
  123. <span style="width: 15px;height: 24px;font-size: 10px;align-content: end">万辆</span>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </template>
  132. <script>
  133. import LineChart from "@/components/Echarts/LineChart";
  134. import PieChart from "@/components/Echarts/PieChart";
  135. import BarChart from "@/components/Echarts/BarChart.vue";
  136. import echarts from "echarts";
  137. export default {
  138. name: "BuildingSaveDialog",
  139. components: {
  140. BarChart,
  141. PieChart,
  142. LineChart,
  143. },
  144. props: {
  145. carTypeNum: Array,
  146. carUseNum: Array,
  147. carActivationNum: Array,
  148. resourceData:{}
  149. },
  150. data() {
  151. return {
  152. //在线数
  153. pieData: [],
  154. catePieData: [
  155. { value: 40, name: "新能源汽车" },
  156. { value: 20, name: "燃油汽车" },
  157. ],
  158. totalPieData: [
  159. { value: 110, name: "商务车" },
  160. { value: 120, name: "越野车" },
  161. { value: 130, name: "小型客车" },
  162. { value: 140, name: "大型客车" },
  163. { value: 150, name: "小轿车" },
  164. ],
  165. catePieLegend: {
  166. orient: "vertical",
  167. top: 60,
  168. right: 23,
  169. itemWidth: 8, // 设置图例标记的宽度
  170. itemHeight: 8, // 设置图例标记的高度
  171. textStyle: {
  172. color: "#FFF",
  173. },
  174. },
  175. totalPieLegend: {
  176. top: 20,
  177. right: 10,
  178. itemWidth: 8,
  179. itemHeight: 8,
  180. orient: "vertical",
  181. textStyle: {
  182. color: "#FFF",
  183. },
  184. },
  185. pieLegend: {
  186. orient: "vertical",
  187. top: 50,
  188. right: 30,
  189. itemWidth: 8, // 设置图例标记的宽度
  190. itemHeight: 8, // 设置图例标记的高度
  191. textStyle: {
  192. color: "#FFF",
  193. },
  194. },
  195. pieCenter: ["27%", "50%"],
  196. totalCenter: ["30%", "50%"],
  197. catePieCenter: ["27%", "50%"],
  198. pieRadius: ["35%", "50%"],
  199. //各单位终端在线
  200. barData: [],
  201. barAxis: {},
  202. barYAxis: {},
  203. barLegend: {},
  204. personInOutBarData: [
  205. {
  206. name: "员工",
  207. type: "bar",
  208. itemStyle: {
  209. color: "#43DCDB",
  210. //barBorderRadius: [10, 10, 0, 0], // 统一设置四个角的圆角大小
  211. },
  212. barWidth: 10,
  213. data: [110, 120, 130, 140, 150, 160, 155, 145, 135, 125, 115, 15],
  214. },
  215. {
  216. name: "访客",
  217. type: "bar",
  218. itemStyle: {
  219. color: "#FFD296",
  220. //barBorderRadius: [10, 10, 0, 0], // 统一设置四个角的圆角大小
  221. },
  222. barWidth: 10,
  223. data: [10, 20, 30, 40, 50, 60, 55, 45, 35, 25, 15, 5],
  224. },
  225. ],
  226. personInOutBarAxis: {
  227. type: "category",
  228. data: [
  229. "01月",
  230. "02月",
  231. "03月",
  232. "04月",
  233. "05月",
  234. "06月",
  235. "07月",
  236. "08月",
  237. "09月",
  238. "10月",
  239. "11月",
  240. "12月",
  241. ],
  242. axisLabel: {
  243. color: "white", // 设置横坐标轴字体颜色为红色
  244. },
  245. axisLine: {
  246. show: true,
  247. lineStyle: {
  248. color: "#08595B",
  249. },
  250. },
  251. axisTick: {
  252. show: false,
  253. },
  254. splitArea: false,
  255. },
  256. personInOutBarYaxis: {
  257. type: "value",
  258. boundaryGap: [0, 0.01],
  259. name: "人",
  260. nameTextStyle: {
  261. color: "#fff",
  262. },
  263. axisLine: {
  264. show: false,
  265. },
  266. axisLabel: {
  267. color: "white", // 设置横坐标轴字体颜色为红色
  268. },
  269. splitLine: {
  270. show: false,
  271. },
  272. axisTick: {
  273. show: false,
  274. },
  275. splitArea: false,
  276. },
  277. personInOutBarLegend: {
  278. top: 0,
  279. orient: "horizontal",
  280. right: 0,
  281. itemWidth: 17, // 设置图例标记的宽度
  282. itemHeight: 10, // 设置图例标记的高度
  283. textStyle: {
  284. color: "#FFF",
  285. },
  286. },
  287. barGrid: {
  288. top: 30,
  289. left: "2%",
  290. right: "5%",
  291. containLabel: true,
  292. bottom: 0,
  293. },
  294. departmentPersonInOutBarData: [
  295. {
  296. name: "员工",
  297. type: "bar",
  298. itemStyle: {
  299. color: "#43DCDB",
  300. //barBorderRadius: [10, 10, 0, 0], // 统一设置四个角的圆角大小
  301. },
  302. barWidth: 10,
  303. data: [110, 150, 160, 135, 115, 15],
  304. },
  305. {
  306. name: "访客",
  307. type: "bar",
  308. itemStyle: {
  309. color: "#FFD296",
  310. //barBorderRadius: [10, 10, 0, 0], // 统一设置四个角的圆角大小
  311. },
  312. barWidth: 10,
  313. data: [10, 20, 30, 40, 50, 60, 55, 45, 35, 25, 15, 5],
  314. },
  315. ],
  316. departmentPersonInOutBarAxis: {
  317. type: "category",
  318. data: ["财务资产部", "离退休工作部", "后勤保障部", "物资管理部", "数字化工作部", "纪委办公室"],
  319. axisLabel: {
  320. color: "white", // 设置横坐标轴字体颜色为红色
  321. },
  322. axisLine: {
  323. show: true,
  324. lineStyle: {
  325. color: "#08595B",
  326. },
  327. },
  328. axisTick: {
  329. show: false,
  330. },
  331. splitArea: false,
  332. },
  333. departmentPersonInOutBarYaxis: {
  334. type: "value",
  335. boundaryGap: [0, 0.01],
  336. name: "人",
  337. nameTextStyle: {
  338. color: "#fff",
  339. },
  340. axisLine: {
  341. show: false,
  342. },
  343. axisLabel: {
  344. color: "white", // 设置横坐标轴字体颜色为红色
  345. },
  346. splitLine: {
  347. show: false,
  348. },
  349. axisTick: {
  350. show: false,
  351. },
  352. splitArea: false,
  353. },
  354. departmentPersonInOutBarLegend: {
  355. top: 0,
  356. orient: "horizontal",
  357. right: 0,
  358. itemWidth: 17, // 设置图例标记的宽度
  359. itemHeight: 10, // 设置图例标记的高度
  360. textStyle: {
  361. color: "#FFF",
  362. },
  363. },
  364. visitorDataList: [
  365. {
  366. name: "于俊",
  367. time: "2024 / 11 / 15 15:01",
  368. department: "财务资产部",
  369. },
  370. {
  371. name: "于俊",
  372. time: "2024 / 11 / 15 14:58",
  373. department: "财务资产部",
  374. },
  375. {
  376. name: "于俊",
  377. time: "2024 / 11 / 15 14:55",
  378. department: "财务资产部",
  379. },
  380. {
  381. name: "于俊",
  382. time: "2024 / 11 / 15 14:01",
  383. department: "财务资产部",
  384. },
  385. ],
  386. warningList: [
  387. {
  388. name: "国网太原供电公司",
  389. data1: 356,
  390. data2: 100,
  391. data3: 56,
  392. data4: 67,
  393. data5: 133,
  394. },
  395. {
  396. name: "国网临汾供电公司",
  397. data1: 324,
  398. data2: 80,
  399. data3: 95,
  400. data4: 63,
  401. data5: 86,
  402. },
  403. {
  404. name: "国网晋城供电公司",
  405. data1: 286,
  406. data2: 80,
  407. data3: 65,
  408. data4: 46,
  409. data5: 95,
  410. },
  411. {
  412. name: "国网长治供电公司",
  413. data1: 275,
  414. data2: 84,
  415. data3: 72,
  416. data4: 63,
  417. data5: 56,
  418. },
  419. {
  420. name: "国网运城供电公司",
  421. data1: 268,
  422. data2: 70,
  423. data3: 65,
  424. data4: 73,
  425. data5: 60,
  426. },
  427. ],
  428. };
  429. },
  430. created() {
  431. this.handlePie();
  432. this.handleBar();
  433. },
  434. destroyed() {},
  435. beforeDestroy() {},
  436. mounted() {},
  437. methods: {
  438. chooseX(){
  439. this.$emit('chooseX')
  440. },
  441. chooseY(){
  442. this.$emit('chooseY')
  443. },
  444. //实例化饼图
  445. handlePie() {
  446. this.pieData = [
  447. { value: 100, name: "离线数" },
  448. { value: 200, name: "在线数" },
  449. ];
  450. },
  451. //实例化柱状图
  452. handleBar() {
  453. this.barData = [
  454. {
  455. name: "总数",
  456. type: "bar",
  457. itemStyle: {
  458. color: "#43DCDB",
  459. },
  460. barWidth: 10,
  461. data: [320, 332, 201, 334, 390, 100],
  462. },
  463. {
  464. name: "离线数",
  465. type: "bar",
  466. itemStyle: {
  467. color: "#EAA553",
  468. },
  469. barWidth: 10,
  470. data: [220, 232, 301, 334, 190, 200],
  471. },
  472. {
  473. name: "在线数",
  474. type: "bar",
  475. itemStyle: {
  476. color: "#1B5CBB",
  477. },
  478. barWidth: 10,
  479. data: [120, 332, 101, 134, 290, 300],
  480. },
  481. ];
  482. this.barGrid = {
  483. top: 30,
  484. bottom: 0,
  485. left: "2%",
  486. right: "5%",
  487. containLabel: true,
  488. };
  489. this.barLegend = {
  490. right: 20,
  491. top: 0,
  492. itemWidth: 17, // 设置图例标记的宽度
  493. itemHeight: 10, // 设置图例标记的高度
  494. textStyle: {
  495. color: "#FFF",
  496. },
  497. };
  498. this.barAxis = {
  499. type: "category",
  500. data: [
  501. "国网太原供电公司",
  502. "国网运城供电公司",
  503. "国网临汾供电公司",
  504. "国网晋城供电公司",
  505. "国网吕梁供电公司",
  506. ],
  507. axisLabel: {
  508. color: "white", // 设置横坐标轴字体颜色为红色
  509. rotate:-50
  510. },
  511. axisLine: {
  512. lineStyle: {
  513. color: "#08595B",
  514. },
  515. },
  516. axisTick: {
  517. show: false,
  518. },
  519. splitArea: false,
  520. };
  521. this.barYAxis = {
  522. name: "数量(个)",
  523. nameTextStyle: {
  524. color: "#fff",
  525. padding: [0, 0, 0, 5],
  526. fontSize: 14,
  527. },
  528. axisLabel: {
  529. formatter: "{value}",
  530. color: "#FFF",
  531. },
  532. axisLine: {
  533. show: false,
  534. },
  535. axisTick: {
  536. show: false,
  537. },
  538. splitLine: {
  539. show: false,
  540. },
  541. splitArea: false,
  542. };
  543. },
  544. //鼠标移出
  545. leaveFun() {
  546. setTimeout(() => {
  547. this.$emit("closeDialog");
  548. }, 200);
  549. },
  550. preventDefault() {
  551. console.log(11);
  552. },
  553. },
  554. };
  555. </script>
  556. <style lang="scss" scoped>
  557. .c1 {
  558. width: 580px;
  559. height: 920px;
  560. padding-top: 19px;
  561. background: url("../../../assets/images/main/main_bg.png") no-repeat;
  562. background-size: cover;
  563. }
  564. .Img {
  565. width: 284px;
  566. height: 32px;
  567. }
  568. .c1_bg{
  569. width: 550px;
  570. height: 849px;
  571. background: url("../../../assets/images/main/components_long_bg.png") no-repeat;
  572. background-size: cover;
  573. margin-top: 4px;
  574. }
  575. .overTitle{
  576. width: 100%;
  577. top: -5px;
  578. color: white;
  579. font-family: 'PingFangSC';
  580. font-size: 20px;
  581. font-weight: 900;
  582. position: absolute;
  583. display: flex;
  584. align-items: center;
  585. justify-content: center;
  586. }
  587. .c1_title{
  588. width: 100%;
  589. height: 36px;
  590. background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
  591. color: #00FFFF;
  592. margin: 20px 0 0 15px;
  593. position: relative;
  594. }
  595. .c1_title::after{
  596. content: '公务车实有数';
  597. position: absolute;
  598. left: 20px;
  599. top: -5px;
  600. }
  601. .carNum{
  602. width: 40px;
  603. height: 58px;
  604. margin-right: 3px;
  605. background: url("../../../assets/zhang/publicCar/numBack.png") no-repeat;
  606. color: #00FFFF;
  607. font-size: 40px;
  608. display: flex;
  609. justify-content: center;
  610. align-items: center;
  611. font-style: oblique;
  612. }
  613. .carText{
  614. width: 40px;
  615. height: 58px;
  616. color: #00FFFF;
  617. font-size: 24px;
  618. margin-left: 3px;
  619. align-content: end;
  620. }
  621. .c1_titleText{
  622. width: 100%;
  623. height: 32px;
  624. margin-left: 35px;
  625. margin-bottom: 10px;
  626. background: url("../../../assets/zhang/publicCar/titleBox.png") no-repeat;
  627. position: relative;
  628. }
  629. .c1_titleText::after{
  630. content: '车辆类型';
  631. position: absolute;
  632. color: #FFFFFF;
  633. font-size: 12px;
  634. left: 20px;
  635. top: 8px;
  636. }
  637. .carTypeNumBox{
  638. width: 95px;
  639. height: 50px;
  640. }
  641. .c1_titleText_half1{
  642. height: 32px;
  643. margin-left: 35px;
  644. margin-bottom: 10px;
  645. background: url("../../../assets/zhang/publicCar/titleBox.png") no-repeat;
  646. position: relative;
  647. }
  648. .c1_titleText_half1::after{
  649. content: '车辆用途';
  650. position: absolute;
  651. color: #FFFFFF;
  652. font-size: 12px;
  653. left: 20px;
  654. top: 8px;
  655. }
  656. .c1_titleText_half2{
  657. height: 32px;
  658. margin-left: 35px;
  659. margin-bottom: 10px;
  660. background: url("../../../assets/zhang/publicCar/titleBox.png") no-repeat;
  661. position: relative;
  662. }
  663. .c1_titleText_half2::after{
  664. content: '动力类型';
  665. position: absolute;
  666. color: #FFFFFF;
  667. font-size: 12px;
  668. left: 20px;
  669. top: 8px;
  670. }
  671. .c1_title_half{
  672. width: 100%;
  673. height: 36px;
  674. background: url("../../../assets/images/main/title_pro.png") no-repeat;
  675. color: #00FFFF;
  676. margin: 20px 0 0 15px;
  677. position: relative;
  678. }
  679. </style>