搜索关闭事件补充;管理单位补充;bug修改

main
张群 3 years ago
parent 143427f4db
commit 7724d0565f
  1. 6
      pages/airport/airport-runData/form.vue
  2. 7
      pages/airport/airport-runData/list.vue
  3. 2
      pages/airport/airport-runStatus/form.vue
  4. 7
      pages/airport/airport-runStatus/list.vue
  5. 12
      pages/highWay/runData/form.vue
  6. 5
      pages/highWay/runData/list.vue
  7. 102
      pages/highWay/runStatusData/form.vue
  8. 5
      pages/highWay/runStatusData/list.vue
  9. 5
      pages/metro/runData/list.vue
  10. 5
      pages/portShipping/internationalTransport/list.vue
  11. 5
      pages/railway/railwayRunData/list.vue
  12. 5
      pages/railway/runStatus/list.vue
  13. 43
      pages/water/transportation/form.vue
  14. 5
      pages/water/transportation/list.vue
  15. 130
      pages/water/waterWay/form.vue
  16. 5
      pages/water/waterWay/list.vue

@ -349,7 +349,7 @@
<view class="form_item_remark">
<view class="form_item_label">备注</view>
<view class="form_item_input">
<uni-easyinput v-model="form.remark"
<uni-easyinput v-model="form.remarks"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
@ -409,7 +409,7 @@
"outboundPassengersTo" : '',//
"statDate" : "",
"statPeriod" : "",
"remark": ""
"remarks": ""
}, //form
array: [], //
index: 2, //,0-24
@ -433,7 +433,7 @@
this.queryTime();
} else if (options.id) {
this.btnText = '修改并保存';
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunData/find/' + options.id, {}, "GET")
this.$request(getApp().globalData.baseUrl + '/api/biz/airportRunData/getById/' + options.id, {}, "GET")
.then(
res => {
this.form = res.data;

@ -1,6 +1,6 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/airport/airport-runData/form', item)">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/airport/airport-runData/form?id='+item.id)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view>{{item.statDate || ''}}<text
@ -20,7 +20,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -124,6 +124,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -93,7 +93,7 @@
this.queryTime(); //
} if (options.id) {
this.btnText = '修改并保存';
this.$request(getApp().globalData.baseUrl+'/api/biz/railwayRunSituation/find//'+options.id,{},"GET").then(res => {
this.$request(getApp().globalData.baseUrl+'/api/biz/airportRunSituation/getById/'+options.id,{},"GET").then(res => {
this.form = res.data;
this.queryTime(); //
});

@ -1,6 +1,6 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/airport/airport-runStatus/form', item)">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/airport/airport-runStatus/form?id='+item.id)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view>{{item.statDate || ''}}<text
@ -20,7 +20,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -124,6 +124,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -214,7 +214,7 @@
<view class="form_item_remark">
<view class="form_item_label">备注</view>
<view class="form_item_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].mark"
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].remarks"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea"
maxlength="200" autoHeight></uni-easyinput>
</view>
@ -293,12 +293,12 @@
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/selectById/' + id, {},
'GET').then(res => {
this.form = res.data;
this.queryTime();
this.queryStation();
if (checkNotEmpty(this.deptNameList)) {
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.organizationName);
this.form.organizationNameIndex = idx > -1 ? idx : '';
}
this.queryTime();
this.queryStation();
})
},
//
@ -426,8 +426,8 @@
.parse(
new Date()), {}, 'GET').then(res => {
this.highwaySubDataList = res.data;
this.form.highwaySubDataList = [];
if (type == 'add') {
this.form.highwaySubDataList = [];
this.highwaySubDataList.map(item => {
item.isFinish = false;
this.form.highwaySubDataList.push({
@ -448,7 +448,7 @@
"tollExemptVehicleCountMom": 0.0,
"tollExemptVehicleCountYoy": 0.0,
"tollStationName": item.stationName,
"remark": '',
"remarks": '',
})
})
} else {
@ -483,7 +483,7 @@
"tollExemptVehicleCountMom": 0.0,
"tollExemptVehicleCountYoy": 0.0,
"tollStationName": item.stationName,
"remark": '',
"remarks": '',
})
}
})

@ -21,7 +21,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -125,6 +125,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -8,8 +8,14 @@
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">管理单位名称</view>
<view class="form_item_input select">
{{form.organizationName}}
<view class="form_item_input picker">
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.organizationNameIndex"
:range="deptNameList" range-key="deptName" @change="bindDeptChange">
<text class="picker_select"
:style="form.organizationName?'color:#333;':''">{{form.organizationName?form.organizationName:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{form.organizationName}}</text>
</view>
</view>
<view class="form_item">
@ -71,17 +77,17 @@
<view class="form_item">
<view class="form_item_label">是否有伤亡</view>
<view class="form_item_input form_input">
<uni-data-checkbox v-model="form.isHas" :localdata="[{text: '无', value: 0 }, { text: '有', value: 1 }]" @change="changeIsHas" />
<uni-data-checkbox v-model="form.isInjuredOrFatal" :localdata="[{text: '无', value: 0 }, { text: '有', value: 1 }]" @change="changeIsHas" />
</view>
</view>
<view class="form_item" v-if="form.isHas == 1">
<view class="form_item" v-if="form.isInjuredOrFatal == 1">
<view class="form_item_label">伤者人数</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.injuredCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" type="number" maxlength="30"></uni-easyinput>
</view>
</view>
<view class="form_item" v-if="form.isHas == 1">
<view class="form_item" v-if="form.isInjuredOrFatal == 1">
<view class="form_item_label">亡者人数</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="form.deceasedCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
@ -118,8 +124,11 @@
<view class="form_item_label">拥堵发生时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.congestionStartTime" :border="false" :hide-second="true" >
<text class="picker_select"
:style="item.congestionStartTime?'color:#333;':''">{{item.congestionStartTime?formatdate(item.congestionStartTime):'请选择'}}</text>
<uni-dateformat v-if="item.congestionStartTime" class="picker_select"
style="color:#333" :date="item.congestionStartTime" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
@ -128,8 +137,11 @@
<view class="form_item_label">拥堵处理结束时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.congestionEndTime" :border="false" :hide-second="true" >
<text class="picker_select"
:style="item.congestionEndTime?'color:#333;':''">{{item.congestionEndTime?formatdate(item.congestionEndTime):'请选择'}}</text>
<uni-dateformat v-if="item.congestionEndTime" class="picker_select"
style="color:#333" :date="item.congestionEndTime" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
@ -152,8 +164,16 @@
<view class="form_item">
<view class="form_item_label">阻断/拥堵持续时间</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.duration" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput>
<!-- <uni-easyinput v-model="item.duration" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput> -->
<uni-datetime-picker type="datetime" v-model="item.duration" :border="false" :hide-second="true" >
<uni-dateformat v-if="item.duration" class="picker_select"
style="color:#333" :date="item.duration" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
</view>
<view class="form_item">
@ -203,8 +223,11 @@
<view class="form_item_label">事故发生时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.accidentStartTime" :border="false" :hide-second="true" >
<text class="picker_select"
:style="item.accidentStartTime?'color:#333;':''">{{item.accidentStartTime?formatdate(item.accidentStartTime):'请选择'}}</text>
<uni-dateformat v-if="item.accidentStartTime" class="picker_select"
style="color:#333" :date="item.accidentStartTime" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
@ -213,8 +236,11 @@
<view class="form_item_label">事故处理结束时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.accidentEndTime" :border="false" :hide-second="true" >
<text class="picker_select"
:style="item.accidentEndTime?'color:#333;':''">{{item.accidentEndTime?formatdate(item.accidentEndTime):'请选择'}}</text>
<uni-dateformat v-if="item.accidentEndTime" class="picker_select"
style="color:#333" :date="item.accidentEndTime" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
@ -240,16 +266,24 @@
<picker :value="item.accidentLevelIndex" :range="accidentLevel" range-key="dictLabel"
@change="e => changeAccidentLevel(e, 'highwayAccidentDetailDTOS', index)">
<text class="picker_select"
:style="item.accidentLevelIndex?'color:#333;':''">{{item.accidentLevelIndex ? accidentLevel[item.accidentLevelIndex].dictLabel : '请选择'}}</text>
:style="item.accidentLevelIndex > -1?'color:#333;':''">{{item.accidentLevelIndex > -1 ? accidentLevel[item.accidentLevelIndex].dictLabel : '请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
</view>
</view>
<view class="form_item">
<view class="form_item_label">阻断/拥堵持续时间</view>
<view class="form_item_input form_input">
<uni-easyinput v-model="item.duration" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput>
<view class="form_item_input picker">
<!-- <uni-easyinput v-model="item.duration" placeholderStyle="color: #D4D4D4;font-size:28rpx;"
placeholder="请输入" maxlength="200"></uni-easyinput> -->
<uni-datetime-picker type="datetime" v-model="item.duration" :border="false" :hide-second="true" >
<uni-dateformat v-if="item.duration" class="picker_select"
style="color:#333" :date="item.duration" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
</view>
<view class="form_item">
@ -287,7 +321,7 @@
</template>
<script>
import {
getDateStr
getDateStr, checkNotEmpty
} from "../../../common/util.js"
export default {
data() {
@ -325,7 +359,8 @@
"isOpen": 1,
"organizationName": "",
"statDate": "",
"statPeriod": ""
"statPeriod": "",
"isInjuredOrFatal": 0,//
}, //form
highwayDataList: [], //
submitPerson: [], //
@ -344,15 +379,18 @@
tabType: 1, //
accidentLevel: [], //
pageType: '',
isHas: 0,//
deptNameList: [], //
btnText: '保存'
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
let arr = uni.getStorageSync('deptName');
this.deptNameList = checkNotEmpty(arr) ? arr : [];
if (options.type == 'add') {
this.pageType = 'add';
this.form.organizationName = this.userInfo.organizationName ? this.userInfo.organizationName : '';
this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : '';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.queryHighway(); //
@ -364,9 +402,14 @@
}
},
methods: {
//
bindDeptChange(e) {
this.form.organizationNameIndex = e.detail.value;
this.form.organizationName = this.deptNameList[e.detail.value].deptName;
},
//
changeIsHas(e) {
this.form.isHas = e.detail.value;
this.form.isInjuredOrFatal = e.detail.value;
if(e.detail.value === 0) {
//
this.form.injuredCount = 0;
@ -383,6 +426,10 @@
this.form = res.data;
this.form.highwayCongestionDetailDTOS = this.form.highwayCongestionDetailVOS;
this.form.highwayAccidentDetailDTOS = this.form.highwayAccidentDetailVOS;
if (checkNotEmpty(this.deptNameList)) {
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.organizationName);
this.form.organizationNameIndex = idx > -1 ? idx : '';
}
this.queryAccidentLevel(); //
this.queryHighway(); //
this.queryTime(); //
@ -421,9 +468,9 @@
},
//
changeAccidentLevel(e, key, index) {
console.log(key,e.detail.value);
this.form[key][index].accidentLevelIndex = e.detail.value;
this.form[key][index].accidentLevel = this.accidentLevel[e.detail.value].dictValue;
console.log(this.form[key][index])
},
//
changeStatPeriod(e) {
@ -473,8 +520,9 @@
Date.parse(
new Date()), {}, 'GET').then(res => {
this.accidentLevel = res.data.list;
this.form.highwayCongestionDetailDTOS.map(item => {
item.accidentLevelIndex = this.accidentLevel.findIndex(item2 => item2.dictValue == item.accidentLevel);
this.form.highwayAccidentDetailDTOS.map(item => {
let idx = this.accidentLevel.findIndex(item2 => item2.dictValue == item.accidentLevel);
item.accidentLevelIndex = idx > -1 ? idx : '';
})
})
},

@ -22,7 +22,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -126,6 +126,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -20,7 +20,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -124,6 +124,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -22,7 +22,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -126,6 +126,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -22,7 +22,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -126,6 +126,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -22,7 +22,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -126,6 +126,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -8,8 +8,14 @@
<view class="form_item_title">基本信息</view>
<view class="form_item">
<view class="form_item_label">管理单位名称</view>
<view class="form_item_input select">
{{form.affiliatedUnit}}
<view class="form_item_input picker">
<picker v-if="pageType == 'add' && deptNameList.length > 1" :value="form.affiliatedUnitIndex"
:range="deptNameList" range-key="deptName" @change="bindDeptChange">
<text class="picker_select"
:style="form.affiliatedUnit?'color:#333;':''">{{form.affiliatedUnit?form.affiliatedUnit:'请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{form.affiliatedUnit}}</text>
</view>
</view>
<view class="form_item">
@ -53,8 +59,11 @@
<view class="form_item_label">事故发生时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.accidentHappened" :border="false" :hide-second="true" >
<text class="picker_select"
:style="item.accidentHappened?'color:#333;':''">{{item.accidentHappened?formatdate(item.accidentHappened):'请选择'}}</text>
<uni-dateformat v-if="item.accidentHappened" class="picker_select"
style="color:#333" :date="item.accidentHappened" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
@ -96,8 +105,11 @@
<view class="form_item_label">事故处理结束时间</view>
<view class="form_item_input picker">
<uni-datetime-picker type="datetime" v-model="item.endTime" :border="false" :hide-second="true" >
<text class="picker_select"
:style="item.endTime?'color:#333;':''">{{item.endTime?formatdate(item.endTime):'请选择'}}</text>
<uni-dateformat v-if="item.endTime" class="picker_select"
style="color:#333" :date="item.endTime" format="yyyy-MM-dd hh:mm"></uni-dateformat>
<text v-else class="picker_select">
请选择
</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</uni-datetime-picker>
</view>
@ -137,7 +149,7 @@
} ],
"statDate" : "",
"statPeriod" : "",
"totalAccidents" : 0
"totalAccidents" : ""
}, //form
array: [], //
index: 2, //,0-24
@ -145,16 +157,21 @@
tabType: 1, //
// accidentLevel: [], //
pageType: '',
deptNameList: [], //
btnText: '保存'
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userInfo');
let arr = uni.getStorageSync('deptName');
this.deptNameList = checkNotEmpty(arr) ? arr : [];
if (options.type == 'add') {
this.pageType = 'add';
this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : '';
this.form.affiliatedUnit = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : '';
this.form.affiliatedUnitIndex = this.deptNameList.length > 0 ? 0 : '';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
console.log(this.form);
// this.queryAccidentLevel(); //
this.queryTime(); //
} else if (options.id) {
@ -163,6 +180,11 @@
}
},
methods: {
//
bindDeptChange(e) {
this.form.affiliatedUnitIndex = e.detail.value;
this.form.affiliatedUnit = this.deptNameList[e.detail.value].deptName;
},
formatdate(date) {
return date.length < 12 ? date + '00:00' : date;
},
@ -171,7 +193,10 @@
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunSituation/find/' + id, {},
'GET').then(res => {
this.form = res.data;
// this.queryAccidentLevel(); //
if (checkNotEmpty(this.deptNameList)) {
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.affiliatedUnit);
this.form.affiliatedUnitIndex = idx > -1 ? idx : '';
}
this.queryTime(); //
})
},

@ -20,7 +20,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -124,6 +124,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

@ -47,7 +47,7 @@
<view v-if='item.isFinish' class="tag">
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons>
</view>
{{item.stationId || ''}}
{{item.stationName || ''}}
</view>
<view v-if="index >= 9 && showLand" :style="(index+1)%3 == 0 ? 'margin-right:0;':''"
@click="changeLandNameIndex(index)" class="station_item"
@ -56,14 +56,13 @@
<view v-if='item.isFinish' class="tag">
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons>
</view>
{{item.stationId || ''}}
{{item.stationName || ''}}
</view>
</view>
<view class="form_item_box"
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 0 ? 'margin-top: 30rpx;' : ''">
<view class="form_item_box">
<!-- 陆岛 -->
<view class="form_item_li">
<view class="form_item" v-if="form.bizWaterwayIslandDataSaveOrUpdateDTOList.length > 1">
<view class="form_item">
<view class="form_item_label">水路(陆岛)</view>
<view class="form_item_input picker">
<!-- <picker :value="item.landNameIndex" :range="landList" @change="e => changeLandName(e, index)">
@ -71,13 +70,13 @@
:style="item.landName?'color:#333;':''">{{item.landName ? item.landName : '请选择'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker> -->
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList.length >= 0 ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].landName : ''}}
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex] ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].landName : ''}}
</view>
</view>
<view class="form_item">
<view class="form_item_label">航次</view>
<view class="form_item_input form_input">
<uni-easyinput @blur="calcYoyMom(landNameIndex)" type="number"
<uni-easyinput @blur="calcYoyMom(landNameIndex)" @clear="calcYoyMom(landNameIndex)" type="number"
v-model="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
@ -85,29 +84,29 @@
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage && form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage == form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayVoyage ? 'danger' : '' ">
:class="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio === 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage && form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage == form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayVoyage ? 'color: #EB4747' : ''">
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio === 0 ? 'color: #EB4747' : ''">
航次环比
</view>
<view class="rate_item_input"
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage && item.voyage == form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayVoyage ? 'color: #EB4747' : ''">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 0 ? '' : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio === 0 ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio) : '--'}}%
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio === 0 ? 'color: #EB4747' : ''">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex] ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio) : '--'}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">航次同比</view>
<view class="rate_item_input">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 0 ? '' : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageYearOnYear === 0 ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageYearOnYear : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageYearOnYear ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageYearOnYear) : '--'}}%
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex] ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageYearOnYear) : '--'}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">人数</view>
<view class="form_item_input form_input">
<uni-easyinput @blur="calcYoyMom(landNameIndex)" type="number"
<uni-easyinput @blur="calcYoyMom(landNameIndex)" @clear="calcYoyMom(landNameIndex)" type="number"
v-model="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入" maxlength="20">
</uni-easyinput>
@ -115,29 +114,29 @@
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople && form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople == form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayNumberOfPeople ? 'danger' : '' ">
:class="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio === 0 ? 'danger' : '' ">
<view class="rate_item">
<view class="rate_item_label"
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople && form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople == form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayNumberOfPeople ? 'color: #EB4747' : ''">
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio === 0 ? 'color: #EB4747' : ''">
人数环比
</view>
<view class="rate_item_input"
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople && form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople == form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayNumberOfPeople ? 'color: #EB4747' : ''">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 0 ? '' : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio === 0 ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio) : '--'}}%
:style="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio === 0 ? 'color: #EB4747' : ''">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex] ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio) : '--'}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">人数同比</view>
<view class="rate_item_input">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 0 ? '' : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleYearOnYear === 0 ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleYearOnYear : form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleYearOnYear ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleYearOnYear) : '--'}}%
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex] ? formatDigit(form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleYearOnYear) : '--'}}%
</view>
</view>
</view>
<view class="form_item_remark">
<view class="form_item_label">备注</view>
<view class="form_item_input">
<uni-easyinput v-model="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].remark"
<uni-easyinput v-model="form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].remarks"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200"
autoHeight></uni-easyinput>
</view>
@ -163,14 +162,27 @@
data() {
return {
form: {
"bizWaterwayIslandDataSaveOrUpdateDTOList": [],
"bizWaterwayIslandDataSaveOrUpdateDTOList": [{
"landName": "",
"lastYearNumberOfPeople": '',
"lastYearVoyage": '',
"numberOfPeople": '',
"peopleRingRatio": '',
"peopleYearOnYear": '',
"voyage": '',
"voyageRingRatio": '',
"voyageYearOnYear": '',
"yesterdayNumberOfPeople": '',
"yesterdayVoyage": '',
"remarks": ''
}],
"reportDate": "",
"statPeriod": ""
}, //form
array: [], //
index: 2, //,0-24
userInfo: {},
landList: ['灵山岛', '斋堂岛', '青黄线', '竹岔', '田横'],
landList: [],
landNameIndex: 0,
showLand: false,
pageType: '',
@ -198,28 +210,24 @@
},
methods: {
formatDigit(data) {
return (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data;
return !checkNotEmpty(data) ? '--' : (data+'').indexOf('.') > -1 && (data+'').substring((data+'').indexOf('.')).length > 2 ? data.toFixed(2) : data;
},
//
changeLandNameIndex(index) {
if (this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[this.landNameIndex].voyage != '' && this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[this.landNameIndex].numberOfPeople != '') {
this.landList[this.landNameIndex].isFinish = true;
} else {
this.landList[this.landNameIndex].isFinish = false;
}
this.landList[this.landNameIndex].isFinish = checkNotEmpty(this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[this.landNameIndex].voyage) && checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[this.landNameIndex].numberOfPeople) ? true : false;
this.landNameIndex = index;
console.log('landNameIndex', index)
},
//
queryLandList() {
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getByCurrentUserId', {}, 'GET').then(res => {
this.landList = res.data;
if (this.pageType == 'add') {
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = [];
this.landList.map(item => {
item.isFinish = false;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.push({
"landName": item.stationId,
"landName": item.stationName,
"lastYearNumberOfPeople": '',
"lastYearVoyage": '',
"numberOfPeople": '',
@ -230,14 +238,14 @@
"voyageYearOnYear": '',
"yesterdayNumberOfPeople": '',
"yesterdayVoyage": '',
"remark": ''
"remarks": ''
})
})
} else {
let arr = JSON.parse(JSON.stringify(this.form.bizWaterwayIslandDataSaveOrUpdateDTOList));
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = [];
this.landList.map(item => {
let idx = arr.findIndex(item2 => item2.landName == item.stationId);
let idx = arr.findIndex(item2 => item2.landName == item.stationName);
console.log(idx)
if (idx > -1) {
item.isFinish = checkNotEmpty(arr[idx].numberOfPeople) && checkNotEmpty(arr[idx].voyage) ? true :
@ -246,7 +254,7 @@
} else {
item.isFinish = false;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.push({
"landName": item.stationId,
"landName": item.stationName,
"lastYearNumberOfPeople": '',
"lastYearVoyage": '',
"numberOfPeople": '',
@ -257,7 +265,7 @@
"voyageYearOnYear": '',
"yesterdayNumberOfPeople": '',
"yesterdayVoyage": '',
"remark": ''
"remarks": ''
})
}
})
@ -281,51 +289,34 @@
}
},
//
calcYoyMom(landNameIndex) {
calcYoyMom(index) {
if (this.form.reportDate == '' || this.form.statPeriod == '' || this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].landName == '') {
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landName == '') {
return;
}
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].isFinish = checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyage) && checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].numberOfPeople) ? true : false;
this.landList[index].isFinish = checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyage) && checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].numberOfPeople) ? true : false;
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getYoyMom?statDate=' + this.form
.reportDate + '&statPeriod=' + this.form.statPeriod + '&landName=' + this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].landName + '&_t=' + Date.parse(new Date()), {},
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landName + '&_t=' + Date.parse(new Date()), {},
'GET')
.then(res => {
let yesterdayData = res.data.yesterdayData;
let lastYearData = res.data.lastYearData;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayVoyage = checkNotEmpty(
yesterdayData.voyage) ? yesterdayData.voyage : 0;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].lastYearVoyage = checkNotEmpty(
lastYearData.voyage) ? lastYearData.voyage : 0;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].yesterdayNumberOfPeople = checkNotEmpty(
yesterdayData.numberOfPeople) ? yesterdayData.numberOfPeople : 0;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].lastYearNumberOfPeople = checkNotEmpty(
lastYearData.numberOfPeople) ? lastYearData.numberOfPeople : 0;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].yesterdayVoyage = yesterdayData.voyage;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].lastYearVoyage = lastYearData.voyage;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].yesterdayNumberOfPeople = yesterdayData.numberOfPeople;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].lastYearNumberOfPeople = lastYearData.numberOfPeople;
//-
// ifelseifelseif===0===00esleif00100,else(-)/*100
let obj = this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex];
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageRingRatio = !checkNotEmpty(obj
.voyage) ? '' : !checkNotEmpty(yesterdayData.voyage) ? '' : yesterdayData.voyage === 0 && parseInt(obj
.voyage) === 0 ? 0 : yesterdayData.voyage === 0 && parseInt(obj.voyage) > 0 ? 100 : (parseInt(obj
.voyage) - yesterdayData.voyage) / yesterdayData.voyage * 100;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].voyageYearOnYear = !checkNotEmpty(obj
.voyage) ? '' : !checkNotEmpty(lastYearData.voyage) ? '' : lastYearData.voyage === 0 && parseInt(obj
.voyage) === 0 ? 0 : lastYearData.voyage === 0 && parseInt(obj.voyage) > 0 ? 100 : (parseInt(obj
.voyage) - lastYearData.voyage) / lastYearData.voyage * 100;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleRingRatio = !checkNotEmpty(obj
.numberOfPeople) ? '' : !checkNotEmpty(yesterdayData.numberOfPeople) ? '' : yesterdayData
.numberOfPeople === 0 && parseInt(obj.numberOfPeople) === 0 ? 0 : yesterdayData.numberOfPeople === 0 &&
parseInt(obj.numberOfPeople) > 0 ? 100 : (parseInt(obj.numberOfPeople) - yesterdayData.numberOfPeople) /
yesterdayData.numberOfPeople * 100;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].peopleYearOnYear = !checkNotEmpty(obj
.numberOfPeople) ? '' : !checkNotEmpty(lastYearData.numberOfPeople) ? '' : lastYearData
.numberOfPeople === 0 && parseInt(obj.numberOfPeople) === 0 ? 0 : lastYearData.numberOfPeople === 0 &&
parseInt(obj.numberOfPeople) > 0 ? 100 : (parseInt(obj.numberOfPeople) - lastYearData.numberOfPeople) /
lastYearData.numberOfPeople * 100;
console.log('环比同比', this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex])
// let obj = this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index];
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyageRingRatio = this.$calcMom(this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyage, yesterdayData.voyage);
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyageYearOnYear = this.$calcYoy(this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyage, lastYearData.voyage);
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].peopleRingRatio = this.$calcMom(this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].numberOfPeople, yesterdayData.numberOfPeople);
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].peopleYearOnYear = this.$calcYoy(this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].numberOfPeople, lastYearData.numberOfPeople);
// console.log('', this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index]);
this.$forceUpdate();
})
},
//id
@ -640,7 +631,7 @@
margin-top: 40rpx;
.station_item {
width: 175rpx;
width: 173rpx;
height: 60rpx;
color: #666666;
line-height: 60rpx;
@ -653,6 +644,7 @@
padding: 0 20rpx;
margin-bottom: 40rpx;
margin-right: 20rpx;
overflow: hidden;
&.active {
position: relative;

@ -20,7 +20,7 @@
<view class="pop_box">
<view class="pop_title">
查询条件
<uni-icons type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
<uni-icons @click="closeSearch" type="closeempty" size="18" color="#666" class="pop_close"></uni-icons>
</view>
<view class="popup-content">
<view class="cont_tit">
@ -124,6 +124,9 @@
showSearch() {
this.$refs.popup.open('bottom');
},
closeSearch() {
this.$refs.popup.close();
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(

Loading…
Cancel
Save