已完成详情页展示

main
limingtao 11 months ago
parent 9e85ccfb80
commit a9feca0131
  1. 176
      components/bottom-button/index.vue
  2. 122
      components/bottom-button/three.vue
  3. 8
      pages/investigation/index.vue
  4. 11
      pages/investigation/task.vue
  5. 22
      pages/map/index.vue

@ -1,74 +1,80 @@
<template> <template>
<!--顶部--> <!--顶部-->
<view class="bottom"> <view class="bottom">
<view class="trapezoidal first" @click="$emit('cancel')"> <view class="trapezoidal first" @click="$emit('cancel')" v-show="type=='edit'">
<text>{{ cancelText }}</text> <text>{{ cancelText }}</text>
</view> </view>
<view class="trapezoidal last" @click="$emit('confirm')"> <view class="trapezoidal last" @click="$emit('confirm')" :class="type=='view'?'view-btn':''">
<text>确认</text> <text>{{type=='view'?'下一步':'下一步'}}</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: "no-data", name: "no-data",
props: { props: {
marginTop:{ marginTop: {
type:Number, type: Number,
default:300 default: 300
},
cancelText: {
type: String,
default: '取消'
},
type: {
type: String,
default: 'edit'
}
}, },
cancelText:{ data() {
type:String, return {
default: '取消' $: this.$,
} }
},
data() {
return {
$:this.$,
}
},
mounted(){
},
computed:{
},
methods: {
// url
getCurPage() {
let pages = getCurrentPages();
let curPage = pages[pages.length - 1];
return curPage
}, },
// mounted() {
backPage(){
this.$emit('backPage')
}, },
// computed: {
skipPage(item) {
this.$emit('skipPage', item.pageUrl)
}, },
}, methods: {
} // url
getCurPage() {
let pages = getCurrentPages();
let curPage = pages[pages.length - 1];
return curPage
},
//
backPage() {
this.$emit('backPage')
},
//
skipPage(item) {
this.$emit('skipPage', item.pageUrl)
},
},
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.bottom { .bottom {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
padding: 18rpx 20rpx; padding: 18rpx 20rpx;
height: 80rpx; height: 80rpx;
background: #FFFFFF; background: #FFFFFF;
border-top: 1px solid #cccccc; border-top: 1px solid #cccccc;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.Img{
.Img {
width: 512rpx; width: 512rpx;
height: 440rpx; height: 440rpx;
margin: 0 auto; margin: 0 auto;
} }
.trapezoidal { .trapezoidal {
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -80,6 +86,7 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
line-height: 60rpx; line-height: 60rpx;
} }
.trapezoidal::before, .trapezoidal::before,
.trapezoidal::after { .trapezoidal::after {
content: ''; content: '';
@ -103,32 +110,53 @@ export default {
background-color: #E9EDF5; background-color: #E9EDF5;
border-left: 0 none; border-left: 0 none;
} }
.first {
margin-right: 40rpx; .first {
text { margin-right: 40rpx;
position: relative;
left: 12.5%; text {
position: relative;
left: 12.5%;
}
} }
}
.last { .last {
background: #2663BF; background: #2663BF;
flex: 1; flex: 1;
margin-left: 60rpx; margin-left: 60rpx;
color: #FFFFFF; color: #FFFFFF;
text {
position: relative; text {
left: -10%; position: relative;
left: -10%;
}
} }
}
.last::after { .last::after {
width: 0; width: 0;
} }
.last::before {
width: 30%; .last::before {
left: -10rpx; width: 30%;
transform: skew(17deg); left: -10rpx;
background-color: #2663BF; transform: skew(17deg);
} background-color: #2663BF;
}
.view-btn {
margin-left: 0;
padding: 8rpx 0rpx 8rpx 0rpx;
uni-text {
position: relative;
left: auto;
}
}
.view-btn::before {
width: 0%;
left: -10rpx;
transform: skew(0deg);
background-color: #2663BF;
}
</style> </style>

@ -1,73 +1,88 @@
<template> <template>
<!--顶部--> <!--顶部-->
<view class="bottom"> <view class="bottom">
<view class="trapezoidal first" :class="{primary: firstPrimary}" style="margin-right: 30rpx" @click="$emit('first')"> <view class="trapezoidal first" :class="{primary: firstPrimary}" :style="{marginRight:type=='view'?'45rpx':'30rpx'}"
@click="$emit('first')">
<text>{{ firstText }}</text> <text>{{ firstText }}</text>
</view> </view>
<view class="trapezoidal min" :class="{primary: secondPrimary}" style="margin:0 30rpx" @click="$emit('second')"> <view v-show="type=='edit'" class="trapezoidal min" :class="{primary: secondPrimary}" style="margin:0 30rpx" @click="$emit('second')">
<text>{{ secondText }}</text> <text>{{ secondText }}</text>
</view> </view>
<view class="trapezoidal last" :class="{primary: thirdPrimary}" style="margin-left:30rpx" @click="$emit('last')"> <view class="trapezoidal last" :class="{primary: thirdPrimary}" :style="{marginLeft:type=='view'?'45rpx':'30rpx'}" @click="$emit('last')">
<text>{{ thirdText }}</text> <text>{{isSubmit?(type=='view'?'关闭':thirdText):nextText}}</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: "no-data", name: "no-data",
props: { props: {
firstText:{ firstText: {
type:String, type: String,
default:'上一步' 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.$,
}
}, },
secondText: { mounted() {
type:String,
default: '取消'
}, },
thirdText:{ computed: {
type:String,
default: '完成'
}, },
firstPrimary: Boolean, methods: {
secondPrimary: Boolean,
thirdPrimary: {
type: Boolean,
default: true
}, },
}, }
data() {
return {
$:this.$,
}
},
mounted(){
},
computed:{
},
methods: {
},
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.bottom { .bottom {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
padding: 18rpx 20rpx; padding: 18rpx 20rpx;
height: 80rpx; height: 80rpx;
background: #FFFFFF; background: #FFFFFF;
border-top: 1px solid #cccccc; border-top: 1px solid #cccccc;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.Img{
.Img {
width: 512rpx; width: 512rpx;
height: 440rpx; height: 440rpx;
margin: 0 auto; margin: 0 auto;
} }
.trapezoidal { .trapezoidal {
position: relative; position: relative;
display: inline-flex; display: inline-flex;
@ -85,11 +100,13 @@ export default {
background: #2663BF; background: #2663BF;
color: #fff; color: #fff;
&::after, &::before { &::after,
&::before {
background: #2663BF; background: #2663BF;
} }
} }
} }
.trapezoidal::before, .trapezoidal::before,
.trapezoidal::after { .trapezoidal::after {
content: ''; content: '';
@ -113,17 +130,18 @@ export default {
background-color: #E9EDF5; background-color: #E9EDF5;
border-left: 0 none; border-left: 0 none;
} }
.first::before { .first::before {
width: 50%; width: 50%;
left: 70%; left: 70%;
} }
.min::before { .min::before {
right: -20%; right: -20%;
} }
.min::after { .min::after {
transform: skew(17deg); transform: skew(17deg);
//right: 10%; //right: 10%;
} }
</style> </style>

@ -190,10 +190,14 @@
}) })
}, },
handleClick(row) { handleClick(row) {
console.log(row) // console.log(row)
if (this.tab === 1) { if (this.tab === 1) {
this.$.open('/pages/map/index?businessId=' + row.businessId) this.$.open('/pages/map/index?businessId=' + row.businessId + '&type=' + (this.tab == 1 ? 'edit' : 'view'))
// this.$.open('/pages/map/index?businessId=' + row.businessId)
}else{
this.$.open('/pages/investigation/task?id=' + row.businessId + '&type=' + (this.tab == 1 ? 'edit' : 'view'))
} }
}, },
// //
skipPage(even) { skipPage(even) {

@ -342,13 +342,13 @@
</view> </view>
<view class="blank" /> <view class="blank" />
</view> </view>
<bottom-button-two v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'" @confirm=" <bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'" @confirm="
isEdit = false; isEdit = false;
active = 2; active = 2;
" /> " />
<bottom-button v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'" @second="isEditStep2 = !isEditStep2" <bottom-button :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'" @second="isEditStep2 = !isEditStep2"
@first="active = 1" @last="active = 3" /> @first="active = 1" @last="active = 3" />
<bottom-button v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" @second="submit(false)" <bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" @second="submit(false)"
@last="submit(true)" /> @last="submit(true)" />
<u-modal <u-modal
:show="modalShow" :show="modalShow"
@ -393,6 +393,8 @@
onLoad(e) { onLoad(e) {
if (e.id) { if (e.id) {
this.businessId = e.id; this.businessId = e.id;
this.type = e.type;
this.getBaseData(e.id); this.getBaseData(e.id);
} }
}, },
@ -565,7 +567,8 @@
modalShow: false, modalShow: false,
extraConfigs: [], extraConfigs: [],
describeArr: [], describeArr: [],
temporary: '' temporary: '',
type:''
}; };
}, },
methods: { methods: {

@ -35,17 +35,19 @@
</view> </view>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<view @click="handleCheck(1)" class="btn btn1"> 智能排查 </view> <view @click="handleCheck(1)" class="btn btn1" v-show="type=='edit'"> 智能排查 </view>
<view @click="handleCheck(2)" class="btn btn2"> 人工排查 </view> <view @click="handleCheck(2)" class="btn btn2" v-show="type=='edit'"> 人工排查 </view>
<view @click="handleCheck(2)" class="btn btn8" v-show="type=='view'"> 查看排查详情 </view>
</view> </view>
</view> </view>
<view class="dialog dialog-two" v-if="pageType == 2"> <view class="dialog dialog-two" v-if="pageType == 2">
<view class="two-f1">根据当前定位信息您要排查的是这条路吗</view> <view class="two-f1">根据当前定位信息您要排查的是这条路吗</view>
<view class="two-f2">{{ rname }}</view> <view class="two-f2">{{ rname }}</view>
<view class="btn-box"> <view class="btn-box">
<view @click="onJump(3)" class="btn btn3"> 更换 </view> <view @click="onJump(3)" class="btn btn3" v-show="type=='edit'"> 更换 </view>
<view @click="handleCheck(1)" class="btn btn4"> 智能排查 </view> <view @click="handleCheck(1)" class="btn btn4" v-show="type=='edit'"> 智能排查 </view>
<view @click="handleCheck(2)" class="btn btn5"> 人工排查 </view> <view @click="handleCheck(2)" class="btn btn5" v-show="type=='edit'"> 人工排查 </view>
<view @click="handleCheck(2)" class="btn btn8" v-show="type=='view'"> 查看排查详情 </view>
</view> </view>
</view> </view>
<view class="dialog dialog-three" v-if="pageType == 3"> <view class="dialog dialog-three" v-if="pageType == 3">
@ -202,12 +204,14 @@ export default {
name3: "", name3: "",
name4: "", name4: "",
show: false, show: false,
type:''
}; };
}, },
onLoad(options) { onLoad(options) {
console.log(options); console.log(options);
// this.businessId = "RX202310210238"; // this.businessId = "RX202310210238";
this.businessId = options.businessId; this.businessId = options.businessId;
this.type = options.type;
this.pageHeight = uni.getSystemInfoSync().windowHeight; this.pageHeight = uni.getSystemInfoSync().windowHeight;
this.pageType = 1; this.pageType = 1;
@ -743,6 +747,14 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.btn8 {
width: 100%;
/* background: url(../../static/map/rr.png);
background-size: 100% 100%;
background-repeat: no-repeat; */
background-color: rgb(53, 103, 193);
border-radius:9px;
}
} }
} }
.dialog-one { .dialog-one {

Loading…
Cancel
Save