develop
ihzero 2023-11-18 14:08:15 +08:00
commit d1c7d2741a
28 changed files with 131 additions and 55 deletions

View File

@ -1,4 +1,4 @@
ENV = 'test'
VUE_APP_BASE_API = 'http://lcny.sk797.cn'
VUE_APP_BASE_API = 'https://lcny.sk797.cn'

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="https://lcny.sk797.cn/h5/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="https://lcny.sk797.cn/h5/static/js/chunk-vendors.959091ef.js"></script><script src="https://lcny.sk797.cn/h5/static/js/index.eadd280b.js"></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="https://lcny.sk797.cn/h5/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="https://lcny.sk797.cn/h5/static/js/chunk-vendors.959091ef.js"></script><script src="https://lcny.sk797.cn/h5/static/js/index.eabbf6b4.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,6 @@
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:h5:test": "cross-env NODE_ENV=test UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",

View File

@ -35,6 +35,9 @@ export default {
<style lang="scss">
@import 'uview-ui/index.scss';
/*每个页面公共css */
uni-modal {
z-index: 999999 !important;
}
body,
uni-page-body {
@ -293,7 +296,7 @@ uni-page-body {
align-items: center;
justify-content: space-between;
padding: 24rpx 30rpx;
margin-bottom: 20rpx;
// margin-bottom: 20rpx;
font-size: 28rpx;
.tit {
font-size: 28rpx;

View File

@ -76,7 +76,7 @@
<view class="flex-1">{{formInfo.created_at|timeFormat}}</view>
</view>
<view class="plist u-border-bottom">
<view class="label_t">地址</view>
<view class="label_t">内容</view>
<view class="flex-1">{{formInfo.content}}</view>
</view>
</view>

View File

@ -8,7 +8,11 @@
</view>
<view class="h-80vh flex-center">
<view class="w-full">
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
<qiun-data-charts
type="column"
:opts="opts"
:chartData="chartData"
/>
</view>
</view>
</view>
@ -212,7 +216,10 @@ export default {
this.getData()
},
async getData() {
if (!this.filterParmas.device_id) return
if (!this.filterParmas.device_id) {
this.$u.toast('没有关联基地')
return (this.chartData = { series: [] })
}
try {
const { data } = await http.get(
`/api/devices/${this.filterParmas.device_id}/worm-statics`,

View File

@ -148,7 +148,11 @@ export default {
this.mescroll.resetUpScroll()
},
async getData(e) {
if (!e.device_id) return
if (!e.device_id) {
this.mescroll.endByPage(0, 0)
return this.$u.toast('没有关联基地')
}
try {
const { data } = await http.get(
`/api/devices/${e.device_id}/worm-photos`,

View File

@ -148,7 +148,9 @@ export default {
this.mescroll.resetUpScroll()
},
async getData(e) {
if (!e.device_id) return
if (!e.device_id) {
return this.$u.toast('没有关联基地')
}
try {
const { data } = await http.get(
`/api/devices/${e.device_id}/worm-photos`,

View File

@ -190,7 +190,9 @@ export default {
},
async getData() {
this.chatList = []
if (!this.filterParmas.device_id) return
if (!this.filterParmas.device_id){
return this.$u.toast('没有关联基地')
}
const { data } = await http.get('/api/monitoring-data', {
params: this.filterParmas,
})

View File

@ -399,15 +399,21 @@
}
this.$http.get('/api/agricultural-device-basic',{params:params}).then(({data})=>{
console.log(data);
if(data.code==200){
let _data = data.data;
if(_data.length==0){
return this.$u.toast('没有关联基地');
}
for(let item of _data){
item['label'] = item.name;
item['value'] = item.id;
}
this.deviceAddressList = _data;
this.addressValue = _data[0].id;
this.addressName = _data[0].name;
this.queryAddressDevicePoints(this.addressValue);
}
}).catch(()=>{

View File

@ -406,6 +406,7 @@ export default {
params['is_recommend'] = this.is_recommend
}
this.loading = 'loading'
this.$http
.get('/api/devices', { params: params })
.then(async ({ data }) => {
@ -533,6 +534,10 @@ export default {
console.log(data)
if (data.code == 200) {
let _data = data.data
if(_data.length==0){
this.loading = 'nomore'
return this.$u.toast('没有关联基地')
}
for (let item of _data) {
item['label'] = item.name
item['value'] = item.id

View File

@ -41,12 +41,17 @@
</view>
</view>
<view class="warning-section">
<view class="top_box u-border-bottom">
<view class="flex justify-between items-center">
<view class="tit">预警数据统计</view>
<view class="set_warning">
<u-button v-auth="['endpoint.soil.setting','endpoint.soil.setting_edit']" class="set_btn" @click="setWarnInfo()" size="mini"></u-button>
</view>
</view>
<view class="my-20rpx">
<u-line></u-line>
</view>
<view class="cont-box">
<view class="warning-item" @click="warningClickFn(1)">
<view class="name">Ⅰ级预警</view>
@ -68,10 +73,13 @@
</view>
<!-- 电导率 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">电导率<text class="unit">us/cm</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -82,10 +90,13 @@
</view>
<!-- 湿度 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">湿度<text class="unit">%RH</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -96,10 +107,13 @@
</view>
<!-- 温度 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">温度<text class="unit"></text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -110,10 +124,13 @@
</view>
<!-- -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit"><text class="unit">mg/kg</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -124,10 +141,13 @@
</view>
<!-- -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit"><text class="unit">mg/kg</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -138,10 +158,13 @@
</view>
<!-- -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit"><text class="unit">mg/kg</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -405,6 +428,9 @@
console.log(data);
if(data.code==200){
let _data = data.data;
if(_data.length==0){
return this.$u.toast('没有关联基地');
}
for(let item of _data){
item['label'] = item.name;
item['value'] = item.id;
@ -429,6 +455,9 @@
console.log(data);
if(data.code==200){
let _data = data.data;
if(_data.length==0){
// return this.$u.toast('');
}
let options = [];
for(let k in _data){
let item = {};
@ -646,7 +675,7 @@
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
// margin-bottom: 24rpx;
padding-bottom: 20rpx;
.tit{
font-weight: bold;

View File

@ -41,12 +41,15 @@
</view>
</view>
<view class="warning-section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">预警数据统计</view>
<view class="set_warning">
<u-button v-auth="['endpoint.water.setting','endpoint.water.setting_edit']" class="set_btn" @click="setWarnInfo()" size="mini"></u-button>
</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cont-box">
<view class="warning-item" @click="warningClickFn(1)">
<view class="name">Ⅰ级预警</view>
@ -68,10 +71,13 @@
</view>
<!-- -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit"><text class="unit">mg/L</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -82,10 +88,13 @@
</view>
<!-- 电导率 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">电导率<text class="unit">us/cm</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -97,10 +106,13 @@
<!-- 氧气 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">氧气<text class="unit">mg/L</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -111,10 +123,13 @@
</view>
<!-- PH -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">PH<text class="unit"></text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -125,10 +140,13 @@
</view>
<!-- 温度 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">温度<text class="unit"></text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -139,10 +157,13 @@
</view>
<!-- 浊度 -->
<view class="chart_section">
<view class="top_box u-border-bottom">
<view class="top_box">
<view class="tit">浊度<text class="unit">NTU</text></view>
<view class="name">{{addressName}}</view>
</view>
<view class="mb-20rpx">
<u-line></u-line>
</view>
<view class="cart_box">
<qiun-data-charts
type="area"
@ -407,6 +428,9 @@
console.log(data);
if(data.code==200){
let _data = data.data;
if(_data.length==0){
return this.$u.toast('没有关联基地');
}
for(let item of _data){
item['label'] = item.name;
item['value'] = item.id;
@ -432,6 +456,9 @@
console.log(data);
if(data.code==200){
let _data = data.data;
if(_data.length==0){
// return this.$u.toast('');
}
let options = [];
for(let k in _data){
let item = {};
@ -652,7 +679,7 @@
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
// margin-bottom: 24rpx;
padding-bottom: 20rpx;
.tit{
font-weight: bold;

View File

@ -25,7 +25,7 @@
v-model="password"
/>
</view>
<button @tap="login()" type="button"> </button>
<u-button type="primary" shape="circle" @tap="login()"> </u-button>
<!-- <view class="reg" @tap="reg()"> </view> -->
</form>
</view>
@ -134,15 +134,7 @@ export default {
padding-top: 80rpx;
}
.t-login button {
font-size: 28rpx;
background: #2796f2;
color: #fff;
height: 90rpx;
line-height: 90rpx;
border-radius: 50rpx;
font-weight: bold;
}
.t-login input {
height: 90rpx;