添加防灾防洪和冰雪天气表单和列表页功能

dev201310
jinna 8 months ago
parent f2b429c25b
commit ebecc877bd
  1. 26
      pages.json
  2. 3
      pages/home/home.vue
  3. 437
      pages/safetySupervisionDepart/floodPrevention/form.vue
  4. 472
      pages/safetySupervisionDepart/floodPrevention/list.vue
  5. 458
      pages/safetySupervisionDepart/winterPrevention/form.vue
  6. 471
      pages/safetySupervisionDepart/winterPrevention/list.vue
  7. BIN
      static/image/airport01.png
  8. BIN
      static/image/bus1.png
  9. BIN
      static/image/icon_rundata.png
  10. BIN
      static/image/icon_runstatus.png
  11. BIN
      static/image/roadTransport.png
  12. BIN
      static/image/roadTransport01.png
  13. BIN
      static/image/safetySupervisionDepart.png
  14. BIN
      static/image/safetySupervisionDepart01.png
  15. BIN
      static/image/spread.png
  16. BIN
      static/image/water.png
  17. BIN
      static/image/water01.png

@ -238,6 +238,32 @@
"style": {
"navigationBarTitleText": "引航站报送"
}
},
{
"path": "pages/safetySupervisionDepart/floodPrevention/form",
"style": {
"navigationBarTitleText": "防灾防洪报送"
}
},
{
"path": "pages/safetySupervisionDepart/floodPrevention/list",
"style": {
"navigationBarTitleText": "防灾防洪",
"enablePullDownRefresh": true
}
},
{
"path": "pages/safetySupervisionDepart/winterPrevention/form",
"style": {
"navigationBarTitleText": "冰雪灾害报送"
}
},
{
"path": "pages/safetySupervisionDepart/winterPrevention/list",
"style": {
"navigationBarTitleText": "冰雪灾害",
"enablePullDownRefresh": true
}
}
],
"globalStyle": {

@ -14,7 +14,7 @@
return {
imgFix: '/static/image/',
routeData: [], //
filterRoute:['机场','地铁','道路运输','铁路','水运','高速','港口','公交'],//
filterRoute:['机场','地铁','道路运输','铁路','水运','高速','港口','公交','恶劣天气应对'],//
}
},
onShow() {
@ -34,6 +34,7 @@
if(res.code == 200) {
console.log('权限路由');
this.routeData = res.data;
console.log('routeData----------------',this.routeData)
}
}).catch(() => {
})

@ -0,0 +1,437 @@
<template>
<view class="form_warp">
<!-- 恶劣天气报送 -->
<view class="form_intro">
<view>如有填报问题请咨询公共服务中心</view>
<view>中心值班电话<text @click="call(mobile)" class="tel">{{mobile}}</text></view>
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">填报单位</view>
<view class="form_item_input picker">
<text>{{form.reportUnit}}</text>
</view>
</view>
<view class="form_item">
<view class="form_item_label">填报日期</view>
<view class="form_item_input picker">
<!-- :end="currentDate" -->
<picker v-if="pageType == 'add'" mode="date" :value="form.reportDate" @change="bindDateChange" >
<text class="picker_select"
:style="form.reportDate?'color:#333;':''">{{form.reportDate?form.reportDate:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{form.reportDate?form.reportDate:''}}</text>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">应急资源调动</view>
<view class="form_item_subtitle">相关资源</view>
<view class="form_item">
<view class="form_item_label">应对队伍()</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerTeam"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">应对人员()</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerPerson"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">机械设备(/)</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerDevice"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">抽排水设备(台部)</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.drainageDevice"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item_line"></view>
<view class="form_item_subtitle">应急运力</view>
<view class="form_item">
<view class="form_item_label">指挥或巡查车()"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.patrolVehicles"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">客运车辆()"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.passengerVehicles"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">货运车辆()"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.freightVeicles"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">预警信息</view>
<view class="form_item">
<view class="form_item_label">预警信息发布(条次)</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.warningRelease"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">应对措施</view>
<view class="form_item_remark">
<view class="form_item_label">防范准备措施重点领域巡视检和管控</view>
<view class="form_item_input">
<uni-easyinput v-model="form.solutions"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入详细信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">处置情况</view>
<view class="form_item_remark">
<view class="form_item_label">受影响情况受损情况处置情况和其他情况</view>
<view class="form_item_input">
<uni-easyinput v-model="form.disposalSituation"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入详细信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
</view>
</view>
<view class="foot_btn">
<!-- <view class="act_btn" @click="doCancel">取消</view> -->
<view class="act_btn blue" @click="doSubmit">{{btnText}}</view>
</view>
</view>
</template>
<script>
import {
calcMom,
calcYoy,
checkNotEmpty,
getDateStr,
lastYearDate
} from '../../../common/util'
export default{
data(){
return{
currentDate:getDateStr(new Date(), 0),
mobile: getApp().globalData.mobile,
userInfo: {},
form:{
reportDate:'',
reportUnit:'',
answerTeam:null,
answerPerson:null,
answerDevice:null,
drainageDevice:null,
patrolVehicles:null,
passengerVehicles:null,
freightVeicles:null,
warningRelease:null,
disposalSituation:'',
solutions:''
},
deptInfo:{},
pageType: '',
btnText: '保存',
isChangeTime:false
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
this.deptInfo = uni.getStorageSync('deptName');
console.log('userInfo-----------------',this.userInfo)
console.log('deptInfo-----------------',this.deptInfo)
if (options.type == 'add') {
this.pageType = 'add';
let now = new Date();
this.form.reportDate = getDateStr(now, -1); //
this.form.reportUnit = this.userInfo.deptName
this.getInfoDetail(this.form.reportDate);
} else if (options.item) {
this.btnText = '修改并保存';
let obj = JSON.parse(options.item);
console.log('ong-------------------',obj)
this.getInfoDetail(obj.reportDate,obj.reportUnit);
}
},
methods:{
//
bindDateChange(e) {
this.isChangeTime = true
this.form.reportDate = e.detail.value;
this.getInfoDetail(this.form.reportDate)
},
//
getInfoDetail(date,unit){
this.$request(getApp().globalData.baseUrl + '/api/biz/disasterPrevention/getDetail',{reportDate:date,reportUnit:unit ? unit : this.userInfo.deptName}).then(res =>{
console.log('res-------------------',res)
this.form = res.data
// if(id){
// this.form = res.data.list.find(item => item.id == id)
// }else{
// this.form = res.data.list.length != 0 ? res.data.list[0] : {
// reportDate:this.form.reportDate,
// reportUnit:this.userInfo.deptName,
// answerTeam:null,
// answerPerson:null,
// answerDevice:null,
// drainageDevice:null,
// patrolVehicles:null,
// passengerVehicles:null,
// freightVeicles:null,
// warningRelease:null,
// disposalSituation:'',
// solutions:''
// }
// }
})
},
doSubmit(){
uni.showModal({
title: "提示",
content: !checkNotEmpty(this.form.id) ? "您确认提交该条报送数据?" : "您确认将该条数据进行修改?",
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...',
mask: true
})
console.log('query--------------------',this.form)
this.$request(getApp().globalData.baseUrl + '/api/biz/disasterPrevention/saveOrUpdate',this.form,'POST').then(res =>{
uni.hideLoading()
if (res.code == 200) {
uni.showToast({
title: "报送提交成功",
icon: "none",
success: () => {
if (this.form.id == undefined || this.isChangeTime) {
setTimeout(() => {
uni.redirectTo({
url: "/pages/safetySupervisionDepart/floodPrevention/list"
})
}, 300)
} else {
setTimeout(() => {
uni.navigateBack()
}, 300)
}
}
})
}
})
}
}
})
},
}
}
</script>
<style lang="scss" scoped>
.form_warp {
padding: 30rpx 30rpx 195rpx;
.form_intro {
color: #666;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
line-height: 48rpx;
text-align: center;
margin-bottom: 20rpx;
.tel {
color: #2D8CF0;
font-weight: bold;
}
}
.form_item_box {
padding: 30rpx 20rpx 30rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
margin-bottom: 40rpx;
.form_item_title {
color: #333;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
.form_item_subtitle{
color: #333;
line-height: 42rpx;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
.form_item_remark {
margin-bottom: 30rpx;
.form_item_label {
// color: #333333;
// line-height: 42rpx;
// font-size: 30rpx;
// font-family: PingFang SC-Bold, PingFang SC;
// // font-weight: bold;
margin-bottom: 30rpx;
color: #666666;
font-size: 26rpx;
}
/deep/ .is-input-border{
border-radius: 20rpx !important;
border: 1px solid #c1c1c1 !important;
}
}
.form_item {
display: flex;
align-items: center;
justify-content: space-between;
line-height: 37rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-bottom: 30rpx;
.form_item_label {
width: 260rpx;
color: #666666;
font-size: 26rpx;
word-break: break-all;
}
.form_item_input {
color: #333;
text-align: right;
word-break: break-all;
&.picker {
flex: 1;
// display: flex;
// justify-content: space-between;
// /deep/ picker {
// flex: 1;
// }
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
//
&.text {
color: #333333;
line-height: 40rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
//
&.form_input {
/deep/ .is-input-border {
border: 0 !important;
.uni-easyinput__content-input {
height: 35rpx !important;
text-align: right;
}
}
/deep/ .uni-date-x--border {
border: 0 !important;
.uni-date__x-input {
// height: 35rpx !important;
text-align: right;
}
}
}
}
}
.form_item_line{
width: 100%;
height: 1px;
background:#E8E8E8;
margin: 40rpx 0;
}
}
.foot_btn {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 40rpx 30rpx;
background-color: #f5f5f5;
z-index: 11;
.act_btn {
width: 690rpx;
height: 90rpx;
color: #666666;
font-size: 28rpx;
line-height: 90rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
background: #F6F6F6;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
&.blue {
color: #fff;
background: #2D8CF0;
border-color: #2D8CF0;
}
}
}
}
</style>

@ -0,0 +1,472 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index">
<!-- <view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form', item)"> -->
<view class="list_top" @click="showDetail(item,!item.show)">
<view class="unit_tags">报送时间</view>
<view class="unit_name">
{{item.reportDate || ''}}
</view>
<view class="unit_arrow">
<uni-icons v-if="item.show" type="bottom" size="16" color="#666666"></uni-icons>
<uni-icons v-else type="right" size="16" color="#666666"></uni-icons>
</view>
</view>
<view class="list_cnt" v-if="item.show">
<view v-for="(item2,index2) in item.reportUnit" :key="index2" class="list_cnt_item"
@click="editItem(item,item2)">{{item2}}</view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<!-- <view @click="goPage('/pages/highway/runData/form?type=add')" class="act_btn"><uni-icons type="plusempty" size="18"
color="#fff" style="margin-right: 9rpx;"></uni-icons></view> -->
<view @click="showSearch" class="act_btn btn1"><uni-icons type="search" size="18" color="#2D8CF0"
style="margin-right: 9rpx;"></uni-icons>
</view>
</view>
<!-- 筛选 -->
<uni-popup ref="popup" style="width: 100%;" background-color="none">
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons @click="this.$refs.popup.close()" type="closeempty" size="18" color="#666"
class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
统计时间
</view>
<view class="time_box">
<uni-datetime-picker v-model="query.reportDate" type="date" />
</view>
</view>
<view class="btn_box">
<p class="btn" @click="searchReset">重置</p>
<p class="btn" @click="searchList">确认</p>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default{
data(){
return{
data: [],
current:0,
size: 10,
hasMore: true,
status: '',
query: {
reportDate: '',
reportUnit:''
},
contentText: {
contentdown: "点击查看更多",
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了",
},
userInfo:{}
}
},
onShow(){
this.loadMore()
},
onLoad(){
this.userInfo = uni.getStorageSync('userInfo');
},
onUnload() {
this.hasMore = true;
this.data = [];
},
onPullDownRefresh() {
this.data = [];
this.current = 0;
this.hasMore = true;
this.loadMore();
},
methods:{
loadMore(){
if(this.hasMore){
this.current = this.current + 1
this.status = 'loading'
let form = {
pageNumber: this.current,
pageSize: this.size,
reportDate: this.query.reportDate,
reportUnit:this.userInfo.deptName
}
console.log('form-------------------',form)
// /api/biz/disasterPrevention/list
this.$request(getApp().globalData.baseUrl + '/api/biz/disasterPrevention/getChaildList',form,"GET").then(res =>{
console.log('res-----------------',res)
if(res.code == 200){
res.data.list.map(item => {
item.show = false;
})
this.data = this.data.concat(res.data.list)
if(res.data.list.length == 0 || res.data.list.length < this.size){
this.hasMore = false
this.status = 'nomore'
}else{
this.status = 'more';
}
uni.stopPullDownRefresh();
}else{
this.status = 'more';
uni.stopPullDownRefresh();
}
})
}
},
//
showSearch() {
this.$refs.popup.open('bottom');
},
//
searchList() {
this.data = [];
this.current = 0;
this.hasMore = true;
this.$refs.popup.close();
uni.pageScrollTo({
scrollTop: 0
})
this.loadMore();
},
//
searchReset() {
this.timeRange = [];
this.query = {
reportDate:''
};
this.index = '';
},
//
showDetail(row,isShow){
// console.log('row--------------------',row)
// console.log('isSHow-------------------',isShow)
if(isShow){
//
let idx = this.data.findIndex(item => item.show == true);
if (idx > -1) {
this.data[idx].show = false;
}
}
row.show = isShow
},
//
editItem(row, reportUnit) {
let param = {
reportDate: row.reportDate,
reportUnit: reportUnit,
}
console.log(param, 'paramparamparamparamparamparamparam')
uni.navigateTo({
url:"/pages/safetySupervisionDepart/floodPrevention/form?type=edit&item=" + JSON.stringify(param)
})
},
},
}
</script>
<style lang="scss" scoped>
.page {
min-height: 100vh;
padding: 30rpx 30rpx 195rpx;
}
.list_box {
background-color: #fff;
border-radius: 30rpx;
margin-bottom: 30rpx;
padding: 30rpx;
.list_top {
display: flex;
.unit_tags {
height: 37rpx;
line-height: 37rpx;
color: #E37616;
font-size: 20rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
background: #FFF7E4;
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
padding: 0 11rpx;
margin-right: 16rpx;
}
.unit_name {
flex: 1;
color: #333333;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: 400;
line-height: 48rpx;
margin-left: 20rpx;
word-break: break-all;
}
.unit_arrow {
float: right;
line-height: 48rpx;
}
}
//
.list_cnt {
border-top: 1rpx solid #F7F0EE;
margin-top: 30rpx;
.list_cnt_item {
color: #666666;
font-size: 30rpx;
line-height: 40rpx;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
margin-top: 30rpx;
}
}
.report_time {
color: #999999;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
text-align: center;
margin-bottom: 30rpx;
}
.unit_station {
color: #666;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
margin-top: 10rpx;
}
.list_item_box {
padding: 30rpx 30rpx 0;
background: #F8F8F8;
border-radius: 30rpx;
margin-bottom: 30rpx;
}
.list_item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0 30rpx;
.list_item_label {
width: 240rpx;
color: #666666;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
}
.list_item_cnt {
flex: 1;
color: #333333;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
text-align: right;
margin-left: 20rpx;
word-break: break-all;
}
}
.list_item_shouqi {
color: #2D8CF0;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
line-height: 33rpx;
padding-bottom: 30rpx;
.txt {
margin-left: 12rpx;
}
}
.act_btn_box {
display: flex;
flex-direction: row-reverse;
margin: 10rpx 0;
.act_btn {
width: 180rpx;
color: #666666;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 70rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
text-align: center;
&.blue {
color: #fff;
background: #2D8CF0;
border-color: #2D8CF0;
}
}
}
}
.foot_btn_box {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background-color: #F8F8F8;
padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
height: 90rpx;
line-height: 88rpx;
display: flex;
justify-content: center;
color: #FFFFFF;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
background: #2D8CF0;
border-radius: 100rpx;
border: 1rpx solid #2D8CF0;
.txt {
margin-left: 9rpx;
}
&.btn1 {
color: #2D8CF0;
background: #F6F6F6;
}
}
}
.pop_box {
border-radius: 30rpx 30rpx 0 0;
background-color: #fff;
padding: 30rpx;
.pop_title {
color: #333333;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 45rpx;
text-align: center;
margin: 20rpx 0;
.pop_close {
float: right;
}
}
.popup-content {
// display: flex;
// flex-direction: column;
.cont_tit {
width: 100%;
color: #333333;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 37rpx;
display: flex;
margin-bottom: 40rpx;
&.picker {
display: flex;
justify-content: space-between;
margin: 60rpx 0;
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
}
.time_box {
width: 690rpx;
margin: 0 auto;
/deep/ .uni-date-x--border {
border-radius: 30rpx;
.uni-date-x {
background: transparent;
.icon-calendar {
padding-left: 20rpx;
}
}
}
/deep/ .uni-date-editor--x .uni-date__icon-clear {
padding-right: 20rpx;
}
}
.picker_box {
width: 690rpx;
margin: 0 auto;
/deep/.input-value-border {
border-radius: 30rpx;
}
}
}
.btn_box {
width: 100%;
height: 120rpx;
display: flex;
margin-top: 20px;
align-items: center;
justify-content: space-between;
.btn {
width: 290rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
color: #666;
font-size: 28rpx;
line-height: 88rpx;
text-align: center;
&:last-child {
background: #2D8CF0;
color: #FFFFFF;
border-color: #2D8CF0;
}
}
}
}
</style>

@ -0,0 +1,458 @@
<template>
<view class="form_warp">
<!-- 恶劣天气报送 -->
<view class="form_intro">
<view>如有填报问题请咨询公共服务中心</view>
<view>中心值班电话<text @click="call(mobile)" class="tel">{{mobile}}</text></view>
</view>
<view class="form_item_box">
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">填报单位</view>
<view class="form_item_input picker">
<text>{{form.reportUnit}}</text>
</view>
</view>
<view class="form_item">
<view class="form_item_label">填报日期</view>
<view class="form_item_input picker">
<!-- :end="currentDate" -->
<picker v-if="pageType == 'add'" mode="date" :value="form.reportDate" @change="bindDateChange" >
<text class="picker_select"
:style="form.reportDate?'color:#333;':''">{{form.reportDate?form.reportDate:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{form.reportDate?form.reportDate:''}}</text>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">应急资源调动</view>
<view class="form_item_subtitle">相关资源</view>
<view class="form_item">
<view class="form_item_label">应对队伍()</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerTeam"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">应对人员()</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerPerson"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">机械设备(/)</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerDevice"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">车辆(辆次)</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.answerVehicles"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<!-- <view class="form_item_line"></view> -->
<!-- <view class="form_item_subtitle">应急运力</view> -->
<view class="form_item">
<view class="form_item_label">融雪剂固体()"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.snowMeltingSolid"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">融雪剂液体()"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.snowMeltingLiquid"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">(立方)"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.sand"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
<view class="form_item">
<view class="form_item_label">航煤()"</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.aviationKerosene"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">预警信息</view>
<view class="form_item">
<view class="form_item_label">预警信息发布(条次)</view>
<view class="form_item_input form_input">
<uni-easyinput type="number"
v-model="form.warningRelease"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">准备情况</view>
<view class="form_item_remark">
<!-- <view class="form_item_label">防范准备措施重点领域巡视检和管控</view> -->
<view class="form_item_input">
<uni-easyinput v-model="form.solutions"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入详细信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">受影响情况</view>
<view class="form_item_remark">
<!-- <view class="form_item_label">防范准备措施重点领域巡视检和管控</view> -->
<view class="form_item_input">
<uni-easyinput v-model="form.affectedSituation"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入详细信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
</view>
</view>
<view class="form_item_box">
<view class="form_item_title">处置情况</view>
<view class="form_item_remark">
<!-- <view class="form_item_label">受影响情况受损情况处置情况和其他情况</view> -->
<view class="form_item_input">
<uni-easyinput v-model="form.disposalSituation"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入详细信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
</view>
</view>
<view class="foot_btn">
<!-- <view class="act_btn" @click="doCancel">取消</view> -->
<view class="act_btn blue" @click="doSubmit">{{btnText}}</view>
</view>
</view>
</template>
<script>
import {
calcMom,
calcYoy,
checkNotEmpty,
getDateStr,
lastYearDate
} from '../../../common/util'
export default{
data(){
return{
currentDate:getDateStr(new Date(), 0),
mobile: getApp().globalData.mobile,
userInfo: {},
form:{
reportDate:'',
reportUnit:'',
answerTeam:null,
answerPerson:null,
answerDevice:null,
drainageDevice:null,
patrolVehicles:null,
passengerVehicles:null,
freightVeicles:null,
warningRelease:null,
disposalSituation:'',
solutions:''
},
deptInfo:{},
pageType: '',
btnText: '保存',
isChangeTime:false
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
this.deptInfo = uni.getStorageSync('deptName');
console.log('userInfo-----------------',this.userInfo)
console.log('deptInfo-----------------',this.deptInfo)
if (options.type == 'add') {
this.pageType = 'add';
let now = new Date();
this.form.reportDate = getDateStr(now, -1); //
this.form.reportUnit = this.userInfo.deptName
this.getInfoDetail(this.form.reportDate);
} else if (options.item) {
this.btnText = '修改并保存';
let obj = JSON.parse(options.item);
console.log('obj-----------------',obj)
this.getInfoDetail(obj.reportDate,obj.reportUnit);
}
},
methods:{
//
bindDateChange(e) {
this.isChangeTime = true
this.form.reportDate = e.detail.value;
this.getInfoDetail(this.form.reportDate)
},
//
getInfoDetail(date,unit){
console.log('detail-----------------',date)
this.$request(getApp().globalData.baseUrl + '/api/biz/winterPrevention/getDetail',{reportDate:date,reportUnit:unit ? unit : this.userInfo.deptName}).then(res =>{
console.log('res-----------------------',res)
this.form = res.data
// if(id){
// this.form = res.data.list.find(item => item.id == id)
// }else{
// this.form = res.data.list.length != 0 ? res.data.list[0] : {
// reportDate:this.form.reportDate,
// reportUnit:this.userInfo.deptName,
// answerTeam:null,
// answerPerson:null,
// answerDevice:null,
// drainageDevice:null,
// patrolVehicles:null,
// passengerVehicles:null,
// freightVeicles:null,
// warningRelease:null,
// disposalSituation:'',
// solutions:''
// }
// }
})
},
doSubmit(){
uni.showModal({
title: "提示",
content: !checkNotEmpty(this.form.id) ? "您确认提交该条报送数据?" : "您确认将该条数据进行修改?",
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中...',
mask: true
})
console.log('query--------------------',this.form)
this.$request(getApp().globalData.baseUrl + '/api/biz/winterPrevention/saveOrUpdate',this.form,'POST').then(res =>{
uni.hideLoading()
if (res.code == 200) {
uni.showToast({
title: "报送提交成功",
icon: "none",
success: () => {
if (this.form.id == undefined || this.isChangeTime) {
setTimeout(() => {
uni.redirectTo({
url: "/pages/safetySupervisionDepart/winterPrevention/list"
})
}, 300)
} else {
setTimeout(() => {
uni.navigateBack()
}, 300)
}
}
})
}
})
}
}
})
},
}
}
</script>
<style lang="scss" scoped>
.form_warp {
padding: 30rpx 30rpx 195rpx;
.form_intro {
color: #666;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
line-height: 48rpx;
text-align: center;
margin-bottom: 20rpx;
.tel {
color: #2D8CF0;
font-weight: bold;
}
}
.form_item_box {
padding: 30rpx 20rpx 30rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
margin-bottom: 40rpx;
.form_item_title {
color: #333;
line-height: 42rpx;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
.form_item_subtitle{
color: #333;
line-height: 42rpx;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
margin-bottom: 30rpx;
}
.form_item_remark {
margin-bottom: 30rpx;
.form_item_label {
// color: #333333;
// line-height: 42rpx;
// font-size: 30rpx;
// font-family: PingFang SC-Bold, PingFang SC;
// // font-weight: bold;
margin-bottom: 30rpx;
color: #666666;
font-size: 26rpx;
}
/deep/ .is-input-border{
border-radius: 20rpx !important;
border: 1px solid #c1c1c1 !important;
}
}
.form_item {
display: flex;
align-items: center;
justify-content: space-between;
line-height: 37rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-bottom: 30rpx;
.form_item_label {
width: 260rpx;
color: #666666;
font-size: 26rpx;
word-break: break-all;
}
.form_item_input {
color: #333;
text-align: right;
word-break: break-all;
&.picker {
flex: 1;
// display: flex;
// justify-content: space-between;
// /deep/ picker {
// flex: 1;
// }
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
//
&.text {
color: #333333;
line-height: 40rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
//
&.form_input {
/deep/ .is-input-border {
border: 0 !important;
.uni-easyinput__content-input {
height: 35rpx !important;
text-align: right;
}
}
/deep/ .uni-date-x--border {
border: 0 !important;
.uni-date__x-input {
// height: 35rpx !important;
text-align: right;
}
}
}
}
}
.form_item_line{
width: 100%;
height: 1px;
background:#E8E8E8;
margin: 40rpx 0;
}
}
.foot_btn {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 40rpx 30rpx;
background-color: #f5f5f5;
z-index: 11;
.act_btn {
width: 690rpx;
height: 90rpx;
color: #666666;
font-size: 28rpx;
line-height: 90rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
background: #F6F6F6;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
&.blue {
color: #fff;
background: #2D8CF0;
border-color: #2D8CF0;
}
}
}
}
</style>

@ -0,0 +1,471 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index">
<!-- <view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form', item)"> -->
<view class="list_top" @click="showDetail(item,!item.show)">
<view class="unit_tags">报送时间</view>
<view class="unit_name">
{{item.reportDate || ''}}
</view>
<view class="unit_arrow">
<uni-icons v-if="item.show" type="bottom" size="16" color="#666666"></uni-icons>
<uni-icons v-else type="right" size="16" color="#666666"></uni-icons>
</view>
</view>
<view class="list_cnt" v-if="item.show">
<view v-for="(item2,index2) in item.reportUnit" :key="index2" class="list_cnt_item"
@click="editItem(item,item2)">{{item2}}</view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:contentText="contentText"></uni-load-more>
<!-- 筛选 -->
<view class="foot_btn_box">
<!-- <view @click="goPage('/pages/highway/runData/form?type=add')" class="act_btn"><uni-icons type="plusempty" size="18"
color="#fff" style="margin-right: 9rpx;"></uni-icons></view> -->
<view @click="showSearch" class="act_btn btn1"><uni-icons type="search" size="18" color="#2D8CF0"
style="margin-right: 9rpx;"></uni-icons>
</view>
</view>
<!-- 筛选 -->
<uni-popup ref="popup" style="width: 100%;" background-color="none">
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons @click="this.$refs.popup.close()" type="closeempty" size="18" color="#666"
class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
统计时间
</view>
<view class="time_box">
<uni-datetime-picker v-model="query.reportDate" type="date" />
</view>
</view>
<view class="btn_box">
<p class="btn" @click="searchReset">重置</p>
<p class="btn" @click="searchList">确认</p>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default{
data(){
return{
data: [],
current:0,
size: 10,
hasMore: true,
status: '',
query: {
reportDate: '',
reportUnit:''
},
contentText: {
contentdown: "点击查看更多",
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了",
},
userInfo:{}
}
},
onShow(){
this.loadMore()
},
onLoad(){
this.userInfo = uni.getStorageSync('userInfo');
},
onUnload() {
this.hasMore = true;
this.data = [];
},
onPullDownRefresh() {
this.data = [];
this.current = 0;
this.hasMore = true;
this.loadMore();
},
methods:{
loadMore(){
if(this.hasMore){
this.current = this.current + 1
this.status = 'loading'
let form = {
pageNumber: this.current,
pageSize: this.size,
reportDate: this.query.reportDate,
reportUnit:this.userInfo.deptName
}
console.log('form-----------------',form)
// this.$request(getApp().globalData.baseUrl + '/api/biz/winterPrevention/list',form,"GET").then(res =>{
this.$request(getApp().globalData.baseUrl + '/api/biz/winterPrevention/getChaildList',form,"GET").then(res =>{
console.log('res-----------------',res)
if(res.code == 200){
res.data.list.map(item =>{
item.show = false
})
this.data = this.data.concat(res.data.list)
if(res.data.list.length == 0 || res.data.list.length < this.size){
this.hasMore = false
this.status = 'nomore'
}else{
this.status = 'more';
}
uni.stopPullDownRefresh();
}else{
this.status = 'more';
uni.stopPullDownRefresh();
}
})
}
},
//
showSearch() {
this.$refs.popup.open('bottom');
},
//
searchList() {
this.data = [];
this.current = 0;
this.hasMore = true;
this.$refs.popup.close();
uni.pageScrollTo({
scrollTop: 0
})
this.loadMore();
},
//
searchReset() {
this.timeRange = [];
this.query = {
reportDate:''
};
this.index = '';
},
//
showDetail(row,isShow){
if(isShow){
//
let idx = this.data.findIndex(item => item.show == true);
if (idx > -1) {
this.data[idx].show = false;
}
}
row.show = isShow
},
//
editItem(row, reportUnit) {
let param = {
reportDate: row.reportDate,
reportUnit: reportUnit,
}
console.log(param, 'paramparamparamparamparamparamparam')
uni.navigateTo({
url:"/pages/safetySupervisionDepart/winterPrevention/form?type=edit&item=" + JSON.stringify(param)
})
},
},
}
</script>
<style lang="scss" scoped>
.page {
min-height: 100vh;
padding: 30rpx 30rpx 195rpx;
}
.list_box {
background-color: #fff;
border-radius: 30rpx;
margin-bottom: 30rpx;
padding: 30rpx;
.list_top {
display: flex;
.unit_tags {
height: 37rpx;
line-height: 37rpx;
color: #E37616;
font-size: 20rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
background: #FFF7E4;
border-radius: 10rpx;
border: 1rpx solid #EF9A4F;
padding: 0 11rpx;
margin-right: 16rpx;
}
.unit_name {
flex: 1;
color: #333333;
font-size: 30rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: 400;
line-height: 48rpx;
margin-left: 20rpx;
word-break: break-all;
}
.unit_arrow {
float: right;
line-height: 48rpx;
}
}
//
.list_cnt {
border-top: 1rpx solid #F7F0EE;
margin-top: 30rpx;
.list_cnt_item {
color: #666666;
font-size: 30rpx;
line-height: 40rpx;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
margin-top: 30rpx;
}
}
.report_time {
color: #999999;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
text-align: center;
margin-bottom: 30rpx;
}
.unit_station {
color: #666;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
margin-top: 10rpx;
}
.list_item_box {
padding: 30rpx 30rpx 0;
background: #F8F8F8;
border-radius: 30rpx;
margin-bottom: 30rpx;
}
.list_item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0 30rpx;
.list_item_label {
width: 240rpx;
color: #666666;
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
}
.list_item_cnt {
flex: 1;
color: #333333;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 48rpx;
text-align: right;
margin-left: 20rpx;
word-break: break-all;
}
}
.list_item_shouqi {
color: #2D8CF0;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: center;
line-height: 33rpx;
padding-bottom: 30rpx;
.txt {
margin-left: 12rpx;
}
}
.act_btn_box {
display: flex;
flex-direction: row-reverse;
margin: 10rpx 0;
.act_btn {
width: 180rpx;
color: #666666;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
line-height: 70rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
text-align: center;
&.blue {
color: #fff;
background: #2D8CF0;
border-color: #2D8CF0;
}
}
}
}
.foot_btn_box {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background-color: #F8F8F8;
padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
height: 90rpx;
line-height: 88rpx;
display: flex;
justify-content: center;
color: #FFFFFF;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
background: #2D8CF0;
border-radius: 100rpx;
border: 1rpx solid #2D8CF0;
.txt {
margin-left: 9rpx;
}
&.btn1 {
color: #2D8CF0;
background: #F6F6F6;
}
}
}
.pop_box {
border-radius: 30rpx 30rpx 0 0;
background-color: #fff;
padding: 30rpx;
.pop_title {
color: #333333;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 45rpx;
text-align: center;
margin: 20rpx 0;
.pop_close {
float: right;
}
}
.popup-content {
// display: flex;
// flex-direction: column;
.cont_tit {
width: 100%;
color: #333333;
font-size: 26rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
line-height: 37rpx;
display: flex;
margin-bottom: 40rpx;
&.picker {
display: flex;
justify-content: space-between;
margin: 60rpx 0;
.picker_select {
color: #D4D4D4;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
text-align: right;
}
}
}
.time_box {
width: 690rpx;
margin: 0 auto;
/deep/ .uni-date-x--border {
border-radius: 30rpx;
.uni-date-x {
background: transparent;
.icon-calendar {
padding-left: 20rpx;
}
}
}
/deep/ .uni-date-editor--x .uni-date__icon-clear {
padding-right: 20rpx;
}
}
.picker_box {
width: 690rpx;
margin: 0 auto;
/deep/.input-value-border {
border-radius: 30rpx;
}
}
}
.btn_box {
width: 100%;
height: 120rpx;
display: flex;
margin-top: 20px;
align-items: center;
justify-content: space-between;
.btn {
width: 290rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 100rpx;
border: 1rpx solid #C1C1C1;
color: #666;
font-size: 28rpx;
line-height: 88rpx;
text-align: center;
&:last-child {
background: #2D8CF0;
color: #FFFFFF;
border-color: #2D8CF0;
}
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Loading…
Cancel
Save