Compare commits

...

10 Commits

Author SHA1 Message Date
秦子超 42a48ac3b3 增加用户行为 2024-07-10 09:37:14 +08:00
秦子超 3bf4926b5d 提交 2024-07-04 13:15:43 +08:00
秦子超 128cfe4b90 提交修改 2024-07-04 09:16:30 +08:00
张林 ab854f6499 fix: 环境 2024-07-02 14:49:36 +08:00
秦子超 9816790316 提交 2024-07-02 14:31:15 +08:00
李神峰 44fcf985fe Merge branch 'lsf-dev' 2024-07-02 13:09:56 +08:00
李神峰 6f5a19fda7 fix():bug修复 2024-07-02 13:09:23 +08:00
秦子超 fcd2767b40 调令反馈修改 2024-07-02 09:29:25 +08:00
李神峰 61387d7a12 fix(): 修复bug 2024-07-01 17:17:25 +08:00
张林 59ba1069ae fix:bug 2024-07-01 16:22:28 +08:00
19 changed files with 310 additions and 142 deletions

120
main.js
View File

@ -1,52 +1,68 @@
// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
import App from './App'
import { $http } from '@escook/request-miniprogram'
Vue.config.productionTip = false
uni.$http = $http
$http.baseUrl = 'http://local.gunshiiot.com:18083'
// 请求拦截器
$http.beforeRequest = function (options) {
uni.showLoading({
title: '数据加载中'
})
if (options.url.indexOf('/doLogin') == -1) {
options.header = {
'gs-token': uni.getStorageSync('Gs-Token')
}
}
}
// 响应拦截器
$http.afterRequest = function (options) {
uni.hideLoading()
}
uni.$showMsg = function (title = '数据请求失败了', duration = 1500) {
return uni.showToast({
title,
duration,
icon: 'none'
})
}
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp () {
const app = createSSRApp(App)
return {
app
}
}
// #endif
// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
import App from './App'
import {
$http
} from '@escook/request-miniprogram'
Vue.config.productionTip = false
uni.$http = $http
// $http.baseUrl = 'http://local.gunshiiot.com:18083'
$http.baseUrl = 'http://36.139.207.50:18083'
// 请求拦截器
$http.beforeRequest = function(options) {
// uni.showLoading({
// 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) {
options.header = {
'gs-token': uni.getStorageSync('Gs-Token')
}
}
}
// 响应拦截器
$http.afterRequest = function(options) {
// uni.hideLoading()
}
uni.$showMsg = function(title = '数据请求失败了', duration = 1500) {
return uni.showToast({
title,
duration,
icon: 'none'
})
}
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

View File

@ -19,7 +19,15 @@
{
"path": "pages/homeIndex/index",
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"app-plus": {
"pullToRefresh": {
"support": true,
"style": "default",
"offset": "70px"
}
}
}
},
{

View File

@ -104,6 +104,7 @@
},
onShow() {
this.getSearch(this.keyword)
this.setInsert()
},
methods: {
getHighlight(val) {
@ -184,8 +185,20 @@
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) {
this.treeData = item.children,
this.treePath = [...this.treePath,{

View File

@ -82,7 +82,7 @@
<uni-col :span="12">
<view class="second-row">{{tableData.rzDiff > 0 ? "+" :"" }}{{tableData.rzDiff?tableData.rzDiff.toFixed(2) : 0}}</view>
</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 :span="12">
<view class="second-row" style="border-bottom: 1px solid #dfdfdf;">{{tableData.maxRz ? tableData.maxRz.toFixed(2) :0}}</view>

View File

@ -25,7 +25,7 @@
<!-- nav -->
<view class="navBar">
<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">
<image
style="width: 100%; height: 100%"
@ -35,7 +35,7 @@
<div
class="readStatus"
v-show="
(readStatus && item.key == 3) ||
(readStatus && item.key == 3) || (dispatchStatus && item.key ==5 && limit == 0) ||
(limit == 1 && readYjStatus && item.key == 5)
"
></div>
@ -56,7 +56,7 @@
mode="aspectFit"
></image
><span style="color: #000">当前防汛应急响应</span>
<span style="color: #59a7ff">{{ !level ? '无' : level }}</span>
<span style="color: #59a7ff">{{ !level || !yjStatus ? '无' : level }}</span>
</view>
<!-- 24小时综述 -->
@ -125,7 +125,7 @@
<span class="line"></span><span class="h4">24小时天气预报</span>
</p>
<div>
<span class="time">{{ imgData[0] }}{{ imgData[1] }}</span>
<!-- <span class="time">{{ imgData[0] }}{{ imgData[1] }}</span> -->
<!-- <image
style="width: 16px; height: 16px; vertical-align: middle"
src="../../static/tabs/panelTitle.png"
@ -219,15 +219,22 @@
<p class="title">
<span class="line"></span><span class="h4">短时天气预报</span>
</p>
<div class="time">{{ imgHourstm[0] }}{{ imgHourstm[1] }}</div>
<!-- <div class="time" v-if="imgHourstm.length > 0">
{{ imgHourstm[0] }}{{ imgHourstm[1] }}
</div> -->
</div>
<div class="imgs" style="height: 100%; text-align: center">
<image
v-if="imgHoursList.url != ''"
:src="imgHoursList.url"
mode="aspectFit"
v-if="imgHoursList.url"
></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>
</view>
</view>
@ -291,6 +298,7 @@
</div>
<div style="color: #91939b">监测时间{{ item.tm }}</div>
</div>
<div v-if="!hdList.length" style="text-align:center"></div>
</div>
<div class="info_icon" v-else>
<div
@ -312,9 +320,15 @@
</div>
<div style="color: #91939b">监测时间{{ item.tm }}</div>
</div>
<div v-if="!skList.length" style="text-align:center"></div>
</div>
</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>
</template>
@ -352,6 +366,7 @@ export default {
tableData: {},
tm: '',
level: '',
yjStatus:0,
limit: disType(uni.getStorageSync('value').adcd),
timeList: [
{ text: '昨天08:00~当前时间', value: 1 },
@ -378,19 +393,38 @@ export default {
current: 0,
hdList: [],
skList: [],
readStatus: false,
readYjStatus: false,
readStatus: false, //
readYjStatus: false, //
dispatchStatus:false, //
default_src: uni.getStorageSync('avatar'),
imgList: {},
imgtm: moment().format('YYYYMMDD'),
imgData: [],
imgHours: '',
imgHourstm: [],
imgHoursList: {},
imgHoursList: { url: '' },
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: {
getNavList () {
const adcd = uni.getStorageSync('value').adcd
@ -487,31 +521,46 @@ export default {
}
},
immediate: true
},
allStatus:{
handler (newValue) {
const newArr = this.getNavList()
},
immediate: true
}
},
methods: {
async getImgs () {
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`
},
success: res => {
console.log(res.data.data)
this.imgList = res.data.data
// let inx = restm(h)
// this.imgHours = res.data.data.imgHours[inx]
let tm = moment().add(1, 'days').format('MM月DD日')
let tm2 = moment().format('MM月DD日')
this.imgData = [`${tm2}08时`, `${tm}08时`]
// this.imgHourstm = [`${tm2}${h + 1}`, `${tm2}${h + 2}`]
}
})
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',
data: {
tm: moment(myTm).format('YYYYMMDDHH')
},
success: res => {
console.log(res.data.data)
this.imgList = res.data.data
// let inx = restm(h)
// this.imgHours = res.data.data.imgHours[inx]
let tm = moment().add(1, 'days').format('MM月DD日')
let tm2 = moment().format('MM月DD日')
this.imgData = [`${tm2}08时`, `${tm}08时`]
// this.imgHourstm = [`${tm2}${h + 1}`, `${tm2}${h + 2}`]
}
})
}
}
})
},
getTmData () {
let hn = this.numPic > 0 ? this.numPic : 1
@ -573,31 +622,34 @@ export default {
console.log('小时', h1)
console.log('需要参数', tms)
uni.request({
url: 'https://shqxjs.cloudowr.cn/service/radar/rainimg',
data: {
tm: tms
},
success: res => {
console.log('pic---', tms, res.data.data)
this.imgHoursList = res.data.data.img
let m = moment().format('MM月DD日')
console.log('am222', this.imgHoursList)
let m1 = Number(h1) + 2
this.imgHourstm = [`${m}${h1}${mm}`, `${m}${m1}${mm}`]
if (res.data.data.img == null) {
this.numPic++
setTimeout(() => {
this.getHoursImg()
}, 10 * 1000)
} else {
this.numPic = 0
return
}
}
})
uni.request({
url: 'http://223.75.53.124:8005/radar/latest',
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)
this.imgHoursList = {'url':url}
let m = moment().format('MM月DD日')
console.log('am222', this.imgHoursList)
let m1 = Number(h1) + 2
this.imgHourstm = [`${m}${h1}${mm}`, `${m}${m1}${mm}`]
if (url == null) {
this.numPic++
setTimeout(() => {
this.getHoursImg()
}, 10 * 1000)
} else {
this.numPic = 0
return
}
}
})
},
// async getInterval () {
@ -629,6 +681,29 @@ export default {
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) {
uni.navigateTo({
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.data.records.length > 0) {
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 {
this.level = '无'
}
@ -842,10 +918,11 @@ export default {
uni.$showMsg()
}
},
myNavigateTo (url) {
myNavigateTo (url,menu2) {
uni.navigateTo({
url: url //
})
})
this.setInsert(menu2)
}
//
},
@ -858,6 +935,9 @@ export default {
onShow () {
this.getReadStatus()
this.getResponseLevel()
this.getDispatchStatus()
this.setInsert()
if (this.limit == 1) {
this.getYjRead()
// this.getInterval()

View File

@ -83,7 +83,7 @@ export default {
},
login (formData) {
//loading
// uni.showLoading({title:'...', mask:true});
uni.showLoading({title:'努力登录中...', mask:true});
//MD5
const encryptData = data => {
@ -113,7 +113,7 @@ export default {
}
//
uni.$http.post('/gunshiApp/xfflood/doLogin', postForm).then(res => {
uni.showLoading({ title: '努力登录中...', mask: true })
@ -150,17 +150,20 @@ export default {
} else {
uni.setStorageSync('avatar', '../../static/tabs/touxiang.png')
}
// uni.showLoading({title:'...', mask:true});
//
setTimeout(function () {
uni.hideLoading()
uni.reLaunch({
url: '/pages/homeIndex/index'
})
}, 1000)
clearTimeout()
})
}
//
setTimeout(function () {
uni.hideLoading()
uni.reLaunch({
url: '/pages/homeIndex/index'
})
}, 1000)
clearTimeout()
} else if (res.data.code === 400) {
//
setTimeout(function () {

View File

@ -65,6 +65,9 @@
default_src: uni.getStorageSync('avatar'),
}
},
onShow() {
this.setInsert()
},
mounted() {
this.default_src = uni.getStorageSync('avatar')
this.userList = uni.getStorageSync('value')
@ -80,6 +83,19 @@
})
// 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(){
if(uni.getStorageSync('loginChecked')===true){
uni.redirectTo({

View File

@ -38,11 +38,11 @@
<div v-for="(item,index) in list" class="listItem" @click="myNavigateTo(item)">
<div class="row1"><text>{{item.year+'年度调令第'+item.serial+'号'}}</text></div>
<div class="row2">
<div><text>{{item.dispatchType}}</text></div>
<div>
<text :style="{marginRight:'5px'}">{{item.createUserName}}</text>
<text>{{item.createTm}}</text>
</div>
<div><text>{{myType[item.dispatchType]}}</text></div>
</div>
</div>
<div :style="{height:'100px'}"></div>
@ -141,11 +141,16 @@
value:2
},
]
const myType = {
0:'水库调洪',
1:'人员转移'
}
export default {
data() {
return {
tabsOptions:tabsOptions,
myType:myType,
show:false,
tabVal:1,
check:['0','1'],
@ -188,6 +193,9 @@
status:this.tabVal,
dispatchTypeList:this.check,
}
if(this.check.length===0){
params.dispatchTypeList = ['不可能存在的值']
}
if(this.isTime){
params.dateTimeRangeSo = {
start:moment(this.stm).format('YYYY-MM-DD HH:mm:sss'),

View File

@ -34,8 +34,8 @@
<text class="lf"><text :style="{color:'red'}">*</text>调度类型:</text>
<div class="rf">
<u--input
border="surround"
v-model="record.dispatchType"
border="surround"
v-model="myType[record.dispatchType]"
:disabled='true'
></u--input>
</div>
@ -106,6 +106,10 @@
<script>
import moment from 'moment'
const myType = {
0:'水库调洪',
1:'人员转移'
}
export default {
props:{
@ -116,6 +120,7 @@
},
data() {
return {
myType:myType
};
},
methods: {

View File

@ -82,7 +82,7 @@
<uni-col :span="12">
<view class="second-row">{{tableData.rzDiff > 0 ? "+" :"" }}{{tableData.rzDiff?tableData.rzDiff.toFixed(2) : 0}}</view>
</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 :span="12">
<view class="second-row" style="border-bottom: 1px solid #dfdfdf;">{{tableData.maxRz ? tableData.maxRz.toFixed(2) :0}}</view>

View File

@ -20,7 +20,7 @@ export function disType(e) {
let type;
if (e.endsWith('000000000')) {
type = 1;
} else if (e.endsWith('000000')) {
} else{
type = 0;
}
return type;

View File

@ -79,7 +79,7 @@
formData:{
args:'',
sources:["SH","SW"],
adcd:type == 1 ? undefined :adcd,
// adcd:type == 1 ? undefined : adcd,
},
list:[], //
saveList:[], //
@ -103,6 +103,9 @@
this.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);
try{
const {data} = await uni.$http.post(

View File

@ -80,7 +80,7 @@
formData:{
args:'',
sources:["SW","SK"],
adcd:type == 1 ? undefined :adcd,
// adcd:uni.getStorageSync('value').adcd,
},
list:[], //
saveList:[] //
@ -104,6 +104,9 @@
this.getList()
},
async getList(){
const adcd = uni.getStorageSync('value').adcd
let newAdcd = adcd.endsWith('000000000') ? "" : adcd
this.formData = {...this.formData,adcd:newAdcd}
try{
const {data} = await uni.$http.post(
"/gunshiApp/xfflood/reservoir/water/list",{...this.formData}

View File

@ -26,10 +26,10 @@
<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 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;
top:0px;right: 34%; color: #32E48E; font-size: 18px;"></text>
<text style="position: absolute; top: 0px; left: 62%;">{{item.afsltdz ? item.afsltdz.toFixed(2):'-'}}</text>
top:0px;right: 33%; color: #32E48E; font-size: 18px;"></text>
<text style="position: absolute; top: 0px; left: 64%;">{{item.afsltdz ? item.afsltdz.toFixed(2):'-'}}</text>
</td>
<!-- <td style="width: 4%"></td> -->
</tr>

View File

@ -318,7 +318,7 @@
</view> </view
></view>
<view v-if="isMap">
<newmap v-if="isMap" @back="back"></newmap>
<newmap v-if="isMap" @back="back" @navBack="navBack"></newmap>
</view>
</view>
</template>
@ -407,7 +407,7 @@ export default {
type: 'string',
required: true,
message: '请选择时间',
trigger: ['blur', 'change']
trigger: ['change']
}
]
// severity: [
@ -436,6 +436,9 @@ export default {
this.$refs.form3.setRules(this.rules2)
},
methods: {
navBack () {
this.isMap = false
},
back (lnglat, address) {
console.log('搜索框22key', lnglat, address)
this.isMap = false
@ -613,7 +616,7 @@ export default {
} else {
params.fileIds = []
}
console.log('this.---can', params)
uni.$http
.post('/gunshiApp/xfflood/iaCHsfwater/insert', params)
.then(res => {

View File

@ -347,7 +347,7 @@ export default {
type: 'string',
required: true,
message: '请选择工程名称',
trigger: ['blur', 'change']
trigger: ['change']
}
]
},

View File

@ -321,7 +321,7 @@ export default {
type: 'string',
required: true,
message: '请选择工程名称',
trigger: ['blur', 'change']
trigger: ['change']
}
],
severity: [
@ -329,7 +329,7 @@ export default {
type: 'string',
required: true,
message: '请选择严重程度',
trigger: ['blur', 'change']
trigger: ['change']
}
]
},

View File

@ -1,5 +1,12 @@
<template>
<view>
<u-navbar
title="灾害发生地点"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
placeholder
></u-navbar>
<view class="page-section page-section-gap">
<map
style="width: 100%; height: 300px; flex: 1"
@ -59,6 +66,9 @@ export default {
onShow () {},
onLoad () {},
methods: {
navigateBack () {
this.$emit('navBack', false)
},
backclick () {
this.$emit('back', this.lnglat, this.address)
},
@ -70,7 +80,7 @@ export default {
console.log('erreee', 'wgs84', 'gcj02')
uni.getLocation({
type: 'wgs84',
type: 'gcj02',
isHighAccuracy: 'true',
geocode: 'true',
success: function (res) {

BIN
static/logoc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB