diff --git a/src/views/tunnel/index-back.vue b/src/views/tunnel/index-back.vue deleted file mode 100644 index 0d2e308..0000000 --- a/src/views/tunnel/index-back.vue +++ /dev/null @@ -1,1193 +0,0 @@ - - - - - - - - - - - - - - - - - - - 隧道总长度: {{ tunnelLength }}米 - - - - - 当前站点:{{ currentSite }} - - - - - {{ item.label }} - - - - - - - - - - 你好!{{ currentUser }} - 今天是:{{ currentDate }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ item.label }} - - - - - - - - - - 报警时间: - {{ alarmDetail.alarmTime }} - - - 报警内容: - {{ alarmDetail.alarmContent }} - - - - - - - - - - - - - - - - 搜索 - 重置 - - - - - - - - - - {{ scope.row.lookupStatus ? "已读" : "未读" }} - - - - - - 详情 - - 删除 - - - - - - - - - - - - - - - - - - - diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index 323332f..1888e9b 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -1,24 +1,11 @@ - - - - - - - - - - - - @@ -29,27 +16,27 @@ 当前站点:{{ currentSite }} {{ item.label }} + v-for="item in siteList" + :key="item.value" + :command="item" + >{{ item.label }} - - - - - - - - - - + @@ -106,32 +93,32 @@ @@ -140,7 +127,7 @@ + @change="changeTunnel"> {{ item.label }} @@ -152,10 +139,10 @@ 报警时间: @@ -169,30 +156,30 @@ @@ -205,55 +192,55 @@ + style="background-color: #011c29;--el-table-border-color: none;" + :header-cell-style="{ backgroundColor: '#064B66', color: '#fff', fontSize: '40px', borderBottom: 'none' }" + :data="alarmList"> + v-if="roleKey !== 'administrator'"> {{ scope.row.lookupStatus ? "已读" : "未读" }} + >{{ scope.row.lookupStatus ? "已读" : "未读" }} 详情 + type="primary" + size="mini" + style="font-weight: bold" + @click="handleView(scope.row)" + link + >详情 删除 + type="danger" + size="mini" + v-if="roleKey !== 'administrator'" + @click="handleDelete(scope.row)" + link + >删除 @@ -327,24 +314,7 @@ const routeList = ref([]); let socket = reactive(""); let pattern = reactive(new RegExp("[A-Za-z]+")); let isTunnel = reactive(false); -const coordsList = ref([ - { - //厂房 - tunnelId: 98, - title: '厂房', - coords: '163,487,153,483,217,480,170,644,111,640,145,483', - }, { - //2#尾水 - tunnelId: 1, - title: '2#尾水隧洞', - coords: '335,548,1029,183,1079,71,1098,78,1044,192,344,567,335,548' - }, { - //5#支洞 - tunnelId: 109, - title: '5#支洞', - coords: '1046,85,1029,76,1020,45,1004,45,1014,88,1045,103,1046,85' - } -]) +// const equipmentOption = ref([]) const btnList = ref([ { route: "/site", @@ -374,28 +344,6 @@ const btnList = ref([ ]); const serialNumber = ref(""); const roleKey = ref(""); -function convertCoordsToArray(coordsArray) { - return coordsArray.map(point => `${point.x},${point.y}`).join(','); -} - -// 示例使用: -const coordsData = [ - { x: 163, y: 487 }, - { x: 153, y: 483 }, - { x: 217, y: 480 }, - { x: 170, y: 644 }, - { x: 111, y: 640 }, - { x: 145, y: 483 } -]; - -const result = convertCoordsToArray(coordsData); -console.log(result); -// 输出: "163,487,153,483,217,480,170,644,111,640,145,483" -const clickHot = (id) => { - console.log('点击热区===============') - router.push('/' + id + '/' + siteId) -} - let token = getToken(); let send = { type: "ping", @@ -576,13 +524,13 @@ const getScreenInfo = (id) => { // }) res.data.sensorList.forEach((item) => { if ( - item.equipmentType === "dust" || - item.equipmentType === "carbonDioxide" || - item.equipmentType === "carbonMonoxide" || - item.equipmentType === "hydrogenSulfide" || - item.equipmentType === "sulfurDioxide" || - item.equipmentType === "sulfurMonoxide" || - item.equipmentType === "nitrogenDioxide" + item.equipmentType === "dust" || + item.equipmentType === "carbonDioxide" || + item.equipmentType === "carbonMonoxide" || + item.equipmentType === "hydrogenSulfide" || + item.equipmentType === "sulfurDioxide" || + item.equipmentType === "sulfurMonoxide" || + item.equipmentType === "nitrogenDioxide" ) { showBadLoading.value = 0; } else { @@ -682,7 +630,7 @@ const manageSelect = (name) => { } else if (name === "隧道管理") { if (currentSiteId.value && currentUserId.value) { router.push( - "/tunnel/" + + "/tunnel/" + localStorage.getItem("currentSiteId") + "/byHome/" + currentUserId.value @@ -875,26 +823,11 @@ const initWebSocket = () => { #main { height: 100%; width: 100%; - //background-color: #072348; - background-image: url('/images/background/background.png'); + background-color: #072348; #tunnel-box { height: 100%; } - .img-box { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - } - .imgModel{ - width: 1040px; - height: 646px; - } } .alarm-dialog { diff --git a/src/views/tunnel/polygon-demo.vue b/src/views/tunnel/polygon-demo.vue index c002451..2b51df3 100644 --- a/src/views/tunnel/polygon-demo.vue +++ b/src/views/tunnel/polygon-demo.vue @@ -1,95 +1,1312 @@ - - 多边形选择演示 + - - - - - 导出坐标 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 隧道总长度: {{ tunnelLength }}米 + + + + + 当前站点:{{ currentSite }} + + + + + {{ item.label }} + + + + + + + + + + 你好!{{ currentUser }} + 今天是:{{ currentDate }} + + - - - 当前选区坐标: - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.label }} + + + + + + + + + + 报警时间: + {{ alarmDetail.alarmTime }} + + + 报警内容: + {{ alarmDetail.alarmContent }} + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + {{ scope.row.lookupStatus ? "已读" : "未读" }} + + + + + + 详情 + + 删除 + + + + + + + + + + + - + + + + \ No newline at end of file diff --git a/src/views/tunnel/test.vue b/src/views/tunnel/test.vue deleted file mode 100644 index fcd7cc5..0000000 --- a/src/views/tunnel/test.vue +++ /dev/null @@ -1,1193 +0,0 @@ - - - - - - - - - - - - - - - - - - - 隧道总长度: {{ tunnelLength }}米 - - - - - 当前站点:{{ currentSite }} - - - - - {{ item.label }} - - - - - - - - - - 你好!{{ currentUser }} - 今天是:{{ currentDate }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ item.label }} - - - - - - - - - - 报警时间: - {{ alarmDetail.alarmTime }} - - - 报警内容: - {{ alarmDetail.alarmContent }} - - - - - - - - - - - - - - - - 搜索 - 重置 - - - - - - - - - - {{ scope.row.lookupStatus ? "已读" : "未读" }} - - - - - - 详情 - - 删除 - - - - - - - - - - - - - - - - - - -