index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  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. 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. console.log("工业", item)
  354. let obj = {
  355. value: item.dictValue
  356. };
  357. //this.handleHiddenShare();
  358. uni.navigateTo({
  359. url: '/pages/enginproject/enginproject?params=' + encodeURIComponent(JSON
  360. .stringify(
  361. obj))
  362. })
  363. } else if (this.projectType == 'JiJian') {
  364. console.log("基建", item)
  365. let obj = {
  366. value: item.dictValue
  367. };
  368. //this.handleHiddenShare();
  369. uni.navigateTo({
  370. url: '/pages/infrastructure/infrastructure?params=' + encodeURIComponent(JSON
  371. .stringify(
  372. obj))
  373. })
  374. } else if (this.projectType == 'DingGuan') {
  375. console.log("顶管", item)
  376. let obj = {
  377. value: item.dictValue
  378. };
  379. //this.handleHiddenShare();
  380. uni.navigateTo({
  381. url: '/pages/TopPipeWork/TopPipeWork?params=' + encodeURIComponent(JSON
  382. .stringify(
  383. obj))
  384. })
  385. }
  386. },
  387. showGongYe() {
  388. this.projectType = 'GongYe';
  389. //工业工程
  390. getDicts("engin_classification").then(response => {
  391. console.log("工业工程", response.data)
  392. this.typeList = response.data;
  393. console.log("工业工程", response.data)
  394. });
  395. this.handleShowSheet();
  396. },
  397. showTopPipe() {
  398. this.projectType = 'DingGuan';
  399. getDicts("pipe_jack").then(response => {
  400. console.log("顶管工程", response.data)
  401. this.typeList = response.data;
  402. });
  403. this.handleShowSheet();
  404. },
  405. showInfrastructureDialog() {
  406. this.projectType = 'JiJian';
  407. //基建工程
  408. getDicts("engineering_infrastructure").then(response => {
  409. console.log("基建工程", response.data)
  410. this.typeList = response.data;
  411. console.log("基建工程", response.data)
  412. });
  413. this.handleShowSheet();
  414. },
  415. showDangerous() {
  416. console.log("危险作业工程")
  417. uni.navigateTo({
  418. url: '/pages/dangerous/dangerous'
  419. })
  420. },
  421. }
  422. }
  423. </script>
  424. <style lang="scss">
  425. /* #ifndef APP-NVUE */
  426. page {
  427. display: flex;
  428. flex-direction: column;
  429. box-sizing: border-box;
  430. background-color: #fff;
  431. min-height: 100%;
  432. height: auto;
  433. }
  434. view {
  435. font-size: 14px;
  436. line-height: inherit;
  437. }
  438. .work-container {
  439. display: flex;
  440. flex-direction: column;
  441. }
  442. /* #endif */
  443. .text {
  444. text-align: center;
  445. font-size: 26rpx;
  446. margin-top: 10rpx;
  447. }
  448. .grid-item-box {
  449. flex: 1;
  450. /* #ifndef APP-NVUE */
  451. display: flex;
  452. /* #endif */
  453. flex-direction: column;
  454. align-items: center;
  455. justify-content: center;
  456. padding: 15px 0;
  457. }
  458. .uni-margin-wrap {
  459. width: 690rpx;
  460. width: 100%;
  461. ;
  462. }
  463. .swiper {
  464. height: 300rpx;
  465. }
  466. .swiper-box {
  467. height: 150px;
  468. }
  469. .swiper-item {
  470. /* #ifndef APP-NVUE */
  471. display: flex;
  472. /* #endif */
  473. flex-direction: column;
  474. justify-content: center;
  475. align-items: center;
  476. color: #fff;
  477. height: 300rpx;
  478. line-height: 300rpx;
  479. }
  480. @media screen and (min-width: 500px) {
  481. .uni-swiper-dot-box {
  482. width: 400px;
  483. /* #ifndef APP-NVUE */
  484. margin: 0 auto;
  485. /* #endif */
  486. margin-top: 8px;
  487. }
  488. .image {
  489. width: 100%;
  490. }
  491. }
  492. // 弹窗效果
  493. .popup {
  494. position: fixed;
  495. bottom: 0;
  496. left: 0;
  497. width: 100%;
  498. background-color: #fff;
  499. // padding: 20rpx;
  500. box-sizing: border-box;
  501. z-index: 999;
  502. border-top-left-radius: 40rpx;
  503. border-top-right-radius: 40rpx;
  504. }
  505. // 遮罩层
  506. .mask {
  507. position: fixed;
  508. top: 0;
  509. left: 0;
  510. width: 100%;
  511. height: 100%;
  512. background-color: rgba(0, 0, 0, 0.5);
  513. z-index: 888;
  514. }
  515. // 弹窗内容
  516. .content {
  517. .top40 {
  518. margin-top: 30rpx;
  519. }
  520. .line1 {
  521. text-align: center;
  522. display: flex;
  523. justify-content: start;
  524. align-items: center;
  525. padding: 20rpx;
  526. }
  527. .btn-grp {
  528. display: flex;
  529. .btn-grp-item {
  530. width: 33%;
  531. display: flex;
  532. flex-direction: column;
  533. align-items: center;
  534. .line2-btn-big {
  535. width: 128rpx;
  536. height: 128rpx;
  537. margin-bottom: 10rpx;
  538. }
  539. }
  540. }
  541. .line2 {
  542. padding: 20rpx;
  543. // border-bottom: 1px solid black;
  544. view {
  545. margin-bottom: 10rpx;
  546. }
  547. }
  548. }
  549. // 按钮样式
  550. .btn-group {
  551. box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.5);
  552. /* 示例阴影参数,根据需要进行调整 */
  553. .btn_position {
  554. display: flex;
  555. width: 100%;
  556. .cancel {
  557. width: 50%;
  558. text-align: center;
  559. padding: 20rpx 0;
  560. color: #519fe7;
  561. }
  562. .submit {
  563. width: 50%;
  564. background-color: #519fe7;
  565. text-align: center;
  566. padding: 20rpx 0;
  567. color: #fff;
  568. }
  569. }
  570. }
  571. .share {
  572. width: 100%;
  573. height: 100%;
  574. }
  575. .share-box {
  576. width: 100%;
  577. height: 100%;
  578. position: fixed;
  579. top: 0rpx;
  580. left: 0rpx;
  581. bottom: 0rpx;
  582. right: 0rpx;
  583. background-color: rgba(0, 0, 0, 0.4);
  584. transition: .3s;
  585. z-index: 999;
  586. }
  587. // 进入分享动画
  588. .share-show {
  589. transition: all 0.3s ease;
  590. transform: translateY(0%) !important;
  591. }
  592. .scroll-Y {
  593. height: 350rpx;
  594. }
  595. // 离开分享动画
  596. .share-item {
  597. position: fixed;
  598. left: 0;
  599. bottom: 0;
  600. width: 100%;
  601. height: auto;
  602. background-color: #FFFFFF;
  603. transition: all 0.3s ease;
  604. transform: translateY(100%);
  605. z-index: 1999;
  606. border-top-left-radius: 40rpx;
  607. border-top-right-radius: 40rpx;
  608. .share-to {
  609. width: 100%;
  610. height: 3rem;
  611. display: flex;
  612. justify-content: center;
  613. align-items: center;
  614. &::after {
  615. content: '';
  616. width: 240rpx;
  617. height: 0rpx;
  618. border-top: 1px solid #E4E7ED;
  619. -webkit-transform: scaleY(0.5);
  620. transform: scaleY(0.5);
  621. margin-left: 30rpx;
  622. }
  623. &::before {
  624. content: '';
  625. width: 240rpx;
  626. height: 0rpx;
  627. border-top: 1px solid #E4E7ED;
  628. -webkit-transform: scaleY(0.5);
  629. transform: scaleY(0.5);
  630. margin-right: 30rpx;
  631. }
  632. }
  633. .content {
  634. width: 100%;
  635. height: 50%;
  636. display: flex;
  637. flex-wrap: wrap;
  638. .block {
  639. width: 100%;
  640. display: flex;
  641. flex-direction: column;
  642. justify-content: center;
  643. align-items: center;
  644. height: 80rpx;
  645. text {
  646. margin-top: 16rpx;
  647. font-size: 28rpx;
  648. color: #606266;
  649. }
  650. }
  651. }
  652. .cancel {
  653. width: 100%;
  654. height: 3rem;
  655. display: flex;
  656. justify-content: center;
  657. align-items: center;
  658. border-top: 1rpx solid #E4E7ED;
  659. }
  660. }
  661. /*********************九宫格********************* */
  662. .Grid {
  663. display: flex;
  664. flex-wrap: wrap;
  665. justify-content: space-between;
  666. align-content: space-between;
  667. // background: #f7f7f7;
  668. padding: 10rpx 0;
  669. .Grid-Item {
  670. width: 50%;
  671. // height: 100px;
  672. text-align: center;
  673. // border: 1rpx solid #ff0000;
  674. box-sizing: border-box;
  675. .icon-item {
  676. width: 220rpx;
  677. height: 220rpx;
  678. }
  679. .GSimg {
  680. width: 96rpx;
  681. height: 96rpx;
  682. margin-top: 42rpx;
  683. margin-left: 75rpx;
  684. .Image {
  685. width: 96rpx;
  686. height: 96rpx;
  687. }
  688. }
  689. .GStitle {
  690. width: 100%;
  691. color: #516d97;
  692. font-size: 28rpx;
  693. text-align: center;
  694. margin-top: -30rpx;
  695. margin-bottom: 30rpx;
  696. }
  697. }
  698. }
  699. .click-hover {
  700. background-color: #d0d0d0;
  701. }
  702. </style>