main
zhangqun 11 months ago
parent db72c72d4d
commit 1bf4775e3b
  1. 138
      components/bottom-button/three2.vue
  2. 12
      pages/investigation/task.vue

@ -0,0 +1,138 @@
<template>
<!--顶部-->
<cover-view class="bottom">
<cover-view class="bottom2"></cover-view>
<cover-view class="bottom1">
<cover-view class="trapezoidal first" :class="{ primary: firstPrimary }">
<cover-image src="../../static/map/l.png"></cover-image>
<cover-view class="font" @click="$emit('first')">
{{ firstText }}
</cover-view>
</cover-view>
<cover-view
v-show="type == 'edit'"
class="trapezoidal min"
:class="{ primary: secondPrimary }"
>
<cover-image src="../../static/map/c2.png"></cover-image>
<cover-view class="font" @click="$emit('second')">
{{ secondText }}
</cover-view>
</cover-view>
<cover-view class="trapezoidal last" :class="{ primary: thirdPrimary }">
<cover-image src="../../static/map/r.png"></cover-image>
<cover-view class="font" style="color: #fff" @click="$emit('last')">
{{
isSubmit ? (type == "view" ? "关闭" : thirdText) : nextText
}}</cover-view
>
</cover-view>
</cover-view>
</cover-view>
</template>
<script>
export default {
name: "no-data",
props: {
firstText: {
type: String,
default: "上一步",
},
secondText: {
type: String,
default: "取消",
},
nextText: {
type: String,
default: "下一步",
},
thirdText: {
type: String,
default: "完成",
},
firstPrimary: Boolean,
secondPrimary: Boolean,
thirdPrimary: {
type: Boolean,
default: true,
},
isSubmit: {
type: Boolean,
default: false,
},
type: {
type: String,
default: "edit",
},
},
data() {
return {
$: this.$,
};
},
mounted() {},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.bottom {
position: fixed;
bottom: 0;
width: 100%;
height: 120rpx;
background: #ffffff;
}
.bottom2 {
width: 100%;
height: 1px;
background: #cccccc;
}
.bottom1 {
width: calc(100% - 40rpx);
padding: 18rpx 20rpx;
height: 80rpx;
background: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
}
.Img {
width: 512rpx;
height: 440rpx;
margin: 0 auto;
}
.trapezoidal {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 1;
width: 100%;
height: 100%;
box-sizing: border-box;
text-align: center;
border-radius: 10rpx;
line-height: 60rpx;
.font {
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 100%;
height: 100%;
text-align: center;
line-height: 60rpx;
}
// cover-image {
// width: 100%;
// height: 100%;
// }
}
</style>

@ -432,11 +432,11 @@
<view class="blank" />
</view>
<bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'"
@confirm="bottomButtonTwo
@confirm="bottomButtonTwo" />
" />
<bottom-button :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'"
<bottom-button2 :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'"
@second="isEditStep2 = !isEditStep2" @first="active = 1" @last="active = 3" />
<bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2"
@second="submit(false)" @last="submit(true)" />
<u-modal :show="modalShow" content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?" confirm-text="确定" cancel-text="取消"
@ -448,6 +448,7 @@
<script>
import BottomButton from "../../components/bottom-button/three.vue";
import BottomButton2 from "../../components/bottom-button/three2.vue";
import BottomButtonTwo from "../../components/bottom-button/index.vue";
import NoData from "../../components/no-data.vue";
import TopTitle from "../../components/top-title.vue";
@ -461,6 +462,7 @@
TopTitle,
NoData,
BottomButton,
BottomButton2,
BottomButtonTwo,
InvestigationItem,
@ -1471,6 +1473,8 @@
}
},
bottomButtonTwo() {
console.log(this.type)
if(!this.type) {
if (!this.formData.roadType) {
return this.$.toast("请输入道路类型");
}
@ -1486,6 +1490,8 @@
if (!this.formData.limitSpeed) {
return this.$.toast("请输入限速");
}
}
this.isEdit = false;
this.active = 2;
},

Loading…
Cancel
Save