index.vue 18 KB

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