Merge pull request '廖杰:更新了隧道简称,和昨天的编辑模式bug' (#284) from liaojie into dev

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/284
This commit is contained in:
liaojie
2024-02-29 14:42:05 +00:00
4 changed files with 46 additions and 34 deletions

View File

@@ -263,10 +263,19 @@ const getScreenInfo = (id) => {
})
}
};
//这里可以获取隧道简称
const getList = () => {
getTunnelList({
siteId: siteId
}).then(res => {
console.log(siteId);
console.log(res.data.rows);
//这里拿到我们的隧道简称
for (let i = 0; i < res.data.rows.length; i++) {
if (siteId == res.data.rows[i].tunnelId) {
tunnelName = res.data.rows[i].tunnelAlias;
}
}
if (res.code === 1000) {
if (res.data.rows.length !== 0) {
isTunnel = true;
@@ -294,7 +303,8 @@ const getTunnel = (id) => {
getScreenInfo(previewId)
} else {
getScreenInfo(res.data[0]?.value)
tunnelName = res.data[0].label
console.log(res);
//tunnelName = res.data[0].label
}
tunnelList.value = res.data
tunnelList.value.forEach((item, index) => {