Compare commits
10 Commits
ac8ac04469
...
42a48ac3b3
| Author | SHA1 | Date |
|---|---|---|
|
|
42a48ac3b3 | |
|
|
3bf4926b5d | |
|
|
128cfe4b90 | |
|
|
ab854f6499 | |
|
|
9816790316 | |
|
|
44fcf985fe | |
|
|
6f5a19fda7 | |
|
|
fcd2767b40 | |
|
|
61387d7a12 | |
|
|
59ba1069ae |
38
main.js
38
main.js
|
|
@ -3,16 +3,30 @@ import Vue from 'vue'
|
||||||
import uView from '@/uni_modules/uview-ui'
|
import uView from '@/uni_modules/uview-ui'
|
||||||
Vue.use(uView)
|
Vue.use(uView)
|
||||||
import App from './App'
|
import App from './App'
|
||||||
import { $http } from '@escook/request-miniprogram'
|
import {
|
||||||
|
$http
|
||||||
|
} from '@escook/request-miniprogram'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
uni.$http = $http
|
uni.$http = $http
|
||||||
$http.baseUrl = 'http://local.gunshiiot.com:18083'
|
// $http.baseUrl = 'http://local.gunshiiot.com:18083'
|
||||||
|
$http.baseUrl = 'http://36.139.207.50:18083'
|
||||||
// 请求拦截器
|
// 请求拦截器
|
||||||
$http.beforeRequest = function (options) {
|
$http.beforeRequest = function(options) {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
title: '数据加载中'
|
// title: '数据加载中'
|
||||||
})
|
// })
|
||||||
|
// if (
|
||||||
|
// options.url.indexOf('/gunshiApp/xfflood/doLogin') == -1
|
||||||
|
// && options.url.indexOf('/gunshiApp/xfflood/getLoginInfo') == -1
|
||||||
|
// && options.url.indexOf('/gunshiApp/xfflood/my/info/getByUserId') == -1
|
||||||
|
// && options.url.indexOf('/gunshiApp/xfflood/bzProjectManipulationRecord/file/get/') == -1
|
||||||
|
// ) {
|
||||||
|
// // uni.showLoading({
|
||||||
|
// // title: '数据加载中'
|
||||||
|
// // })
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
if (options.url.indexOf('/doLogin') == -1) {
|
if (options.url.indexOf('/doLogin') == -1) {
|
||||||
options.header = {
|
options.header = {
|
||||||
|
|
@ -21,10 +35,10 @@ $http.beforeRequest = function (options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
$http.afterRequest = function (options) {
|
$http.afterRequest = function(options) {
|
||||||
uni.hideLoading()
|
// uni.hideLoading()
|
||||||
}
|
}
|
||||||
uni.$showMsg = function (title = '数据请求失败了', duration = 1500) {
|
uni.$showMsg = function(title = '数据请求失败了', duration = 1500) {
|
||||||
return uni.showToast({
|
return uni.showToast({
|
||||||
title,
|
title,
|
||||||
duration,
|
duration,
|
||||||
|
|
@ -41,9 +55,11 @@ app.$mount()
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef VUE3
|
// #ifdef VUE3
|
||||||
import { createSSRApp } from 'vue'
|
import {
|
||||||
|
createSSRApp
|
||||||
|
} from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
export function createApp () {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
return {
|
return {
|
||||||
app
|
app
|
||||||
|
|
|
||||||
10
pages.json
10
pages.json
|
|
@ -19,7 +19,15 @@
|
||||||
{
|
{
|
||||||
"path": "pages/homeIndex/index",
|
"path": "pages/homeIndex/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"app-plus": {
|
||||||
|
"pullToRefresh": {
|
||||||
|
"support": true,
|
||||||
|
"style": "default",
|
||||||
|
"offset": "70px"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getSearch(this.keyword)
|
this.getSearch(this.keyword)
|
||||||
|
this.setInsert()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getHighlight(val) {
|
getHighlight(val) {
|
||||||
|
|
@ -184,8 +185,20 @@
|
||||||
uni.$showMsg()
|
uni.$showMsg()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
async setInsert () {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
createId: uni.getStorageSync('value').userId,
|
||||||
|
loginType:1,
|
||||||
|
menu1:'通讯录',
|
||||||
|
menu2:'通讯录',
|
||||||
}
|
}
|
||||||
,
|
|
||||||
|
const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params)
|
||||||
|
console.log('用户行为',params,data)
|
||||||
|
} catch (error) {}
|
||||||
|
},
|
||||||
itemClick(item,index) {
|
itemClick(item,index) {
|
||||||
this.treeData = item.children,
|
this.treeData = item.children,
|
||||||
this.treePath = [...this.treePath,{
|
this.treePath = [...this.treePath,{
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="second-row">{{tableData.rzDiff > 0 ? "+" :"" }}{{tableData.rzDiff?tableData.rzDiff.toFixed(2) : 0}}</view>
|
<view class="second-row">{{tableData.rzDiff > 0 ? "+" :"" }}{{tableData.rzDiff?tableData.rzDiff.toFixed(2) : 0}}</view>
|
||||||
</uni-col> <uni-col :span="12">
|
</uni-col> <uni-col :span="12">
|
||||||
<view class="first-row" style="border-bottom: 1px solid #dfdfdf;">本年最高水位(mm)</view>
|
<view class="first-row" style="border-bottom: 1px solid #dfdfdf;">本年最高水位(m)</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="second-row" style="border-bottom: 1px solid #dfdfdf;">{{tableData.maxRz ? tableData.maxRz.toFixed(2) :0}}</view>
|
<view class="second-row" style="border-bottom: 1px solid #dfdfdf;">{{tableData.maxRz ? tableData.maxRz.toFixed(2) :0}}</view>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<!-- nav -->
|
<!-- nav -->
|
||||||
<view class="navBar">
|
<view class="navBar">
|
||||||
<div class="navList" v-for="(item, index) in getNavList" :key="index">
|
<div class="navList" v-for="(item, index) in getNavList" :key="index">
|
||||||
<div @click="myNavigateTo(item.url)">
|
<div @click="myNavigateTo(item.url,item.value)">
|
||||||
<div class="navIcon">
|
<div class="navIcon">
|
||||||
<image
|
<image
|
||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<div
|
<div
|
||||||
class="readStatus"
|
class="readStatus"
|
||||||
v-show="
|
v-show="
|
||||||
(readStatus && item.key == 3) ||
|
(readStatus && item.key == 3) || (dispatchStatus && item.key ==5 && limit == 0) ||
|
||||||
(limit == 1 && readYjStatus && item.key == 5)
|
(limit == 1 && readYjStatus && item.key == 5)
|
||||||
"
|
"
|
||||||
></div>
|
></div>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
></image
|
></image
|
||||||
><span style="color: #000">当前防汛应急响应:</span>
|
><span style="color: #000">当前防汛应急响应:</span>
|
||||||
<span style="color: #59a7ff">{{ !level ? '无' : level }}</span>
|
<span style="color: #59a7ff">{{ !level || !yjStatus ? '无' : level }}</span>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 24小时综述 -->
|
<!-- 24小时综述 -->
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
<span class="line"></span><span class="h4">24小时天气预报</span>
|
<span class="line"></span><span class="h4">24小时天气预报</span>
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<span class="time">{{ imgData[0] }}至{{ imgData[1] }}</span>
|
<!-- <span class="time">{{ imgData[0] }}至{{ imgData[1] }}</span> -->
|
||||||
<!-- <image
|
<!-- <image
|
||||||
style="width: 16px; height: 16px; vertical-align: middle"
|
style="width: 16px; height: 16px; vertical-align: middle"
|
||||||
src="../../static/tabs/panelTitle.png"
|
src="../../static/tabs/panelTitle.png"
|
||||||
|
|
@ -219,15 +219,22 @@
|
||||||
<p class="title">
|
<p class="title">
|
||||||
<span class="line"></span><span class="h4">短时天气预报</span>
|
<span class="line"></span><span class="h4">短时天气预报</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="time">{{ imgHourstm[0] }}至{{ imgHourstm[1] }}</div>
|
<!-- <div class="time" v-if="imgHourstm.length > 0">
|
||||||
|
{{ imgHourstm[0] }}至{{ imgHourstm[1] }}
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="imgs" style="height: 100%; text-align: center">
|
<div class="imgs" style="height: 100%; text-align: center">
|
||||||
<image
|
<image
|
||||||
|
v-if="imgHoursList.url != ''"
|
||||||
:src="imgHoursList.url"
|
:src="imgHoursList.url"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
v-if="imgHoursList.url"
|
|
||||||
></image>
|
></image>
|
||||||
<image class="noData" src="" mode="aspectFit" v-else></image>
|
<image
|
||||||
|
v-if="imgHoursList.url == ''"
|
||||||
|
class="noData"
|
||||||
|
src="../../static/tabs//noData1.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
></image>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -291,6 +298,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="color: #91939b">监测时间:{{ item.tm }}</div>
|
<div style="color: #91939b">监测时间:{{ item.tm }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="!hdList.length" style="text-align:center">暂无内容</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info_icon" v-else>
|
<div class="info_icon" v-else>
|
||||||
<div
|
<div
|
||||||
|
|
@ -312,9 +320,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="color: #91939b">监测时间:{{ item.tm }}</div>
|
<div style="color: #91939b">监测时间:{{ item.tm }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="!skList.length" style="text-align:center">暂无内容</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="info_24" :style="{display:'flex',justifyContent:'center',alignItems:'center',padding:'5px 0',margin:'0'}">
|
||||||
|
<image :style="{width:'20px',height:'20px',marginRight:'10px'}" src="../../static/logoc.png"></image>
|
||||||
|
<div>技术支持: 湖北鲧石物联科技有限公司</div>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -352,6 +366,7 @@ export default {
|
||||||
tableData: {},
|
tableData: {},
|
||||||
tm: '',
|
tm: '',
|
||||||
level: '',
|
level: '',
|
||||||
|
yjStatus:0,
|
||||||
limit: disType(uni.getStorageSync('value').adcd),
|
limit: disType(uni.getStorageSync('value').adcd),
|
||||||
timeList: [
|
timeList: [
|
||||||
{ text: '昨天08:00~当前时间', value: 1 },
|
{ text: '昨天08:00~当前时间', value: 1 },
|
||||||
|
|
@ -378,19 +393,38 @@ export default {
|
||||||
current: 0,
|
current: 0,
|
||||||
hdList: [],
|
hdList: [],
|
||||||
skList: [],
|
skList: [],
|
||||||
readStatus: false,
|
readStatus: false, //工灾情状态
|
||||||
readYjStatus: false,
|
readYjStatus: false, //预警状态
|
||||||
|
dispatchStatus:false, //调令状态
|
||||||
default_src: uni.getStorageSync('avatar'),
|
default_src: uni.getStorageSync('avatar'),
|
||||||
imgList: {},
|
imgList: {},
|
||||||
imgtm: moment().format('YYYYMMDD'),
|
imgtm: moment().format('YYYYMMDD'),
|
||||||
imgData: [],
|
imgData: [],
|
||||||
imgHours: '',
|
imgHours: '',
|
||||||
imgHourstm: [],
|
imgHourstm: [],
|
||||||
imgHoursList: {},
|
imgHoursList: { url: '' },
|
||||||
interval: null,
|
interval: null,
|
||||||
numPic: 0
|
numPic: 0,
|
||||||
|
allStatus: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getSwiperList()
|
||||||
|
this.getOverview()
|
||||||
|
this.getDataTime()
|
||||||
|
this.getResponseLevel()
|
||||||
|
this.getDispatchStatus()
|
||||||
|
this.getReadStatus()
|
||||||
|
if (this.limit == 1) {
|
||||||
|
this.getYjRead()
|
||||||
|
// this.getInterval()
|
||||||
|
this.getImgs()
|
||||||
|
this.getHoursImg()
|
||||||
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getNavList () {
|
getNavList () {
|
||||||
const adcd = uni.getStorageSync('value').adcd
|
const adcd = uni.getStorageSync('value').adcd
|
||||||
|
|
@ -487,16 +521,28 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
|
},
|
||||||
|
allStatus:{
|
||||||
|
handler (newValue) {
|
||||||
|
const newArr = this.getNavList()
|
||||||
|
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getImgs () {
|
async getImgs () {
|
||||||
let h = moment().format('HH')
|
let h = moment().format('HH')
|
||||||
let m = moment().format('mm')
|
let m = moment().format('mm')
|
||||||
await uni.request({
|
uni.request({
|
||||||
|
url: 'http://223.75.53.124:8005/grb/latest',
|
||||||
|
success: res => {
|
||||||
|
const myTm = res.data.data.tm
|
||||||
|
if(myTm){
|
||||||
|
uni.request({
|
||||||
url: 'http://223.75.53.124:8005/grb/rainimglist',
|
url: 'http://223.75.53.124:8005/grb/rainimglist',
|
||||||
data: {
|
data: {
|
||||||
tm: `${this.imgtm}08`
|
tm: moment(myTm).format('YYYYMMDDHH')
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log(res.data.data)
|
console.log(res.data.data)
|
||||||
|
|
@ -512,6 +558,9 @@ export default {
|
||||||
// this.imgHourstm = [`${tm2}${h + 1}时`, `${tm2}${h + 2}时`]
|
// this.imgHourstm = [`${tm2}${h + 1}时`, `${tm2}${h + 2}时`]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getTmData () {
|
getTmData () {
|
||||||
let hn = this.numPic > 0 ? this.numPic : 1
|
let hn = this.numPic > 0 ? this.numPic : 1
|
||||||
|
|
@ -573,21 +622,24 @@ export default {
|
||||||
|
|
||||||
console.log('小时', h1)
|
console.log('小时', h1)
|
||||||
console.log('需要参数', tms)
|
console.log('需要参数', tms)
|
||||||
|
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'https://shqxjs.cloudowr.cn/service/radar/rainimg',
|
url: 'http://223.75.53.124:8005/radar/latest',
|
||||||
data: {
|
|
||||||
tm: tms
|
|
||||||
},
|
|
||||||
success: res => {
|
success: res => {
|
||||||
|
let tm = moment(res.data.data.tm);
|
||||||
|
let subfix = '?rainFile=' + res.data.data.rainFile;
|
||||||
|
let url = `http://shqxjs.cloudowr.cn/yj_folder/rain/radar/${tm.format('YYYYMM')}/${tm.format('DD')}/${tm.format('YYYYMMDDHHmm')}+00.02.jpg${subfix}`;
|
||||||
|
console.log(222222222227,url)
|
||||||
|
|
||||||
console.log('pic---', tms, res.data.data)
|
console.log('pic---', tms, res.data.data)
|
||||||
this.imgHoursList = res.data.data.img
|
this.imgHoursList = {'url':url}
|
||||||
let m = moment().format('MM月DD日')
|
let m = moment().format('MM月DD日')
|
||||||
|
|
||||||
console.log('am222', this.imgHoursList)
|
console.log('am222', this.imgHoursList)
|
||||||
let m1 = Number(h1) + 2
|
let m1 = Number(h1) + 2
|
||||||
this.imgHourstm = [`${m}${h1}时${mm}分`, `${m}${m1}时${mm}分`]
|
this.imgHourstm = [`${m}${h1}时${mm}分`, `${m}${m1}时${mm}分`]
|
||||||
|
|
||||||
if (res.data.data.img == null) {
|
if (url == null) {
|
||||||
this.numPic++
|
this.numPic++
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getHoursImg()
|
this.getHoursImg()
|
||||||
|
|
@ -629,6 +681,29 @@ export default {
|
||||||
uni.$showMsg()
|
uni.$showMsg()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getDispatchStatus(){
|
||||||
|
try {
|
||||||
|
const res = await uni.$http.post('/gunshiApp/xfflood/xfEmerDispatchR/app/list',{status:1,dispatchTypeList:["0","1"]})
|
||||||
|
if(res.data.code == 200){
|
||||||
|
this.dispatchStatus = res.data.data.length > 0 ? true : false
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async setInsert (menu2) {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
createId: uni.getStorageSync('value').userId,
|
||||||
|
loginType:1,
|
||||||
|
menu1:'首页',
|
||||||
|
menu2: menu2||'首页',
|
||||||
|
}
|
||||||
|
|
||||||
|
const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params)
|
||||||
|
console.log('用户行为',params,data)
|
||||||
|
} catch (error) {}
|
||||||
|
},
|
||||||
jumpHdDetail (params) {
|
jumpHdDetail (params) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}`
|
url: `/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}`
|
||||||
|
|
@ -833,7 +908,8 @@ export default {
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
if (data.data.records.length > 0) {
|
if (data.data.records.length > 0) {
|
||||||
console.log('1111111data', data)
|
console.log('1111111data', data)
|
||||||
this.level = level(data.data.records[0].status)
|
this.level = level(data.data.records[0].level)
|
||||||
|
this.yjStatus = data.data.records[0].status
|
||||||
} else {
|
} else {
|
||||||
this.level = '无'
|
this.level = '无'
|
||||||
}
|
}
|
||||||
|
|
@ -842,10 +918,11 @@ export default {
|
||||||
uni.$showMsg()
|
uni.$showMsg()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
myNavigateTo (url) {
|
myNavigateTo (url,menu2) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url // 跳转到对应路径的页面
|
url: url // 跳转到对应路径的页面
|
||||||
})
|
})
|
||||||
|
this.setInsert(menu2)
|
||||||
}
|
}
|
||||||
// 响应级别
|
// 响应级别
|
||||||
},
|
},
|
||||||
|
|
@ -858,6 +935,9 @@ export default {
|
||||||
|
|
||||||
onShow () {
|
onShow () {
|
||||||
this.getReadStatus()
|
this.getReadStatus()
|
||||||
|
this.getResponseLevel()
|
||||||
|
this.getDispatchStatus()
|
||||||
|
this.setInsert()
|
||||||
if (this.limit == 1) {
|
if (this.limit == 1) {
|
||||||
this.getYjRead()
|
this.getYjRead()
|
||||||
// this.getInterval()
|
// this.getInterval()
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ export default {
|
||||||
},
|
},
|
||||||
login (formData) {
|
login (formData) {
|
||||||
//loading
|
//loading
|
||||||
// uni.showLoading({title:'努力登录中...', mask:true});
|
uni.showLoading({title:'努力登录中...', mask:true});
|
||||||
|
|
||||||
//MD5加密
|
//MD5加密
|
||||||
const encryptData = data => {
|
const encryptData = data => {
|
||||||
|
|
@ -150,10 +150,11 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('avatar', '../../static/tabs/touxiang.png')
|
uni.setStorageSync('avatar', '../../static/tabs/touxiang.png')
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//登录成功后跳转界面
|
|
||||||
|
|
||||||
|
// uni.showLoading({title:'努力登录中...', mask:true});
|
||||||
|
//登录成功后跳转界
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
|
@ -161,6 +162,8 @@ export default {
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
clearTimeout()
|
clearTimeout()
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if (res.data.code === 400) {
|
} else if (res.data.code === 400) {
|
||||||
//登录失败后弹出信息
|
//登录失败后弹出信息
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,9 @@
|
||||||
default_src: uni.getStorageSync('avatar'),
|
default_src: uni.getStorageSync('avatar'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.setInsert()
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.default_src = uni.getStorageSync('avatar')
|
this.default_src = uni.getStorageSync('avatar')
|
||||||
this.userList = uni.getStorageSync('value')
|
this.userList = uni.getStorageSync('value')
|
||||||
|
|
@ -80,6 +83,19 @@
|
||||||
})
|
})
|
||||||
// console.log('click',index,func[index].url)
|
// console.log('click',index,func[index].url)
|
||||||
},
|
},
|
||||||
|
async setInsert () {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
createId: uni.getStorageSync('value').userId,
|
||||||
|
loginType:1,
|
||||||
|
menu1:'我的',
|
||||||
|
menu2:'我的',
|
||||||
|
}
|
||||||
|
|
||||||
|
const { data } = await uni.$http.post('/gunshiApp/xfflood/visitMenuLog/insert',params)
|
||||||
|
console.log('用户行为',params,data)
|
||||||
|
} catch (error) {}
|
||||||
|
},
|
||||||
logout(){
|
logout(){
|
||||||
if(uni.getStorageSync('loginChecked')===true){
|
if(uni.getStorageSync('loginChecked')===true){
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,11 @@
|
||||||
<div v-for="(item,index) in list" class="listItem" @click="myNavigateTo(item)">
|
<div v-for="(item,index) in list" class="listItem" @click="myNavigateTo(item)">
|
||||||
<div class="row1"><text>{{item.year+'年度调令第'+item.serial+'号'}}</text></div>
|
<div class="row1"><text>{{item.year+'年度调令第'+item.serial+'号'}}</text></div>
|
||||||
<div class="row2">
|
<div class="row2">
|
||||||
<div><text>{{item.dispatchType}}</text></div>
|
|
||||||
<div>
|
<div>
|
||||||
<text :style="{marginRight:'5px'}">{{item.createUserName}}</text>
|
<text :style="{marginRight:'5px'}">{{item.createUserName}}</text>
|
||||||
<text>{{item.createTm}}</text>
|
<text>{{item.createTm}}</text>
|
||||||
</div>
|
</div>
|
||||||
|
<div><text>{{myType[item.dispatchType]}}</text></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :style="{height:'100px'}"></div>
|
<div :style="{height:'100px'}"></div>
|
||||||
|
|
@ -141,11 +141,16 @@
|
||||||
value:2
|
value:2
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
const myType = {
|
||||||
|
0:'水库调洪',
|
||||||
|
1:'人员转移'
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabsOptions:tabsOptions,
|
tabsOptions:tabsOptions,
|
||||||
|
myType:myType,
|
||||||
show:false,
|
show:false,
|
||||||
tabVal:1,
|
tabVal:1,
|
||||||
check:['0','1'],
|
check:['0','1'],
|
||||||
|
|
@ -188,6 +193,9 @@
|
||||||
status:this.tabVal,
|
status:this.tabVal,
|
||||||
dispatchTypeList:this.check,
|
dispatchTypeList:this.check,
|
||||||
}
|
}
|
||||||
|
if(this.check.length===0){
|
||||||
|
params.dispatchTypeList = ['不可能存在的值']
|
||||||
|
}
|
||||||
if(this.isTime){
|
if(this.isTime){
|
||||||
params.dateTimeRangeSo = {
|
params.dateTimeRangeSo = {
|
||||||
start:moment(this.stm).format('YYYY-MM-DD HH:mm:sss'),
|
start:moment(this.stm).format('YYYY-MM-DD HH:mm:sss'),
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="rf">
|
<div class="rf">
|
||||||
<u--input
|
<u--input
|
||||||
border="surround"
|
border="surround"
|
||||||
v-model="record.dispatchType"
|
v-model="myType[record.dispatchType]"
|
||||||
:disabled='true'
|
:disabled='true'
|
||||||
></u--input>
|
></u--input>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -106,6 +106,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
const myType = {
|
||||||
|
0:'水库调洪',
|
||||||
|
1:'人员转移'
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
|
|
@ -116,6 +120,7 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
myType:myType
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="second-row">{{tableData.rzDiff > 0 ? "+" :"" }}{{tableData.rzDiff?tableData.rzDiff.toFixed(2) : 0}}</view>
|
<view class="second-row">{{tableData.rzDiff > 0 ? "+" :"" }}{{tableData.rzDiff?tableData.rzDiff.toFixed(2) : 0}}</view>
|
||||||
</uni-col> <uni-col :span="12">
|
</uni-col> <uni-col :span="12">
|
||||||
<view class="first-row" style="border-bottom: 1px solid #dfdfdf;">本年最高水位(mm)</view>
|
<view class="first-row" style="border-bottom: 1px solid #dfdfdf;">本年最高水位(m)</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="second-row" style="border-bottom: 1px solid #dfdfdf;">{{tableData.maxRz ? tableData.maxRz.toFixed(2) :0}}</view>
|
<view class="second-row" style="border-bottom: 1px solid #dfdfdf;">{{tableData.maxRz ? tableData.maxRz.toFixed(2) :0}}</view>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export function disType(e) {
|
||||||
let type;
|
let type;
|
||||||
if (e.endsWith('000000000')) {
|
if (e.endsWith('000000000')) {
|
||||||
type = 1;
|
type = 1;
|
||||||
} else if (e.endsWith('000000')) {
|
} else{
|
||||||
type = 0;
|
type = 0;
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
formData:{
|
formData:{
|
||||||
args:'',
|
args:'',
|
||||||
sources:["SH","SW"],
|
sources:["SH","SW"],
|
||||||
adcd:type == 1 ? undefined :adcd,
|
// adcd:type == 1 ? undefined : adcd,
|
||||||
},
|
},
|
||||||
list:[], //搜索结果
|
list:[], //搜索结果
|
||||||
saveList:[], //保存搜索结果
|
saveList:[], //保存搜索结果
|
||||||
|
|
@ -103,6 +103,9 @@
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
async getList(){
|
async getList(){
|
||||||
|
const adcd = uni.getStorageSync('value').adcd
|
||||||
|
let newAdcd = adcd.endsWith('000000000') ? "" : adcd
|
||||||
|
this.formData = {...this.formData,adcd:newAdcd}
|
||||||
console.log(1111,this.formData);
|
console.log(1111,this.formData);
|
||||||
try{
|
try{
|
||||||
const {data} = await uni.$http.post(
|
const {data} = await uni.$http.post(
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
formData:{
|
formData:{
|
||||||
args:'',
|
args:'',
|
||||||
sources:["SW","SK"],
|
sources:["SW","SK"],
|
||||||
adcd:type == 1 ? undefined :adcd,
|
// adcd:uni.getStorageSync('value').adcd,
|
||||||
},
|
},
|
||||||
list:[], //搜索结果
|
list:[], //搜索结果
|
||||||
saveList:[] //保存搜索结果
|
saveList:[] //保存搜索结果
|
||||||
|
|
@ -104,6 +104,9 @@
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
async getList(){
|
async getList(){
|
||||||
|
const adcd = uni.getStorageSync('value').adcd
|
||||||
|
let newAdcd = adcd.endsWith('000000000') ? "" : adcd
|
||||||
|
this.formData = {...this.formData,adcd:newAdcd}
|
||||||
try{
|
try{
|
||||||
const {data} = await uni.$http.post(
|
const {data} = await uni.$http.post(
|
||||||
"/gunshiApp/xfflood/reservoir/water/list",{...this.formData}
|
"/gunshiApp/xfflood/reservoir/water/list",{...this.formData}
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,10 @@
|
||||||
<td style="width: 38%; position: relative;" >
|
<td style="width: 38%; position: relative;" >
|
||||||
<text :class="{'active1':item.flState == 1,'active2':item.desState == 1,'active3':item.calState}" style="margin-right:20%">{{ item.rz.toFixed(2) }}</text>
|
<text :class="{'active1':item.flState == 1,'active2':item.desState == 1,'active3':item.calState}" style="margin-right:20%">{{ item.rz.toFixed(2) }}</text>
|
||||||
<text v-if="item.state == 1"
|
<text v-if="item.state == 1"
|
||||||
style="position: absolute; top: 0px; right: 34%; color: #FF7D7D;font-size:18px;">↑</text>
|
style="position: absolute; top: 0px; right: 33%; color: #FF7D7D;font-size:18px;">↑</text>
|
||||||
<text v-else-if="item.state == 2" style="position: absolute;
|
<text v-else-if="item.state == 2" style="position: absolute;
|
||||||
top:0px;right: 34%; color: #32E48E; font-size: 18px;">↓</text>
|
top:0px;right: 33%; color: #32E48E; font-size: 18px;">↓</text>
|
||||||
<text style="position: absolute; top: 0px; left: 62%;">({{item.afsltdz ? item.afsltdz.toFixed(2):'-'}})</text>
|
<text style="position: absolute; top: 0px; left: 64%;">({{item.afsltdz ? item.afsltdz.toFixed(2):'-'}})</text>
|
||||||
</td>
|
</td>
|
||||||
<!-- <td style="width: 4%"></td> -->
|
<!-- <td style="width: 4%"></td> -->
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@
|
||||||
</view> </view
|
</view> </view
|
||||||
></view>
|
></view>
|
||||||
<view v-if="isMap">
|
<view v-if="isMap">
|
||||||
<newmap v-if="isMap" @back="back"></newmap>
|
<newmap v-if="isMap" @back="back" @navBack="navBack"></newmap>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -407,7 +407,7 @@ export default {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择时间',
|
message: '请选择时间',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['change']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// severity: [
|
// severity: [
|
||||||
|
|
@ -436,6 +436,9 @@ export default {
|
||||||
this.$refs.form3.setRules(this.rules2)
|
this.$refs.form3.setRules(this.rules2)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
navBack () {
|
||||||
|
this.isMap = false
|
||||||
|
},
|
||||||
back (lnglat, address) {
|
back (lnglat, address) {
|
||||||
console.log('搜索框22key', lnglat, address)
|
console.log('搜索框22key', lnglat, address)
|
||||||
this.isMap = false
|
this.isMap = false
|
||||||
|
|
@ -613,7 +616,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
params.fileIds = []
|
params.fileIds = []
|
||||||
}
|
}
|
||||||
|
console.log('this.---can', params)
|
||||||
uni.$http
|
uni.$http
|
||||||
.post('/gunshiApp/xfflood/iaCHsfwater/insert', params)
|
.post('/gunshiApp/xfflood/iaCHsfwater/insert', params)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ export default {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择工程名称',
|
message: '请选择工程名称',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['change']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ export default {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择工程名称',
|
message: '请选择工程名称',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['change']
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
severity: [
|
severity: [
|
||||||
|
|
@ -329,7 +329,7 @@ export default {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择严重程度',
|
message: '请选择严重程度',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['change']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<u-navbar
|
||||||
|
title="灾害发生地点"
|
||||||
|
@leftClick="navigateBack"
|
||||||
|
safeAreaInsetTop
|
||||||
|
fixed
|
||||||
|
placeholder
|
||||||
|
></u-navbar>
|
||||||
<view class="page-section page-section-gap">
|
<view class="page-section page-section-gap">
|
||||||
<map
|
<map
|
||||||
style="width: 100%; height: 300px; flex: 1"
|
style="width: 100%; height: 300px; flex: 1"
|
||||||
|
|
@ -59,6 +66,9 @@ export default {
|
||||||
onShow () {},
|
onShow () {},
|
||||||
onLoad () {},
|
onLoad () {},
|
||||||
methods: {
|
methods: {
|
||||||
|
navigateBack () {
|
||||||
|
this.$emit('navBack', false)
|
||||||
|
},
|
||||||
backclick () {
|
backclick () {
|
||||||
this.$emit('back', this.lnglat, this.address)
|
this.$emit('back', this.lnglat, this.address)
|
||||||
},
|
},
|
||||||
|
|
@ -70,7 +80,7 @@ export default {
|
||||||
console.log('erreee', 'wgs84', 'gcj02')
|
console.log('erreee', 'wgs84', 'gcj02')
|
||||||
|
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'gcj02',
|
||||||
isHighAccuracy: 'true',
|
isHighAccuracy: 'true',
|
||||||
geocode: 'true',
|
geocode: 'true',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 453 KiB |
Loading…
Reference in New Issue