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
uni.$http = $http
// $http.baseUrl = 'http://223.75.53.141:83'
// $http.baseUrl = 'http://local.gunshiiot.com:18083'
$http.baseUrl = 'http://192.168.66.27:24105'
$http.baseUrl = 'http://local.gunshiiot.com:18083'
// $http.baseUrl = 'http://192.168.66.27:24105'
// 请求拦截器
$http.beforeRequest = function (options) {
if (options.url.indexOf('/doLogin') == -1) {

View File

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

View File

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

View File

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

View File

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

View File

@ -107,7 +107,7 @@ export default {
uploadFilePromise(url,name) {
return new Promise((resolve, reject) => {
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,
name: 'file',
formData: {

View File

@ -13,7 +13,7 @@
<div class="scroll-table">
<tr v-for="(item, index) in tableData" :key="index">
<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>
</tr>
<div style="height:180px"></div>

View File

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

View File

@ -13,7 +13,7 @@
<div class="scroll-table">
<tr v-for="(item, index) in tableData" :key="index">
<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>
</tr>
<div style="height:180px"></div>

View File

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

View File

@ -87,7 +87,7 @@
this.isStartDownload = true
//App
// 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 => {
//
this.hasProgress = true

View File

@ -195,7 +195,7 @@
uploadFilePromise(url, name) {
return new Promise((resolve, reject) => {
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,
name: 'file',
formData: {

View File

@ -142,7 +142,7 @@
uploadFilePromise(url,name) {
return new Promise((resolve, reject) => {
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,
name: 'file',
formData: {

View File

@ -134,19 +134,19 @@
item.childen = item.children.map(i => {
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
})
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
})
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
})
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
})
if (!i.handlePics) {
@ -370,7 +370,7 @@
uploadFilePromise(url, name, index, index1) {
return new Promise((resolve, reject) => {
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,
name: 'file',
formData: {

View File

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