feat(): ip更换

master
李神峰 2025-09-30 17:23:21 +08:00
parent 5a4383dc9d
commit 540b929cd5
17 changed files with 327 additions and 163 deletions

View File

@ -9,8 +9,8 @@ import {
Vue.config.productionTip = false Vue.config.productionTip = false
uni.$http = $http uni.$http = $http
// $http.baseUrl = 'http://223.75.53.141:83' // $http.baseUrl = 'http://223.75.53.141:83'
// $http.baseUrl = 'http://local.gunshiiot.com:18083' $http.baseUrl = 'http://local.gunshiiot.com:18083'
$http.baseUrl = 'http://192.168.66.27:24105' // $http.baseUrl = 'http://192.168.66.27:24105'
// 请求拦截器 // 请求拦截器
$http.beforeRequest = function (options) { $http.beforeRequest = function (options) {
if (options.url.indexOf('/doLogin') == -1) { if (options.url.indexOf('/doLogin') == -1) {

View File

@ -2,7 +2,7 @@
"name" : "檀树岗水库", "name" : "檀树岗水库",
"appid" : "__UNI__33ED56F", "appid" : "__UNI__33ED56F",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.1",
"versionCode" : 1, "versionCode" : 1,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {

View File

@ -200,6 +200,12 @@
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "pages/yj/detail/byTable",
"style": {
"navigationBarTitleText": ""
}
}, },
{ {
"path": "pages/messageList/index", "path": "pages/messageList/index",

View File

@ -170,14 +170,14 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
[63, data[alltype[2]]], [63, data[alltype[2]]],
[87, data[alltype[3]]] [87, data[alltype[3]]]
] : ] :
type == "1"? type == "1" ?
[ [
[xValue, data?.rz], [xValue, data?.rz],
[49, data[alltype[0]]], [49, data[alltype[0]]],
[57, data[alltype[1]]], [57, data[alltype[1]]],
[67, data[alltype[2]]], [67, data[alltype[2]]],
[89, data[alltype[3]]] [89, data[alltype[3]]]
]: ] :
[ [
[xValue, data?.rz], [xValue, data?.rz],
[51.6, data[alltype[0]]], [51.6, data[alltype[0]]],
@ -185,7 +185,10 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
[73, data[alltype[2]]], [73, data[alltype[2]]],
[85, data[alltype[3]]] [85, data[alltype[3]]]
] ]
: [] : [];
const filteredArray = line.filter(subArray => {
return subArray.every(item => item !== null && item !== undefined);
});
let eopts = { let eopts = {
toolbox: { toolbox: {
show: true, show: true,
@ -430,7 +433,7 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
lineStyle: { lineStyle: {
color: '#5487FF', color: '#5487FF',
}, },
data: line data: filteredArray
}, },
] ]
} }

View File

@ -157,7 +157,7 @@
getImgFlow(imgUrl) { getImgFlow(imgUrl) {
if (imgUrl) { if (imgUrl) {
uni.request({ uni.request({
url: 'http://223.75.53.141:83' + url: uni.$http.baseUrl +
`/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`, `/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`,
responseType: 'arraybuffer', responseType: 'arraybuffer',
success: (res) => { success: (res) => {

View File

@ -107,7 +107,7 @@ export default {
uploadFilePromise(url,name) { uploadFilePromise(url,name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://223.75.53.141:83/gunshiApp/tsg/maintain/service/file/upload/singleSimple', // url: uni.$http.baseUrl +'/gunshiApp/tsg/maintain/service/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -13,7 +13,7 @@
<div class="scroll-table"> <div class="scroll-table">
<tr v-for="(item, index) in tableData" :key="index"> <tr v-for="(item, index) in tableData" :key="index">
<td style="width: 40%;">{{item.obDate}}</td> <td style="width: 40%;">{{item.obDate}}</td>
<td style="width: 40%;">{{item.mnNo}}</td> <td style="width: 40%;">{{item.order}}</td>
<td style="width:20%;"><span :class="item.status === 1 ? 'has-ant' : 'no-ant'">{{ simpleData(item.status) }}</span></td> <td style="width:20%;"><span :class="item.status === 1 ? 'has-ant' : 'no-ant'">{{ simpleData(item.status) }}</span></td>
</tr> </tr>
<div style="height:180px"></div> <div style="height:180px"></div>

View File

@ -99,7 +99,7 @@
getImgFlow(imgUrl) { getImgFlow(imgUrl) {
uni.request({ uni.request({
url: 'http://223.75.53.141:83' + url: uni.$http.baseUrl +
`/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`, `/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`,
responseType: 'arraybuffer', responseType: 'arraybuffer',
success: (res) => { success: (res) => {

View File

@ -13,7 +13,7 @@
<div class="scroll-table"> <div class="scroll-table">
<tr v-for="(item, index) in tableData" :key="index"> <tr v-for="(item, index) in tableData" :key="index">
<td style="width: 40%;">{{item.obDate}}</td> <td style="width: 40%;">{{item.obDate}}</td>
<td style="width: 40%;">{{item.mnNo}}</td> <td style="width: 40%;">{{item.order}}</td>
<td style="width:20%;"><span :class="item.status === 1 ? 'has-ant' : 'no-ant'">{{ simpleData(item.status) }}</span></td> <td style="width:20%;"><span :class="item.status === 1 ? 'has-ant' : 'no-ant'">{{ simpleData(item.status) }}</span></td>
</tr> </tr>
<div style="height:180px"></div> <div style="height:180px"></div>

View File

@ -61,7 +61,7 @@
stStcd:'', stStcd:'',
shStcd:'', shStcd:'',
imageList:[], imageList:[],
baseUrl:'http://223.75.53.141:83', baseUrl:uni.$http.baseUrl,
showImg:'../../static/skimg.png' showImg:'../../static/skimg.png'
} }

View File

@ -87,7 +87,7 @@
this.isStartDownload = true this.isStartDownload = true
//App //App
// const baseUrl = `http://223.75.53.141:83/gunshiApp/tsg/${this.info.url}` // const baseUrl = `http://223.75.53.141:83/gunshiApp/tsg/${this.info.url}`
const baseUrl = `http://local.gunshiiot.com:18083/gunshiApp/tsg/${this.info.url}` const baseUrl = uni.$http.baseUrl+`/gunshiApp/tsg/${this.info.url}`
downloadApp(baseUrl, current => { downloadApp(baseUrl, current => {
// //
this.hasProgress = true this.hasProgress = true

View File

@ -195,7 +195,7 @@
uploadFilePromise(url, name) { uploadFilePromise(url, name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://223.75.53.141:83/gunshiApp/tsg/inspect/task/file/upload/singleSimple', // url: uni.$http.baseUrl +'/gunshiApp/tsg/inspect/task/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -142,7 +142,7 @@
uploadFilePromise(url,name) { uploadFilePromise(url,name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://223.75.53.141:83/gunshiApp/tsg/maintain/service/file/upload/singleSimple', // url: uni.$http.baseUrl +'/gunshiApp/tsg/maintain/service/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -134,19 +134,19 @@
item.childen = item.children.map(i => { item.childen = item.children.map(i => {
i.handlePics?.map(item1=>{ i.handlePics?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath item1.url ='http://223.75.53.141:9100/gs-tsg' + item1.filePath
return item1 return item1
}) })
i.handleVideos?.map(item1=>{ i.handleVideos?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath item1.url ='http://223.75.53.141:9100/gs-tsg' + item1.filePath
return item1 return item1
}) })
i.inspectPics?.map(item1=>{ i.inspectPics?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath item1.url ='http://223.75.53.141:9100/gs-tsg' + item1.filePath
return item1 return item1
}) })
i.inspectVideos?.map(item1=>{ i.inspectVideos?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath item1.url ='http://223.75.53.141:9100/gs-tsg' + item1.filePath
return item1 return item1
}) })
if (!i.handlePics) { if (!i.handlePics) {
@ -370,7 +370,7 @@
uploadFilePromise(url, name, index, index1) { uploadFilePromise(url, name, index, index1) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://223.75.53.141:83/gunshiApp/tsg/inspect/task/file/upload/singleSimple', // url: uni.$http.baseUrl +'/gunshiApp/tsg/inspect/task/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -107,7 +107,7 @@ export default {
uploadFilePromise(url,name) { uploadFilePromise(url,name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://223.75.53.141:83/gunshiApp/tsg/maintain/service/file/upload/singleSimple', // url: uni.$http.baseUrl +'/gunshiApp/tsg/maintain/service/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

137
pages/yj/detail/byTable.vue Normal file
View File

@ -0,0 +1,137 @@
<template>
<view :style="{height:'100vh',overflow:'auto'}">
<u-status-bar></u-status-bar>
<u-navbar title="白蚁告警" :autoBack="true" :titleStyle="{
fontSize:'18px'
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar>
<div class="table_div">
<div class="table_cur">
<table style="width:100%;display:block;margin-top: 8vh;">
<tr>
<th style="width: 40%;">
最近告警时间
</th>
<th style="width: 40%;">测点编号</th>
<th style="width: 20%;">有无白蚁</th>
</tr>
<!-- style="max-height: 480px; overflow-y: auto" -->
<div class="scroll-table">
<tr v-for="(item, index) in list" :key="index">
<td style="width: 40%;">{{ item.obDate }}</td>
<td style="width: 40%;">{{ item.order }}</td>
<td style="width:20%;"><span :class="item.status === 1 ? 'has-ant' : 'no-ant'">{{ simpleData(item.status)
}}</span></td>
</tr>
<div style="height:180px"></div>
</div>
</table>
</div>
</div>
</view>
</template>
<script>
import moment from "moment"
export default {
data() {
return {
list:[]
}
},
methods: {
simpleData(status) {
if (status === 1) {
return '有'
} else if (status === 0) {
return '无'
} else {
return ''
}
}
},
onLoad(options) {
this.list = JSON.parse(decodeURIComponent(options.list))
},
}
</script>
<style lang="scss" scoped>
.table_div {
// height: 100%;
max-width: calc(100% - 0px);
// max-height: calc(80vh);
flex: 1;
padding-top: 0px;
// overflow-x: scroll;
}
/*table样式*/
.table_cur {
width: 100%;
empty-cells: show;
border-collapse: collapse;
font-size: 14px;
}
.scroll-table {
height: calc(100vh - 180px);
overflow-y: auto;
width: '100%'
}
.table_cur tr {
display: flex;
line-height: 75rpx;
}
.table_cur th {
height: 85rpx;
color: #3399ef;
background: #e1f3ff;
font-size: 14px;
// font-weight: bold;
padding: 0px 10px;
box-sizing: border-box;
white-space: nowrap;
text-align: center !important;
}
.table_cur td {
height: 65rpx;
// border-bottom: 1px solid #d8ddeb;
font-size: 14px;
color: #2f4056;
padding: 0 10px;
box-sizing: border-box;
white-space: nowrap;
text-align: center !important;
}
.has-ant {
display: inline-block;
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
background-color: red;
color: white;
text-align: center;
font-size: 12px;
}
.no-ant {
display: inline-block;
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
background-color: green;
color: white;
text-align: center;
font-size: 12px;
}
/*table样式 end*/
</style>

View File

@ -1,23 +1,23 @@
<template> <template>
<view :style="{height:'100vh',overflow:'hidden'}"> <view :style="{ height: '100vh', overflow: 'hidden' }">
<u-status-bar></u-status-bar> <u-status-bar></u-status-bar>
<u-navbar title="预警" :autoBack="true" :titleStyle="{ <u-navbar title="预警" :autoBack="true" :titleStyle="{
fontSize:'18px' fontSize: '18px'
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'> }" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar> </u-navbar>
<view class="" style="margin-top:44px;border-top: 1px solid #f0f0f0;"> <view class="" style="margin-top:44px;border-top: 1px solid #f0f0f0;">
<view class="align-center" style="height: 44px;background-color: #f0f0f0;font-size: 12px;padding: 0 10px;"> <view class="align-center" style="height: 44px;background-color: #f0f0f0;font-size: 12px;padding: 0 10px;">
预警时间{{model.start}} {{model.end}} 预警时间{{ model.start }} {{ model.end }}
</view> </view>
<view class="itemYj"> <view class="itemYj">
<view class="itemYjCont" v-for="(value,key) of list" > <view class="itemYjCont" v-for="(value, key) of list">
<view class="item" @click="todetail(key,value)"> <view class="item" @click="todetail(key, value)">
<view :style="`color:${!getValue(value)?'#D9001B':'#04D919'} ;`" class="num"> <view :style="`color:${getColor(value)};`" class="num">
{{getValue(value)}} {{ getValue(value) }}
</view> </view>
<view class="title"> <view class="title">
{{mapType[key]}} {{ mapType[key] }}
</view> </view>
</view> </view>
</view> </view>
@ -30,45 +30,52 @@
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
export default { export default {
data() { data() {
return { return {
show: false, show: false,
model: { model: {
start: moment().subtract(1,'day').format('YYYY-MM-DD HH:mm:ss'), start: moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'),
end: moment().format('YYYY-MM-DD HH:mm:ss') end: moment().format('YYYY-MM-DD HH:mm:ss')
}, },
mapType:{ mapType: {
aiWarnCount:'AI告警', aiWarnCount: 'AI告警',
rzWarn:"水位告警", rzWarn: "水位告警",
// qxWarn:'', // qxWarn:'',
pressWarn:'渗流告警', pressWarn: '渗流告警',
flowWarn:'渗压告警', flowWarn: '渗压告警',
shiftWarn:'位移告警' shiftWarn: '位移告警',
byWarn: '白蚁告警'
}, },
list: { list: {
rzWarn:"正常(-4.031)", rzWarn: "正常(-4.031)",
flowWarn:[], flowWarn: [],
pressWarn:[], pressWarn: [],
// qxWarn:[], // qxWarn:[],
shiftWarn:[], shiftWarn: [],
aiWarnCount: 0,} aiWarnCount: 0,
byWarn: 0
}
}; };
}, },
onLoad() { onLoad() {
this.getList();
this.getList()
}, },
methods: { methods: {
getValue(value){ getValue(value) {
if(Array.isArray(value)){ if (Array.isArray(value)) {
return value.length return value.length
}else{ } else {
return value return value
} }
}, },
getColor(value) {
let str = '';
str = this.getValue(value) + '';
return str.includes("正常") ? '#04D919' : '#D9001B'
},
confirm(e) { confirm(e) {
console.log(e); console.log(e);
this.model.stm = e[0] this.model.stm = e[0]
@ -78,56 +85,64 @@
cancel() { cancel() {
this.show = false this.show = false
}, },
todetail(key,e){ todetail(key, e) {
let arr = encodeURIComponent(JSON.stringify(e)) let arr = encodeURIComponent(JSON.stringify(e))
console.log(key,e.length?.length); console.log(key, e.length);
if(!e.length?.length){ if (!e.length) {
return; return;
} }
if(key=='qxWarn'){ if (key == 'qxWarn') {
uni.navigateTo({ uni.navigateTo({
url:'/pages/yj/detail/qxyj?list='+arr url: '/pages/yj/detail/qxyj?list=' + arr
}) })
} }
if(key == 'shiftWarn'){ if (key == 'shiftWarn') {
uni.navigateTo({ uni.navigateTo({
url:'/pages/yj/detail/wyyj?list='+arr url: '/pages/yj/detail/wyyj?list=' + arr
}) })
} }
if(key == 'flowWarn'){ if (key == 'flowWarn') {
uni.navigateTo({ uni.navigateTo({
url:'/pages/yj/detail/wyyj?list='+arr url: '/pages/yj/detail/wyyj?list=' + arr
}) })
} }
if(key == 'pressWarn'){ if (key == 'pressWarn') {
uni.navigateTo({ uni.navigateTo({
url:'/pages/yj/detail/wyyj?list='+arr url: '/pages/yj/detail/wyyj?list=' + arr
}) })
} }
if(key == 'aiWarnCount'){ if (key == 'aiWarnCount') {
uni.navigateTo({ uni.navigateTo({
url:'/pages/yj/detail/aiyj?list='+arr url: '/pages/yj/detail/aiyj?list=' + arr
})
}
if (key == 'byWarn') {
uni.navigateTo({
url: '/pages/yj/detail/byTable?list=' + arr
}) })
} }
}, },
getList(){ getList() {
uni.$http.post('/gunshiApp/tsg/stQxWarnR/home/warn',this.model).then(res=>{ uni.$http.post('/gunshiApp/tsg/stQxWarnR/home/warn', this.model).then(res => {
delete res.data.data.qxWarn; delete res.data.data.qxWarn;
this.list = res.data.data this.list = res.data.data
}) })
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.itemYj{ .itemYj {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
// justify-content: space-between; // justify-content: space-between;
// column-gap: 8px; // column-gap: 8px;
padding: 10px; padding: 10px;
.itemYjCont{
.itemYjCont {
border-width: 0px; border-width: 0px;
width: 112px; width: 112px;
height: 85px; height: 85px;
@ -144,18 +159,21 @@
justify-content: center; justify-content: center;
margin-bottom: 10px; margin-bottom: 10px;
margin-right: 1px; margin-right: 1px;
.item{
.item {
text-align: center; text-align: center;
} }
.normal{
.normal {
color: #04D919; color: #04D919;
} }
.bj{
color:#D9001B; .bj {
color: #D9001B;
} }
// width: 30%; // width: 30%;
// margin: 5px; // margin: 5px;
} }
} }
</style> </style>