|
@@ -62,19 +62,20 @@
|
|
|
<view class="line1">
|
|
|
<view>旧改工程</view>
|
|
|
</view>
|
|
|
- <view class="line2">
|
|
|
- <view @click="Indoor(0)">室内</view>
|
|
|
- <view @click="Courtyard(0)">庭院</view>
|
|
|
- <view @click="Overhead(0)">架空</view>
|
|
|
+ <view class="line2" v-for="(item, index) in OldProjectList" :key="index">
|
|
|
+ <view @click="OldProject(item.dictValue)">{{item.dictLabel}}</view>
|
|
|
+ <!-- <view @click="Courtyard(0)">庭院</view>
|
|
|
+ <view @click="Overhead(0)">架空</view> -->
|
|
|
|
|
|
</view>
|
|
|
<view class="line1">
|
|
|
<view>新建工程</view>
|
|
|
</view>
|
|
|
- <view class="line2">
|
|
|
- <view @click="Indoor(1)">室内</view>
|
|
|
- <view @click="Courtyard(1)">庭院</view>
|
|
|
- <view @click="Overhead(1)">架空</view>
|
|
|
+ <view class="line2" v-for="(item, index) in NewProjectList" :key="index">
|
|
|
+ <view @click="NewProject(item.dictValue)">{{item.dictLabel}}</view>
|
|
|
+ <!-- <view @click="Courtyard(0)">庭院</view>
|
|
|
+ <view @click="Overhead(0)">架空</view> -->
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -86,16 +87,47 @@
|
|
|
</view>
|
|
|
<view v-if="showPopup" class="mask" @click="showMinYong"></view>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="share">
|
|
|
+ <view :class="{'share-box': shareState}" @click="handleHiddenShare">
|
|
|
+ </view>
|
|
|
+ <view class="share-item" :class="{'share-show': shareState}">
|
|
|
+ <view class="share-to">
|
|
|
+ <text>请选择</text>
|
|
|
+ </view>
|
|
|
+ <view class="content">
|
|
|
+ <view class="block" v-for="(item, index) in typeList" :key="index" @click="showTypeSheet(item)">
|
|
|
+ <!-- <image :src="item.image" mode="aspectFill"></image> -->
|
|
|
+ <text>{{item.dictLabel}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cancel" @click.stop="handleHiddenShare">
|
|
|
+ <text>取消</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ getDicts
|
|
|
+ } from "@/api/system/dict/data";
|
|
|
export default {
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
showPopup: false,
|
|
|
-
|
|
|
+ shareState: false,
|
|
|
+ array: [],
|
|
|
+ OldProjectList: '', //旧改工程
|
|
|
+ NewProjectList: '', //民用工程
|
|
|
+ typeList: '', //二次弹窗数据
|
|
|
+ enginType: '',
|
|
|
+ enginClassification: '', // 旧改节点 数据字典
|
|
|
+ enginClassValue: '', //二次节点 数据字典
|
|
|
current: 0,
|
|
|
swiperDotIndex: 0,
|
|
|
data: [{
|
|
@@ -111,6 +143,14 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 显示二次弹窗
|
|
|
+ handleShowSheet() {
|
|
|
+ this.shareState = true;
|
|
|
+ },
|
|
|
+ // 隐藏二次弹窗
|
|
|
+ handleHiddenShare() {
|
|
|
+ this.shareState = false;
|
|
|
+ },
|
|
|
clickBannerItem(item) {
|
|
|
console.info(item)
|
|
|
},
|
|
@@ -121,78 +161,112 @@
|
|
|
this.$modal.showToast('模块建设中~')
|
|
|
},
|
|
|
showMinYong() {
|
|
|
+ getDicts("old_renovation").then(response => {
|
|
|
+ console.log("旧改", response.data)
|
|
|
+ this.OldProjectList = response.data;
|
|
|
+ });
|
|
|
+ getDicts("new_built").then(response => {
|
|
|
+ this.NewProjectList = response.data;
|
|
|
+ console.log("新建", response.data)
|
|
|
+ });
|
|
|
this.showPopup = !this.showPopup;
|
|
|
|
|
|
},
|
|
|
- //室内
|
|
|
- Indoor(e) {
|
|
|
- if (e == 0) {
|
|
|
- //旧改
|
|
|
- this.showTypeSheet(0);
|
|
|
- } else if (e == 1) {
|
|
|
- //新建
|
|
|
- this.showTypeSheet(1);
|
|
|
- }
|
|
|
- },
|
|
|
- //庭院
|
|
|
- Courtyard(e) {
|
|
|
- if (e === 0) {
|
|
|
-
|
|
|
- this.showTypeSheet(0);
|
|
|
- //旧改
|
|
|
- } else if (e == 1) {
|
|
|
- //新建
|
|
|
- this.showTypeSheet(1);
|
|
|
- }
|
|
|
+
|
|
|
+ NewProject(e) {
|
|
|
+ this.enginType = 'new_built'; //写死
|
|
|
+
|
|
|
},
|
|
|
- //架空
|
|
|
- Overhead(e) {
|
|
|
- if (e == 0) {
|
|
|
- //旧改
|
|
|
- this.showTypeSheet(0);
|
|
|
- } else if (e == 1) {
|
|
|
- //新建
|
|
|
- this.showTypeSheet(1);
|
|
|
+ OldProject(e) {
|
|
|
+ this.enginType = 'old_renovation'; //写死
|
|
|
+ this.enginClassification = e;
|
|
|
+ this.typeList = ''; //置空
|
|
|
+ if (e == 'indoor_engin') {
|
|
|
+ //旧改室内
|
|
|
+ getDicts("old_renovation_indoor_engin").then(response => {
|
|
|
+
|
|
|
+ this.typeList = response.data;
|
|
|
+ });
|
|
|
+
|
|
|
+ } else if (e == 'courtyard') {
|
|
|
+ //旧改庭院
|
|
|
+ getDicts("old_renovation_courtyard_engin").then(response => {
|
|
|
+ console.log("庭院", response.data)
|
|
|
+ this.typeList = response.data;
|
|
|
+
|
|
|
+ });
|
|
|
+ } else if (e == 'overhead') {
|
|
|
+ //旧改架空
|
|
|
+ getDicts("old_renovation_overhead").then(response => {
|
|
|
+ console.log("架空", response.data)
|
|
|
+ this.typeList = response.data;
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
+ this.handleShowSheet();
|
|
|
},
|
|
|
- //二次弹窗 选择类型
|
|
|
- showTypeSheet(e) {
|
|
|
- uni.showActionSheet({
|
|
|
- itemList: ['拆旧管', '立杠', '挂表', '表后管', '阀管'],
|
|
|
- success: (res) => {
|
|
|
- console.log('选择了第' + (res.tapIndex + 1) + '个选项');
|
|
|
- if (e == 0 && res.tapIndex == 0) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/oldrenovation/indoor/tearOldPipe'
|
|
|
- })
|
|
|
- }
|
|
|
- if (e == 0 && res.tapIndex == 1) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/oldrenovation/indoor/verticalBar'
|
|
|
- })
|
|
|
- }
|
|
|
- if (e == 0 && res.tapIndex == 2) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/oldrenovation/indoor/putUpWatch'
|
|
|
- })
|
|
|
- }
|
|
|
- if (e == 0 && res.tapIndex == 3) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/oldrenovation/indoor/watchAfterPipe'
|
|
|
- })
|
|
|
- }
|
|
|
- if (e == 0 && res.tapIndex == 4) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/oldrenovation/indoor/valveTube'
|
|
|
- })
|
|
|
- }
|
|
|
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- console.log('弹窗取消');
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //二次弹窗 选择类型
|
|
|
+ showTypeSheet(item) {
|
|
|
+ this.showPopup = !this.showPopup; //隐藏第一次痰喘
|
|
|
+ console.log(item)
|
|
|
+ this.enginClassValue = item.dictValue; //二次节点赋值
|
|
|
+ const obj = {
|
|
|
+ enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
|
|
|
+ enginType: this.enginType, //旧改 还是新建 写死
|
|
|
+ enginClassification: this.enginClassification //室内 庭院 架空
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ //拆旧管
|
|
|
+ this.handleHiddenShare();
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/oldrenovation/indoor/tearOldPipe?params=' + encodeURIComponent(JSON.stringify(
|
|
|
+ obj))
|
|
|
+ })
|
|
|
+
|
|
|
+ // uni.showActionSheet({
|
|
|
+ // itemList: ['拆旧管', '立杠', '挂表', '表后管', '阀管'],
|
|
|
+ // success: (res) => {
|
|
|
+ // console.log('选择了第' + (res.tapIndex + 1) + '个选项');
|
|
|
+ // if (e == 0 && res.tapIndex == 0) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/oldrenovation/indoor/tearOldPipe?description=OldIndoor&form=Pipe'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (e == 0 && res.tapIndex == 1) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/oldrenovation/indoor/tearOldPipe?description=OldIndoor&form=verticalBar'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (e == 0 && res.tapIndex == 2) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/oldrenovation/indoor/putUpWatch'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (e == 0 && res.tapIndex == 3) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/oldrenovation/indoor/watchAfterPipe'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (e == 0 && res.tapIndex == 4) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/oldrenovation/indoor/valveTube'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ // },
|
|
|
+ // fail: (err) => {
|
|
|
+ // console.log('弹窗取消');
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -341,4 +415,102 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ .share {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .share-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ position: fixed;
|
|
|
+ top: 0rpx;
|
|
|
+ left: 0rpx;
|
|
|
+ bottom: 0rpx;
|
|
|
+ right: 0rpx;
|
|
|
+ background-color: rgba(0, 0, 0, 0.4);
|
|
|
+ transition: .3s;
|
|
|
+ z-index: 999;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 进入分享动画
|
|
|
+ .share-show {
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ transform: translateY(0%) !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 离开分享动画
|
|
|
+ .share-item {
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ transform: translateY(100%);
|
|
|
+ z-index: 1999;
|
|
|
+
|
|
|
+ .share-to {
|
|
|
+ width: 100%;
|
|
|
+ height: 3rem;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ width: 240rpx;
|
|
|
+ height: 0rpx;
|
|
|
+ border-top: 1px solid #E4E7ED;
|
|
|
+ -webkit-transform: scaleY(0.5);
|
|
|
+ transform: scaleY(0.5);
|
|
|
+ margin-left: 30rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ width: 240rpx;
|
|
|
+ height: 0rpx;
|
|
|
+ border-top: 1px solid #E4E7ED;
|
|
|
+ -webkit-transform: scaleY(0.5);
|
|
|
+ transform: scaleY(0.5);
|
|
|
+ margin-right: 30rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ width: 100%;
|
|
|
+ height: 50%;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .block {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ height: 80rpx;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ text {
|
|
|
+ margin-top: 16rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #606266;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .cancel {
|
|
|
+ width: 100%;
|
|
|
+ height: 3rem;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-top: 1rpx solid #E4E7ED;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|