|
@@ -104,14 +104,7 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
- @click="jumpScreen(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
- 大屏
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="tunnelData = scope.row ; tunnelEditDialog = true"
|
|
|
|
|
|
|
+ @click="openTunnelChange(scope.row)"
|
|
|
>
|
|
>
|
|
|
修改
|
|
修改
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -218,7 +211,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!-- 隧道修改-->
|
|
<!-- 隧道修改-->
|
|
|
- <el-dialog
|
|
|
|
|
|
|
+ <el-drawer
|
|
|
v-model="tunnelEditDialog"
|
|
v-model="tunnelEditDialog"
|
|
|
title="隧道修改"
|
|
title="隧道修改"
|
|
|
width="500"
|
|
width="500"
|
|
@@ -263,6 +256,7 @@
|
|
|
style="width: 200px;"
|
|
style="width: 200px;"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <Area />
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
@@ -275,7 +269,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ </el-drawer>
|
|
|
<!-- 隧道分配-->
|
|
<!-- 隧道分配-->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
v-model="allocationRegionDialog"
|
|
v-model="allocationRegionDialog"
|
|
@@ -463,7 +457,6 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, onMounted } from 'vue'
|
|
import { ref, onMounted } from 'vue'
|
|
|
-import { useScreenStore } from '@/pinia/modules/screen'
|
|
|
|
|
import { queryAllRegions } from '@/api/region'
|
|
import { queryAllRegions } from '@/api/region'
|
|
|
import {
|
|
import {
|
|
|
createTunnel,
|
|
createTunnel,
|
|
@@ -477,13 +470,12 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { nextTick } from 'vue'
|
|
import { nextTick } from 'vue'
|
|
|
import { deviceSwitch, generateDeviceFile } from '@/api/device'
|
|
import { deviceSwitch, generateDeviceFile } from '@/api/device'
|
|
|
import * as echarts from 'echarts'
|
|
import * as echarts from 'echarts'
|
|
|
|
|
+import Area from './components/area.vue'
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
const userData = useUserStore()
|
|
const userData = useUserStore()
|
|
|
const userInfo = userData.userInfo
|
|
const userInfo = userData.userInfo
|
|
|
-import { useRouter } from 'vue-router'
|
|
|
|
|
-const router = useRouter()
|
|
|
|
|
-
|
|
|
|
|
-const lampList = [33, 66, 100]
|
|
|
|
|
|
|
+import { useCoordinateStore } from '@/pinia/modules/coordinate'
|
|
|
|
|
+const useCoordinate = useCoordinateStore()
|
|
|
const searchData = ref({
|
|
const searchData = ref({
|
|
|
pageInfo: {
|
|
pageInfo: {
|
|
|
page: 1,
|
|
page: 1,
|
|
@@ -565,6 +557,17 @@ const tunnelAdd = async() => {
|
|
|
|
|
|
|
|
const tunnelEditDialog = ref(false)
|
|
const tunnelEditDialog = ref(false)
|
|
|
|
|
|
|
|
|
|
+const openTunnelChange = (row) => {
|
|
|
|
|
+ tunnelData.value = row
|
|
|
|
|
+ console.log(row)
|
|
|
|
|
+ const place = {
|
|
|
|
|
+ lat: row.latitude,
|
|
|
|
|
+ lng: row.longitude
|
|
|
|
|
+ }
|
|
|
|
|
+ useCoordinate.changePlace(place)
|
|
|
|
|
+ tunnelEditDialog.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const tunnelEdit = async() => {
|
|
const tunnelEdit = async() => {
|
|
|
await updateTunnel(tunnelData.value).then(res => {
|
|
await updateTunnel(tunnelData.value).then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
@@ -934,13 +937,6 @@ const switchButton = async(device, relay, index) => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 大屏
|
|
|
|
|
-const useScreen = useScreenStore()
|
|
|
|
|
-const jumpScreen = (row) => {
|
|
|
|
|
- useScreen.setController(row)
|
|
|
|
|
- router.push('/dataDashboard')
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getData()
|
|
getData()
|
|
|
})
|
|
})
|