From ba009f0da30869b59790db9314985b805388ae6f Mon Sep 17 00:00:00 2001 From: zhanglin Date: Mon, 24 Jun 2024 09:56:50 +0800 Subject: [PATCH] fix() --- pages/homeIndex/index.vue | 42 +++-- pages/login/login.vue | 350 ++++++++++++++++++++------------------ pages/xxsb/dsfrom.vue | 35 ++-- pages/xxsb/from.vue | 20 ++- pages/xxsb/map.vue | 2 +- 5 files changed, 244 insertions(+), 205 deletions(-) diff --git a/pages/homeIndex/index.vue b/pages/homeIndex/index.vue index 13fdf98..ac78d14 100644 --- a/pages/homeIndex/index.vue +++ b/pages/homeIndex/index.vue @@ -219,7 +219,11 @@
{{ imgHourstm[0] }} 至 {{ imgHourstm[1] }}
- +
@@ -229,7 +233,7 @@

雨情

-
+
-
+
水情

-
+
30) { - tms = `${this.imgtm}${h1}30` + h1 = Number(h) - 1 + tms = `${this.imgtm}${h}30` mm = '30' } else if (m < 10) { - tms = `${this.imgtm}${h1}00` + tms = `${this.imgtm}${h1}` mm = '00' } else { tms = `${this.imgtm}${h1}30` mm = '30' } + + console.log('ddddd', h, h1) + console.log('ddddd', tms) uni.request({ url: 'https://shqxjs.cloudowr.cn/service/radar/rainimg', data: { @@ -529,8 +547,8 @@ export default { let m = moment().format('MM月DD日') console.log('am222', this.imgHoursList) - - this.imgHourstm = [`${m}${h1}时${mm}分`, `${m}${h1 + 2}时${mm}分`] + let m1 = Number(h1) + 2 + this.imgHourstm = [`${m}${h1}时${mm}分`, `${m}${m1}时${mm}分`] } }) }, @@ -787,15 +805,15 @@ export default { this.getOverview() this.getDataTime() this.getResponseLevel() - this.getImgs() - this.getHoursImg() - this.getInterval() }, onShow () { this.getReadStatus() if (this.limit == 1) { this.getYjRead() + this.getInterval() + this.getImgs() + this.getHoursImg() } }, onUnload () { diff --git a/pages/login/login.vue b/pages/login/login.vue index 683f636..7e11189 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -1,178 +1,192 @@ diff --git a/pages/xxsb/dsfrom.vue b/pages/xxsb/dsfrom.vue index 5fc493a..8da2e3b 100644 --- a/pages/xxsb/dsfrom.vue +++ b/pages/xxsb/dsfrom.vue @@ -15,8 +15,8 @@ { uni.$u.toast('校验通过', res) - debugger let params = Object.assign(this.formList) // 严重程度(1一般险情 2较大险情 3重大险情 4特别重大险情 if (this.formList.severity == '一般险情') { @@ -635,11 +640,11 @@ export default { // 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true }, reset () { - const validateList = ['projectName', 'radiovalue1'] - this.$refs.form1.resetFields() - this.$refs.form1.clearValidate() + const validateList = ['otime', 'severity', 'address'] + this.$refs.form3.resetFields() + this.$refs.form3.clearValidate() setTimeout(() => { - this.$refs.form1.clearValidate(validateList) + this.$refs.form3.clearValidate(validateList) // 或者使用 this.$refs.form1.clearValidate() }, 10) }, diff --git a/pages/xxsb/from.vue b/pages/xxsb/from.vue index 73d87a5..5554a2e 100644 --- a/pages/xxsb/from.vue +++ b/pages/xxsb/from.vue @@ -504,7 +504,9 @@ export default { open () {}, navigateBack () { - uni.navigateBack() + uni.reLaunch({ + url: '/pages/xxsb/index' + }) }, // 是否发电 sexSelect (e) { @@ -539,14 +541,14 @@ export default { params.isPowerGeneration = params.isPowerGeneration == '是' ? 1 : 0 params.isFloodRelease = params.isFloodRelease == '是' ? 1 : 0 - console.log('参数', params) - if (this.fileList1.length > 0) { - params.fileId = this.fileList1.map(item => { + params.fileIds = this.fileList1.map(item => { return JSON.parse(item.url).data.fileId }) + } else { + params.fileIds = [] } - + console.log('参数', params) uni.$http .post('/gunshiApp/xfflood/xfProjectRun/insert', params) .then(res => { @@ -559,10 +561,10 @@ export default { } }) .catch(e => { - this.model1.isPowerGeneration = - params.isPowerGeneration == 1 ? '是' : '否' - this.model1.isFloodRelease = - params.isPowerGeneration == 1 ? '是' : '否' + // this.model1.isPowerGeneration = + // params.isPowerGeneration == 1 ? '是' : '否' + // this.model1.isFloodRelease = + // params.isPowerGeneration == 1 ? '是' : '否' }) }) .catch(errors => { diff --git a/pages/xxsb/map.vue b/pages/xxsb/map.vue index 90d0598..a69a348 100644 --- a/pages/xxsb/map.vue +++ b/pages/xxsb/map.vue @@ -2,7 +2,7 @@