currentArea.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. <template>
  2. <div class="main-data data-current-area">
  3. <!-- <div class="title-area flex-row align-items-center">
  4. <span>当前区域数据</span>
  5. </div> -->
  6. <div class="content-area">
  7. <!-- <img src="@/assets/images/main/data_bg6.png" class="bg" />-->
  8. <!-- 摄像头列表 -->
  9. <div class="content">
  10. <div class="content-title long">
  11. <span class="title">问题台账统计</span>
  12. </div>
  13. <div class="sddha">
  14. <div class="data-asgeh">
  15. <div class="asdakda">
  16. <div>
  17. <img src="@/assets/images/service_new/img_1.png"/>
  18. </div>
  19. <div>本周检查项目数</div>
  20. </div>
  21. <div >
  22. <div class="num">{{ issues }} <span class="unit">个</span></div>
  23. </div>
  24. </div>
  25. <div class="data-asgeh">
  26. <div class="asdakda">
  27. <div>
  28. <img src="@/assets/images/service_new/img_1.png"/>
  29. </div>
  30. <div>问题数</div>
  31. </div>
  32. <div class="num">{{ lastweek }} <span class="unit">个</span></div>
  33. </div>
  34. <div class="data-asgeh">
  35. <div class="asdakda">
  36. <div>
  37. <img src="@/assets/images/service_new/img_1.png"/>
  38. </div>
  39. <div>已整改数</div>
  40. </div>
  41. <div class="num">{{getprojectnum}} <span class="unit">个</span></div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <!-- 近一周问题列表/-->
  47. <div class="content-ear">
  48. <div class="content">
  49. <div class="content-title long">
  50. <span class="title">近一周问题列表</span>
  51. </div>
  52. <div class="table-cont">
  53. <div class="table-top">
  54. <div class="fir" style="width: 43%">时间</div>
  55. <div class="snd" style="width: 31%">标题</div>
  56. <div class="thd" style="width: 29%">问题状态</div>
  57. </div>
  58. <div class="table-roll" @click="choose" ref="scrollContainer" style="padding-bottom: 140px">
  59. <div class="table-bot">
  60. <div class="table-list" v-for="(item, index) in getProList" :key="index">
  61. <div class="said"></div>
  62. <div class="fir">{{ item.name }}</div>
  63. <div class="snd">{{ item.num }}</div>
  64. <div class="thd">
  65. <div v-if="item.status === '1'"><span style="color: #67C23A">●</span> 已完结</div>
  66. <div v-if="item.status === '0'"><span style="color: #FAAD14">●</span> 处理中</div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <!-- 本周检查计划-->
  75. <div class="content-ear">
  76. <div class="content">
  77. <div class="content-title long">
  78. <span class="title">本周检查计划</span>
  79. </div>
  80. <div class="table-cont">
  81. <div class="table-top">
  82. <div class="fir">检查日期</div>
  83. <div class="snd">所属项目</div>
  84. <div class="thd">检查内容</div>
  85. <div class="fir">负责人员</div>
  86. </div>
  87. <div class="table-roll">
  88. <div class="table-bot">
  89. <div class="table-roll">
  90. <div class="table-list" v-for="(item, index) in getProjecList" :key="index" @click="co">
  91. <div class="said"></div>
  92. <div class="fir">{{item.head}}</div>
  93. <div class="snd">{{item.startTime}}</div>
  94. <div class="thd">{{item.content}}</div>
  95. <div class="fir">{{item.projectName}}</div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <!-- 本周施工计划-->
  104. <div class="content-ear">
  105. <div class="content">
  106. <div class="content-title long">
  107. <span class="title">本周施工计划</span>
  108. </div>
  109. <div style="display: flex;flex-wrap: nowrap;overflow: auto">
  110. <div class="table-five">
  111. <div class="table-top">
  112. <div class="fir">所属项目</div>
  113. <div class="snd">施工内容</div>
  114. <div class="thd">开始日期</div>
  115. <div class="fir">结束日期</div>
  116. <div class="fiv">负责人</div>
  117. </div>
  118. <div class="table-bot">
  119. <div class="table-roll">
  120. <div class="table-list" v-for="(item, index) in thisweek" :key="index">
  121. <div class="fir">{{ item.projectName }}</div>
  122. <div class="snd">{{ item.content }}</div>
  123. <div class="thd">{{ item.startTime }}</div>
  124. <div class="fir">{{ item.endTime }}</div>
  125. <div class="fiv">{{ item.head }}</div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </template>
  135. <script>
  136. import LineChart from "@/components/Echarts/LineChart.vue";
  137. import echarts from "echarts";
  138. import {
  139. getCanteenData,
  140. getCanteenNameList,
  141. getIssueListLastWeek, getIssueNum, getOverIssueNum,
  142. getProjectNumThisWeek, planCheckList, planDoneList,
  143. videoList
  144. } from '@/api/screen/service'
  145. import BarChart from "@/components/Echarts/BarChart.vue";
  146. export default {
  147. name: "Canteen",
  148. components: {
  149. BarChart
  150. },
  151. props: {
  152. appOrg: {
  153. type: String,
  154. default: "10001",
  155. },
  156. },
  157. watch:{
  158. },
  159. data() {
  160. return{
  161. getProList:[],
  162. getProjecList:[],
  163. thisweek:[],
  164. issues:0,
  165. issueCount: 0,
  166. lastweek:0,
  167. getprojectnum:0
  168. }
  169. },
  170. created() {
  171. this.getProjectNumThisWeek()
  172. this.getIssueNum()
  173. this.getOverIssueNum()
  174. this.getIssueListLastWeek()
  175. this.planCheckList()
  176. this.planDoneList()
  177. },
  178. destroyed() {},
  179. beforeDestroy() {
  180. clearTimeout(this.scrollTimeout);
  181. },
  182. mounted() {this.startAutoScroll()},
  183. methods: {
  184. startAutoScroll() {
  185. const scrollContainer = this.$refs.scrollContainer;
  186. const scroll = () => {
  187. scrollContainer.scrollTop += 1;
  188. if (scrollContainer.scrollTop >= scrollContainer.scrollHeight - scrollContainer.clientHeight) {
  189. scrollContainer.scrollTop = 0;
  190. }
  191. this.scrollTimeout = setTimeout(scroll, 30);
  192. };
  193. this.scrollTimeout = setTimeout(scroll, 30);
  194. },
  195. co(){
  196. console.log(this.getProjecList)
  197. },
  198. getIssueListLastWeek(){
  199. getIssueListLastWeek(this.$props.appOrg).then((res) => {
  200. if (Number(res.code) === 200) {
  201. this.getProList = res.data;
  202. this.getProList.forEach((item, index) => {
  203. item.name = item.createTime;
  204. item.num = item.title;
  205. });
  206. }
  207. });
  208. },
  209. planCheckList(){
  210. planCheckList(this.$props.appOrg).then((res) => {
  211. if (Number(res.code) === 200) {
  212. this.thisweek = res.data;
  213. }
  214. });
  215. },
  216. planDoneList(){
  217. planDoneList(this.$props.appOrg).then((res) => {
  218. if (Number(res.code) === 200) {
  219. this.getProjecList = res.data;
  220. }
  221. });
  222. },
  223. getProjectNumThisWeek(){
  224. getProjectNumThisWeek(this.$props.appOrg).then((res) => {
  225. if (Number(res.code) === 200) {
  226. this.issues=res.data;
  227. this.issueCount = res.data.length;
  228. }
  229. });
  230. },
  231. getIssueNum(){
  232. getIssueNum(this.$props.appOrg).then((res) => {
  233. if (Number(res.code) === 200) {
  234. this.lastweek = res.data;
  235. }
  236. });
  237. },
  238. getOverIssueNum(){
  239. getOverIssueNum(this.$props.appOrg).then((res) => {
  240. if (Number(res.code) === 200) {
  241. this.getprojectnum = res.data;
  242. }
  243. });
  244. },
  245. choose(){
  246. this.$emit('choose')
  247. }
  248. }
  249. }
  250. </script>
  251. <style lang="scss">
  252. .data-current-area {
  253. height: 100%;
  254. overflow: hidden;
  255. position: relative;
  256. .content-area {
  257. display: flex;
  258. flex-direction: row;
  259. align-items: flex-start;
  260. justify-content: flex-start;
  261. padding: 15px 20px 0 15px;
  262. overflow: auto;
  263. .bg{
  264. display: block;
  265. width:calc(100% - 40px);
  266. height:auto;
  267. position: absolute;
  268. left:20px;
  269. bottom:40px;
  270. z-index:-5;
  271. }
  272. }
  273. .content-ear {
  274. width: 100%;
  275. height: 28%;
  276. display: flex;
  277. flex-direction: row;
  278. align-items: flex-start;
  279. justify-content: flex-start;
  280. padding: 15px 20px 0 15px;
  281. overflow: auto;
  282. .bg{
  283. display: block;
  284. width:calc(100% - 40px);
  285. height:auto;
  286. position: absolute;
  287. left:20px;
  288. bottom:40px;
  289. z-index:-5;
  290. }
  291. }
  292. .content {
  293. margin-top: 10px;
  294. width: 100%;
  295. flex-direction: row;
  296. .title-format {
  297. display: flex;
  298. flex-direction: row;
  299. align-items: center;
  300. img {
  301. width: 6px !important;
  302. height: 24px !important;
  303. margin-right: 6px;
  304. }
  305. .title-info {
  306. display: flex;
  307. flex-direction: column;
  308. font-size: 14px;
  309. color: #ffffff;
  310. .title-en {
  311. font-size: 8px;
  312. color: #ffffff;
  313. opacity: 0.4;
  314. }
  315. }
  316. }
  317. .sddha{
  318. display: flex;
  319. margin-left: 20px;
  320. align-items: flex-start;
  321. justify-content: flex-start;
  322. .data-asgeh{
  323. display: flex;
  324. flex-direction: column;
  325. padding-top: 12px;
  326. padding-left: 10px;
  327. padding-right: 50px;
  328. justify-content: flex-end;
  329. }
  330. .asdakda{
  331. display: flex;
  332. font-size:14px;
  333. color:#FFFFFF;
  334. justify-content: space-around;
  335. }
  336. }
  337. .num{
  338. font-size: 34px;
  339. color: #00FFFF;
  340. font-weight: bold;
  341. font-family: "electronicFont";
  342. }
  343. .unit{
  344. font-size: 12px;
  345. color: #00FFFF;
  346. font-weight: 500;
  347. position: relative;
  348. right:0px
  349. }
  350. .data-list {
  351. display: flex;
  352. flex-direction: row;
  353. align-items: center;
  354. justify-content: flex-start;
  355. width: 30%;
  356. .data-item {
  357. display: flex;
  358. flex-direction: row;
  359. justify-content: center;
  360. flex: 1;
  361. width: 30%;
  362. border-right: 1px solid rgba(25, 252, 222, 0.2);
  363. margin-right: 20px;
  364. .data-detail {
  365. display: flex;
  366. flex-direction: row;
  367. align-items: baseline;
  368. color: #00ffff;
  369. margin-top: 11px;
  370. font-size: 12px;
  371. .data {
  372. font-size: 30px;
  373. font-family: "electronicFont";
  374. }
  375. }
  376. }
  377. .data-item:last-child {
  378. border-right: none;
  379. margin-right: 0px;
  380. }
  381. }
  382. .chart-area {
  383. .chart-item {
  384. margin-top: 40px;
  385. }
  386. }
  387. }
  388. .table-cont{
  389. width: 100%;
  390. .table-roll{
  391. width: 100%;
  392. height: 140px;
  393. overflow: auto;
  394. }
  395. .table-top{
  396. height: 38px;
  397. background-size: 100% 100%;
  398. padding:0 25px 0 10px;
  399. display: flex;
  400. justify-content: space-between;
  401. align-items: center;
  402. font-size:14px;
  403. color:#00FFFF;
  404. width: 504px;
  405. background: #44f1ff1a;
  406. }
  407. .table-bot{
  408. width:100%;
  409. padding: 5px 0px;
  410. .table-list{
  411. width:100%;
  412. height:35px;
  413. padding:5px 25px 0 10px;
  414. display: flex;
  415. justify-content: space-between;
  416. align-items: center;
  417. font-size:14px;
  418. color:#FFFFFF;
  419. font-weight: 500;
  420. }
  421. }
  422. .fir{
  423. width:40%;
  424. text-align: left;
  425. margin-left: 5px;
  426. }
  427. .snd{
  428. width:30%;
  429. text-align: left;
  430. }
  431. .thd{
  432. width:30%;
  433. left: 3px;
  434. text-align: left;
  435. }
  436. }
  437. .table-five{
  438. width: 600px;
  439. .table-roll{
  440. width: 100%;
  441. height: 120px;
  442. overflow: auto;
  443. }
  444. .table-top{
  445. height: 38px;
  446. background-size: 100% 100%;
  447. padding:0 25px 0 10px;
  448. display: flex;
  449. justify-content: space-between;
  450. align-items: center;
  451. font-size:14px;
  452. color:#00FFFF;
  453. width: 504px;
  454. background: #44f1ff1a;
  455. }
  456. .table-bot{
  457. width:100%;
  458. padding: 5px 0px;
  459. .table-list{
  460. width:100%;
  461. height:30px;
  462. padding:5px 25px 0 10px;
  463. display: flex;
  464. justify-content: space-between;
  465. align-items: center;
  466. font-size:14px;
  467. color:#FFFFFF;
  468. font-weight: 500;
  469. }
  470. }
  471. .fir{
  472. text-align: left;
  473. margin-left: 5px;
  474. }
  475. .snd{
  476. text-align: left;
  477. }
  478. .thd{
  479. left: 3px;
  480. text-align: left;
  481. }
  482. }
  483. .said{
  484. width: 1px;
  485. height: 13px;
  486. background-color: #00FFFF;
  487. }
  488. .smail{
  489. width: 8px;
  490. height: 8px;
  491. background: #FAAD14;
  492. border-radius: 50%;
  493. border: 1px solid #FFDE9E;
  494. }
  495. .content-title {
  496. width: 230px;
  497. height: 26px;
  498. background: url("../../../assets/images/main/title_pro.png") no-repeat !important;
  499. background-size: 100% 100%;
  500. font-family: "PingFangSC";
  501. font-size: 16px;
  502. font-weight: bold;
  503. color: #00ffff;
  504. padding-left: 20px !important;
  505. .title {
  506. display: block;
  507. position: relative;
  508. top:-5px !important;
  509. }
  510. }
  511. .content-title.long {
  512. width: 100%;
  513. background: url("../../../assets/images/main/title_pro_long.png") no-repeat !important;
  514. }
  515. .monitor-cont{
  516. width:100%;
  517. display: flex;
  518. flex-wrap: wrap;
  519. padding:15px 15px 20px;
  520. .monitor-list{
  521. width:151px;
  522. position: relative;
  523. margin:0 10px 10px 0;
  524. cursor: pointer;
  525. .img{
  526. display: block;
  527. width:151px;
  528. height:104px;
  529. }
  530. .monitor-info{
  531. position: absolute;
  532. left:0;
  533. bottom: 0;
  534. width: 100%;
  535. height: 25px;
  536. opacity: 0.55;
  537. background: #000000;
  538. display: flex;
  539. justify-content: space-between;
  540. align-items: center;
  541. padding: 0 8px;
  542. .name{
  543. font-size: 13px;
  544. color: #FFFFFF;
  545. font-weight: 500;
  546. }
  547. .online{
  548. font-size: 12px;
  549. color: #00F6EC;
  550. font-weight: 500;
  551. }
  552. .offline{
  553. font-size: 12px;
  554. color: #F60000;
  555. font-weight: 500;
  556. }
  557. }
  558. }
  559. .monitor-list:nth-child(3n){
  560. margin-right: 0;
  561. }
  562. }
  563. ::-webkit-scrollbar {
  564. display: none;
  565. width: 3px;
  566. height: 3px;
  567. }
  568. ::-webkit-scrollbar-thumb {
  569. //滑块部分
  570. // border-radius: 5px;
  571. background-color: #58cbbb;
  572. }
  573. ::-webkit-scrollbar-track {
  574. //轨道部分
  575. // box-shadow: inset 0 0 5px #ddd;
  576. background: #ddd;
  577. // border-radius: 5px;
  578. }
  579. }
  580. </style>