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
|
||||
- echo $NODE_MODULES_PATH
|
||||
- cp -r dist /app/build/$DRONE_REPO_NAME
|
||||
- ls
|
||||
|
||||
|
||||
|
||||
@@ -92,5 +93,8 @@ volumes:
|
||||
trigger:
|
||||
branch:
|
||||
- dev
|
||||
|
||||
|
||||
|
||||
event:
|
||||
- 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
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: app-port
|
||||
name: app-port1
|
||||
|
||||
@@ -109,6 +109,7 @@ async function handleMounted() {
|
||||
demo = new ThreeDScene(three, content.value);
|
||||
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
||||
demo.isedit = params.isedit;
|
||||
demo.enableLeftBtn = true;
|
||||
// "../../../../public/tunnelModel/chanel-have-wall-now-use.gltf"
|
||||
const loaded = await demo.loadModel(
|
||||
GLTFLoader,
|
||||
@@ -209,6 +210,7 @@ let pointNum = ref(0);
|
||||
let targetP = ref({});
|
||||
// 右键点击附着点后调函数
|
||||
function rClickCallback(demo) {
|
||||
|
||||
function editDev(targetPoint = null) {
|
||||
hasDevice.value = targetPoint.hasDevice;
|
||||
targetP.value = targetPoint;
|
||||
|
||||
@@ -261,7 +261,7 @@ export default class Demo {
|
||||
const intersects = raycaster.intersectObjects(hoverModels);
|
||||
|
||||
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) {
|
||||
this.preHover = intersects[0].object;
|
||||
} else {
|
||||
@@ -353,6 +353,7 @@ export default class Demo {
|
||||
if (e.button === 0) {
|
||||
this._handleLClick(intersects[0].object);
|
||||
} else if (e.button === 2) {
|
||||
return; //==========》暂时不处理右键事件
|
||||
this._handleRClick(intersects[0].object);
|
||||
}
|
||||
}, 400);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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 class="loading" v-if="loading===0"></div>-->
|
||||
<!-- {{ loading === 0 ? '加载中...' : '暂无数据~' }}-->
|
||||
@@ -142,10 +142,10 @@ watch(() => props.eleData, (now) => {
|
||||
if (now) {
|
||||
let fanObj = {}
|
||||
now.frequencyChangerList.forEach(item => {
|
||||
if (item.equipmentId === 22 || item.equipmentId === 23) {
|
||||
if (item.equipmentType === 'frequency1' || item.equipmentType === "frequency2") {
|
||||
fanObj = {
|
||||
value: item.equipmentId,
|
||||
label: changeNum(item.equipmentId)
|
||||
label: changeNum(item.equipmentId, item.equipmentType)
|
||||
}
|
||||
}
|
||||
fanList.value.push(fanObj)
|
||||
@@ -224,11 +224,11 @@ const shrinkScreen = () => {
|
||||
initChart(chartData.dates, chartData.consumptionValues, chartData.saveElectricityValues, dataZoomTop)
|
||||
})
|
||||
}
|
||||
const changeNum = (item) => {
|
||||
switch (item) {
|
||||
case 22:
|
||||
const changeNum = (item,equipmentType) => {
|
||||
switch (equipmentType) {
|
||||
case 'frequency1':
|
||||
return '一号风机';
|
||||
case 23:
|
||||
case 'frequency2':
|
||||
return '二号风机';
|
||||
}
|
||||
}
|
||||
@@ -327,12 +327,12 @@ const getFanInfo = (equipmentId, type = 'month', time = '', flag) => {
|
||||
loadingText.value = '加载中...'
|
||||
})
|
||||
}
|
||||
const handleOpenChart = () => {
|
||||
const handleOpenChart = (list) => {
|
||||
monthValue.value = ''
|
||||
selectTimeButton.value = 1
|
||||
isVisited.value = true
|
||||
openEquipmentId.value = fanList.value[0].value
|
||||
chooseChartFan.value = fanList.value[0].value
|
||||
openEquipmentId.value = list[0].value
|
||||
chooseChartFan.value = list[0].value
|
||||
nextTick(() => {
|
||||
if (chooseMonthRef.value) {
|
||||
chooseMonthRef.value.clearData()
|
||||
|
||||
@@ -333,8 +333,8 @@ const handleLogout = () => {
|
||||
const initWebSocket = () => {
|
||||
// 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://tunnel.feashow.com/api/wstunnel/websocket/simulate/${token}/${serialNumber.value}`;
|
||||
let wsUrl = import.meta.env.VITE_BASE_WSURL + `/${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 = `ws://clay.frp.feashow.cn/wstunnel/websocket/equipment/${token}/${serialNumber.value}`;
|
||||
// let wsUrl = `ws://frp.toomewhy.top:39000/websocket/simulate/${token}/${serialNumber.value}`;
|
||||
socket = new WebSocket(wsUrl);
|
||||
@@ -363,7 +363,7 @@ const initWebSocket = () => {
|
||||
socketData.windSpeed = data;
|
||||
}
|
||||
nextTick(() => {
|
||||
previewRef.value.changePointValue(item)
|
||||
previewRef.value?.changePointValue(item)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</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"
|
||||
style="background-color: #011c29;--el-table-border-color: none;"
|
||||
:header-cell-style="{ backgroundColor: '#064B66', color: '#fff', fontSize: '40px', borderBottom: 'none' }"
|
||||
@@ -229,13 +229,13 @@
|
||||
</el-table>
|
||||
<div
|
||||
class="pagination"
|
||||
:style="{ bottom: roleKey === 'administrator' ? '40px' : '0' }"
|
||||
:style="{ bottom: roleKey === 'administrator' ? '-7px' : '0' }"
|
||||
>
|
||||
<el-pagination
|
||||
background
|
||||
v-model:current-page="pageInfo.pageNum"
|
||||
v-model:page-size="pageInfo.pageSize"
|
||||
:total="total"
|
||||
:total="total" :pager-count="8"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
layout="prev, pager, next"
|
||||
@@ -350,7 +350,7 @@ let send = {
|
||||
};
|
||||
const pageInfo = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 40,
|
||||
});
|
||||
const queryForm = ref();
|
||||
const total = ref(10);
|
||||
@@ -739,6 +739,30 @@ const initWebSocket = () => {
|
||||
</script>
|
||||
|
||||
<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 {
|
||||
display: none;
|
||||
}
|
||||
@@ -1095,7 +1119,7 @@ const initWebSocket = () => {
|
||||
}
|
||||
|
||||
:deep(.el-pager li.is-active) {
|
||||
width: 70px;
|
||||
min-width: 70px;
|
||||
height: 70px;
|
||||
background: #60ddde;
|
||||
border-radius: 50%;
|
||||
@@ -1109,7 +1133,7 @@ const initWebSocket = () => {
|
||||
}
|
||||
|
||||
:deep(.el-pager li:not(.is-active)) {
|
||||
width: 70px;
|
||||
min-width: 70px;
|
||||
height: 70px;
|
||||
border: 1px solid #60ddde;
|
||||
border-radius: 50%;
|
||||
|
||||
@@ -7,7 +7,6 @@ import Icons from 'unplugin-icons/vite'
|
||||
import IconsResolver from 'unplugin-icons/resolver'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import Inspect from 'vite-plugin-inspect'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
@@ -58,14 +57,13 @@ export default defineConfig({
|
||||
strictPort: false,
|
||||
open: true,
|
||||
proxy: {
|
||||
// // '/api/tunnel': {
|
||||
// '/tunnel': {
|
||||
//
|
||||
// '/api/tunnel': {
|
||||
// // // 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://192.168.31.175:9020',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// rewrite: (path) => path.replace(/^\/api\/tunnel/, ''),
|
||||
// },
|
||||
// '/api/admin': {
|
||||
// // target: 'http://gateway.feashow.cn',
|
||||
@@ -75,6 +73,7 @@ export default defineConfig({
|
||||
// },
|
||||
'/api': {
|
||||
target: 'http://tunnel.feashow.com/api',
|
||||
// target: 'http://frp.toomewhy.top:38000',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
@@ -83,11 +82,10 @@ export default defineConfig({
|
||||
ws: true
|
||||
},
|
||||
'/websocket': {
|
||||
target: 'ws://web-tunnel.feashow.com/api/wstunnel/websocket/equipment',
|
||||
// target: 'ws://192.168.31.176:9000/websocket/debug',
|
||||
target: 'ws://tunnel.feashow.com/api/wstunnel/websocket/simulate',
|
||||
// target: 'ws://192.168.31.175:9000/websocket/simulate',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
|
||||
rewrite: (path) => path.replace(/^\/websocket/, '')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user