邓洁: 设备接口部分对接
This commit is contained in:
@@ -29,7 +29,7 @@ export const addSite = (data) => {
|
|||||||
}
|
}
|
||||||
export const deleteSite = (siteIdList) => {
|
export const deleteSite = (siteIdList) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/tunnel/site/${siteIdList}`,
|
url: `/tunnel/site/delete/${siteIdList}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,3 +46,18 @@ export const editTunnel = (data) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//设备管理-风机设备信息修改
|
||||||
|
export const editFan = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/tunnel/equipment/frequency/equipments',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export const editEquipment = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/tunnel/equipment/equipments',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
<el-menu-item index="3">
|
<el-menu-item index="3">
|
||||||
<span>其他传感器</span>
|
<span>其他传感器</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<!-- <el-menu-item index="4">-->
|
<!-- <el-menu-item index="4">-->
|
||||||
<!-- <span>分流器</span>-->
|
<!-- <span>分流器</span>-->
|
||||||
<!-- </el-menu-item>-->
|
<!-- </el-menu-item>-->
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-right" v-if="changeIndex==1">
|
<div class="box-right" v-if="changeIndex==1">
|
||||||
@@ -53,17 +53,20 @@
|
|||||||
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
||||||
<el-table-column prop="phaseCurrentAOffset" label="A电流" align="center">
|
<el-table-column prop="phaseCurrentAOffset" label="A电流" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="请输入A电流" v-model="scope.row.phaseCurrentAOffset"></el-input>
|
<el-input placeholder="请输入A电流" v-model="scope.row.phaseCurrentAOffset"
|
||||||
|
@change="changeCurrent(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="phaseCurrentBOffset" label="B电流" align="center">
|
<el-table-column prop="phaseCurrentBOffset" label="B电流" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="请输入B电流" v-model="scope.row.phaseCurrentBOffset"></el-input>
|
<el-input placeholder="请输入B电流" v-model="scope.row.phaseCurrentBOffset"
|
||||||
|
@change="changeCurrent(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="phaseCurrentCOffset" label="C电流" align="center">
|
<el-table-column prop="phaseCurrentCOffset" label="C电流" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="请输入C电流" v-model="scope.row.phaseCurrentCOffset"></el-input>
|
<el-input placeholder="请输入C电流" v-model="scope.row.phaseCurrentCOffset"
|
||||||
|
@change="changeCurrent(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="state" label="状态" align="center">
|
<el-table-column prop="state" label="状态" align="center">
|
||||||
@@ -71,15 +74,15 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<div
|
<div
|
||||||
:class="{ active: scope.row.state }"
|
:class="{ active: scope.row.state }"
|
||||||
@click=" scope.row.state = true"
|
@click="scope.row.state = 1;changeState(scope.row)"
|
||||||
>
|
>
|
||||||
启动
|
启用
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{ active: ! scope.row.state }"
|
:class="{ active: ! scope.row.state }"
|
||||||
@click=" scope.row.state = false"
|
@click=" scope.row.state = 0;changeState(scope.row)"
|
||||||
>
|
>
|
||||||
停止
|
停用
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -90,7 +93,7 @@
|
|||||||
<div class="cancel-btn">
|
<div class="cancel-btn">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="router.back(-1)">
|
<div class="sure-btn" @click="handleEditFan">
|
||||||
确定
|
确定
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,7 +122,7 @@
|
|||||||
<el-table-column prop="unit" label="单位" align="center"/>
|
<el-table-column prop="unit" label="单位" align="center"/>
|
||||||
<el-table-column prop="alarmValue" label="阈值" align="center">
|
<el-table-column prop="alarmValue" label="阈值" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="请输入阈值" v-model="scope.row.alarmValue"></el-input>
|
<el-input placeholder="请输入阈值" v-model="scope.row.alarmValue" @change="changeCurrent(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="state" label="状态" align="center">
|
<el-table-column prop="state" label="状态" align="center">
|
||||||
@@ -127,15 +130,15 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<div
|
<div
|
||||||
:class="{ active: scope.row.state }"
|
:class="{ active: scope.row.state }"
|
||||||
@click=" scope.row.state = true"
|
@click=" scope.row.state = 1;changeState(scope.row)"
|
||||||
>
|
>
|
||||||
启动
|
启用
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{ active: ! scope.row.state }"
|
:class="{ active: ! scope.row.state }"
|
||||||
@click=" scope.row.state = false"
|
@click=" scope.row.state = 0;changeState(scope.row)"
|
||||||
>
|
>
|
||||||
停止
|
停用
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -146,7 +149,7 @@
|
|||||||
<div class="cancel-btn">
|
<div class="cancel-btn">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="router.back(-1)">
|
<div class="sure-btn" @click="editWinPresure">
|
||||||
确定
|
确定
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -174,12 +177,12 @@
|
|||||||
<el-table-column prop="offset" label="偏移量" align="center"/>
|
<el-table-column prop="offset" label="偏移量" align="center"/>
|
||||||
<el-table-column prop="unit" label="单位" align="center">
|
<el-table-column prop="unit" label="单位" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="请输入单位" v-model="scope.row.unit"></el-input>
|
<el-input placeholder="请输入单位" v-model="scope.row.unit" @change="changeCurrent(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="alarmValue" label="阈值" align="center">
|
<el-table-column prop="alarmValue" label="阈值" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input placeholder="请输入阈值" v-model="scope.row.alarmValue"></el-input>
|
<el-input placeholder="请输入阈值" v-model="scope.row.alarmValue" @change="changeCurrent(scope.row)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="state" label="状态" align="center">
|
<el-table-column prop="state" label="状态" align="center">
|
||||||
@@ -187,15 +190,15 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<div
|
<div
|
||||||
:class="{ active: scope.row.state }"
|
:class="{ active: scope.row.state }"
|
||||||
@click=" scope.row.state = true"
|
@click=" scope.row.state = 1;changeState(scope.row)"
|
||||||
>
|
>
|
||||||
启动
|
启用
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{ active: ! scope.row.state }"
|
:class="{ active: ! scope.row.state }"
|
||||||
@click=" scope.row.state = false"
|
@click=" scope.row.state = 0;changeState(scope.row)"
|
||||||
>
|
>
|
||||||
停止
|
停用
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -206,7 +209,7 @@
|
|||||||
<div class="cancel-btn" @click="isVisited=false">
|
<div class="cancel-btn" @click="isVisited=false">
|
||||||
取消
|
取消
|
||||||
</div>
|
</div>
|
||||||
<div class="sure-btn" @click="router.back(-1)">
|
<div class="sure-btn" @click="editOtherSensor">
|
||||||
确定
|
确定
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -244,13 +247,13 @@
|
|||||||
:class="{ active: scope.row.state }"
|
:class="{ active: scope.row.state }"
|
||||||
@click=" scope.row.state = true"
|
@click=" scope.row.state = true"
|
||||||
>
|
>
|
||||||
启动
|
启用
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{ active: ! scope.row.state }"
|
:class="{ active: ! scope.row.state }"
|
||||||
@click=" scope.row.state = false"
|
@click=" scope.row.state = false"
|
||||||
>
|
>
|
||||||
停止
|
停用
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -272,7 +275,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getEquipmentList} from "@/api/tunnelManage";
|
import {getEquipmentList, editFan} from "@/api/tunnelManage";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {editEquipment} from "../../api/tunnelManage";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
||||||
@@ -460,6 +465,64 @@ const fenliuData = ref([
|
|||||||
// state: false,
|
// state: false,
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
const fanItem=ref({})
|
||||||
|
const windItem=ref({})
|
||||||
|
const sensorItem=ref({})
|
||||||
|
const changeCurrent = (row) => {
|
||||||
|
fanItem.value=getFanEditItem(row)
|
||||||
|
windItem.value=getWindEditItem(row)
|
||||||
|
sensorItem.value=getSensorEditItem(row)
|
||||||
|
}
|
||||||
|
const changeState = (row) => {
|
||||||
|
fanItem.value=getFanEditItem(row)
|
||||||
|
windItem.value=getWindEditItem(row)
|
||||||
|
sensorItem.value=getSensorEditItem(row)
|
||||||
|
}
|
||||||
|
const getFanEditItem = (item) => {
|
||||||
|
return {
|
||||||
|
equipmentId: item.equipmentId,
|
||||||
|
phaseCurrentAOffset: parseInt(item.phaseCurrentAOffset),
|
||||||
|
phaseCurrentBOffset: parseInt(item.phaseCurrentBOffset),
|
||||||
|
phaseCurrentCOffset: parseInt(item.phaseCurrentCOffset),
|
||||||
|
state: item.state,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getWindEditItem = (item) => {
|
||||||
|
return {
|
||||||
|
equipmentId: item.equipmentId,
|
||||||
|
alarmValue: item.alarmValue,
|
||||||
|
state: item.state,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getSensorEditItem = (item) => {
|
||||||
|
return {
|
||||||
|
equipmentId: item.equipmentId,
|
||||||
|
unit: item.unit,
|
||||||
|
alarmValue: item.alarmValue,
|
||||||
|
state: item.state,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const editWinPresure=()=>{
|
||||||
|
editEquipment([windItem.value]).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const editOtherSensor=()=>{
|
||||||
|
editEquipment([sensorItem.value]).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleEditFan = () => {
|
||||||
|
editFan([fanItem.value]).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const handleChangeMenu = (e) => {
|
const handleChangeMenu = (e) => {
|
||||||
console.log('切换', e)
|
console.log('切换', e)
|
||||||
changeIndex.value = e
|
changeIndex.value = e
|
||||||
@@ -471,9 +534,9 @@ const getList = () => {
|
|||||||
fanData.value = res.data.frequencyChangerList
|
fanData.value = res.data.frequencyChangerList
|
||||||
winData.value = res.data.windPressureSensorList
|
winData.value = res.data.windPressureSensorList
|
||||||
otherData.value = res.data.sensorList
|
otherData.value = res.data.sensorList
|
||||||
res.data.acquisitionList.map(item=>{
|
res.data.acquisitionList.map(item => {
|
||||||
if(item.tunnelId==tunnelId){
|
if (item.tunnelId == tunnelId) {
|
||||||
collectionFrequency.value=item.acquisitionPeriod
|
collectionFrequency.value = item.acquisitionPeriod
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import TunnelScene from "@/components/content/tunnelScene/TunnelScene.vue";
|
|||||||
import { editTunnel, getTunnelDetail } from "@/api/tunnelManage";
|
import { editTunnel, getTunnelDetail } from "@/api/tunnelManage";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import { useModelSceneStore } from "@/store/modelSceneStore";
|
import { useModelSceneStore } from "@/store/modelSceneStore";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
||||||
@@ -68,7 +69,7 @@ const tunnelLength = computed(() => form.value.totalLength);
|
|||||||
const handleGotoDevice = () => {
|
const handleGotoDevice = () => {
|
||||||
router.push('/device/' + tunnelId)
|
router.push('/device/' + tunnelId)
|
||||||
}
|
}
|
||||||
const handleSave = () => {
|
const handleSave =async () => {
|
||||||
const data = {
|
const data = {
|
||||||
tunnelId: tunnelId,
|
tunnelId: tunnelId,
|
||||||
tunnelName: form.value.tunnelName,
|
tunnelName: form.value.tunnelName,
|
||||||
@@ -77,12 +78,14 @@ const handleSave = () => {
|
|||||||
// constructionLength:form.value.constructionLength,
|
// constructionLength:form.value.constructionLength,
|
||||||
constructionLength: 500,
|
constructionLength: 500,
|
||||||
tunnelLength: form.value.totalLength,
|
tunnelLength: form.value.totalLength,
|
||||||
tunnelThreeConfig: JSON.stringify(equipmentList.value),
|
tunnelThreeConfig: JSON.stringify(await store.getEquipmentList())
|
||||||
}
|
}
|
||||||
console.log('data', data, form.value.tunnelLength)
|
console.log('data', data, form.value.tunnelLength)
|
||||||
editTunnel(data).then((res) => {
|
editTunnel(data).then((res) => {
|
||||||
if (res?.code === 1000) {
|
if (res?.code === 1000) {
|
||||||
console.log('re---s', res)
|
console.log('re---s', res)
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
router.push('/tunnel/'+tunnelId)
|
||||||
// form.value=res.data
|
// form.value=res.data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<div class="box-center">
|
<div class="box-center">
|
||||||
<div class="left-img"></div>
|
<div class="left-img"></div>
|
||||||
<div class="right-tunnel">
|
<div class="right-tunnel">
|
||||||
<div>隧道数量:{{ item.tunnelList.length }}条
|
<div>隧道数量:{{ item.totalTunnel }}条
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="tunnel" v-if="item.info.tunnelName">
|
<div class="tunnel" v-if="item.info.tunnelName">
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div class="add-icon"></div>
|
<div class="add-icon"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="goToAddTunnel(item.siteId)" v-if="item.info.tunnelName">
|
<div class="more" @click="goToMoreTunnel(item.siteId)" v-if="item.info.tunnelName">
|
||||||
更多
|
更多
|
||||||
<div class="icon"></div>
|
<div class="icon"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -195,6 +195,10 @@ const goToAddTunnel = (siteId) => {
|
|||||||
router.push('/tunnel/' + siteId)
|
router.push('/tunnel/' + siteId)
|
||||||
// router.push('/tunnel/1')
|
// router.push('/tunnel/1')
|
||||||
}
|
}
|
||||||
|
const goToMoreTunnel = (siteId) => {
|
||||||
|
router.push('/tunnel/' + siteId)
|
||||||
|
// router.push('/tunnel/1')
|
||||||
|
}
|
||||||
//重置from表单
|
//重置from表单
|
||||||
const restFrom = () => {
|
const restFrom = () => {
|
||||||
form.value = {
|
form.value = {
|
||||||
@@ -246,23 +250,39 @@ const handleMoreDelete = () => {
|
|||||||
if (siteIds.value.length === 0) {
|
if (siteIds.value.length === 0) {
|
||||||
ElMessage.warning('请先选择站点进行删除')
|
ElMessage.warning('请先选择站点进行删除')
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.confirm(`是否确定删除该站点`, '系统提示', {
|
let flag=false
|
||||||
confirmButtonText: '确定',
|
siteList.value.map(item=>{
|
||||||
cancelButtonText: '取消',
|
siteIds.value.map(siteItem=>{
|
||||||
type: 'warning',
|
if(item.siteId===siteItem){
|
||||||
customClass: 'delBox'
|
console.log('item.tunnelList',item.tunnelList)
|
||||||
}).then(() => {
|
if(item.tunnelList.length!==0){
|
||||||
deleteSite(siteIds.value).then(res => {
|
ElMessage.error('该站点下存在隧道,不能删除!')
|
||||||
if (res.code === 1000) {
|
flag=false
|
||||||
ElMessage.success(res.msg)
|
}else {
|
||||||
getList()
|
flag=true
|
||||||
siteIds.value = []
|
}
|
||||||
siteNameList.value = []
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
if(flag){
|
||||||
|
ElMessageBox.confirm(`是否确定删除该站点`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
customClass: 'delBox'
|
||||||
|
}).then(() => {
|
||||||
|
deleteSite(siteIds.value).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
getList()
|
||||||
|
siteIds.value = []
|
||||||
|
siteNameList.value = []
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,10 +98,12 @@
|
|||||||
<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";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const showAddIcon = ref(true)
|
const showAddIcon = ref(true)
|
||||||
const siteId = reactive(router.currentRoute.value.params.siteId)
|
const siteId = reactive(router.currentRoute.value.params.siteId)
|
||||||
|
const type = reactive(router.currentRoute.value.params.type)
|
||||||
const formRules = ref({
|
const formRules = ref({
|
||||||
tunnelName: [{required: true, message: '请输入隧道名称', trigger: 'blur'}],
|
tunnelName: [{required: true, message: '请输入隧道名称', trigger: 'blur'}],
|
||||||
serialNumber: [{required: true, message: '请输入序列号', trigger: 'blur'}]
|
serialNumber: [{required: true, message: '请输入序列号', trigger: 'blur'}]
|
||||||
@@ -241,6 +243,14 @@ const pageInfo = reactive({
|
|||||||
pageSize: 12
|
pageSize: 12
|
||||||
});
|
});
|
||||||
const total = ref(10);
|
const total = ref(10);
|
||||||
|
onMounted(()=>{
|
||||||
|
console.log('type',type)
|
||||||
|
if(type==='add'){
|
||||||
|
restFrom()
|
||||||
|
title.value = '新增隧道'
|
||||||
|
isVisited.value = true
|
||||||
|
}
|
||||||
|
})
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
getTunnelList({
|
getTunnelList({
|
||||||
siteId:siteId,
|
siteId:siteId,
|
||||||
@@ -266,6 +276,7 @@ const handleSubmit = (instance) => {
|
|||||||
// if (!valid) return
|
// if (!valid) return
|
||||||
const data={
|
const data={
|
||||||
siteId:siteId,
|
siteId:siteId,
|
||||||
|
tunnelId:12,
|
||||||
...form.value
|
...form.value
|
||||||
}
|
}
|
||||||
if(form.value.tunnelName&&form.value.serialNumber&&form.value.totalLength){
|
if(form.value.tunnelName&&form.value.serialNumber&&form.value.totalLength){
|
||||||
@@ -474,7 +485,7 @@ const handleMoreDelete = () => {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-left: 67px;
|
padding-left: 67px;
|
||||||
padding-right: 70px;
|
padding-right: 70px;
|
||||||
justify-content: space-between;
|
//justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,9 @@
|
|||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-form :model="form" :label-position="right" :rules="formRules" ref="formInstance" label-width="240px">
|
<el-form :model="form" :label-position="right" :rules="formRules" ref="formInstance" label-width="240px">
|
||||||
|
<el-form-item label="当前站点">
|
||||||
|
<div class="current-site">{{ currentSite }}<span>如果需要切换站点,请返回首屏切换</span></div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="输入用户名称">
|
<el-form-item label="输入用户名称">
|
||||||
<el-input v-model="form.userName" placeholder="请输入用户名称"/>
|
<el-input v-model="form.userName" placeholder="请输入用户名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -124,6 +127,7 @@ import {addUser, editUser, getUser, getRoleOption} from "@/api/user";
|
|||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {getTunnelOption} from "@/api/tunnel";
|
import {getTunnelOption} from "@/api/tunnel";
|
||||||
import {deleteUser, getUserDetail} from "../../api/user";
|
import {deleteUser, getUserDetail} from "../../api/user";
|
||||||
|
import {getSiteDetail} from "@/api/site";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const title = ref('添加用户')
|
const title = ref('添加用户')
|
||||||
@@ -131,6 +135,7 @@ const siteId = reactive(router.currentRoute.value.params.siteId)
|
|||||||
const tunnelIndex = ref()
|
const tunnelIndex = ref()
|
||||||
const username = ref()
|
const username = ref()
|
||||||
const userIds = ref()
|
const userIds = ref()
|
||||||
|
const currentSite = ref()
|
||||||
const formInstance = ref()
|
const formInstance = ref()
|
||||||
const userData = ref([])
|
const userData = ref([])
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
@@ -161,10 +166,14 @@ const getTunnel = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAddUser = () => {
|
const handleAddUser = () => {
|
||||||
reset()
|
reset()
|
||||||
title.value = '添加用户'
|
title.value = '添加用户'
|
||||||
isVisited.value = true
|
isVisited.value = true
|
||||||
|
getSiteDetail(siteId).then((res) => {
|
||||||
|
currentSite.value = res.data.siteName
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const handleEditUser = (row) => {
|
const handleEditUser = (row) => {
|
||||||
reset()
|
reset()
|
||||||
@@ -270,6 +279,15 @@ const handleSelect = async (selection, row) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.current-site{
|
||||||
|
font-size: 38px;color: #FFFFFF;
|
||||||
|
margin-top: 12px;
|
||||||
|
>span{
|
||||||
|
font-size: 30px!important;
|
||||||
|
color: darkgray!important;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
:deep(.el-table__header-wrapper .el-checkbox) {
|
:deep(.el-table__header-wrapper .el-checkbox) {
|
||||||
display: none
|
display: none
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user