Merge pull request 'dev' (#274) from dev into master

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/274
This commit is contained in:
2024-02-27 08:59:59 +00:00
7 changed files with 103 additions and 53 deletions

View File

@@ -295,25 +295,25 @@ body,
#container { #container {
flex: 1; flex: 1;
height: 1160px; height: 1200px;
//width: 1300px; //width: 1300px;
} }
#containerFan { #containerFan {
flex: 1; flex: 1;
height: 1160px; height: 1200px;
//width: 1300px; //width: 1300px;
} }
#containerBad { #containerBad {
flex: 1; flex: 1;
height: 1160px; height: 1200px;
//width: 1300px; //width: 1300px;
} }
#containerWind { #containerWind {
flex: 1; flex: 1;
height: 1160px; height: 1200px;
//width: 1300px; //width: 1300px;
} }
#containerWindDirection { #containerWindDirection {

View File

@@ -200,7 +200,7 @@ const initChart = (type, values) => {
left: 0, // 左边距 left: 0, // 左边距
right: 20, // 右边距 right: 20, // 右边距
top: 80, // 顶边距 top: 80, // 顶边距
bottom: 0, // 底边距 bottom: 170, // 底边距
containLabel: true, containLabel: true,
}, },
//提示框组件 //提示框组件
@@ -233,7 +233,17 @@ const initChart = (type, values) => {
}, },
dataZoom: [{ dataZoom: [{
type: 'inside' type: 'inside'
}], },
{
type: 'slider',
top: 1050,
height: 100,
textStyle: {
fontSize: 45,
color: '#fffff'
}
}
],
//X轴 //X轴
xAxis: { xAxis: {
type: 'category', type: 'category',

View File

@@ -181,7 +181,7 @@ const initChart = (type, values) => {
left: 0, // 左边距 left: 0, // 左边距
right: 20, // 右边距 right: 20, // 右边距
top: 80, // 顶边距 top: 80, // 顶边距
bottom: 0, // 底边距 bottom: 170, // 底边距
containLabel: true, containLabel: true,
}, },
//提示框组件 //提示框组件
@@ -218,7 +218,17 @@ const initChart = (type, values) => {
}, },
dataZoom: [{ dataZoom: [{
type: 'inside' type: 'inside'
}], },
{
type: 'slider',
top: 1050,
height: 100,
textStyle: {
fontSize: 45,
color: '#fffff'
}
}
],
//X轴 //X轴
xAxis: { xAxis: {
type: "category", type: "category",

View File

@@ -15,7 +15,7 @@
<!-- 功能 --> <!-- 功能 -->
<div class="option-nav"> <div class="option-nav">
<div> <div>
<div class="state" :class="{changeMargin: item.showTooltip}"> <div class="state">
<div class="blue-state" :class="{ stopColor: item.breakdown }"> <div class="blue-state" :class="{ stopColor: item.breakdown }">
<div :style="{ backgroundImage: 'url(' +getImageUrl(item.breakdown)+')' }" class="state-icon"></div> <div :style="{ backgroundImage: 'url(' +getImageUrl(item.breakdown)+')' }" class="state-icon"></div>
状态<span class="fan-state">{{ item.breakdown ? '故障' : '运行' }}</span> 状态<span class="fan-state">{{ item.breakdown ? '故障' : '运行' }}</span>
@@ -44,7 +44,7 @@
<el-radio :label="false">手动</el-radio> <el-radio :label="false">手动</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="edit-power"> <div class="edit-power" title="输入完成后, 请回车进行修改">
<div> <div>
<span style="color: white">给定频率</span> <span style="color: white">给定频率</span>
<!-- <span class="units"--> <!-- <span class="units"-->
@@ -55,16 +55,18 @@
<!-- onchange="changeFrequency(item)"--> <!-- onchange="changeFrequency(item)"-->
<!-- :disabled="item.autoMode"--> <!-- :disabled="item.autoMode"-->
<!-- /></span>--> <!-- /></span>-->
<el-input type="number" min="0" v-model="item.frequencySetting" :disabled="item.autoMode" title="" <el-input type="number" min="0" v-model="item.frequencySetting" :disabled="item.autoMode"
@change="changeFrequency(item)" @focus="item.showTooltip=true" @blur="item.showTooltip=false"> title="输入完成后, 请回车进行修改"
@change="changeFrequency(item)" @focus="item.showTooltip=true"
@blur="item.showTooltip=false" :class="{changeMargin: item.showTooltip}">
<template #suffix> <template #suffix>
<span>Hz</span> <span>Hz</span>
</template> </template>
</el-input> </el-input>
</div> </div>
<span v-if="item.showTooltip"> <!-- <span v-if="item.showTooltip">-->
正在输入中... <!-- 正在输入中...-->
</span> <!-- </span>-->
</div> </div>
</div> </div>
@@ -506,7 +508,7 @@ const initChart = (type, valueA, valueB, valueC) => {
left: 0, // 左边距 left: 0, // 左边距
right: 20, // 右边距 right: 20, // 右边距
top: 80, // 顶边距 top: 80, // 顶边距
bottom: 0, // 底边距 bottom: 170, // 底边距
containLabel: true, containLabel: true,
}, },
//提示框组件 //提示框组件
@@ -528,22 +530,7 @@ const initChart = (type, valueA, valueB, valueC) => {
`; `;
} }
return res return res
// return content;
}, },
// formatter: function (params) {
// let content = `
// <div style="background: linear-gradient(180deg, #254062 0%, rgba(20,36,51,0.3) 100%);;border: 2px solid #6087BA;border-radius: 4px;padding: 8px 16px;">
// <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[0].name}</div>
// <div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 20px"><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[0].value}</span></div>
// <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[1].name}</div>
// <div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 20px"><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[1].value}</span></div>
// <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[2].name}</div>
// <div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 20px"><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[2].value}</span></div>
//
// </div>`;
// return content;
// },
}, },
toolbox: { toolbox: {
show: false, show: false,
@@ -555,8 +542,18 @@ const initChart = (type, valueA, valueB, valueC) => {
} }
}, },
dataZoom: [{ dataZoom: [{
type: 'inside' type: 'inside',
}], },
{
type: 'slider',
top: 1050,
height: 100,
textStyle: {
fontSize: 45,
color: '#fffff'
}
}
],
//X轴 //X轴
xAxis: { xAxis: {
type: 'category', type: 'category',
@@ -820,9 +817,7 @@ input[type="number"] {
margin-top: 48px; margin-top: 48px;
display: flex; display: flex;
align-items: center; align-items: center;
.changeMargin{
margin-top: -40px;
}
.state { .state {
flex: 1; flex: 1;
display: flex; display: flex;
@@ -903,6 +898,10 @@ input[type="number"] {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.changeMargin {
}
> div:first-child { > div:first-child {
display: flex; display: flex;
@@ -910,6 +909,14 @@ input[type="number"] {
white-space: pre; white-space: pre;
margin-right: 14px; margin-right: 14px;
} }
:deep(.is-focus) {
.el-input__inner {
font-weight: normal !important;
color: #fff !important;
}
}
:deep(.el-input__wrapper) { :deep(.el-input__wrapper) {
width: 160px; width: 160px;
height: 44px; height: 44px;

View File

@@ -136,7 +136,7 @@ const initChart = (type, values) => {
left: 0, // 左边距 left: 0, // 左边距
right: 20, // 右边距 right: 20, // 右边距
top: 80, // 顶边距 top: 80, // 顶边距
bottom: 0, // 底边距 bottom: 170, // 底边距
containLabel: true, containLabel: true,
}, },
//提示框组件 //提示框组件
@@ -169,7 +169,17 @@ const initChart = (type, values) => {
}, },
dataZoom: [{ dataZoom: [{
type: 'inside' type: 'inside'
}], },
{
type: 'slider',
top: 1050,
height: 100,
textStyle: {
fontSize: 45,
color: '#fffff'
}
}
],
//X轴 //X轴
xAxis: { xAxis: {
type: 'category', type: 'category',

View File

@@ -111,7 +111,6 @@
<script setup> <script setup>
import {ElMessage, ElMessageBox} from "element-plus"; import {ElMessage, ElMessageBox} from "element-plus";
import {getTunnelList, addTunnel, deleteTunnel} from "@/api/tunnelManage"; import {getTunnelList, addTunnel, deleteTunnel} from "@/api/tunnelManage";
import {onMounted} from "vue";
import {getSiteDetail} from "@/api/site"; import {getSiteDetail} from "@/api/site";
const router = useRouter() const router = useRouter()
@@ -216,6 +215,15 @@ const handleGoSiteOrIndex = () => {
router.push('/') router.push('/')
} }
} }
//根据站点id获取隧道信息
const getTunnel = (id) => {
getSiteDetail(id).then((res) => {
if (res?.code === 1000) {
siteName.value = res.data.siteName
}
});
}
getTunnel(siteId)
const getList = () => { const getList = () => {
getTunnelList({ getTunnelList({
siteId: siteId, siteId: siteId,
@@ -225,6 +233,8 @@ const getList = () => {
total.value = res.data.total total.value = res.data.total
tunnelList.value = res.data.rows tunnelList.value = res.data.rows
showFirst.value = total.value / pageInfo.pageSize >= 1; showFirst.value = total.value / pageInfo.pageSize >= 1;
// siteName.value = res.data.siteName
} else { } else {
ElMessage.warning(res.msg) ElMessage.warning(res.msg)
} }

View File

@@ -87,7 +87,6 @@ import { getLargeScreen, getLargeScreenInfo, getTunnelBySiteId } from "@/api/lar
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import { getUserInfo } from "@/api/login"; import { getUserInfo } from "@/api/login";
import { initSceneData } from "@/api/tunnelScene"; import { initSceneData } from "@/api/tunnelScene";
import { reactive } from "vue";
const authStore = useAuthStore(); const authStore = useAuthStore();
const router = useRouter(); const router = useRouter();
const previewId = reactive(router.currentRoute.value.params.tunnelId) const previewId = reactive(router.currentRoute.value.params.tunnelId)
@@ -191,7 +190,11 @@ const getOtherInfo = () => {
currentSiteId.value = res.data.siteOption[0].value currentSiteId.value = res.data.siteOption[0].value
currentSite.value = res.data.siteOption[0].label currentSite.value = res.data.siteOption[0].label
localStorage.setItem('site', currentSite.value) localStorage.setItem('site', currentSite.value)
if(res.data.tunnelOption.length === 0){
getTunnel(res.data.siteOption[0].value)
}else {
tunnelList.value = res.data.tunnelOption tunnelList.value = res.data.tunnelOption
}
if (previewId) { if (previewId) {
tunnelList.value.forEach((item, index) => { tunnelList.value.forEach((item, index) => {
if (item.value == previewId) { if (item.value == previewId) {
@@ -256,7 +259,7 @@ const getTunnel = (id) => {
if (res?.code === 1000) { if (res?.code === 1000) {
getScreenInfo(res.data[0]?.value) getScreenInfo(res.data[0]?.value)
tunnelName = res.data[0].label tunnelName = res.data[0].label
console.log(res.data[0].label); tunnelList.value = res.data
} }
}); });
} }