邓洁: 站点接口及修改细节

This commit is contained in:
邓洁
2023-12-20 21:24:52 +08:00
parent a404f99385
commit 30384547af
10 changed files with 138 additions and 131 deletions

View File

@@ -16,7 +16,7 @@ steps:
- export NODE_MODULES_PATH=`pwd`/node_modules
- npm config set registry https://registry.npm.taobao.org
- set NODE_OPTIONS=--openssl-legacy-provider
- npm install
# - npm install
- npm run build
- echo $NODE_MODULES_PATH
- cp -r dist /app/build/$DRONE_REPO_NAME

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request.js'
export const getSiteList = (params) => {
return request({
url: '/tunnel/site/screenlist',
url: '/tunnel/site/screen/list',
method: 'get',
params
})

View File

@@ -599,3 +599,11 @@ input[type="number"] {
font-size: 38px;
}
}
.el-pagination.is-background .btn-prev:disabled{
background-color: transparent!important;
color: #60DDDE!important;
}
.el-pagination.is-background .btn-next:disabled{
background-color: transparent!important;
color: #60DDDE!important;
}

View File

@@ -17,7 +17,7 @@
@click="handleOpenAirChart(item)"
/>
<div class="digital-tunnel">
<el-dialog v-model="isWindSpeedVisited" :title="'风速监控数据'" width="2175px" :modal="false">
<el-dialog :close-on-click-modal="false" v-model="isWindSpeedVisited" :title="'风速监控数据'" width="2175px" :modal="false">
<div class="left-top-icon"></div>
<div class="right-top-icon"></div>
<div class="chat-dialog">
@@ -36,7 +36,7 @@
</el-dialog>
</div>
<div class="digital-tunnel">
<el-dialog v-model="isAirVisited" :title="airTitle+'监控数据'" width="2175px" :modal="false">
<el-dialog :close-on-click-modal="false" v-model="isAirVisited" :title="airTitle+'监控数据'" width="2175px" :modal="false">
<div class="left-top-icon"></div>
<div class="right-top-icon"></div>
<div class="chat-dialog">

View File

@@ -14,6 +14,7 @@
<div class="digital-tunnel">
<el-dialog
:close-on-click-modal="false"
v-model="isBadGasVisited"
title="有害气体监控数据"
width="2175px"

View File

@@ -11,7 +11,7 @@
</div>
</div>
<div class="digital-tunnel">
<el-dialog v-model="isVisited" width="2175px" :modal="false">
<el-dialog :close-on-click-modal="false" v-model="isVisited" width="2175px" :modal="false">
<div class="left-top-icon"></div>
<div class="right-top-icon"></div>
<div class="top-tag">

View File

@@ -6,7 +6,7 @@
@click="handleOpenChart(item,index+1)"/>
</div>
<div class="digital-tunnel">
<el-dialog v-model="isVisited" :title="windSort+'号风压监控数据'" width="2175px" :modal="false">
<el-dialog :close-on-click-modal="false" v-model="isVisited" :title="windSort+'号风压监控数据'" width="2175px" :modal="false">
<div class="left-top-icon"></div>
<div class="right-top-icon"></div>
<div class="chat-dialog">

View File

@@ -27,7 +27,7 @@
<div class="box-center">
<div class="left-img"></div>
<div class="right-tunnel">
<div>隧道数量{{ item.info.tunnelNum }}
<div>隧道数量{{ item.tunnelList.length }}
</div>
<div>
<div class="tunnel" v-if="item.info.tunnelName">
@@ -57,7 +57,7 @@
<div style="cursor: pointer">添加站点</div>
</div>
</div>
<el-dialog v-model="isVisited" width="1958px">
<el-dialog :close-on-click-modal="false" v-model="isVisited" width="1958px">
<div class="siteId">
<span>{{ title }}</span>
</div>
@@ -101,41 +101,40 @@ import {ElMessage, ElMessageBox} from "element-plus";
const router = useRouter()
const siteList = ref([
{
siteName: '松江站',
info:{
tunnelNum: 1,
tunnelName: '一号隧道',
constructionLength: 500,
implementationLength: 10
}
},
{
siteName: '松江站',
info:{
tunnelNum: 1,
tunnelName: '二号隧道',
constructionLength: 500,
implementationLength: 10
}
},
{
siteName: '松江站',
info:{
tunnelNum: 1,
tunnelName: '三号隧道',
constructionLength: 500,
implementationLength: 10
}
}
// {
// siteName: '松江站',
// info:{
// tunnelNum: 1,
// tunnelName: '一号隧道',
// constructionLength: 500,
// implementationLength: 10
// }
// },
// {
// siteName: '松江站',
// info:{
// tunnelNum: 1,
// tunnelName: '二号隧道',
// constructionLength: 500,
// implementationLength: 10
// }
// },
// {
// siteName: '松江站',
// info:{
// tunnelNum: 1,
// tunnelName: '三号隧道',
// constructionLength: 500,
// implementationLength: 10
// }
// }
])
const siteIds = ref([])
const siteNameList = ref([])
const info = ref({
tunnelNum: 0,
tunnelName: '',
constructionLength: 0,
implementationLength: 0
totalLength: 0
})
const title = ref('新增站点')
const isClick = ref(false);
@@ -160,16 +159,18 @@ const getList = () => {
...pageInfo
}).then((res) => {
total.value = res.data.total;
showAddIcon.value = total.value !== 6;
showAddIcon.value = total.value % 6!==0;
res.data.rows.map(item => {
if (item.tunnelList === null || item.tunnelList === []) {
if (item.tunnelList === null || item.tunnelList.length === 0) {
item.info = info.value
}else{
item.info=item.tunnelList[0]
}
item.checked = false
})
// siteList.value = res.data.rows;
siteList.value = res.data.rows;
console.log('res',siteList.value)
});
}
getList()
@@ -191,8 +192,8 @@ const handleClickSite = (type) => {
}
}
const goToAddTunnel = (siteId) => {
// router.push('/tunnel/' + siteId)
router.push('/tunnel/1')
router.push('/tunnel/' + siteId)
// router.push('/tunnel/1')
}
//重置from表单
const restFrom = () => {
@@ -205,11 +206,11 @@ const restFrom = () => {
const handleEdit = (item) => {
title.value = '编辑站点'
restFrom()
// getSiteDetail(item.siteId).then((res) => {
// form.value = res.data;
getSiteDetail(item.siteId).then((res) => {
form.value = res.data;
form.value = item;
isVisited.value = true
// });
});
}
const handleAdd = () => {
@@ -218,21 +219,21 @@ const handleAdd = () => {
isVisited.value = true
}
const handleSubmit = (instance) => {
// if (!instance) return
// instance.validate(async (valid) => {
// if (!valid) return
// if (title.value === '编辑站点') {
// editSite(form.value).then(() => {
// isVisited.value = false
// getList()
// });
// } else {
// addSite(form.value).then(() => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
if (title.value === '编辑站点') {
editSite(form.value).then(() => {
isVisited.value = false
// getList()
// });
// }
// })
getList()
});
} else {
addSite(form.value).then(() => {
isVisited.value = false
getList()
});
}
})
}
const handleChooseAll=()=>{
siteList.value.map(item=>{
@@ -249,16 +250,16 @@ const handleMoreDelete = () => {
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)
// }
// })
deleteSite(siteIds.value).then(res => {
if (res.code === 1000) {
ElMessage.success(res.msg)
getList()
siteIds.value = []
siteNameList.value = []
} else {
ElMessage.error(res.msg)
}
})
})
}
}

View File

@@ -59,7 +59,7 @@
<div style="cursor: pointer">添加隧道</div>
</div>
</div>
<el-dialog v-model="isVisited" width="1958px">
<el-dialog :close-on-click-modal="false" v-model="isVisited" width="1958px">
<div class="siteId">
<span>{{ title }}</span>
</div>
@@ -602,16 +602,15 @@ const handleMoreDelete = () => {
:deep(.btn-prev) {
background-color: transparent;
font-size: 38px;
font-family: MicrosoftYaHei, MicrosoftYaHei;
font-weight: bold;
color: #60DDDE;
margin-right: 20px;
}
:deep(.btn-next) {
background-color: transparent;
font-size: 38px;
font-family: MicrosoftYaHei, MicrosoftYaHei;
font-weight: bold;
color: #60DDDE;
margin-left: 30px;
@@ -624,7 +623,6 @@ const handleMoreDelete = () => {
border-radius: 50%;
color: #071F40;
font-size: 38px;
font-family: MicrosoftYaHei, MicrosoftYaHei;
font-weight: bold;
}
@@ -639,7 +637,6 @@ const handleMoreDelete = () => {
border-radius: 50%;
background-color: transparent;
font-size: 38px;
font-family: MicrosoftYaHei, MicrosoftYaHei;
font-weight: bold;
color: #60DDDE;
}

View File

@@ -50,7 +50,7 @@
</div>
</div>
</div>
<el-dialog v-model="isVisited" width="1658px">
<el-dialog :close-on-click-modal="false" v-model="isVisited" width="1658px">
<div class="siteId">
<span>{{ title }}</span>
</div>