propertyDialog.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <template>
  2. <div class="main-data dialog-property-area" @click.stop="preventDefault" @mouseleave="leaveFun">
  3. <div class="dialog-title">
  4. <img
  5. src="@/assets/images/main/cont_title_bg.png"
  6. />
  7. <div class="title">物业服务</div>
  8. </div>
  9. <div class="dialog-cont">
  10. <div class="dialog-left">
  11. <div class="dialog-list">
  12. <div class="dialog-item wid100">
  13. <div class="content-title">
  14. <span class="title">数据概况(近三月)</span>
  15. </div>
  16. <div class="data-chart">
  17. <div class="data-content">
  18. <div class="data-item mar">
  19. <div class="data">
  20. <div>{{faultWarrantyNum.value}}</div>
  21. <div class="unit">个</div>
  22. </div>
  23. <div class="name">{{ faultWarrantyNum.name }}</div>
  24. </div>
  25. <div class="data-item mar">
  26. <div class="data">
  27. <div>{{dispatchedNum.value}}</div>
  28. <div class="unit">个</div>
  29. </div>
  30. <div class="name">{{ dispatchedNum.name }}</div>
  31. </div>
  32. <div class="data-item mar">
  33. <div class="data">
  34. <div>{{suggestedNum.value}}</div>
  35. <div class="unit">个</div>
  36. </div>
  37. <div class="name">{{ suggestedNum.name }}</div>
  38. </div>
  39. <div class="data-item mar">
  40. <div class="data">
  41. <div>{{repairOrdersNum.value}}</div>
  42. <div class="unit">个</div>
  43. </div>
  44. <div class="name">{{ repairOrdersNum.name }}</div>
  45. </div>
  46. <div class="data-item mar">
  47. <div class="data">
  48. <div>{{questionnairesNum.value}}</div>
  49. <div class="unit">个</div>
  50. </div>
  51. <div class="name">{{ questionnairesNum.name }}</div>
  52. </div>
  53. <!-- <div class="data-item mar">
  54. <div class="data">
  55. <div>{{carlicense.value}}</div>
  56. <div class="unit">个</div>
  57. </div>
  58. <div class="name">{{ carlicense.name }}</div>
  59. </div> -->
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="dialog-list">
  65. <div class="dialog-item wid100">
  66. <div class="content-title">
  67. <span class="title">近一个月报修分类占比</span>
  68. </div>
  69. <div class="data-chart">
  70. <pie-chart
  71. :chart-data="pieData"
  72. :legend="pieLegend"
  73. :title="pieTitle"
  74. :labelShow="true"
  75. :labelLine="true"
  76. :center="pieCenter"
  77. width="515px"
  78. height="180px"
  79. />
  80. </div>
  81. </div>
  82. </div>
  83. <div class="dialog-list">
  84. <div class="dialog-item wid100">
  85. <div class="content-title">
  86. <span class="title">近六个月报修分类</span>
  87. </div>
  88. <div class="data-chart">
  89. <bar-chart
  90. :chart-data="barData"
  91. :x-axis="barAxis"
  92. :y-axis="barYaxis"
  93. :grid="barGrid"
  94. :legend="barLegend"
  95. y-color="#FFF"
  96. l-color="#FFF"
  97. width="500px"
  98. height="280px"
  99. />
  100. </div>
  101. </div>
  102. </div>
  103. <div class="dialog-list">
  104. <div class="dialog-item wid100">
  105. <div class="content-title">
  106. <span class="title">一周车流量统计</span>
  107. </div>
  108. <div class="data-chart">
  109. <bar-chart
  110. :chart-data="carFlowBarData"
  111. :x-axis="carFlowBarAxis"
  112. :y-axis="carFlowBarYaxis"
  113. y-color="#FFF"
  114. l-color="#FFF"
  115. width="515px"
  116. height="180px"
  117. />
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </template>
  125. <script>
  126. import PieChart from "@/components/Echarts/PieChart";
  127. import BarChart from "@/components/Echarts/BarChart.vue";
  128. import {
  129. getPostOverviewData,
  130. getPastMonthPieData,
  131. getPastSixMonthChartsData, getCarFlowData,
  132. } from "@/api/screen/service";
  133. export default {
  134. name: "PropertyDialog",
  135. components: {
  136. BarChart,
  137. PieChart,
  138. },
  139. props: {
  140. appOrg: {
  141. type: String,
  142. default: "0000",
  143. },
  144. },
  145. data() {
  146. return {
  147. //数据概况
  148. faultWarrantyNum: {},
  149. dispatchedNum: {},
  150. suggestedNum: {},
  151. repairOrdersNum: {},
  152. carlicense: {},
  153. questionnairesNum: {},
  154. //近一个月报修占比
  155. pieData: [],
  156. pieLegend: {
  157. top: 10,
  158. orient: "vertical",
  159. right: 0,
  160. itemWidth: 8, // 设置图例标记的宽度
  161. itemHeight: 8, // 设置图例标记的高度
  162. textStyle: {
  163. color: "#FFF",
  164. },
  165. },
  166. pieTitle: {},
  167. pieCenter: ["30%", "50%"],
  168. //近六个月报修订单分类
  169. barData: [],
  170. barAxis: {},
  171. barYaxis: {
  172. type: "value",
  173. boundaryGap: [0, 0.01],
  174. name: '单位:个',
  175. nameTextStyle: {
  176. color: '#fff',
  177. },
  178. axisLine:{
  179. show:false
  180. },
  181. axisLabel: {
  182. color: "white", // 设置横坐标轴字体颜色为红色
  183. },
  184. splitLine: {
  185. show: false,
  186. },
  187. axisTick: {
  188. show: false,
  189. },
  190. splitArea:false
  191. },
  192. barGrid: {
  193. top: 30,
  194. bottom: 50,
  195. left: "2%",
  196. right: "2%",
  197. containLabel: true,
  198. },
  199. barLegend: {
  200. left: 20,
  201. bottom: 0,
  202. itemWidth: 8, // 设置图例标记的宽度
  203. itemHeight: 8, // 设置图例标记的高度
  204. textStyle: {
  205. color: "#FFF",
  206. },
  207. },
  208. //一周车流量统计
  209. carFlowBarData: [],
  210. carFlowBarAxis: {},
  211. carFlowBarYaxis: {
  212. type: "value",
  213. boundaryGap: [0, 0.01],
  214. name: '单位:辆',
  215. nameTextStyle: {
  216. color: '#fff',
  217. },
  218. axisLine:{
  219. show:false
  220. },
  221. axisLabel: {
  222. color: "white", // 设置横坐标轴字体颜色为红色
  223. },
  224. splitLine: {
  225. show: false,
  226. },
  227. axisTick: {
  228. show: false,
  229. },
  230. splitArea:false
  231. },
  232. };
  233. },
  234. created() {
  235. //数据概况
  236. this.getPostOverviewData();
  237. //近一个月报修分类占比
  238. this.getPastMonthPieData();
  239. //近六个月报修订单分类
  240. this.getPastSixMonthChartsData();
  241. //一周车流量统计
  242. this.getCarFlowData();
  243. },
  244. destroyed() {},
  245. beforeDestroy() {},
  246. mounted() {},
  247. methods: {
  248. //获取数据概况
  249. getPostOverviewData() {
  250. getPostOverviewData(this.$props.appOrg).then((res) => {
  251. if (Number(res.code) === 200) {
  252. this.faultWarrantyNum = res.data.faultWarrantyNum
  253. this.dispatchedNum = res.data.dispatchedNum
  254. this.suggestedNum = res.data.suggestedNum
  255. this.repairOrdersNum = res.data.repairOrdersNum
  256. this.questionnairesNum = res.data.questionnairesNum
  257. this.carlicense = res.data.carlicense
  258. }
  259. });
  260. },
  261. //近一个月报修分类占比
  262. getPastMonthPieData() {
  263. getPastMonthPieData(this.$props.appOrg).then((res) => {
  264. if (Number(res.code) === 200) {
  265. this.pieData = res.data;
  266. }
  267. });
  268. },
  269. //近六个月报修订单分类
  270. getPastSixMonthChartsData() {
  271. getPastSixMonthChartsData(this.$props.appOrg).then((res) => {
  272. if (Number(res.code) === 200) {
  273. let list = [
  274. "seNum",
  275. "arNum",
  276. "otNum",
  277. "ofNum",
  278. "meNum",
  279. "laNum",
  280. "diNum",
  281. "colNum",
  282. "toNum",
  283. "elevatorNum",
  284. ];
  285. for (let index = 0; index < list.length; index++) {
  286. this.barData.push({
  287. name: res.data[list[index]].name,
  288. type: "bar",
  289. stack: "a",
  290. itemStyle: {
  291. color: res.data[list[index]].color,
  292. },
  293. barWidth: 30,
  294. data: res.data[list[index]].dataList,
  295. });
  296. }
  297. this.barAxis = {
  298. type: "category",
  299. data: res.data.xList,
  300. axisLabel: {
  301. color: "white", // 设置横坐标轴字体颜色为红色
  302. },
  303. axisTick: {
  304. show: false,
  305. },
  306. axisLine: {
  307. lineStyle: {
  308. color: "#0A7C80",
  309. },
  310. },
  311. };
  312. }
  313. });
  314. },
  315. //电子餐券
  316. getCarFlowData() {
  317. getCarFlowData(this.$props.appOrg).then((res) => {
  318. if (Number(res.code) === 200) {
  319. this.carFlowBarData = [
  320. {
  321. name: "",
  322. type: "bar",
  323. stack: "a",
  324. itemStyle: {
  325. color: res.data.yData.color,
  326. //barBorderRadius: [5, 5, 0, 0], // 统一设置四个角的圆角大小
  327. },
  328. barWidth: 30,
  329. data: res.data.yData.yList,
  330. },
  331. ];
  332. this.carFlowBarAxis = {
  333. type: "category",
  334. data: res.data.xList,
  335. axisLabel: {
  336. color: "white", // 设置横坐标轴字体颜色为红色
  337. rotate: 16,
  338. interval: 0
  339. },
  340. axisTick: {
  341. show: false,
  342. },
  343. axisLine: {
  344. lineStyle: {
  345. color: "#465A64",
  346. },
  347. },
  348. };
  349. }
  350. });
  351. },
  352. //鼠标移出
  353. leaveFun(){
  354. setTimeout(()=>{
  355. this.$emit("closeDialog")
  356. },200)
  357. },
  358. preventDefault() {
  359. console.log(11);
  360. },
  361. },
  362. };
  363. </script>
  364. <style lang="scss">
  365. .dialog-property-area {
  366. overflow: hidden;
  367. width: 580px;
  368. height:1000px;
  369. background: url("../../../assets/images/main/main_bg.png") no-repeat;
  370. background-size: 100% 100%;
  371. padding: 19px 15px 11px 15px;
  372. .dialog-title {
  373. display: flex;
  374. flex-direction: row;
  375. align-items: center;
  376. justify-content: center;
  377. position: relative;
  378. margin-bottom: 10px;
  379. img {
  380. width: 284px;
  381. height: 32px;
  382. }
  383. .title {
  384. font-size: 20px;
  385. font-weight: 900;
  386. font-family: "PingFangSC";
  387. width: 100%;
  388. position: absolute;
  389. display: flex;
  390. align-items: center;
  391. justify-content: center;
  392. top: -5px;
  393. color: #fff;
  394. }
  395. }
  396. .dialog-cont {
  397. width:100%;
  398. height: 920px;
  399. padding: 15px;
  400. overflow-y: scroll;
  401. background: url("../../../assets/images/main/components_long_bg.png") no-repeat;
  402. background-size: 100% 100%;
  403. .dialog-left{
  404. width: 520px;
  405. float: left;
  406. }
  407. .dialog-right{
  408. width: 520px;
  409. float: right;
  410. }
  411. }
  412. .dialog-list{
  413. width: 100%;
  414. display: flex;
  415. justify-content: space-between !important;
  416. margin-bottom:20px;
  417. .dialog-item{
  418. width: calc(50% - 20px);
  419. }
  420. .dialog-item-cont{
  421. display: flex;
  422. justify-content: center;
  423. align-items: center;
  424. margin-top:40px;
  425. }
  426. .wid100{
  427. width:100%;
  428. .content-title{
  429. width:100%;
  430. background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
  431. }
  432. }
  433. }
  434. .content-title {
  435. width: 100%;
  436. height: 26px;
  437. background: url("../../../assets/images/main/title_pro.png") no-repeat;
  438. background-size: 100% 100%;
  439. font-family: "PingFangSC";
  440. font-size: 16px;
  441. font-weight: bold;
  442. color: #00ffff;
  443. padding-left: 25px;
  444. .title {
  445. display: block;
  446. position: relative;
  447. top:-5px;
  448. }
  449. }
  450. .tips{
  451. width: 12px;
  452. height: 12px;
  453. /* margin: 0 0 -4px 10px; */
  454. position: relative;
  455. top: -7px;
  456. left: 1px;
  457. }
  458. .data-chart {
  459. margin-top: 15px !important;
  460. margin-bottom: 5px !important;
  461. }
  462. .data-content{
  463. display: flex;
  464. justify-content: space-between;
  465. align-items: center;
  466. overflow: visible;
  467. padding-top:15px;
  468. .mar{
  469. margin-bottom: 15px;
  470. }
  471. .wid{
  472. width: 65px;
  473. }
  474. .data-item{
  475. width: 65px;
  476. height: 65px;
  477. background: url("../../../assets/images/service_new/img_5.png") no-repeat;
  478. background-size: 100% 100%;
  479. display: flex;
  480. flex-direction: column;
  481. justify-content: center;
  482. align-items: center;
  483. overflow: visible;
  484. .data{
  485. width: auto;
  486. font-size: 24px;
  487. color:#00FFFF;
  488. font-family: 'electronicFont';
  489. position: relative;
  490. top: -15px;
  491. display: flex;
  492. align-items: center;
  493. .unit{
  494. font-size:13px;
  495. color:#00FFFF;
  496. font-weight: 500;
  497. position: relative;
  498. top: 5px;
  499. left:2px;
  500. }
  501. }
  502. .name{
  503. font-size: 14px;
  504. color:#FFFFFF;
  505. position: relative;
  506. top: 16px;
  507. font-family: "fashionZh";
  508. }
  509. }
  510. }
  511. ::-webkit-scrollbar {
  512. display: none;
  513. width: 3px;
  514. height: 3px;
  515. }
  516. ::-webkit-scrollbar-thumb {
  517. //滑块部分
  518. // border-radius: 5px;
  519. background-color: #58cbbb;
  520. }
  521. ::-webkit-scrollbar-track {
  522. //轨道部分
  523. // box-shadow: inset 0 0 5px #ddd;
  524. background: #ddd;
  525. // border-radius: 5px;
  526. }
  527. }
  528. </style>