develop
ihzero 2024-01-29 22:21:44 +08:00
commit be897f3391
48 changed files with 1363 additions and 1036 deletions

View File

@ -1,2 +1,6 @@
<!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.4daeafb1.js"></script></body></html>
<<<<<<< HEAD
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.4daeafb1.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="/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.959091ef.js"></script><script src="/static/js/index.d07e9c1f.js"></script></body></html>
>>>>>>> master

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

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

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

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

@ -1,9 +1,9 @@
<template>
<view class="h-full w-full">
<iframe class="w-full h-full" v-if="type=='iframe'" :src="url"></iframe>
<div ref="muiPlayer" v-else>
</div>
<view class="relative video-box">
<view class="absolute top-0 left-0 w-full h-full">
<iframe class="w-full h-full" :src="url" v-if="type == 'iframe'"></iframe>
<div ref="muiPlayer" v-else></div>
</view>
</view>
</template>
<script>
@ -27,7 +27,7 @@ export default {
methods: {
videoPlayer() {
if (this.type == 'iframe') {
console.log("=====");
console.log('=====')
} else {
let parse = {}
if (this.type == 'm3u8') {
@ -101,4 +101,9 @@ export default {
},
}
</script>
<style lang="scss"></style>
<style lang="scss">
.video-box {
width: 100%;
padding-top: 56.2%;
}
</style>

View File

@ -1,10 +1,37 @@
<template>
<u-dropdown-item
:title="label"
v-model="status"
@change="handleChange"
:options="getOptions"
></u-dropdown-item>
<view>
<!-- <u-dropdown-item v-if="filterable">
<u-input v-model="filterValue" placeholder="筛选"></u-input>
</u-dropdown-item> -->
<u-dropdown-item
:title="label"
v-model="status"
@change="handleChange"
:options="getOptions"
>
<view class="bg-white">
<view class="px-34rpx" v-if="filterable">
<u-input v-model="filterValue" placeholder="筛选"></u-input>
</view>
<scroll-view
scroll-y="true"
:style="{
height: $u.addUnit(getOptions.length > 8 ? 930 : 'auto'),
}"
>
<u-cell-group>
<u-cell-item
@click="handleSelect(item)"
v-for="(item, i) in getOptions"
:key="i"
:title="item.label"
:arrow="false"
></u-cell-item>
</u-cell-group>
</scroll-view>
</view>
</u-dropdown-item>
</view>
</template>
<script>
import { omit } from 'lodash-es'
@ -33,6 +60,10 @@ export default {
type: String,
default: 'value',
},
filterable: {
type: Boolean,
default: false,
},
},
computed: {
status: {
@ -46,7 +77,7 @@ export default {
},
getOptions() {
const { labelField, valueField } = this
return this.options.reduce((prev, next) => {
const arr = this.options.reduce((prev, next) => {
if (next) {
const value = next[valueField]
prev.push({
@ -57,10 +88,13 @@ export default {
}
return prev
}, [])
if (!this.filterValue) return arr
return arr.filter((e) => e.label.includes(this.filterValue))
},
},
data() {
return {
filterValue: '',
options: [],
emitData: null,
isFirstLoad: true,
@ -70,6 +104,10 @@ export default {
this.fetch()
},
methods: {
handleSelect(e) {
this.status = e.value
this.$emit('close-dropdown', this.status)
},
async fetch() {
const api = this.api
if (!api || !this.isFunction(api)) return

View File

@ -1,7 +1,7 @@
<template>
<u-dropdown-item :title="label">
<view class="bg-white p-30rpx">
<u-input v-model="status" :placeholder="placeholder" class="flex-1" />
<u-input v-model="status" :placeholder="placeholder" :clearable="false" class="flex-1" />
<view class="my-20rpx">
<u-line></u-line>
</view>

View File

@ -239,8 +239,9 @@
"path" : "pages/basics/profile-detail",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarTitleText": "基地概况",
"enablePullDownRefresh": false,
"navigationStyle":"custom"
}
},{
"path" : "pages/crop/town-crop",

View File

@ -86,7 +86,6 @@ export default {
const resData = data.data
Object.keys(resData).map((e) => {
const zindex = this.list.findIndex(({ key }) => key == e)
if (zindex >= 0) this.list[zindex].value = resData[e].slice(1)
})
})

View File

@ -13,12 +13,12 @@
<view class="flex items-center">
<view class="w-16rpx h-16rpx bg-hex-F7B379"></view>
<view class="ml-10rpx">离线</view>
<view class="ml-10rpx text-32rpx">{{ data.value[0] }}</view>
<view class="ml-10rpx text-32rpx">{{ data.value[1] }}</view>
</view>
<view class="flex items-center">
<view class="w-16rpx h-16rpx bg-hex-EB313E"></view>
<view class="ml-10rpx">故障</view>
<view class="ml-10rpx text-32rpx">{{ data.value[0] }}</view>
<view class="ml-10rpx text-32rpx">{{ data.value[2] }}</view>
</view>
</view>
</view>

View File

@ -8,6 +8,17 @@
<u-line></u-line>
</view>
<view class="py-20rpx">
<u-tabs
:list="desList"
bar-height="4"
height="50"
font-size="28"
gutter="18"
:current="current"
@change="changeTab"
></u-tabs>
</view>
<view class="pb-20rpx">
<qiun-data-charts
:loadingType="loadingType"
type="area"
@ -21,6 +32,39 @@
<script>
import QiunDataCharts from '@/components/qiun-data-charts/qiun-data-charts.vue'
import { http } from '@/api/index.js'
const desList = [
{
key: 'turbidity',
unit: 'NTU',
name: '浊度',
},
{
key: 'chlorine',
unit: 'mg/L',
name: '余氯',
},
{
key: 'ph',
unit: 'PH',
name: 'PH值',
},
{
key: 'temperature',
unit: '℃',
name: '温度',
},
{
key: 'oxygen',
unit: 'mg/L',
name: '溶解氧',
},
{
key: 'conductivity',
unit: 'uS/cm',
name: '电导率',
},
]
export default {
props: {
baseId: {
@ -30,6 +74,8 @@ export default {
components: { QiunDataCharts },
data() {
return {
desList,
current: 0,
loadingType: 1,
opts: {
dataLabel: false, //
@ -53,16 +99,26 @@ export default {
},
}
},
computed: {
currentTab() {
return this.desList[this.current]
},
},
mounted() {
this.init()
},
methods: {
changeTab(e) {
this.current = e
this.init()
},
async init() {
try {
const { data } = await http.get('/api/device-base-data-statics', {
params: {
base_id: this.baseId,
device_type: 3,
device_column: this.currentTab.key,
},
})
const resData = data.data

View File

@ -8,6 +8,17 @@
<u-line></u-line>
</view>
<view class="py-20rpx">
<u-tabs
:list="desList"
bar-height="4"
height="50"
font-size="28"
gutter="18"
:current="current"
@change="changeTab"
></u-tabs>
</view>
<view class="pb-20rpx">
<qiun-data-charts
:loadingType="loadingType"
type="area"
@ -62,6 +73,8 @@ export default {
components: { QiunDataCharts },
data() {
return {
desList,
current: 0,
loadingType: 1,
opts: {
dataLabel: false, //
@ -85,16 +98,26 @@ export default {
},
}
},
computed: {
currentTab() {
return this.desList[this.current]
},
},
mounted() {
this.init()
},
methods: {
changeTab(e) {
this.current = e
this.init()
},
async init() {
try {
const { data } = await http.get('/api/device-base-data-statics', {
params: {
base_id: this.baseId,
device_type: 2,
device_column: this.currentTab.key,
},
})
const resData = data.data

View File

@ -1,5 +1,15 @@
<template>
<view>
<u-navbar
:isBack="showAppbar"
:title="title"
:background="background"
:custom-back="goback"
:title-color="titleColor"
v-if="showAppbar"
:back-icon-color="titleColor"
>
</u-navbar>
<view class="space-y-20rpx">
<BaseChat
:baseId="id"
@ -18,6 +28,7 @@
</view>
</template>
<script>
import { navigateBack } from '@/com/utils.js'
import { http } from '@/api/index.js'
import BaseChat from './components/base-chat.vue'
import SBYXZT from './components/sbyxzt.vue'
@ -32,10 +43,14 @@ export default {
QXSJ,
TRJC,
SZJC,
JK
JK,
},
data() {
return {
background: {
backgroundColor: '#2a7dc9',
},
titleColor: '#ffffff',
id: '',
devices: [],
crops: [],
@ -43,21 +58,21 @@ export default {
}
},
computed: {
isJK(){
isJK() {
return this.devices.findIndex((e) => e.type == '监控设备') >= 0
},
isTR(){
isTR() {
return this.devices.findIndex((e) => e.type == '土壤设备') >= 0
},
isQX(){
isQX() {
return this.devices.findIndex((e) => e.type == '气象设备') >= 0
},
isSZ(){
isSZ() {
return this.devices.findIndex((e) => e.type == '水质设备') >= 0
},
isSB(){
isSB() {
return this.devices.length > 0
}
},
},
onLoad({ id }) {
this.id = id
@ -77,8 +92,20 @@ export default {
this.devices = devices
uni.setNavigationBarTitle({ title: name })
this.crops = crops
try {
uni.postMessage({
data: {
even:'xxxxxi'
}
});
} catch (error) {
}
})
},
goback() {
navigateBack()
},
},
}
</script>

View File

@ -1,13 +1,13 @@
<template>
<view>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="bg-white">
<SearchForm
:schemas="searchFormSchema"
@submit="handleSubmit"
></SearchForm>
</view>
</u-sticky>
<!-- <u-sticky :h5NavHeight="h5NavHeightP"> -->
<view class="bg-white">
<SearchForm
:schemas="searchFormSchema"
@submit="handleSubmit"
></SearchForm>
</view>
<!-- </u-sticky> -->
<mescroll-body
@init="mescrollInit"
@up="upCallback"
@ -147,14 +147,6 @@ export default {
formShow: false,
baseShow: false,
searchFormSchema: [
{
field: 'name',
label: '名称',
component: 'Input',
componentProps: {
placeholder: '请输入名称',
},
},
{
field: 'industry',
label: '农业类型',
@ -172,6 +164,36 @@ export default {
}
},
},
{
field: 'name',
label: '名称',
component: 'ApiSelect',
componentProps: ({ formActionType }) => {
return {
api: async (e) => {
const { data } = await http.get('/api/agricultural-basic', {
params: {
page: 1,
per_page: 10000,
},
})
return [{name:'全部',key:''}].concat(data.data.map(e => ({name:e.name,key:e.name})))
},
filterable: true,
filterMethod: (e) => {},
labelField: 'name',
valueField: 'key',
}
},
},
// {
// field: 'name',
// label: '',
// component: 'Input',
// componentProps: {
// placeholder: ''
// },
// }
],
}
},

View File

@ -94,7 +94,7 @@ export default {
{
label: '基地概况',
url: '/pages/basics/profile',
permission: 'super',
permission: 'endpoint.agricultural_base_overview.index',
},
],
},

View File

@ -139,7 +139,7 @@
<view class="video_cd">
<!-- #ifdef H5 -->
<!-- {{ video.video_url }} -->
<LiveVideo :id="video.id"></LiveVideo>
<LiveVideo :id="video.id" :key="video.id"></LiveVideo>
<!-- <LiveVideo :url="video.video_url" :type="video.video_type"></LiveVideo> -->
<!-- <videoM3u8H5 v-if="video.video_type=='m3u8'" :url="video.video_url" :id="`m_${index}_refsM3u8`"></videoM3u8H5>
<video-flv-h5 v-else :url="video.video_url"></video-flv-h5> -->

File diff suppressed because it is too large Load Diff

View File

@ -129,7 +129,7 @@
<view class="handle-btns">
<view v-auth="['endpoint.admin_users.destroy']" class="btn_del" @click="deleteInfoId(formInfo.id)"></view>
<view v-auth="['endpoint.admin_users.edit_password']" class="btn_edit" @click="editPwdPopup(formInfo.id)"></view>
<view v-if="formInfo.banned_at" v-auth="['super']" class="btn_edit" @click="unlock(formInfo.id)"></view>
<view v-if="formInfo.banned_at" v-auth="['endpoint.admin_users.unban']" class="btn_edit" @click="unlock(formInfo.id)"></view>
<view v-auth="['endpoint.admin_users.edit']" class="btn_edit" @click="editInfoId(formInfo.id)"></view>
</view>
</view>