index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782
  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.dictValue)">
  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('jk.png')" class="line2-btn-big" v-if="item.dictLabel == '底腿'">
  43. </image>
  44. <image :src="loadImgSrc('jk.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.dictValue)">
  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('jk2.png')" class="line2-btn-big" v-if="item.dictLabel == '底腿'">
  70. </image>
  71. <image :src="loadImgSrc('jk2.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;
  207. this.typeList = ''; //置空
  208. console.log("新建", e)
  209. if (e == 'indoor_engin') {
  210. //新建室内
  211. getDicts("new_built_indoor_engin").then(response => {
  212. this.typeList = response.data;
  213. });
  214. this.handleShowSheet();
  215. } else if (e == 'courtyard') {
  216. //新建庭院
  217. getDicts("new_built_courtyard").then(response => {
  218. console.log("庭院", response.data)
  219. this.typeList = response.data;
  220. });
  221. } else if (e == 'overhead') {
  222. //新建架空
  223. getDicts("new_built_courtyard").then(response => {
  224. console.log("架空", response.data)
  225. this.typeList = response.data;
  226. });
  227. this.handleShowSheet();
  228. } else if (e == 'bottom_leg') {
  229. //新建底腿
  230. const obj = {
  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 == 'construction_records') {
  240. //新建管道施工记录
  241. const obj = {
  242. enginType: this.enginType, //旧改 还是新建 写死
  243. enginClassification: this.enginClassification //室内 庭院 架空
  244. };
  245. uni.navigateTo({
  246. url: '/pages/piping_record/piping_record?params=' + encodeURIComponent(JSON
  247. .stringify(
  248. obj))
  249. })
  250. }
  251. },
  252. OldProject(e) {
  253. this.enginType = 'old_renovation'; //写死
  254. this.enginClassification = e;
  255. console.log("旧改", e)
  256. this.typeList = ''; //置空
  257. if (e == 'indoor_engin') {
  258. //旧改室内
  259. getDicts("old_renovation_indoor_engin").then(response => {
  260. this.typeList = response.data;
  261. });
  262. this.handleShowSheet();
  263. } else if (e == 'courtyard') {
  264. //旧改庭院
  265. getDicts("old_renovation_courtyard").then(response => {
  266. console.log("庭院", response.data)
  267. this.typeList = response.data;
  268. });
  269. this.handleShowSheet();
  270. } else if (e == 'overhead') {
  271. //旧改架空
  272. getDicts("old_renovation_overhead").then(response => {
  273. console.log("架空", response.data)
  274. this.typeList = response.data;
  275. });
  276. this.handleShowSheet();
  277. } else if (e == 'bottom_leg') {
  278. //旧改底腿
  279. const obj = {
  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 == 'construction_records') {
  289. //旧改管道施工记录
  290. const obj = {
  291. enginType: this.enginType, //旧改 还是新建 写死
  292. enginClassification: this.enginClassification //室内 庭院 架空
  293. };
  294. uni.navigateTo({
  295. url: '/pages/piping_record/piping_record?params=' + encodeURIComponent(JSON
  296. .stringify(
  297. obj))
  298. })
  299. }
  300. },
  301. //二次弹窗 选择类型
  302. showTypeSheet(item) {
  303. if (this.projectType == 'MinYong') {
  304. //this.showPopup = !this.showPopup; //隐藏第一次弹窗
  305. this.enginClassValue = item.dictValue; //二次节点赋值
  306. const obj = {
  307. enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
  308. enginType: this.enginType, //旧改 还是新建 写死
  309. enginClassification: this.enginClassification //室内 庭院 架空
  310. };
  311. console.log(obj)
  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. console.log(this.enginClassValue)
  323. uni.navigateTo({
  324. url: '/pages/oldrenovation/courtyard/courtyard?params=' + encodeURIComponent(JSON
  325. .stringify(
  326. obj))
  327. })
  328. } else if (this.enginClassification == 'overhead') { //架空
  329. uni.navigateTo({
  330. url: '/pages/oldrenovation/overhead/overhead?params=' + encodeURIComponent(JSON
  331. .stringify(
  332. obj))
  333. })
  334. }
  335. } else if (this.projectType == 'GongYe') {
  336. console.log("工业", item)
  337. let obj = {
  338. value: item.dictValue
  339. };
  340. //this.handleHiddenShare();
  341. uni.navigateTo({
  342. url: '/pages/enginproject/enginproject?params=' + encodeURIComponent(JSON
  343. .stringify(
  344. obj))
  345. })
  346. } else if (this.projectType == 'JiJian') {
  347. console.log("基建", item)
  348. let obj = {
  349. value: item.dictValue
  350. };
  351. //this.handleHiddenShare();
  352. uni.navigateTo({
  353. url: '/pages/infrastructure/infrastructure?params=' + encodeURIComponent(JSON
  354. .stringify(
  355. obj))
  356. })
  357. } else if (this.projectType == 'DingGuan') {
  358. console.log("顶管", item)
  359. let obj = {
  360. value: item.dictValue
  361. };
  362. //this.handleHiddenShare();
  363. uni.navigateTo({
  364. url: '/pages/TopPipeWork/TopPipeWork?params=' + encodeURIComponent(JSON
  365. .stringify(
  366. obj))
  367. })
  368. }
  369. },
  370. showGongYe() {
  371. this.projectType = 'GongYe';
  372. //工业工程
  373. getDicts("engin_classification").then(response => {
  374. console.log("工业工程", response.data)
  375. this.typeList = response.data;
  376. console.log("工业工程", response.data)
  377. });
  378. this.handleShowSheet();
  379. },
  380. showTopPipe() {
  381. this.projectType = 'DingGuan';
  382. getDicts("pipe_jack").then(response => {
  383. console.log("顶管工程", response.data)
  384. this.typeList = response.data;
  385. });
  386. this.handleShowSheet();
  387. },
  388. showInfrastructureDialog() {
  389. this.projectType = 'JiJian';
  390. //基建工程
  391. getDicts("engineering_infrastructure").then(response => {
  392. console.log("基建工程", response.data)
  393. this.typeList = response.data;
  394. console.log("基建工程", response.data)
  395. });
  396. this.handleShowSheet();
  397. },
  398. showDangerous() {
  399. console.log("危险作业工程")
  400. uni.navigateTo({
  401. url: '/pages/dangerous/dangerous'
  402. })
  403. },
  404. }
  405. }
  406. </script>
  407. <style lang="scss">
  408. /* #ifndef APP-NVUE */
  409. page {
  410. display: flex;
  411. flex-direction: column;
  412. box-sizing: border-box;
  413. background-color: #fff;
  414. min-height: 100%;
  415. height: auto;
  416. }
  417. view {
  418. font-size: 14px;
  419. line-height: inherit;
  420. }
  421. .work-container {
  422. display: flex;
  423. flex-direction: column;
  424. }
  425. /* #endif */
  426. .text {
  427. text-align: center;
  428. font-size: 26rpx;
  429. margin-top: 10rpx;
  430. }
  431. .grid-item-box {
  432. flex: 1;
  433. /* #ifndef APP-NVUE */
  434. display: flex;
  435. /* #endif */
  436. flex-direction: column;
  437. align-items: center;
  438. justify-content: center;
  439. padding: 15px 0;
  440. }
  441. .uni-margin-wrap {
  442. width: 690rpx;
  443. width: 100%;
  444. ;
  445. }
  446. .swiper {
  447. height: 300rpx;
  448. }
  449. .swiper-box {
  450. height: 150px;
  451. }
  452. .swiper-item {
  453. /* #ifndef APP-NVUE */
  454. display: flex;
  455. /* #endif */
  456. flex-direction: column;
  457. justify-content: center;
  458. align-items: center;
  459. color: #fff;
  460. height: 300rpx;
  461. line-height: 300rpx;
  462. }
  463. @media screen and (min-width: 500px) {
  464. .uni-swiper-dot-box {
  465. width: 400px;
  466. /* #ifndef APP-NVUE */
  467. margin: 0 auto;
  468. /* #endif */
  469. margin-top: 8px;
  470. }
  471. .image {
  472. width: 100%;
  473. }
  474. }
  475. // 弹窗效果
  476. .popup {
  477. position: fixed;
  478. bottom: 0;
  479. left: 0;
  480. width: 100%;
  481. background-color: #fff;
  482. // padding: 20rpx;
  483. box-sizing: border-box;
  484. z-index: 999;
  485. border-top-left-radius: 40rpx;
  486. border-top-right-radius: 40rpx;
  487. }
  488. // 遮罩层
  489. .mask {
  490. position: fixed;
  491. top: 0;
  492. left: 0;
  493. width: 100%;
  494. height: 100%;
  495. background-color: rgba(0, 0, 0, 0.5);
  496. z-index: 888;
  497. }
  498. // 弹窗内容
  499. .content {
  500. .top40 {
  501. margin-top: 30rpx;
  502. }
  503. .line1 {
  504. text-align: center;
  505. display: flex;
  506. justify-content: start;
  507. align-items: center;
  508. padding: 20rpx;
  509. }
  510. .btn-grp {
  511. display: flex;
  512. .btn-grp-item {
  513. width: 33%;
  514. display: flex;
  515. flex-direction: column;
  516. align-items: center;
  517. .line2-btn-big {
  518. width: 128rpx;
  519. height: 128rpx;
  520. margin-bottom: 10rpx;
  521. }
  522. }
  523. }
  524. .line2 {
  525. padding: 20rpx;
  526. // border-bottom: 1px solid black;
  527. view {
  528. margin-bottom: 10rpx;
  529. }
  530. }
  531. }
  532. // 按钮样式
  533. .btn-group {
  534. box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.5);
  535. /* 示例阴影参数,根据需要进行调整 */
  536. .btn_position {
  537. display: flex;
  538. width: 100%;
  539. .cancel {
  540. width: 50%;
  541. text-align: center;
  542. padding: 20rpx 0;
  543. color: #519fe7;
  544. }
  545. .submit {
  546. width: 50%;
  547. background-color: #519fe7;
  548. text-align: center;
  549. padding: 20rpx 0;
  550. color: #fff;
  551. }
  552. }
  553. }
  554. .share {
  555. width: 100%;
  556. height: 100%;
  557. }
  558. .share-box {
  559. width: 100%;
  560. height: 100%;
  561. position: fixed;
  562. top: 0rpx;
  563. left: 0rpx;
  564. bottom: 0rpx;
  565. right: 0rpx;
  566. background-color: rgba(0, 0, 0, 0.4);
  567. transition: .3s;
  568. z-index: 999;
  569. }
  570. // 进入分享动画
  571. .share-show {
  572. transition: all 0.3s ease;
  573. transform: translateY(0%) !important;
  574. }
  575. .scroll-Y {
  576. height: 350rpx;
  577. }
  578. // 离开分享动画
  579. .share-item {
  580. position: fixed;
  581. left: 0;
  582. bottom: 0;
  583. width: 100%;
  584. height: auto;
  585. background-color: #FFFFFF;
  586. transition: all 0.3s ease;
  587. transform: translateY(100%);
  588. z-index: 1999;
  589. border-top-left-radius: 40rpx;
  590. border-top-right-radius: 40rpx;
  591. .share-to {
  592. width: 100%;
  593. height: 3rem;
  594. display: flex;
  595. justify-content: center;
  596. align-items: center;
  597. &::after {
  598. content: '';
  599. width: 240rpx;
  600. height: 0rpx;
  601. border-top: 1px solid #E4E7ED;
  602. -webkit-transform: scaleY(0.5);
  603. transform: scaleY(0.5);
  604. margin-left: 30rpx;
  605. }
  606. &::before {
  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-right: 30rpx;
  614. }
  615. }
  616. .content {
  617. width: 100%;
  618. height: 50%;
  619. display: flex;
  620. flex-wrap: wrap;
  621. .block {
  622. width: 100%;
  623. display: flex;
  624. flex-direction: column;
  625. justify-content: center;
  626. align-items: center;
  627. height: 80rpx;
  628. text {
  629. margin-top: 16rpx;
  630. font-size: 28rpx;
  631. color: #606266;
  632. }
  633. }
  634. }
  635. .cancel {
  636. width: 100%;
  637. height: 3rem;
  638. display: flex;
  639. justify-content: center;
  640. align-items: center;
  641. border-top: 1rpx solid #E4E7ED;
  642. }
  643. }
  644. /*********************九宫格********************* */
  645. .Grid {
  646. display: flex;
  647. flex-wrap: wrap;
  648. justify-content: space-between;
  649. align-content: space-between;
  650. // background: #f7f7f7;
  651. padding: 10rpx 0;
  652. .Grid-Item {
  653. width: 50%;
  654. // height: 100px;
  655. text-align: center;
  656. // border: 1rpx solid #ff0000;
  657. box-sizing: border-box;
  658. .icon-item {
  659. width: 220rpx;
  660. height: 220rpx;
  661. }
  662. .GSimg {
  663. width: 96rpx;
  664. height: 96rpx;
  665. margin-top: 42rpx;
  666. margin-left: 75rpx;
  667. .Image {
  668. width: 96rpx;
  669. height: 96rpx;
  670. }
  671. }
  672. .GStitle {
  673. width: 100%;
  674. color: #516d97;
  675. font-size: 28rpx;
  676. text-align: center;
  677. margin-top: -30rpx;
  678. margin-bottom: 30rpx;
  679. }
  680. }
  681. }
  682. .click-hover {
  683. background-color: #d0d0d0;
  684. }
  685. </style>