You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
4.0 KiB
173 lines
4.0 KiB
<template> |
|
<!-- 编辑综合运输 --> |
|
<view class="edit_synth"> |
|
<view class="top_box"> |
|
<view class="top_con"> |
|
<view class="edit_item"> |
|
<p class="left">统计日期</p> |
|
<!-- <p class="right">{{roadData.statisticalDate}}</p> --> |
|
<view class="right"> |
|
<p>{{synthData.reportDatetime}}</p> |
|
<uni-datetime-picker type="date" v-model="synthData.reportDatetime"> |
|
<image style="width: 49rpx;height: 49rpx;" src="../../static/icons/number-box.png" mode=""></image> |
|
</uni-datetime-picker> |
|
</view> |
|
</view> |
|
<view class="edit_item"> |
|
<p class="left">统计时段</p> |
|
<!-- <p class="right">{{roadData.reportPhase}}</p> --> |
|
<view class="right"> |
|
<uni-data-picker v-model="synthData.reportPhase" :localdata="roadTime" :map="{text:'dictLabel',value:'dictValue'}" popup-title="请选择班级" @change="onchange" @nodeclick="onnodeclick"></uni-data-picker> |
|
<image style="width: 49rpx;height: 49rpx;" src="../../static/icons/number-box.png" mode=""></image> |
|
</view> |
|
</view> |
|
<view class="edit_item"> |
|
<p class="left">交通运行情况</p> |
|
<p class="right">{{synthData.trafficOperationDescription}}</p> |
|
</view> |
|
</view> |
|
</view> |
|
<view class="bottom_box"> |
|
<p class="btn_item" @click="cancelEdit">取消</p> |
|
<p class="btn_item" @click="confirmRoad">确认</p> |
|
</view> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
data() { |
|
return { |
|
roadTime:[], |
|
unitData:[], |
|
synthData:{ |
|
reportPhase:'', |
|
reportDatetime:'', |
|
trafficOperationDescription:'' |
|
} |
|
} |
|
}, |
|
onLoad(options) { |
|
let row = JSON.parse(options.item); |
|
console.log(row) |
|
this.synthData = row; |
|
this.synthData.reportDatetime = this.synthData.reportDatetime ? this.synthData.reportDatetime.substring(0,10) : '' |
|
this.getRoadTime() |
|
}, |
|
methods: { |
|
// 获取时段 |
|
getRoadTime(){ |
|
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time&_t=1693372307694',"GET").then(res =>{ |
|
this.roadTime = res.data |
|
}) |
|
}, |
|
// 点击确认按钮 |
|
confirmRoad(){ |
|
let params = this.synthData; |
|
uni.showModal({ |
|
title:"提示", |
|
content:"您确定,提交修改吗?", |
|
success:(res) =>{ |
|
if(res.confirm){ |
|
this.$request(getApp().globalData.baseUrl + '/api/biz/roadtransport/operation/saveOrUpdate',params,'POST').then(res =>{ |
|
if(res.code == 200){ |
|
uni.showToast({ |
|
title:'修改成功', |
|
icon:"none" |
|
}); |
|
uni.navigateBack() |
|
} |
|
}) |
|
}else if(res.cancel){} |
|
} |
|
}) |
|
}, |
|
// 点击取消按钮 |
|
cancelEdit(){ |
|
uni.navigateBack() |
|
}, |
|
|
|
onchange(e){ |
|
console.log('确定===》',e) |
|
}, |
|
onnodeclick(e){ |
|
console.log('点击===》',e) |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
.edit_synth{ |
|
width: 100%; |
|
height: 100%; |
|
|
|
.top_box{ |
|
padding-bottom: 160rpx; |
|
margin-top: 30rpx; |
|
height:100%; |
|
|
|
.top_con{ |
|
width: 690rpx; |
|
height: 84%; |
|
overflow-y: auto; |
|
padding: 30rpx 0; |
|
display: flex; |
|
flex-direction: column; |
|
margin: 0 auto; |
|
background-color: #fff; |
|
border-radius: 20rpx; |
|
|
|
.edit_item{ |
|
width: 100%; |
|
display: flex; |
|
justify-content: space-between; |
|
margin-bottom: 30rpx; |
|
align-items: center; |
|
|
|
&:last-child{ |
|
margin-bottom: 0; |
|
} |
|
|
|
.left{ |
|
margin-left: 30rpx; |
|
} |
|
.right{ |
|
margin-right: 30rpx; |
|
display: flex; |
|
align-items: center; |
|
} |
|
} |
|
} |
|
} |
|
.bottom_box{ |
|
width: 100%; |
|
height: 150rpx; |
|
position: fixed; |
|
bottom: 0; |
|
display: flex; |
|
justify-content: center; |
|
align-items: center; |
|
|
|
.btn_item{ |
|
width: 320rpx; |
|
height: 78rpx; |
|
background: #FFFFFF; |
|
border-radius: 40rpx; |
|
border: 1rpx solid #D73232; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
font-size: 26rpx; |
|
color: #D73232; |
|
|
|
&:last-child { |
|
background: #D73232; |
|
margin-left: 50rpx; |
|
color: #FFFFFF; |
|
} |
|
} |
|
} |
|
} |
|
|
|
</style>
|
|
|