Merge pull request 'clay' (#358) from clay into dev

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/358
This commit is contained in:
2024-08-07 11:56:00 +00:00
3 changed files with 99 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
FROM nginx
FROM 10.7.127.190:38080/nginx:latest
RUN rm -rf /etc/nginx/conf.d/default.conf
RUN rm -rf /etc/nginx/nginx.conf

View File

@@ -56,3 +56,12 @@ export const editEquipment = (data) => {
data
})
}
export const getEquipmentSerialNumberOptions = (tunnelId) => {
return request({
url: '/tunnel/tunnel/serialnumber/options',
method: 'get',
params:{
tunnelId:tunnelId
}
})
}

View File

@@ -76,6 +76,19 @@
@change="changeFanData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="serialNumber" label="序列号" align="center" width="500">
<template #default="scope">
<el-select placeholder="请选择" v-model="scope.row.serialNumber" popper-class="serialNumber-select"
@change="changeFanData(scope.row)" class="serialNumber">
<el-option
v-for="item in serialNumberOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center" min-width="86">
<template #default="scope">
<div class="switch">
@@ -147,6 +160,19 @@
@change="changeWindData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="serialNumber" label="序列号" align="center" width="500">
<template #default="scope">
<el-select placeholder="请选择" v-model="scope.row.serialNumber" popper-class="serialNumber-select"
@change="changeWindData(scope.row)" class="serialNumber">
<el-option
v-for="item in serialNumberOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
<template #default="scope">
<div class="switch wind-switch">
@@ -218,6 +244,19 @@
@change="changeOtherData(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="serialNumber" label="序列号" align="center" width="500">
<template #default="scope">
<el-select placeholder="请选择" v-model="scope.row.serialNumber" popper-class="serialNumber-select"
@change="changeOtherData(scope.row)" clearable class="serialNumber">
<el-option
v-for="item in serialNumberOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="state" label="状态" align="center">
<template #default="scope">
<div class="switch wind-switch">
@@ -308,9 +347,10 @@
<script setup>
import {ElLoading, ElMessage} from "element-plus";
import {getEquipmentList, editEquipment, getTunnelDetail} from "@/api/tunnelManage";
import {getEquipmentList, editEquipment, getTunnelDetail, getEquipmentSerialNumberOptions} from "@/api/tunnelManage";
import TunnelTitle from "@/components/tunnelTitle/index.vue";
import { debounce } from 'lodash'
import {debounce} from 'lodash'
const router = useRouter()
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
const userId = reactive(router.currentRoute.value.params.userId)
@@ -328,8 +368,20 @@ const editOtherData = ref([])
const fenLiuData = ref([])
const editFenLiuData = ref([])
const frequencyData = ref([])
const serialNumberOptions = ref([])
const siteId = ref(0)
const tunnelName = ref('')
const getSerialNumberOptions = () => {
console.log('tunnelId',tunnelId)
getEquipmentSerialNumberOptions(tunnelId).then(res => {
if (res.code === 1000) {
serialNumberOptions.value = res.data
} else {
ElMessage.error(res.msg)
}
})
}
getSerialNumberOptions()
const changeFan = (e) => {
// const fanObj = {
// acquisitionPeriod: e * 1000,
@@ -368,6 +420,7 @@ const changeData = (item) => {
equipmentId: item.equipmentId,
unit: item.unit,
alarmValue: item.alarmValue,
serialNumber:item.serialNumber,
miniRange: parseInt(item.miniRange),
maxRange: parseInt(item.maxRange),
state: item.state,
@@ -397,6 +450,7 @@ const editEquip = debounce(() => {
acurrentValue: parseInt(item.acurrentValue),
bcurrentValue: parseInt(item.bcurrentValue),
ccurrentValue: parseInt(item.ccurrentValue),
serialNumber:item.serialNumber,
state: parseInt(item.state)
}
newFan.push(obj)
@@ -472,7 +526,39 @@ const getTunnel = () => {
getTunnel()
getList()
</script>
<style lang="scss">
.serialNumber{
.el-input{
width: 450px!important;
}
}
.el-table__cell{
}
.serialNumber-select.el-popper {
background: #064B66 !important;
border: 2px solid #05FEFF !important;
.el-select-dropdown {
min-width: 130px !important;
}
.el-select-dropdown__item {
color: #FFFFFF;
border-bottom: 1px solid #05FEFF;
&:last-child {
border-bottom: none;
}
}
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background-color: transparent !important;
color: #F7B500;
}
}
</style>
<style scoped lang="scss">
.tunnel-bgc {
padding: 85px 0 0 0;
@@ -523,7 +609,7 @@ getList()
.device-box {
display: flex;
width: 2260px;
width: 2680px;
height: 1600px;
background: #064B66;
border-radius: 20px;