fix: 上传、短临图片
parent
bc98aca1a2
commit
ded3afbfbe
|
|
@ -219,7 +219,7 @@
|
|||
<div class="time">{{ imgHourstm[0] }} 至 {{ imgHourstm[1] }}</div>
|
||||
</div>
|
||||
<div class="imgs" style="height: 100%; text-align: center">
|
||||
<image :src="imgHours.url" mode="aspectFit"></image>
|
||||
<image :src="imgHoursList.url" mode="aspectFit"></image>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -373,7 +373,9 @@ export default {
|
|||
imgtm: moment().format('YYYYMMDD'),
|
||||
imgData: [],
|
||||
imgHours: '',
|
||||
imgHourstm: []
|
||||
imgHourstm: [],
|
||||
imgHoursList: {},
|
||||
interval: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -429,12 +431,12 @@ export default {
|
|||
icon: '../../static/tabs/water2.png',
|
||||
url: '/pages/water/water'
|
||||
},
|
||||
{
|
||||
value: '工情灾情',
|
||||
key: 3,
|
||||
icon: '../../static/tabs/gongqing2.png',
|
||||
url: '/pages/gqzq/index'
|
||||
},
|
||||
// {
|
||||
// value: '工情灾情',
|
||||
// key: 3,
|
||||
// icon: '../../static/tabs/gongqing2.png',
|
||||
// url: '/pages/gqzq/index'
|
||||
// },
|
||||
{
|
||||
value: '调令反馈',
|
||||
key: 5,
|
||||
|
|
@ -476,7 +478,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async getImgs () {
|
||||
uni.request({
|
||||
let h = moment().format('HH')
|
||||
let m = moment().format('mm')
|
||||
await uni.request({
|
||||
url: 'http://223.75.53.124:8005/grb/rainimglist',
|
||||
data: {
|
||||
tm: `${this.imgtm}08`
|
||||
|
|
@ -484,18 +488,57 @@ export default {
|
|||
success: res => {
|
||||
console.log(res.data.data)
|
||||
this.imgList = res.data.data
|
||||
let h = moment().format('HH') - 1
|
||||
let inx = restm(h)
|
||||
|
||||
this.imgHours = res.data.data.imgHours[inx]
|
||||
// let inx = restm(h)
|
||||
|
||||
let tm = moment().subtract(1, 'days').format('MM月DD日')
|
||||
// this.imgHours = res.data.data.imgHours[inx]
|
||||
|
||||
let tm = moment().add(1, 'days').format('MM月DD日')
|
||||
let tm2 = moment().format('MM月DD日')
|
||||
this.imgData = [`${tm}08时`, `${tm2}08时`]
|
||||
this.imgHourstm = [`${tm2}${h}时`, `${tm2}${h + 1}时`]
|
||||
this.imgData = [`${tm2}08时`, `${tm}08时`]
|
||||
// this.imgHourstm = [`${tm2}${h + 1}时`, `${tm2}${h + 2}时`]
|
||||
}
|
||||
})
|
||||
},
|
||||
async getHoursImg () {
|
||||
let h = moment().format('HH')
|
||||
let m = moment().format('mm')
|
||||
console.log('hhh--', h, m)
|
||||
let tms = null,
|
||||
mm = null
|
||||
let h1 = Number(h) - 1
|
||||
if (m > 30) {
|
||||
tms = `${this.imgtm}${h1}30`
|
||||
mm = '30'
|
||||
} else if (m < 10) {
|
||||
tms = `${this.imgtm}${h1}00`
|
||||
mm = '00'
|
||||
} else {
|
||||
tms = `${this.imgtm}${h1}30`
|
||||
mm = '30'
|
||||
}
|
||||
uni.request({
|
||||
url: 'https://shqxjs.cloudowr.cn/service/radar/rainimg',
|
||||
data: {
|
||||
tm: tms
|
||||
},
|
||||
success: res => {
|
||||
console.log('000000', tms, res.data.data)
|
||||
this.imgHoursList = res.data.data.img
|
||||
|
||||
let m = moment().format('MM月DD日')
|
||||
|
||||
console.log('am222', this.imgHoursList)
|
||||
|
||||
this.imgHourstm = [`${m}${h1}时${mm}分`, `${m}${h1 + 2}时${mm}分`]
|
||||
}
|
||||
})
|
||||
},
|
||||
async getInterval () {
|
||||
this.interval = setInterval(() => {
|
||||
this.getHoursImg()
|
||||
}, 60 * 1000)
|
||||
},
|
||||
async getYjRead () {
|
||||
try {
|
||||
const { data } = await uni.$http.get(
|
||||
|
|
@ -575,6 +618,7 @@ export default {
|
|||
}
|
||||
)
|
||||
if (data.code == 200) {
|
||||
console.log('rainChartData0,', data)
|
||||
this.rainChartData = data.data
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -744,12 +788,19 @@ export default {
|
|||
this.getDataTime()
|
||||
this.getResponseLevel()
|
||||
this.getImgs()
|
||||
this.getHoursImg()
|
||||
this.getInterval()
|
||||
},
|
||||
|
||||
onShow () {
|
||||
this.getReadStatus()
|
||||
if (this.limit == 1) {
|
||||
this.getYjRead()
|
||||
}
|
||||
},
|
||||
onUnload () {
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -51,3 +51,14 @@ export function restm (e) {
|
|||
}
|
||||
return index
|
||||
}
|
||||
export const adnmZhen = adcd => {
|
||||
if (!adcd || !nameMap) {
|
||||
return undefined
|
||||
}
|
||||
if (adcd.endsWith('000000000')) {
|
||||
return undefined
|
||||
} else if (adcd.endsWith('000000')) {
|
||||
return nameMap[adcd]
|
||||
}
|
||||
return nameMap[`${adcd.substr(0, 9)}000000`]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@
|
|||
<script>
|
||||
import moment from 'moment'
|
||||
import newmap from './map.vue'
|
||||
const adcd = uni.getStorageSync('value').adcd
|
||||
export default {
|
||||
name: 'dsfrom',
|
||||
components: {
|
||||
|
|
@ -341,6 +342,7 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
isMap: false,
|
||||
adcd,
|
||||
showTextTypeTab: 1,
|
||||
activeType: '',
|
||||
valueTime2: Number(moment()),
|
||||
|
|
@ -438,6 +440,7 @@ export default {
|
|||
onLoad (options) {
|
||||
this.key = options.key
|
||||
console.log('搜索框22', options.key)
|
||||
console.log('adcd', this.adcd)
|
||||
|
||||
this.getresList()
|
||||
},
|
||||
|
|
@ -607,7 +610,7 @@ export default {
|
|||
} else if (this.formList.severity == '特别重大险情') {
|
||||
params.severity = 4
|
||||
}
|
||||
params.adcd = ''
|
||||
// params.adcd = ''
|
||||
|
||||
if (this.fileList1.length > 0) {
|
||||
params.fileId = this.fileList1.map(item => {
|
||||
|
|
|
|||
|
|
@ -268,6 +268,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { adnmZhen } from '../utils/tool'
|
||||
import { disType } from '../utils/dicType.js'
|
||||
const adcd = uni.getStorageSync('value').adcd
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
|
|
@ -276,6 +279,7 @@ export default {
|
|||
isSk: true,
|
||||
resList: [],
|
||||
key: '',
|
||||
adcd,
|
||||
title: {
|
||||
1: '运行情况上报',
|
||||
2: '工程险情上报',
|
||||
|
|
@ -366,7 +370,18 @@ export default {
|
|||
let res = null
|
||||
this.resList = []
|
||||
res = await uni.$http.get('/gunshiApp/xfflood/webi/resList')
|
||||
this.resList = res.data.data.map(item => {
|
||||
// console.log('res', adcd.endsWith('000000000'))
|
||||
console.log('res---', this.adcd)
|
||||
let list = res.data.data.filter(item => {
|
||||
if (this.adcd.endsWith('000000000')) {
|
||||
return item
|
||||
} else {
|
||||
return item.adcd == this.adcd
|
||||
}
|
||||
})
|
||||
|
||||
console.log('listlist---', list)
|
||||
this.resList = list.map(item => {
|
||||
item.isShow = false
|
||||
|
||||
return item
|
||||
|
|
@ -376,8 +391,14 @@ export default {
|
|||
async gethystList () {
|
||||
this.resList = []
|
||||
let res = await uni.$http.get('/gunshiApp/xfflood/webi/hystList')
|
||||
console.log('res', res.data.data)
|
||||
this.resList = res.data.data.map(item => {
|
||||
let list = res.data.data.filter(item => {
|
||||
if (this.adcd.endsWith('000000000')) {
|
||||
return item
|
||||
} else {
|
||||
return item.adcd == this.adcd
|
||||
}
|
||||
})
|
||||
this.resList = list.map(item => {
|
||||
item.isShow = false
|
||||
item.resName = item.hystName
|
||||
|
||||
|
|
@ -482,12 +503,6 @@ export default {
|
|||
},
|
||||
|
||||
open () {},
|
||||
groupChange (n) {
|
||||
// console.log('groupChange', n);
|
||||
},
|
||||
radioChange (n) {
|
||||
// console.log('radioChange', n);
|
||||
},
|
||||
navigateBack () {
|
||||
uni.navigateBack()
|
||||
},
|
||||
|
|
@ -516,7 +531,6 @@ export default {
|
|||
this.$refs.form1
|
||||
.validate()
|
||||
.then(res => {
|
||||
debugger
|
||||
console.log('文件', this.fileId)
|
||||
|
||||
let params = this.model1
|
||||
|
|
@ -527,8 +541,10 @@ export default {
|
|||
|
||||
console.log('参数', params)
|
||||
|
||||
if (this.fileId != '') {
|
||||
params.fileId = [this.fileId]
|
||||
if (this.fileList1.length > 0) {
|
||||
params.fileId = this.fileList1.map(item => {
|
||||
return JSON.parse(item.url).data.fileId
|
||||
})
|
||||
}
|
||||
|
||||
uni.$http
|
||||
|
|
@ -537,11 +553,17 @@ export default {
|
|||
console.log('this.model1---', res)
|
||||
if (res.data.code == 200) {
|
||||
console.log('this.model122', res.data)
|
||||
uni.reLaunch({
|
||||
url: '/pages/xxsb/index'
|
||||
uni.navigateTo({
|
||||
url: `./index`
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.model1.isPowerGeneration =
|
||||
params.isPowerGeneration == 1 ? '是' : '否'
|
||||
this.model1.isFloodRelease =
|
||||
params.isPowerGeneration == 1 ? '是' : '否'
|
||||
})
|
||||
})
|
||||
.catch(errors => {
|
||||
uni.$u.toast('校验失败', errors)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
</u-form-item>
|
||||
<u-form-item
|
||||
label="严重程度"
|
||||
prop="severityList"
|
||||
prop="severity"
|
||||
:borderBottom="false"
|
||||
@click="
|
||||
isseverity = true
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
<u-popup
|
||||
:show="isName"
|
||||
@close="isName = false"
|
||||
mode="right"
|
||||
mode="bottom"
|
||||
@open="open"
|
||||
>
|
||||
<view style="padding: 30px 20px">
|
||||
|
|
@ -252,9 +252,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
const adcd = uni.getStorageSync('value').adcd
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
adcd,
|
||||
showTextTypeTab: 1,
|
||||
activeType: '',
|
||||
isSk: true,
|
||||
|
|
@ -321,6 +323,14 @@ export default {
|
|||
message: '请选择工程名称',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
severity: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择严重程度',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
},
|
||||
projectType: 1,
|
||||
|
|
@ -343,7 +353,14 @@ export default {
|
|||
let res = null
|
||||
this.resList = []
|
||||
res = await uni.$http.get('/gunshiApp/xfflood/webi/resList')
|
||||
this.resList = res.data.data.map(item => {
|
||||
let list = res.data.data.filter(item => {
|
||||
if (this.adcd.endsWith('000000000')) {
|
||||
return item
|
||||
} else {
|
||||
return item.adcd == this.adcd
|
||||
}
|
||||
})
|
||||
this.resList = list.map(item => {
|
||||
item.isShow = false
|
||||
|
||||
return item
|
||||
|
|
@ -353,8 +370,15 @@ export default {
|
|||
async gethystList () {
|
||||
this.resList = []
|
||||
let res = await uni.$http.get('/gunshiApp/xfflood/webi/hystList')
|
||||
let list = res.data.data.filter(item => {
|
||||
if (this.adcd.endsWith('000000000')) {
|
||||
return item
|
||||
} else {
|
||||
return item.adcd == this.adcd
|
||||
}
|
||||
})
|
||||
console.log('res', res.data.data)
|
||||
this.resList = res.data.data.map(item => {
|
||||
this.resList = list.map(item => {
|
||||
item.isShow = false
|
||||
item.resName = item.hystName
|
||||
|
||||
|
|
|
|||
|
|
@ -79,13 +79,14 @@ export default {
|
|||
console.log('lnglatlnglat', self.lnglat, res)
|
||||
console.log('地址', res.address)
|
||||
if (res.address) {
|
||||
console.log('地址', res.address.province)
|
||||
self.address =
|
||||
res.address.province +
|
||||
res.address.city +
|
||||
res.address.district +
|
||||
res.address.street +
|
||||
res.address.poiName
|
||||
console.log('地址', res.address)
|
||||
self.address = res.address.city
|
||||
? res.address.city
|
||||
: '' + res.address.district
|
||||
? res.address.district
|
||||
: '' + res.address.street
|
||||
? res.address.street
|
||||
: ''
|
||||
console.log('地址', self.address)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue