index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. <template>
  2. <view class="work-container">
  3. <view style="work-banner">
  4. <image :src="loadImgSrc('work-banner.png')" style="width: 100%;height:43vh"></image>
  5. </view>
  6. <view class="grid-body">
  7. <view class="Grid">
  8. <view class="Grid-Item" v-for="item in List" :key="item.id" @click="navClick(item.id)"
  9. hover-class="click-hover" hover-start-time="50" hover-stay-time="50">
  10. <image class="icon-item" :src="loadImgSrc('mygc.png')" v-if="item.title == '民用工程'"></image>
  11. <image class="icon-item" :src="loadImgSrc('gygc.png')" v-if="item.title == '工业工程'"></image>
  12. <image class="icon-item" :src="loadImgSrc('szgc.png')" v-if="item.title == '市政工程'"></image>
  13. <image class="icon-item" :src="loadImgSrc('wxzy.png')" v-if="item.title == '危险作业工程'"></image>
  14. <image class="icon-item" :src="loadImgSrc('dggc.png')" v-if="item.title == '顶管工程'"></image>
  15. <image class="icon-item" :src="loadImgSrc('jjgc.png')" v-if="item.title == '基建工程'"></image>
  16. <view class="GStitle">{{ item.title }}
  17. </view>
  18. </view>
  19. </view>
  20. <view v-if="showPopup" class="popup">
  21. <view class="content">
  22. <view class="line1 top40">
  23. <view style="width: 61rpx;
  24. color: #CEB98D;
  25. height: 61rpx;
  26. display: flex;
  27. justify-content: center;
  28. align-items: center;
  29. border: 3px solid #CEB98D;
  30. border-radius: 50%; margin-right: 20rpx;">旧</view>
  31. <view>旧改工程</view>
  32. </view>
  33. <view class="line2 btn-grp">
  34. <view class="btn-grp-item" v-for="(item, index) in OldProjectList" :key="index"
  35. @click="OldProject(item)">
  36. <image :src="loadImgSrc('sn.png')" class="line2-btn-big" v-if="item.dictLabel == '室内工程'">
  37. </image>
  38. <image :src="loadImgSrc('ty.png')" class="line2-btn-big" v-if="item.dictLabel == '庭院工程'">
  39. </image>
  40. <image :src="loadImgSrc('jk.png')" class="line2-btn-big" v-if="item.dictLabel == '架空'">
  41. </image>
  42. <image :src="loadImgSrc('dt.png')" class="line2-btn-big" v-if="item.dictLabel == '底腿'">
  43. </image>
  44. <image :src="loadImgSrc('gd.png')" class="line2-btn-big" v-if="item.dictLabel == '管道施工记录'">
  45. </image>
  46. {{item.dictLabel}}
  47. </view>
  48. </view>
  49. <view class="line1">
  50. <view style="width: 61rpx;
  51. color: #85c9c2;
  52. height: 61rpx;
  53. display: flex;
  54. justify-content: center;
  55. align-items: center;
  56. border: 3px solid #85c9c2;
  57. border-radius: 50%; margin-right: 20rpx;">新</view>
  58. <view>新建工程</view>
  59. </view>
  60. <view class="line2 btn-grp">
  61. <view class="btn-grp-item" v-for="(item, index) in NewProjectList" :key="index"
  62. @click="NewProject(item)">
  63. <image :src="loadImgSrc('sn2.png')" class="line2-btn-big" v-if="item.dictLabel == '室内工程'">
  64. </image>
  65. <image :src="loadImgSrc('ty2.png')" class="line2-btn-big" v-if="item.dictLabel == '庭院工程'">
  66. </image>
  67. <image :src="loadImgSrc('jk2.png')" class="line2-btn-big" v-if="item.dictLabel == '架空'">
  68. </image>
  69. <image :src="loadImgSrc('dt2.png')" class="line2-btn-big" v-if="item.dictLabel == '底腿'">
  70. </image>
  71. <image :src="loadImgSrc('gd2.png')" class="line2-btn-big" v-if="item.dictLabel == '管道施工记录'">
  72. </image>
  73. {{item.dictLabel}}
  74. </view>
  75. </view>
  76. </view>
  77. <!-- <view class="btn-group">
  78. <view class="btn_position">
  79. <view class="cancel" @click="showMinYong">取消</view>
  80. </view>
  81. </view> -->
  82. </view>
  83. <view v-if="showPopup" class="mask" @click="showMinYong"></view>
  84. </view>
  85. <view class="share">
  86. <view :class="{'share-box': shareState}" @click="handleHiddenShare">
  87. </view>
  88. <view class="share-item" :class="{'share-show': shareState}">
  89. <view class="share-to">
  90. <text>请选择</text>
  91. </view>
  92. <scroll-view scroll-y="true" class="scroll-Y">
  93. <view class="content">
  94. <view class="block" v-for="(item, index) in typeList" :key="index" @click="showTypeSheet(item)">
  95. <!-- <image :src="item.image" mode="aspectFill"></image> -->
  96. <text>{{item.dictLabel}}</text>
  97. </view>
  98. </view>
  99. </scroll-view>
  100. <view class="cancel" @click.stop="handleHiddenShare">
  101. <text>取消</text>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import {
  110. getDicts
  111. } from "@/api/system/dict/data";
  112. export default {
  113. data() {
  114. return {
  115. showPopup: false,
  116. shareState: false,
  117. array: [],
  118. projectType: '', //工程类型
  119. OldProjectList: '', //旧改工程
  120. NewProjectList: '', //民用工程
  121. typeList: '', //二次弹窗数据
  122. enginType: '',
  123. enginClassification: '', // 旧改节点 数据字典
  124. enginClassValue: '', //二次节点 数据字典
  125. current: 0,
  126. swiperDotIndex: 0,
  127. List: [{
  128. id: 1,
  129. img: '/static/logo.png',
  130. title: '民用工程'
  131. },
  132. {
  133. id: 2,
  134. img: '/static/logo.png',
  135. title: '工业工程'
  136. },
  137. {
  138. id: 3,
  139. img: '/static/logo.png',
  140. title: '市政工程'
  141. },
  142. {
  143. id: 4,
  144. img: '/static/logo.png',
  145. title: '危险作业工程'
  146. },
  147. {
  148. id: 5,
  149. img: '/static/logo.png',
  150. title: '顶管工程'
  151. },
  152. {
  153. id: 6,
  154. img: '/static/logo.png',
  155. title: '基建工程'
  156. },
  157. ]
  158. }
  159. },
  160. methods: {
  161. navClick(newId) {
  162. if (newId == 1) {
  163. this.showMinYong()
  164. } else if (newId == 2) {
  165. this.showGongYe();
  166. } else if (newId == 3) {
  167. this.municipalProjectClick();
  168. } else if (newId == 4) {
  169. this.showDangerous();
  170. } else if (newId == 5) {
  171. this.showTopPipe();
  172. } else if (newId == 6) {
  173. this.showInfrastructureDialog();
  174. }
  175. },
  176. // 显示二次弹窗
  177. handleShowSheet() {
  178. this.shareState = true;
  179. },
  180. // 隐藏二次弹窗
  181. handleHiddenShare() {
  182. this.shareState = false;
  183. },
  184. showMinYong() {
  185. this.projectType = 'MinYong';
  186. getDicts("old_renovation").then(response => {
  187. this.OldProjectList = response.data;
  188. });
  189. getDicts("new_built").then(response => {
  190. this.NewProjectList = response.data;
  191. });
  192. this.showPopup = !this.showPopup;
  193. },
  194. //市政工程-首页-点击事件
  195. municipalProjectClick() {
  196. let obj = {
  197. value: '市政工程'
  198. };
  199. uni.navigateTo({
  200. url: '/pages/municipal/municipal?params=' + encodeURIComponent(JSON
  201. .stringify(obj))
  202. });
  203. },
  204. NewProject(e) {
  205. this.enginType = 'new_built'; //写死
  206. this.enginClassification = e.dictValue;
  207. this.enginClassValue = e.dictLabel; //(拆旧管等 字典值)
  208. this.typeList = ''; //置空
  209. if (e.dictValue == 'indoor_engin') {
  210. //新建室内
  211. getDicts("new_built_indoor_engin").then(response => {
  212. this.typeList = response.data;
  213. });
  214. this.handleShowSheet();
  215. } else if (e.dictValue == 'courtyard') {
  216. //新建庭院
  217. getDicts("new_built_courtyard").then(response => {
  218. this.typeList = response.data;
  219. });
  220. this.handleShowSheet();
  221. } else if (e.dictValue == 'overhead') {
  222. //新建架空
  223. getDicts("new_built_overhead").then(response => {
  224. this.typeList = response.data;
  225. });
  226. this.handleShowSheet();
  227. } else if (e.dictValue == 'bottom_leg') {
  228. //新建底腿
  229. const obj = {
  230. enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
  231. enginType: this.enginType, //旧改 还是新建 写死
  232. enginClassification: this.enginClassification //室内 庭院 架空
  233. };
  234. uni.navigateTo({
  235. url: '/pages/bottom_leg/bottom_leg?params=' + encodeURIComponent(JSON
  236. .stringify(
  237. obj))
  238. })
  239. } else if (e.dictValue == 'construction_records') {
  240. //新建管道施工记录
  241. const obj = {
  242. enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
  243. enginType: this.enginType, //旧改 还是新建 写死
  244. enginClassification: this.enginClassification //室内 庭院 架空
  245. };
  246. uni.navigateTo({
  247. url: '/pages/piping_record/piping_record?params=' + encodeURIComponent(JSON
  248. .stringify(
  249. obj))
  250. })
  251. }
  252. },
  253. OldProject(e) {
  254. this.enginType = 'old_renovation'; //写死
  255. this.enginClassification = e.dictValue;
  256. this.enginClassValue = e.dictLabel; //(拆旧管等 字典值)
  257. this.typeList = ''; //置空
  258. if (e.dictValue == 'indoor_engin') {
  259. //旧改室内
  260. getDicts("old_renovation_indoor_engin").then(response => {
  261. this.typeList = response.data;
  262. });
  263. this.handleShowSheet();
  264. } else if (e.dictValue == 'courtyard') {
  265. //旧改庭院
  266. getDicts("old_renovation_courtyard").then(response => {
  267. this.typeList = response.data;
  268. });
  269. this.handleShowSheet();
  270. } else if (e.dictValue == 'overhead') {
  271. //旧改架空
  272. getDicts("old_renovation_overhead").then(response => {
  273. this.typeList = response.data;
  274. });
  275. this.handleShowSheet();
  276. } else if (e.dictValue == 'bottom_leg') {
  277. //旧改底腿
  278. const obj = {
  279. enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
  280. enginType: this.enginType, //旧改 还是新建 写死
  281. enginClassification: this.enginClassification //室内 庭院 架空
  282. };
  283. uni.navigateTo({
  284. url: '/pages/bottom_leg/bottom_leg?params=' + encodeURIComponent(JSON
  285. .stringify(
  286. obj))
  287. })
  288. } else if (e.dictValue == 'construction_records') {
  289. //旧改管道施工记录
  290. const obj = {
  291. enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
  292. enginType: this.enginType, //旧改 还是新建 写死
  293. enginClassification: this.enginClassification //室内 庭院 架空
  294. };
  295. uni.navigateTo({
  296. url: '/pages/piping_record/piping_record?params=' + encodeURIComponent(JSON
  297. .stringify(
  298. obj))
  299. })
  300. }
  301. },
  302. //二次弹窗 选择类型
  303. showTypeSheet(item) {
  304. if (this.projectType == 'MinYong') {
  305. //this.showPopup = !this.showPopup; //隐藏第一次弹窗
  306. this.enginClassValue = item.dictValue; //二次节点赋值
  307. const obj = {
  308. enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
  309. enginType: this.enginType, //旧改 还是新建 写死
  310. enginClassification: this.enginClassification //室内 庭院 架空
  311. };
  312. //this.handleHiddenShare();
  313. // 室内
  314. if (this.enginClassification == 'indoor_engin') {
  315. uni.navigateTo({
  316. url: '/pages/oldrenovation/indoor/indoor?params=' + encodeURIComponent(JSON.stringify(
  317. obj))
  318. })
  319. }
  320. // 庭院
  321. else if (this.enginClassification == 'courtyard') {
  322. if (this.enginClassValue == '下沟') {
  323. uni.navigateTo({
  324. url: '/pages/oldrenovation/courtyard/courtyard?params=' + encodeURIComponent(
  325. JSON
  326. .stringify(
  327. obj))
  328. })
  329. } else {
  330. uni.navigateTo({
  331. url: '/pages/oldrenovation/courtyard/newcourtyard?params=' + encodeURIComponent(
  332. JSON
  333. .stringify(
  334. obj))
  335. })
  336. }
  337. } else if (this.enginClassification == 'overhead') { //架空
  338. if (this.enginClassValue == '全貌照片') {
  339. uni.navigateTo({
  340. url: '/pages/oldrenovation/overhead/newoverhead?params=' + encodeURIComponent(JSON
  341. .stringify(
  342. obj))
  343. })
  344. } else {
  345. uni.navigateTo({
  346. url: '/pages/oldrenovation/overhead/overhead?params=' + encodeURIComponent(JSON
  347. .stringify(
  348. obj))
  349. })
  350. }
  351. }
  352. } else if (this.projectType == 'GongYe') {
  353. let obj = {
  354. value: item.dictValue
  355. };
  356. //this.handleHiddenShare();
  357. uni.navigateTo({
  358. url: '/pages/enginproject/enginproject?params=' + encodeURIComponent(JSON
  359. .stringify(
  360. obj))
  361. })
  362. } else if (this.projectType == 'JiJian') {
  363. let obj = {
  364. value: item.dictValue
  365. };
  366. //this.handleHiddenShare();
  367. uni.navigateTo({
  368. url: '/pages/infrastructure/infrastructure?params=' + encodeURIComponent(JSON
  369. .stringify(
  370. obj))
  371. })
  372. } else if (this.projectType == 'DingGuan') {
  373. let obj = {
  374. value: item.dictValue
  375. };
  376. //this.handleHiddenShare();
  377. uni.navigateTo({
  378. url: '/pages/TopPipeWork/TopPipeWork?params=' + encodeURIComponent(JSON
  379. .stringify(
  380. obj))
  381. })
  382. }
  383. },
  384. showGongYe() {
  385. this.projectType = 'GongYe';
  386. //工业工程
  387. getDicts("engin_classification").then(response => {
  388. this.typeList = response.data;
  389. });
  390. this.handleShowSheet();
  391. },
  392. showTopPipe() {
  393. this.projectType = 'DingGuan';
  394. getDicts("pipe_jack").then(response => {
  395. this.typeList = response.data;
  396. });
  397. this.handleShowSheet();
  398. },
  399. showInfrastructureDialog() {
  400. this.projectType = 'JiJian';
  401. //基建工程
  402. getDicts("engineering_infrastructure").then(response => {
  403. this.typeList = response.data;
  404. });
  405. this.handleShowSheet();
  406. },
  407. showDangerous() {
  408. uni.navigateTo({
  409. url: '/pages/dangerous/dangerous'
  410. })
  411. },
  412. }
  413. }
  414. </script>
  415. <style lang="scss">
  416. /* #ifndef APP-NVUE */
  417. page {
  418. display: flex;
  419. flex-direction: column;
  420. box-sizing: border-box;
  421. background-color: #fff;
  422. min-height: 100%;
  423. height: auto;
  424. }
  425. view {
  426. font-size: 14px;
  427. line-height: inherit;
  428. }
  429. .work-container {
  430. display: flex;
  431. flex-direction: column;
  432. }
  433. /* #endif */
  434. .text {
  435. text-align: center;
  436. font-size: 26rpx;
  437. margin-top: 10rpx;
  438. }
  439. .grid-item-box {
  440. flex: 1;
  441. /* #ifndef APP-NVUE */
  442. display: flex;
  443. /* #endif */
  444. flex-direction: column;
  445. align-items: center;
  446. justify-content: center;
  447. padding: 15px 0;
  448. }
  449. .uni-margin-wrap {
  450. width: 690rpx;
  451. width: 100%;
  452. ;
  453. }
  454. .swiper {
  455. height: 300rpx;
  456. }
  457. .swiper-box {
  458. height: 150px;
  459. }
  460. .swiper-item {
  461. /* #ifndef APP-NVUE */
  462. display: flex;
  463. /* #endif */
  464. flex-direction: column;
  465. justify-content: center;
  466. align-items: center;
  467. color: #fff;
  468. height: 300rpx;
  469. line-height: 300rpx;
  470. }
  471. @media screen and (min-width: 500px) {
  472. .uni-swiper-dot-box {
  473. width: 400px;
  474. /* #ifndef APP-NVUE */
  475. margin: 0 auto;
  476. /* #endif */
  477. margin-top: 8px;
  478. }
  479. .image {
  480. width: 100%;
  481. }
  482. }
  483. // 弹窗效果
  484. .popup {
  485. position: fixed;
  486. bottom: 0;
  487. left: 0;
  488. width: 100%;
  489. background-color: #fff;
  490. // padding: 20rpx;
  491. box-sizing: border-box;
  492. z-index: 999;
  493. border-top-left-radius: 40rpx;
  494. border-top-right-radius: 40rpx;
  495. }
  496. // 遮罩层
  497. .mask {
  498. position: fixed;
  499. top: 0;
  500. left: 0;
  501. width: 100%;
  502. height: 100%;
  503. background-color: rgba(0, 0, 0, 0.5);
  504. z-index: 888;
  505. }
  506. // 弹窗内容
  507. .content {
  508. .top40 {
  509. margin-top: 30rpx;
  510. }
  511. .line1 {
  512. text-align: center;
  513. display: flex;
  514. justify-content: start;
  515. align-items: center;
  516. padding: 20rpx;
  517. }
  518. .btn-grp {
  519. display: flex;
  520. .btn-grp-item {
  521. width: 33%;
  522. display: flex;
  523. flex-direction: column;
  524. align-items: center;
  525. text-align: center;
  526. .line2-btn-big {
  527. width: 90rpx;
  528. height: 90rpx;
  529. margin-bottom: 10rpx;
  530. }
  531. }
  532. }
  533. .line2 {
  534. padding: 20rpx;
  535. // border-bottom: 1px solid black;
  536. view {
  537. margin-bottom: 10rpx;
  538. }
  539. }
  540. }
  541. // 按钮样式
  542. .btn-group {
  543. box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.5);
  544. /* 示例阴影参数,根据需要进行调整 */
  545. .btn_position {
  546. display: flex;
  547. width: 100%;
  548. .cancel {
  549. width: 50%;
  550. text-align: center;
  551. padding: 20rpx 0;
  552. color: #519fe7;
  553. }
  554. .submit {
  555. width: 50%;
  556. background-color: #519fe7;
  557. text-align: center;
  558. padding: 20rpx 0;
  559. color: #fff;
  560. }
  561. }
  562. }
  563. .share {
  564. width: 100%;
  565. height: 100%;
  566. }
  567. .share-box {
  568. width: 100%;
  569. height: 100%;
  570. position: fixed;
  571. top: 0rpx;
  572. left: 0rpx;
  573. bottom: 0rpx;
  574. right: 0rpx;
  575. background-color: rgba(0, 0, 0, 0.4);
  576. transition: .3s;
  577. z-index: 999;
  578. }
  579. // 进入分享动画
  580. .share-show {
  581. transition: all 0.3s ease;
  582. transform: translateY(0%) !important;
  583. }
  584. .scroll-Y {
  585. height: 350rpx;
  586. }
  587. // 离开分享动画
  588. .share-item {
  589. position: fixed;
  590. left: 0;
  591. bottom: 0;
  592. width: 100%;
  593. height: auto;
  594. background-color: #FFFFFF;
  595. transition: all 0.3s ease;
  596. transform: translateY(100%);
  597. z-index: 1999;
  598. border-top-left-radius: 40rpx;
  599. border-top-right-radius: 40rpx;
  600. .share-to {
  601. width: 100%;
  602. height: 3rem;
  603. display: flex;
  604. justify-content: center;
  605. align-items: center;
  606. &::after {
  607. content: '';
  608. width: 240rpx;
  609. height: 0rpx;
  610. border-top: 1px solid #E4E7ED;
  611. -webkit-transform: scaleY(0.5);
  612. transform: scaleY(0.5);
  613. margin-left: 30rpx;
  614. }
  615. &::before {
  616. content: '';
  617. width: 240rpx;
  618. height: 0rpx;
  619. border-top: 1px solid #E4E7ED;
  620. -webkit-transform: scaleY(0.5);
  621. transform: scaleY(0.5);
  622. margin-right: 30rpx;
  623. }
  624. }
  625. .content {
  626. width: 100%;
  627. height: 50%;
  628. display: flex;
  629. flex-wrap: wrap;
  630. .block {
  631. width: 100%;
  632. display: flex;
  633. flex-direction: column;
  634. justify-content: center;
  635. align-items: center;
  636. height: 80rpx;
  637. text {
  638. margin-top: 16rpx;
  639. font-size: 28rpx;
  640. color: #606266;
  641. }
  642. }
  643. }
  644. .cancel {
  645. width: 100%;
  646. height: 3rem;
  647. display: flex;
  648. justify-content: center;
  649. align-items: center;
  650. border-top: 1rpx solid #E4E7ED;
  651. }
  652. }
  653. /*********************九宫格********************* */
  654. .Grid {
  655. display: flex;
  656. flex-wrap: wrap;
  657. justify-content: space-between;
  658. align-content: space-between;
  659. // background: #f7f7f7;
  660. padding: 10rpx 0;
  661. .Grid-Item {
  662. width: 50%;
  663. // height: 100px;
  664. text-align: center;
  665. // border: 1rpx solid #ff0000;
  666. box-sizing: border-box;
  667. .icon-item {
  668. width: 220rpx;
  669. height: 220rpx;
  670. }
  671. .GSimg {
  672. width: 96rpx;
  673. height: 96rpx;
  674. margin-top: 42rpx;
  675. margin-left: 75rpx;
  676. .Image {
  677. width: 96rpx;
  678. height: 96rpx;
  679. }
  680. }
  681. .GStitle {
  682. width: 100%;
  683. color: #516d97;
  684. font-size: 28rpx;
  685. text-align: center;
  686. margin-top: -30rpx;
  687. margin-bottom: 30rpx;
  688. }
  689. }
  690. }
  691. .click-hover {
  692. background-color: #d0d0d0;
  693. }
  694. </style>