currentArea.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  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() {},
  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, 600);
  192. };
  193. this.scrollTimeout = setTimeout(scroll, 600);
  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. if (this.getProList.length > 6){
  206. this.startAutoScroll()
  207. }
  208. });
  209. }
  210. });
  211. },
  212. planCheckList(){
  213. planCheckList(this.$props.appOrg).then((res) => {
  214. if (Number(res.code) === 200) {
  215. this.thisweek = res.data;
  216. }
  217. });
  218. },
  219. planDoneList(){
  220. planDoneList(this.$props.appOrg).then((res) => {
  221. if (Number(res.code) === 200) {
  222. this.getProjecList = res.data;
  223. }
  224. });
  225. },
  226. getProjectNumThisWeek(){
  227. getProjectNumThisWeek(this.$props.appOrg).then((res) => {
  228. if (Number(res.code) === 200) {
  229. this.issues=res.data;
  230. this.issueCount = res.data.length;
  231. }
  232. });
  233. },
  234. getIssueNum(){
  235. getIssueNum(this.$props.appOrg).then((res) => {
  236. if (Number(res.code) === 200) {
  237. this.lastweek = res.data;
  238. }
  239. });
  240. },
  241. getOverIssueNum(){
  242. getOverIssueNum(this.$props.appOrg).then((res) => {
  243. if (Number(res.code) === 200) {
  244. this.getprojectnum = res.data;
  245. }
  246. });
  247. },
  248. choose(){
  249. this.$emit('choose')
  250. }
  251. }
  252. }
  253. </script>
  254. <style lang="scss">
  255. .data-current-area {
  256. height: 100%;
  257. overflow: hidden;
  258. position: relative;
  259. .content-area {
  260. display: flex;
  261. flex-direction: row;
  262. align-items: flex-start;
  263. justify-content: flex-start;
  264. padding: 15px 20px 0 15px;
  265. overflow: auto;
  266. .bg{
  267. display: block;
  268. width:calc(100% - 40px);
  269. height:auto;
  270. position: absolute;
  271. left:20px;
  272. bottom:40px;
  273. z-index:-5;
  274. }
  275. }
  276. .content-ear {
  277. width: 100%;
  278. height: 28%;
  279. display: flex;
  280. flex-direction: row;
  281. align-items: flex-start;
  282. justify-content: flex-start;
  283. padding: 15px 20px 0 15px;
  284. overflow: auto;
  285. .bg{
  286. display: block;
  287. width:calc(100% - 40px);
  288. height:auto;
  289. position: absolute;
  290. left:20px;
  291. bottom:40px;
  292. z-index:-5;
  293. }
  294. }
  295. .content {
  296. margin-top: 10px;
  297. width: 100%;
  298. flex-direction: row;
  299. .title-format {
  300. display: flex;
  301. flex-direction: row;
  302. align-items: center;
  303. img {
  304. width: 6px !important;
  305. height: 24px !important;
  306. margin-right: 6px;
  307. }
  308. .title-info {
  309. display: flex;
  310. flex-direction: column;
  311. font-size: 14px;
  312. color: #ffffff;
  313. .title-en {
  314. font-size: 8px;
  315. color: #ffffff;
  316. opacity: 0.4;
  317. }
  318. }
  319. }
  320. .sddha{
  321. display: flex;
  322. margin-left: 20px;
  323. align-items: flex-start;
  324. justify-content: flex-start;
  325. .data-asgeh{
  326. display: flex;
  327. flex-direction: column;
  328. padding-top: 12px;
  329. padding-left: 10px;
  330. padding-right: 50px;
  331. justify-content: flex-end;
  332. }
  333. .asdakda{
  334. display: flex;
  335. font-size:14px;
  336. color:#FFFFFF;
  337. justify-content: space-around;
  338. }
  339. }
  340. .num{
  341. font-size: 34px;
  342. color: #00FFFF;
  343. font-weight: bold;
  344. font-family: "electronicFont";
  345. }
  346. .unit{
  347. font-size: 12px;
  348. color: #00FFFF;
  349. font-weight: 500;
  350. position: relative;
  351. right:0px
  352. }
  353. .data-list {
  354. display: flex;
  355. flex-direction: row;
  356. align-items: center;
  357. justify-content: flex-start;
  358. width: 30%;
  359. .data-item {
  360. display: flex;
  361. flex-direction: row;
  362. justify-content: center;
  363. flex: 1;
  364. width: 30%;
  365. border-right: 1px solid rgba(25, 252, 222, 0.2);
  366. margin-right: 20px;
  367. .data-detail {
  368. display: flex;
  369. flex-direction: row;
  370. align-items: baseline;
  371. color: #00ffff;
  372. margin-top: 11px;
  373. font-size: 12px;
  374. .data {
  375. font-size: 30px;
  376. font-family: "electronicFont";
  377. }
  378. }
  379. }
  380. .data-item:last-child {
  381. border-right: none;
  382. margin-right: 0px;
  383. }
  384. }
  385. .chart-area {
  386. .chart-item {
  387. margin-top: 40px;
  388. }
  389. }
  390. }
  391. .table-cont{
  392. width: 100%;
  393. .table-roll{
  394. width: 100%;
  395. height: 140px;
  396. overflow: auto;
  397. }
  398. .table-top{
  399. height: 38px;
  400. background-size: 100% 100%;
  401. padding:0 25px 0 10px;
  402. display: flex;
  403. justify-content: space-between;
  404. align-items: center;
  405. font-size:14px;
  406. color:#00FFFF;
  407. width: 515px;
  408. background: #44f1ff1a;
  409. }
  410. .table-bot{
  411. width:100%;
  412. padding: 5px 0px;
  413. .table-list{
  414. width:100%;
  415. height:35px;
  416. padding:5px 25px 0 10px;
  417. display: flex;
  418. justify-content: space-between;
  419. align-items: center;
  420. font-size:14px;
  421. color:#FFFFFF;
  422. font-weight: 500;
  423. }
  424. }
  425. .fir{
  426. width:40%;
  427. text-align: left;
  428. margin-left: 5px;
  429. }
  430. .snd{
  431. width:30%;
  432. text-align: left;
  433. }
  434. .thd{
  435. width:30%;
  436. left: 3px;
  437. text-align: left;
  438. }
  439. }
  440. .table-five{
  441. width: 600px;
  442. .table-roll{
  443. width: 100%;
  444. height: 120px;
  445. overflow: auto;
  446. }
  447. .table-top{
  448. height: 38px;
  449. background-size: 100% 100%;
  450. padding:0 25px 0 10px;
  451. display: flex;
  452. justify-content: space-between;
  453. align-items: center;
  454. font-size:14px;
  455. color:#00FFFF;
  456. width: 515px;
  457. background: #44f1ff1a;
  458. }
  459. .table-bot{
  460. width:100%;
  461. padding: 5px 0px;
  462. .table-list{
  463. width:100%;
  464. height:30px;
  465. padding:5px 25px 0 10px;
  466. display: flex;
  467. justify-content: space-between;
  468. align-items: center;
  469. font-size:14px;
  470. color:#FFFFFF;
  471. font-weight: 500;
  472. }
  473. }
  474. .fir{
  475. text-align: left;
  476. margin-left: 5px;
  477. }
  478. .snd{
  479. text-align: left;
  480. }
  481. .thd{
  482. left: 3px;
  483. text-align: left;
  484. }
  485. }
  486. .said{
  487. width: 1px;
  488. height: 13px;
  489. background-color: #00FFFF;
  490. }
  491. .smail{
  492. width: 8px;
  493. height: 8px;
  494. background: #FAAD14;
  495. border-radius: 50%;
  496. border: 1px solid #FFDE9E;
  497. }
  498. .content-title {
  499. width: 230px;
  500. height: 26px;
  501. background: url("../../../assets/images/main/title_pro.png") no-repeat !important;
  502. background-size: 100% 100%;
  503. font-family: "PingFangSC";
  504. font-size: 16px;
  505. font-weight: bold;
  506. color: #00ffff;
  507. padding-left: 20px !important;
  508. .title {
  509. display: block;
  510. position: relative;
  511. top:-5px !important;
  512. }
  513. }
  514. .content-title.long {
  515. width: 100%;
  516. margin-top: -8px;
  517. background: url("../../../assets/images/main/title_pro_long.png") no-repeat !important;
  518. }
  519. .monitor-cont{
  520. width:100%;
  521. display: flex;
  522. flex-wrap: wrap;
  523. padding:15px 15px 20px;
  524. .monitor-list{
  525. width:151px;
  526. position: relative;
  527. margin:0 10px 10px 0;
  528. cursor: pointer;
  529. .img{
  530. display: block;
  531. width:151px;
  532. height:104px;
  533. }
  534. .monitor-info{
  535. position: absolute;
  536. left:0;
  537. bottom: 0;
  538. width: 100%;
  539. height: 25px;
  540. opacity: 0.55;
  541. background: #000000;
  542. display: flex;
  543. justify-content: space-between;
  544. align-items: center;
  545. padding: 0 8px;
  546. .name{
  547. font-size: 13px;
  548. color: #FFFFFF;
  549. font-weight: 500;
  550. }
  551. .online{
  552. font-size: 12px;
  553. color: #00F6EC;
  554. font-weight: 500;
  555. }
  556. .offline{
  557. font-size: 12px;
  558. color: #F60000;
  559. font-weight: 500;
  560. }
  561. }
  562. }
  563. .monitor-list:nth-child(3n){
  564. margin-right: 0;
  565. }
  566. }
  567. ::-webkit-scrollbar {
  568. display: none;
  569. width: 3px;
  570. height: 3px;
  571. }
  572. ::-webkit-scrollbar-thumb {
  573. //滑块部分
  574. // border-radius: 5px;
  575. background-color: #58cbbb;
  576. }
  577. ::-webkit-scrollbar-track {
  578. //轨道部分
  579. // box-shadow: inset 0 0 5px #ddd;
  580. background: #ddd;
  581. // border-radius: 5px;
  582. }
  583. }
  584. </style>