Merge pull request 'dev' (#423) from dev into master
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/423
This commit is contained in:
@@ -23,6 +23,7 @@ steps:
|
|||||||
- npm run build
|
- npm run build
|
||||||
- echo $NODE_MODULES_PATH
|
- echo $NODE_MODULES_PATH
|
||||||
- cp -r dist /app/build/$DRONE_REPO_NAME
|
- cp -r dist /app/build/$DRONE_REPO_NAME
|
||||||
|
- ls
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -92,5 +93,8 @@ volumes:
|
|||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|||||||
19
default.conf
Normal file
19
default.conf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://gateway.dev.svc.cluster.local:8080;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
#proxy_set_header Host $host;
|
||||||
|
rewrite "^/api/(.*)$" /$1 break;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /home/clay;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -46,4 +46,4 @@ spec:
|
|||||||
cpu: 2
|
cpu: 2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: app-port
|
name: app-port1
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ async function handleMounted() {
|
|||||||
demo = new ThreeDScene(three, content.value);
|
demo = new ThreeDScene(three, content.value);
|
||||||
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
||||||
demo.isedit = params.isedit;
|
demo.isedit = params.isedit;
|
||||||
|
demo.enableLeftBtn = true;
|
||||||
// "../../../../public/tunnelModel/chanel-have-wall-now-use.gltf"
|
// "../../../../public/tunnelModel/chanel-have-wall-now-use.gltf"
|
||||||
const loaded = await demo.loadModel(
|
const loaded = await demo.loadModel(
|
||||||
GLTFLoader,
|
GLTFLoader,
|
||||||
@@ -209,6 +210,7 @@ let pointNum = ref(0);
|
|||||||
let targetP = ref({});
|
let targetP = ref({});
|
||||||
// 右键点击附着点后调函数
|
// 右键点击附着点后调函数
|
||||||
function rClickCallback(demo) {
|
function rClickCallback(demo) {
|
||||||
|
|
||||||
function editDev(targetPoint = null) {
|
function editDev(targetPoint = null) {
|
||||||
hasDevice.value = targetPoint.hasDevice;
|
hasDevice.value = targetPoint.hasDevice;
|
||||||
targetP.value = targetPoint;
|
targetP.value = targetPoint;
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ export default class Demo {
|
|||||||
const intersects = raycaster.intersectObjects(hoverModels);
|
const intersects = raycaster.intersectObjects(hoverModels);
|
||||||
|
|
||||||
if (intersects.length > 0) {
|
if (intersects.length > 0) {
|
||||||
if(Object.keys(intersects[0].object).includes('enableHover') && !intersects[0].object.enableHover)return;
|
if(Object.keys(intersects[0].object).includes('enableHover') && !intersects[0].object.enableHover && !isedit)return;
|
||||||
if (!this.preHover) {
|
if (!this.preHover) {
|
||||||
this.preHover = intersects[0].object;
|
this.preHover = intersects[0].object;
|
||||||
} else {
|
} else {
|
||||||
@@ -353,6 +353,7 @@ export default class Demo {
|
|||||||
if (e.button === 0) {
|
if (e.button === 0) {
|
||||||
this._handleLClick(intersects[0].object);
|
this._handleLClick(intersects[0].object);
|
||||||
} else if (e.button === 2) {
|
} else if (e.button === 2) {
|
||||||
|
return; //==========》暂时不处理右键事件
|
||||||
this._handleRClick(intersects[0].object);
|
this._handleRClick(intersects[0].object);
|
||||||
}
|
}
|
||||||
}, 400);
|
}, 400);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="used-ele" :style="{ backgroundColor: bgImage }" @click="handleOpenChart">
|
<div id="used-ele" :style="{ backgroundColor: bgImage }" @click="handleOpenChart(fanList)">
|
||||||
<!-- <div v-if="electricityConsumptionMonthly===0&&monthlySavings===0" class="showNull ">-->
|
<!-- <div v-if="electricityConsumptionMonthly===0&&monthlySavings===0" class="showNull ">-->
|
||||||
<!-- <div class="loading" v-if="loading===0"></div>-->
|
<!-- <div class="loading" v-if="loading===0"></div>-->
|
||||||
<!-- {{ loading === 0 ? '加载中...' : '暂无数据~' }}-->
|
<!-- {{ loading === 0 ? '加载中...' : '暂无数据~' }}-->
|
||||||
@@ -142,10 +142,10 @@ watch(() => props.eleData, (now) => {
|
|||||||
if (now) {
|
if (now) {
|
||||||
let fanObj = {}
|
let fanObj = {}
|
||||||
now.frequencyChangerList.forEach(item => {
|
now.frequencyChangerList.forEach(item => {
|
||||||
if (item.equipmentId === 22 || item.equipmentId === 23) {
|
if (item.equipmentType === 'frequency1' || item.equipmentType === "frequency2") {
|
||||||
fanObj = {
|
fanObj = {
|
||||||
value: item.equipmentId,
|
value: item.equipmentId,
|
||||||
label: changeNum(item.equipmentId)
|
label: changeNum(item.equipmentId, item.equipmentType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fanList.value.push(fanObj)
|
fanList.value.push(fanObj)
|
||||||
@@ -224,30 +224,30 @@ const shrinkScreen = () => {
|
|||||||
initChart(chartData.dates, chartData.consumptionValues, chartData.saveElectricityValues, dataZoomTop)
|
initChart(chartData.dates, chartData.consumptionValues, chartData.saveElectricityValues, dataZoomTop)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const changeNum = (item) => {
|
const changeNum = (item,equipmentType) => {
|
||||||
switch (item) {
|
switch (equipmentType) {
|
||||||
case 22:
|
case 'frequency1':
|
||||||
return '一号风机';
|
return '一号风机';
|
||||||
case 23:
|
case 'frequency2':
|
||||||
return '二号风机';
|
return '二号风机';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const setValueA = () => {
|
const setValueA = () => {
|
||||||
if (electricityConsumptionMonthly.value === 0 || length.value === null||electricityConsumptionMonthly.value<0) {
|
if (electricityConsumptionMonthly.value === 0 || length.value === null || electricityConsumptionMonthly.value < 0) {
|
||||||
valueA.value.style.height = `0px`;
|
valueA.value.style.height = `0px`;
|
||||||
}
|
}
|
||||||
let width = (electricityConsumptionMonthly.value * length.value?.offsetHeight) / 1000000;
|
let width = (electricityConsumptionMonthly.value * length.value?.offsetHeight) / 1000000;
|
||||||
valueA.value.style.height = `${width}px`;
|
valueA.value.style.height = `${width}px`;
|
||||||
}
|
}
|
||||||
const setValueB = () => {
|
const setValueB = () => {
|
||||||
if (monthlySavings.value === 0 || length.value === null||monthlySavings.value<0) {
|
if (monthlySavings.value === 0 || length.value === null || monthlySavings.value < 0) {
|
||||||
valueB.value.style.height = `0px`;
|
valueB.value.style.height = `0px`;
|
||||||
}
|
}
|
||||||
let width = (monthlySavings.value * length.value?.offsetHeight) / 1000000;
|
let width = (monthlySavings.value * length.value?.offsetHeight) / 1000000;
|
||||||
valueB.value.style.height = `${width}px`;
|
valueB.value.style.height = `${width}px`;
|
||||||
}
|
}
|
||||||
const getBasicData = (data) => {
|
const getBasicData = (data) => {
|
||||||
if(!data)return;
|
if (!data) return;
|
||||||
electricityConsumptionMonthly.value = data.electricityConsumptionCount
|
electricityConsumptionMonthly.value = data.electricityConsumptionCount
|
||||||
monthlySavings.value = data.conserveElectricityCount
|
monthlySavings.value = data.conserveElectricityCount
|
||||||
}
|
}
|
||||||
@@ -327,12 +327,12 @@ const getFanInfo = (equipmentId, type = 'month', time = '', flag) => {
|
|||||||
loadingText.value = '加载中...'
|
loadingText.value = '加载中...'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleOpenChart = () => {
|
const handleOpenChart = (list) => {
|
||||||
monthValue.value=''
|
monthValue.value = ''
|
||||||
selectTimeButton.value = 1
|
selectTimeButton.value = 1
|
||||||
isVisited.value = true
|
isVisited.value = true
|
||||||
openEquipmentId.value = fanList.value[0].value
|
openEquipmentId.value = list[0].value
|
||||||
chooseChartFan.value = fanList.value[0].value
|
chooseChartFan.value = list[0].value
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (chooseMonthRef.value) {
|
if (chooseMonthRef.value) {
|
||||||
chooseMonthRef.value.clearData()
|
chooseMonthRef.value.clearData()
|
||||||
|
|||||||
@@ -333,8 +333,8 @@ const handleLogout = () => {
|
|||||||
const initWebSocket = () => {
|
const initWebSocket = () => {
|
||||||
// let wsUrl = `ws://frp.toomewhy.top:38000/wstunnel/websocket/simulate/${token}/123`;
|
// let wsUrl = `ws://frp.toomewhy.top:38000/wstunnel/websocket/simulate/${token}/123`;
|
||||||
// let wsUrl = `ws://192.168.31.175:9000/websocket/simulate/${token}/${serialNumber.value}`;
|
// let wsUrl = `ws://192.168.31.175:9000/websocket/simulate/${token}/${serialNumber.value}`;
|
||||||
// let wsUrl = `ws://tunnel.feashow.com/api/wstunnel/websocket/simulate/${token}/${serialNumber.value}`;
|
let wsUrl = `ws://tunnel.feashow.com/api/wstunnel/websocket/simulate/${token}/${serialNumber.value}`;
|
||||||
let wsUrl = import.meta.env.VITE_BASE_WSURL + `/${token}/${serialNumber.value}`;
|
// let wsUrl = import.meta.env.VITE_BASE_WSURL + `/${token}/${serialNumber.value}`;
|
||||||
// let wsUrl = `ws://clay.frp.feashow.cn/wstunnel/websocket/equipment/${token}/${serialNumber.value}`;
|
// let wsUrl = `ws://clay.frp.feashow.cn/wstunnel/websocket/equipment/${token}/${serialNumber.value}`;
|
||||||
// let wsUrl = `ws://frp.toomewhy.top:39000/websocket/simulate/${token}/${serialNumber.value}`;
|
// let wsUrl = `ws://frp.toomewhy.top:39000/websocket/simulate/${token}/${serialNumber.value}`;
|
||||||
socket = new WebSocket(wsUrl);
|
socket = new WebSocket(wsUrl);
|
||||||
@@ -363,7 +363,7 @@ const initWebSocket = () => {
|
|||||||
socketData.windSpeed = data;
|
socketData.windSpeed = data;
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
previewRef.value.changePointValue(item)
|
previewRef.value?.changePointValue(item)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
<el-button @click="handleReset">重置</el-button>
|
<el-button @click="handleReset">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="device-table" :style="{ marginTop: roleKey === 'administrator' ? '40px' : '0' }">
|
<div class="device-table" :style="{ marginTop: roleKey === 'administrator' ? '10px' : '0' }">
|
||||||
<el-table stripe v-loading="loading" :empty-text="tableEmptyText"
|
<el-table stripe v-loading="loading" :empty-text="tableEmptyText"
|
||||||
style="background-color: #011c29;--el-table-border-color: none;"
|
style="background-color: #011c29;--el-table-border-color: none;"
|
||||||
:header-cell-style="{ backgroundColor: '#064B66', color: '#fff', fontSize: '40px', borderBottom: 'none' }"
|
:header-cell-style="{ backgroundColor: '#064B66', color: '#fff', fontSize: '40px', borderBottom: 'none' }"
|
||||||
@@ -229,13 +229,13 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<div
|
<div
|
||||||
class="pagination"
|
class="pagination"
|
||||||
:style="{ bottom: roleKey === 'administrator' ? '40px' : '0' }"
|
:style="{ bottom: roleKey === 'administrator' ? '-7px' : '0' }"
|
||||||
>
|
>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
background
|
background
|
||||||
v-model:current-page="pageInfo.pageNum"
|
v-model:current-page="pageInfo.pageNum"
|
||||||
v-model:page-size="pageInfo.pageSize"
|
v-model:page-size="pageInfo.pageSize"
|
||||||
:total="total"
|
:total="total" :pager-count="8"
|
||||||
prev-text="上一页"
|
prev-text="上一页"
|
||||||
next-text="下一页"
|
next-text="下一页"
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
@@ -350,7 +350,7 @@ let send = {
|
|||||||
};
|
};
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 40,
|
||||||
});
|
});
|
||||||
const queryForm = ref();
|
const queryForm = ref();
|
||||||
const total = ref(10);
|
const total = ref(10);
|
||||||
@@ -739,6 +739,30 @@ const initWebSocket = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.alarm-tunnel .device-table{
|
||||||
|
|
||||||
|
height: 1158px!important;
|
||||||
|
overflow-y: scroll;
|
||||||
|
.el-dialog__body{
|
||||||
|
height: 1158px!important;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 滚动条轨道
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 小滑块
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: rgb(8, 183, 184);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.el-drawer__header {
|
.el-drawer__header {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -1095,7 +1119,7 @@ const initWebSocket = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-pager li.is-active) {
|
:deep(.el-pager li.is-active) {
|
||||||
width: 70px;
|
min-width: 70px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
background: #60ddde;
|
background: #60ddde;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@@ -1109,7 +1133,7 @@ const initWebSocket = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-pager li:not(.is-active)) {
|
:deep(.el-pager li:not(.is-active)) {
|
||||||
width: 70px;
|
min-width: 70px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
border: 1px solid #60ddde;
|
border: 1px solid #60ddde;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
import {fileURLToPath, URL} from 'node:url'
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
import {defineConfig} from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import AutoImport from 'unplugin-auto-import/vite'
|
import AutoImport from 'unplugin-auto-import/vite'
|
||||||
import Components from 'unplugin-vue-components/vite'
|
import Components from 'unplugin-vue-components/vite'
|
||||||
import {ElementPlusResolver} from 'unplugin-vue-components/resolvers'
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||||
import Icons from 'unplugin-icons/vite'
|
import Icons from 'unplugin-icons/vite'
|
||||||
import IconsResolver from 'unplugin-icons/resolver'
|
import IconsResolver from 'unplugin-icons/resolver'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import Inspect from 'vite-plugin-inspect'
|
import Inspect from 'vite-plugin-inspect'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
//自动导入vue相关函数
|
//自动导入vue相关函数
|
||||||
imports: ['vue', 'vue-router'],
|
imports: ['vue','vue-router'],
|
||||||
|
|
||||||
resolvers: [
|
resolvers: [
|
||||||
ElementPlusResolver(),
|
ElementPlusResolver(),
|
||||||
@@ -58,14 +57,13 @@ export default defineConfig({
|
|||||||
strictPort: false,
|
strictPort: false,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// // '/api/tunnel': {
|
// '/api/tunnel': {
|
||||||
// '/tunnel': {
|
|
||||||
//
|
|
||||||
// // // target: 'http://gateway.feashow.cn',
|
// // // target: 'http://gateway.feashow.cn',
|
||||||
// target: 'http://frp.feashow.cn:31800/',
|
// // target: 'http://frp.feashow.cn:31800/',
|
||||||
// // target: 'http://clay.frp.feashow.cn',
|
// // target: 'http://clay.frp.feashow.cn',
|
||||||
|
// target: 'http://192.168.31.175:9020',
|
||||||
// changeOrigin: true,
|
// changeOrigin: true,
|
||||||
// rewrite: (path) => path.replace(/^\/api/, ''),
|
// rewrite: (path) => path.replace(/^\/api\/tunnel/, ''),
|
||||||
// },
|
// },
|
||||||
// '/api/admin': {
|
// '/api/admin': {
|
||||||
// // target: 'http://gateway.feashow.cn',
|
// // target: 'http://gateway.feashow.cn',
|
||||||
@@ -75,6 +73,7 @@ export default defineConfig({
|
|||||||
// },
|
// },
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://tunnel.feashow.com/api',
|
target: 'http://tunnel.feashow.com/api',
|
||||||
|
// target: 'http://frp.toomewhy.top:38000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
},
|
},
|
||||||
@@ -83,11 +82,10 @@ export default defineConfig({
|
|||||||
ws: true
|
ws: true
|
||||||
},
|
},
|
||||||
'/websocket': {
|
'/websocket': {
|
||||||
target: 'ws://web-tunnel.feashow.com/api/wstunnel/websocket/equipment',
|
target: 'ws://tunnel.feashow.com/api/wstunnel/websocket/simulate',
|
||||||
// target: 'ws://192.168.31.176:9000/websocket/debug',
|
// target: 'ws://192.168.31.175:9000/websocket/simulate',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true,
|
ws: true,
|
||||||
|
|
||||||
rewrite: (path) => path.replace(/^\/websocket/, '')
|
rewrite: (path) => path.replace(/^\/websocket/, '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user