ProjectSituationofQMNew.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. <template>
  2. <transition
  3. appear
  4. name="animate__animated animate__move"
  5. enter-active-class="animate__slideInRight"
  6. leave-active-class="animate__slideOutRight"
  7. >
  8. <div class="widget-ProjectSituationofQM">
  9. <div class="head">
  10. <div class="title">
  11. <div class="icon"></div>
  12. <span class="site-info">近期工程情况</span>
  13. <div class="dateRange">{{ beginTime }}~{{ endTime }}</div>
  14. </div>
  15. </div>
  16. <div class="content-info">
  17. <!---->
  18. <!-- <div class="projectContent">
  19. <div class="pc-topContent">
  20. <div class="ptc-item">
  21. <span>分部工程验收:</span><span>5<i>个</i></span>
  22. </div>
  23. <div class="ptc-item">
  24. <span>分项工程验收:</span><span>5<i>个</i></span>
  25. </div>
  26. </div>
  27. <div class="pc-bottomContent">
  28. <div class="pbc-item">
  29. <span>224<i>个</i></span> <span>完成功能性试验</span>
  30. </div>
  31. <div class="pbc-item">
  32. <span>224<i>个</i></span> <span>申请检验批</span>
  33. </div>
  34. <div class="pbc-item">
  35. <span>224<i>个</i></span> <span>完成检验批</span>
  36. </div>
  37. </div>
  38. </div> -->
  39. <!---->
  40. <div class="bottom3Content">
  41. <!---->
  42. <div class="bottom2Content">
  43. <!---->
  44. <div class="overallProjectProgress">
  45. <div class="oppContent">
  46. <div class="oppItem">
  47. <div class="oppItem-content">
  48. {{ weeklyInfo }}
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <!---->
  54. <div class="scanCodeNumber">
  55. <div class="title">
  56. <div class="icon"></div>
  57. <span class="item-name">质量验评记录</span>
  58. </div>
  59. <div class="recordsContent">
  60. <div class="records-item" v-for="(item, index) in recordsList" :key="index">
  61. <div class="ri-title">
  62. <span>{{ index + 1 }}、</span>
  63. <span>{{ item.create_time.split(' ')[0] || '' }}</span>
  64. <span>{{ `【${item.name}】` }}</span>
  65. <span class="qualityGrade" :class="{ disqualification: item.quality_grade_str == '不合格' }">{{
  66. item.quality_grade_str || '暂无'
  67. }}</span>
  68. </div>
  69. <div class="ri-content">{{ item.project_name }}-{{ item.name }}</div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <!---->
  75. <div class="constructionRecords">
  76. <div class="title">
  77. <div class="icon"></div>
  78. <span class="item-name">施工记录</span>
  79. <!-- <span class="item-type">(沟槽开挖)</span> -->
  80. </div>
  81. <div class="constructionRecordsContent">
  82. <el-carousel ref="picCarousel" indicator-position="none" :autoplay="true" @change="changeCarousel">
  83. <el-carousel-item v-for="(item, index) in pictureList" :key="index">
  84. <!-- <div class="consName">
  85. <div class="nameWrap">
  86. <div class="prjName">白洋冲片区排水管网综合治理工程{{ item.index }}</div>
  87. <div class="isQualified">合格</div>
  88. </div>
  89. </div> -->
  90. <div class="consInfo">
  91. <div class="infoWrap">
  92. <!-- <div class="pipeInfo">排水管网WS01-WS03</div> -->
  93. <div class="pipeInfo"></div>
  94. <div class="timeInfo">{{ item.createTime }}</div>
  95. </div>
  96. </div>
  97. <!-- <img class="consImg" src="@/views/groupPage/images/项目图册/质量现场.jpg" /> -->
  98. <el-image
  99. class="consImg"
  100. :src="item.img"
  101. :preview-src-list="pictureList.map((i) => i.img)"
  102. ></el-image>
  103. </el-carousel-item>
  104. </el-carousel>
  105. <div class="switchWidget">
  106. <div class="leftArrow" @click="clickPrev()"><i class="el-icon-caret-left"></i></div>
  107. <div class="middleNumber">
  108. <div class="activeNum">{{ currentActive }}</div>
  109. /{{ pictureList.length }}
  110. </div>
  111. <div class="rightArrow" @click="clickNext()"><i class="el-icon-caret-right"></i></div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </transition>
  119. </template>
  120. <script lang="ts">
  121. import moment from 'moment'
  122. import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
  123. import PercentGaugeChart from '../../../components/GaugeChart/percentGaugeChart.vue'
  124. import SupAndConsNumChartVue from '../../../components/ComprehensiveChart/supAndConsNumChart.vue'
  125. import { getImgFiles, getEpcQbsDetailPage } from '../../../apis'
  126. import request from '@/utils/request'
  127. //近期工程情况-质量
  128. @Component({
  129. name: 'ProjectSituationofQM',
  130. components: { PercentGaugeChart, SupAndConsNumChartVue }
  131. })
  132. export default class ProjectSituationofQM extends Vue {
  133. @Prop({ type: Object, default: () => {} }) dataInfo!: any
  134. beginTime = moment(new Date().setDate(new Date().getDate() - 6)).format('YYYY.MM.DD')
  135. endTime = moment(new Date()).format('YYYY.MM.DD')
  136. // beginTime = null
  137. // endTime = null
  138. pictureList: Array<any> = []
  139. currentActive = 1
  140. weeklyInfo = ''
  141. recordsList = []
  142. clickPrev() {
  143. ;(this.$refs['picCarousel'] as any).prev()
  144. }
  145. clickNext() {
  146. ;(this.$refs['picCarousel'] as any).next()
  147. }
  148. changeCarousel(active, prev) {
  149. this.currentActive = active + 1
  150. }
  151. get projectCode() {
  152. return this.$store.state.bigScreen.currentProjectCode
  153. }
  154. @Watch('dataInfo')
  155. onChangMehod() {
  156. this.getPageData()
  157. }
  158. mounted() {
  159. this.getImgData()
  160. }
  161. async getPageData() {
  162. if (!this.dataInfo) return
  163. const { start_date, end_date, quality_content } = this.dataInfo || {}
  164. // this.beginTime = start_date.split(' ')[0]
  165. // this.endTime = end_date.split(' ')[0]
  166. this.weeklyInfo = quality_content
  167. const res = await getEpcQbsDetailPage({ project_code: this.projectCode })
  168. let { code, result } = res
  169. if (code != 1) return
  170. result.records.sort((a, b) => {
  171. return b.create_time.localeCompare(a.create_time)
  172. })
  173. result.records = result.records.filter(
  174. (item) => moment(new Date()).diff(moment(item.create_time), 'days') < moment(new Date()).daysInMonth()
  175. )
  176. this.recordsList = result.records
  177. }
  178. async getImgData() {
  179. const res = await getImgFiles({ size: 999, imgType: 'tjfxzl', groupCode: this.projectCode, isShow: 1 })
  180. const { code, result } = res
  181. if (code != 1) return
  182. let list = []
  183. result.records.forEach((item) => {
  184. item.img =
  185. request.defaults.baseURL +
  186. 'base/file/loadImg' +
  187. '?remotePath=' +
  188. item.path +
  189. '&access_token=' +
  190. sessionStorage.getItem('token')
  191. list.push(item)
  192. })
  193. this.pictureList = list
  194. }
  195. }
  196. </script>
  197. <style lang='scss' scoped>
  198. .animate__slideInRight,
  199. .animate__slideOutRight {
  200. animation-duration: 3s; //动画持续时间
  201. animation-delay: 0s; //动画延迟时间
  202. }
  203. .widget-ProjectSituationofQM {
  204. z-index: 2;
  205. //position
  206. bottom: $size10 /* 10/192 */;
  207. margin-right: $size20 /* 20/192 */;
  208. right: 0;
  209. position: absolute;
  210. //size
  211. height: calc(100% - 0.557292rem /* 107/192 */);
  212. width: 2.083333rem /* 400/192 */;
  213. .head {
  214. height: 0.166667rem /* 32/192 */;
  215. width: 100%;
  216. background: linear-gradient(-90deg, rgba(43, 167, 255, 0.2) 0%, rgba(43, 167, 255, 0.08) 100%);
  217. font-family: Source Han Sans CN-HEAVY;
  218. .title {
  219. width: 100%;
  220. height: 100%;
  221. display: flex;
  222. font-weight: 400;
  223. align-items: center;
  224. .icon {
  225. height: 0.166667rem /* 32/192 */;
  226. width: 0.34375rem /* 66/192 */;
  227. background: url('~@/views/groupPage/images/模块图标/统计分析/工程情况.png') no-repeat center center;
  228. background-size: 100% 100%;
  229. }
  230. span {
  231. flex: 1;
  232. font-weight: bold;
  233. font-size: 0.083333rem /* 16/192 */;
  234. color: #ffffff;
  235. padding: 0.041667rem /* 8/192 */;
  236. background: linear-gradient(0deg, #9bd2fa 0%, #ffffff 100%);
  237. background-clip: text;
  238. -webkit-text-fill-color: transparent;
  239. }
  240. .dateRange {
  241. height: 0.0625rem /* 12/192 */;
  242. font-size: 0.072917rem /* 14/192 */;
  243. font-family: Source Han Sans CN;
  244. font-weight: 400;
  245. color: #ffffff;
  246. }
  247. }
  248. }
  249. .content-info {
  250. width: 100%;
  251. height: calc(100% - 0.166667rem);
  252. font-family: Source Han Sans CN;
  253. .projectContent {
  254. height: 0.755208rem /* 145/192 */;
  255. margin-top: 0.052083rem /* 10/192 */;
  256. width: 100%;
  257. display: flex;
  258. align-items: center;
  259. justify-content: center;
  260. flex-flow: column;
  261. background: rgba(6, 34, 57, 0.76);
  262. padding: 0 0.104167rem /* 20/192 */;
  263. font-size: 0.072917rem /* 14/192 */;
  264. font-weight: 400;
  265. color: #84bde5;
  266. .pc-topContent {
  267. height: 0.3125rem /* 60/192 */;
  268. width: 100%;
  269. display: flex;
  270. justify-content: space-between;
  271. position: relative;
  272. .ptc-item {
  273. display: flex;
  274. align-items: center;
  275. & span:nth-of-type(2) {
  276. font-size: 0.104167rem /* 20/192 */;
  277. font-family: Agency FB;
  278. font-weight: bold;
  279. color: #ffffff;
  280. background: linear-gradient(90deg, #1e9dff 0%, #01eae2 100%);
  281. background-clip: text;
  282. -webkit-text-fill-color: transparent;
  283. i {
  284. font-family: Source Han Sans CN-MEDIUM;
  285. font-size: 0.09375rem /* 18/192 */;
  286. }
  287. }
  288. }
  289. .ptc-item:last-child > span:nth-of-type(2) {
  290. background: linear-gradient(90deg, #fdb332 0%, #01eae2 100%);
  291. background-clip: text;
  292. -webkit-text-fill-color: transparent;
  293. }
  294. }
  295. .pc-topContent::before {
  296. content: '';
  297. position: absolute;
  298. margin: auto 0;
  299. bottom: 0;
  300. width: 100%;
  301. height: 0.005208rem /* 1/192 */;
  302. background: rgba(255, 255, 255, 0.24);
  303. }
  304. .pc-bottomContent {
  305. height: calc(100% - 0.3125rem /* 60/192 */);
  306. width: 100%;
  307. display: flex;
  308. justify-content: space-between;
  309. .pbc-item {
  310. display: flex;
  311. flex-flow: column;
  312. align-items: center;
  313. justify-content: center;
  314. & span:first-of-type {
  315. font-size: 0.083333rem /* 16/192 */;
  316. font-family: Agency FB;
  317. font-weight: bold;
  318. color: #ffffff;
  319. margin-bottom: 0.0625rem /* 12/192 */;
  320. i {
  321. font-family: Source Han Sans CN-HEAVY;
  322. font-size: 0.072917rem /* 14/192 */;
  323. }
  324. }
  325. }
  326. }
  327. }
  328. .title {
  329. width: 100%;
  330. display: flex;
  331. align-items: center;
  332. .icon {
  333. height: 0.072917rem /* 14/192 */;
  334. width: 0.078125rem /* 15/192 */;
  335. margin-right: 0.046875rem /* 9/192 */;
  336. background: url('~@/views/groupPage/images/三角.png') no-repeat center center;
  337. background-size: 100% 100%;
  338. }
  339. .item-name,
  340. .item-type {
  341. font-family: Source Han Sans CN;
  342. color: #0ea7ff;
  343. font-size: 0.072917rem /* 14/192 */;
  344. font-weight: 500;
  345. }
  346. .item-type {
  347. color: #89c3ec !important;
  348. }
  349. .symbol {
  350. margin-left: 0.052083rem /* 10/192 */;
  351. width: 0.208333rem /* 40/192 */;
  352. height: 0.104167rem /* 20/192 */;
  353. font-size: 0.072917rem /* 14/192 */;
  354. font-family: Source Han Sans CN;
  355. font-weight: 400;
  356. color: #ffffff;
  357. background: linear-gradient(90deg, #2188d3, #9c2bec);
  358. border-radius: 2px;
  359. display: flex;
  360. align-items: center;
  361. justify-content: center;
  362. }
  363. }
  364. .bottom3Content {
  365. height: 100%;
  366. // height: calc(100% - 0.807292rem /* 155/192 */);
  367. width: 100%;
  368. background: linear-gradient(0deg, rgba(14, 167, 255, 0.16) 0%, rgba(14, 167, 255, 0) 100%);
  369. }
  370. .overallProjectProgress {
  371. margin-top: 0.052083rem /* 10/192 */;
  372. width: 100%;
  373. height: calc(100% - 1.380208rem /* 265/192 */);
  374. .oppContent {
  375. width: 100%;
  376. height: 100%;
  377. background: rgba(6, 34, 57, 0.76);
  378. overflow: auto;
  379. .oppItem {
  380. width: 100%;
  381. padding: 0.052083rem /* 10/192 */;
  382. color: #feffff;
  383. font-family: Source Han Sans CN;
  384. font-size: 0.072917rem /* 14/192 */;
  385. .oppItem-title {
  386. color: #17aaff;
  387. }
  388. .oppItem-content {
  389. // padding: 0.026042rem /* 5/192 */ 0;
  390. line-height: 0.114583rem /* 22/192 */;
  391. }
  392. }
  393. }
  394. }
  395. .scanCodeNumber {
  396. margin-top: 0.052083rem /* 10/192 */;
  397. width: 100%;
  398. height: 1.25rem /* 240/192 */;
  399. .recordsContent {
  400. margin-top: 0.052083rem /* 10/192 */;
  401. height: calc(100% - 0.125rem /* 24/192 */);
  402. width: 100%;
  403. background: rgba(6, 34, 57, 0.76);
  404. overflow-y: auto;
  405. .records-item {
  406. width: 100%;
  407. display: flex;
  408. flex-flow: column;
  409. padding: 0.052083rem /* 10/192 */;
  410. .ri-title {
  411. width: 100%;
  412. font-size: 0.072917rem /* 14/192 */;
  413. font-family: Source Han Sans CN;
  414. font-weight: 400;
  415. color: #feffff;
  416. line-height: 0.09375rem /* 18/192 */;
  417. & span:first-of-type {
  418. font-family: Source Han Sans CN-Medium;
  419. color: #16aaff;
  420. }
  421. .qualityGrade {
  422. display: inline-block;
  423. min-width: 0.166667rem /* 32/192 */;
  424. height: 0.09375rem /* 18/192 */;
  425. background: linear-gradient(-90deg, #09be78, #069161);
  426. border-radius: 2px;
  427. }
  428. .disqualification {
  429. background: linear-gradient(-90deg, #e95555, #f22840);
  430. }
  431. }
  432. .ri-content {
  433. margin-top: 0.026042rem /* 5/192 */;
  434. width: 100%;
  435. font-size: 0.072917rem /* 14/192 */;
  436. font-family: Source Han Sans CN;
  437. font-weight: 400;
  438. color: #84bde5;
  439. padding: 0 0.104167rem /* 20/192 */;
  440. line-height: 0.09375rem /* 18/192 */;
  441. }
  442. }
  443. }
  444. }
  445. .bottom2Content {
  446. width: 100%;
  447. height: calc(100% - 1.40625rem /* 270/192 */);
  448. overflow: auto;
  449. }
  450. .constructionRecords {
  451. margin-top: 0.052083rem /* 10/192 */;
  452. width: 100%;
  453. height: 1.354167rem /* 260/192 */;
  454. .constructionRecordsContent {
  455. width: 100%;
  456. height: calc(100% - 0.072917rem /* 14/192 */);
  457. display: flex;
  458. flex-flow: column;
  459. align-items: center;
  460. justify-content: flex-end;
  461. .el-carousel {
  462. width: 90%;
  463. height: 80%;
  464. /deep/ .el-carousel__container {
  465. height: 100% !important;
  466. }
  467. .consImg {
  468. height: 100%;
  469. width: 100%;
  470. }
  471. .consName,
  472. .consInfo {
  473. position: absolute;
  474. background: rgba(0, 0, 0, 0.4);
  475. width: 100%;
  476. height: 0.177083rem /* 34/192 */;
  477. line-height: 0.177083rem /* 34/192 */;
  478. font-size: 0.072917rem /* 14/192 */;
  479. font-family: Source Han Sans CN;
  480. font-weight: 500;
  481. color: #ffffff;
  482. }
  483. .consName {
  484. top: 0;
  485. }
  486. .consInfo {
  487. bottom: 0;
  488. z-index: 999;
  489. }
  490. .nameWrap {
  491. display: flex;
  492. align-items: center;
  493. justify-content: space-between;
  494. .isQualified {
  495. width: 0.322917rem /* 62/192 */;
  496. text-align: center;
  497. background: rgba(13, 162, 100, 0.9);
  498. border-radius: 0px 0px 0px 30px;
  499. }
  500. }
  501. .infoWrap {
  502. display: flex;
  503. align-items: center;
  504. justify-content: space-between;
  505. }
  506. }
  507. .switchWidget {
  508. display: flex;
  509. align-items: center;
  510. justify-content: space-between;
  511. width: 0.557292rem /* 107/192 */;
  512. color: rgba(137, 195, 236, 1);
  513. height: 0.072917rem /* 14/192 */;
  514. margin: 0.052083rem /* 10/192 */;
  515. .leftArrow,
  516. .rightArrow {
  517. font-size: 0.072917rem /* 14/192 */;
  518. cursor: pointer;
  519. }
  520. .middleNumber {
  521. display: flex;
  522. .activeNum {
  523. color: #2ba7ff;
  524. }
  525. }
  526. }
  527. }
  528. }
  529. }
  530. }
  531. </style>