|
@@ -1,32 +1,36 @@
|
|
|
<template>
|
|
|
<view class="uni-container uni-container-bg">
|
|
|
<view class="example container" :style="'height: ' + (screenHeight - wheight - 75) + 'px'">
|
|
|
- <view class="event">
|
|
|
- <view class="event-title">事件时间</view>
|
|
|
- <uni-datetime-picker class="time-item-check" type="date" :clear-icon="false":disabled="isview" v-model="eventTime"
|
|
|
- @maskClick="startMaskClick" placeholder="请选择事件时间" />
|
|
|
- <view class="content">
|
|
|
- <view class="event-title">出动人数</view>
|
|
|
- <u-input v-model="eventPeples" placeholder="请输入出动人数" :maxlength="1000" :disabled="isview" count height="150">
|
|
|
- </u-input>
|
|
|
- </view>
|
|
|
- <view class="content">
|
|
|
- <view class="event-title">燃烧面积</view>
|
|
|
- <u-input v-model="burnArea" placeholder="请输入燃烧面积" :maxlength="1000" :disabled="isview" count height="150">
|
|
|
- </u-input>
|
|
|
- </view>
|
|
|
- <view class="content">
|
|
|
- <view class="event-title">过火面积</view>
|
|
|
- <u-input v-model="fireArea" placeholder="请输入过火面积" :maxlength="1000" :disabled="isview" count height="150">
|
|
|
- </u-input>
|
|
|
- </view>
|
|
|
- <view class="content" style="margin-bottom: 60rpx;">
|
|
|
- <view class="event-title">事件内容</view>
|
|
|
- <u--textarea v-model="eventContent" placeholder="请输入内容" :disabled="isview" :maxlength="1000" count height="150">
|
|
|
- </u--textarea >
|
|
|
+ <view class="event">
|
|
|
+ <view class="event-title"> <text class="xinghao">*</text>事件时间</view>
|
|
|
+ <uni-datetime-picker class="time-item-check" type="date" :clear-icon="false" :disabled="isview"
|
|
|
+ v-model="eventTime" @maskClick="startMaskClick" placeholder="请选择事件时间" />
|
|
|
+ <view class="content">
|
|
|
+ <view class="event-title"> <text class="xinghao">*</text>出动人数</view>
|
|
|
+ <u-input v-model="eventPeples" placeholder="请输入出动人数" :maxlength="1000" :disabled="isview" count
|
|
|
+ height="150">
|
|
|
+ </u-input>
|
|
|
+ </view>
|
|
|
+ <view class="content">
|
|
|
+ <view class="event-title"> <text class="xinghao">*</text>燃烧面积</view>
|
|
|
+ <u-input v-model="burnArea" placeholder="请输入燃烧面积" :maxlength="1000" :disabled="isview" count
|
|
|
+ height="150">
|
|
|
+ </u-input>
|
|
|
+ </view>
|
|
|
+ <view class="content">
|
|
|
+ <view class="event-title"> <text class="xinghao">*</text>过火面积</view>
|
|
|
+ <u-input v-model="fireArea" placeholder="请输入过火面积" :maxlength="1000" :disabled="isview" count
|
|
|
+ height="150">
|
|
|
+ </u-input>
|
|
|
+ </view>
|
|
|
+ <view class="content" style="margin-bottom: 60rpx;">
|
|
|
+ <view class="event-title"> <text class="xinghao">*</text>事件内容</view>
|
|
|
+ <u--textarea v-model="eventContent" placeholder="请输入内容" :disabled="isview" :maxlength="1000" count
|
|
|
+ height="150">
|
|
|
+ </u--textarea>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
<view class="bottons heigthButton" v-if="!isview">
|
|
|
<view class="buttons-item">
|
|
|
<u-button shape="circle" type="primary" text="取消"
|
|
@@ -57,18 +61,18 @@
|
|
|
eventTime: '',
|
|
|
riliicon: riliicon,
|
|
|
isEditId: false,
|
|
|
- eventPeples:'',//出动人数
|
|
|
- burnArea:"",//燃烧面积
|
|
|
- fireArea:'',//过火面积
|
|
|
- runId:'',
|
|
|
- isview:false
|
|
|
+ eventPeples: '', //出动人数
|
|
|
+ burnArea: "", //燃烧面积
|
|
|
+ fireArea: '', //过火面积
|
|
|
+ runId: '',
|
|
|
+ isview: false
|
|
|
}
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
- if(option.isview=="isview"){
|
|
|
- this.isview=true
|
|
|
+ if (option.isview == "isview") {
|
|
|
+ this.isview = true
|
|
|
}
|
|
|
- this.runId=option.runId
|
|
|
+ this.runId = option.runId
|
|
|
if (option.id) {
|
|
|
this.isEditId = option.id
|
|
|
getOneMicrostation({
|
|
@@ -76,10 +80,10 @@
|
|
|
}).then(reponse => {
|
|
|
this.eventTime = reponse.data.eventTime
|
|
|
this.eventContent = reponse.data.eventContent
|
|
|
- this.eventPeples=reponse.data.eventPeples,//出动人数
|
|
|
- this.burnArea=reponse.data.burnArea,//燃烧面积
|
|
|
- this.fireArea=reponse.data.fireArea,//过火面积
|
|
|
- console.log(reponse, 'opt');
|
|
|
+ this.eventPeples = reponse.data.eventPeples, //出动人数
|
|
|
+ this.burnArea = reponse.data.burnArea, //燃烧面积
|
|
|
+ this.fireArea = reponse.data.fireArea, //过火面积
|
|
|
+ console.log(reponse, 'opt');
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -90,22 +94,19 @@
|
|
|
},
|
|
|
methods: {
|
|
|
submit() {
|
|
|
- console.log(this.runId,'this.runIdthis.runId');
|
|
|
+ console.log(this.runId, 'this.runIdthis.runId');
|
|
|
const that = this
|
|
|
- if (!this.eventContent) {
|
|
|
- return this.$modal.msgError('请填写事件内容')
|
|
|
- }
|
|
|
- if (!this.eventTime) {
|
|
|
- return this.$modal.msgError('请选择事件时间')
|
|
|
+ if (!this.eventPeples || !this.eventTime || !this.eventContent || !this.burnArea || !this.fireArea) {
|
|
|
+ return this.$modal.msgError('未填写必填项')
|
|
|
}
|
|
|
if (!this.isEditId) {
|
|
|
createStationEvent({
|
|
|
eventContent: this.eventContent,
|
|
|
eventTime: this.eventTime + '',
|
|
|
- eventPeples:this.eventPeples,//出动人数
|
|
|
- burnArea:this.burnArea,//燃烧面积
|
|
|
- fireArea:this.fireArea,//过火面积
|
|
|
- microstationid:this.runId
|
|
|
+ eventPeples: this.eventPeples, //出动人数
|
|
|
+ burnArea: this.burnArea, //燃烧面积
|
|
|
+ fireArea: this.fireArea, //过火面积
|
|
|
+ microstationid: this.runId
|
|
|
}).then(reponse => {
|
|
|
that.$modal.msg('保存成功')
|
|
|
setTimeout(() => {
|
|
@@ -118,10 +119,10 @@
|
|
|
eventContent: this.eventContent,
|
|
|
eventTime: this.eventTime + '',
|
|
|
id: this.isEditId,
|
|
|
- eventPeples:this.eventPeples,//出动人数
|
|
|
- burnArea:this.burnArea,//燃烧面积
|
|
|
- fireArea:this.fireArea,//过火面积
|
|
|
- microstationid:this.runId
|
|
|
+ eventPeples: this.eventPeples, //出动人数
|
|
|
+ burnArea: this.burnArea, //燃烧面积
|
|
|
+ fireArea: this.fireArea, //过火面积
|
|
|
+ microstationid: this.runId
|
|
|
}).then(reponse => {
|
|
|
that.$modal.msg('编辑成功')
|
|
|
setTimeout(() => {
|
|
@@ -207,10 +208,17 @@
|
|
|
bottom: 30rpx;
|
|
|
right: 0;
|
|
|
}
|
|
|
- /deep/ .u-input{
|
|
|
+
|
|
|
+ /deep/ .u-input {
|
|
|
background: #fff;
|
|
|
}
|
|
|
+
|
|
|
.example {
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
+
|
|
|
+ .xinghao {
|
|
|
+ color: red;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ }
|
|
|
</style>
|