@@ -291,11 +248,12 @@ import {
editEquipment,
getTunnelDetail,
getOtherSensorSerialNumberOptions,
- getWindPressureSerialNumberOptions
+ getWindPressureSerialNumberOptions, getSimulateTunnelDetail, editSimulateEquipment
} from "@/api/tunnelManage";
import TunnelTitle from "@/components/tunnelTitle/index.vue";
import {debounce} from 'lodash'
import {defineEmits} from "vue";
+import {startSimulation} from "@/api/largeScreen.js";
const router = useRouter()
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
@@ -316,44 +274,7 @@ const siteId = ref(0)
const emit = defineEmits([
"cancel"
]);
-const getWindPressureOptions = async () => {
- let {data, code, msg} = await getWindPressureSerialNumberOptions(tunnelId)
- if (code === 1000) {
- // windPressureDataSerialNumberOptions.value= data
- return data
- } else {
- ElMessage.error(msg)
- }
-}
-const getOtherSensorOptions = async () => {
- let {data, code, msg} = await getOtherSensorSerialNumberOptions(tunnelId)
- if (code === 1000) {
- otherSensorSerialNumberOptions.value = data
- } else {
- ElMessage.error(msg)
- }
-}
-getOtherSensorOptions()
-const clearWinDataSelectedOption = () => {
- winDataSelectedOption.value = []
-}
-const changeWindDataSerialNumber = (value, options) => {
- // console.info("🚀 ~method:changeWindDataSerialNumber -----", value,options)
- options?.forEach(item => {
- if (item.value == value) {
- // console.info("🚀 ~method:item.label -----", item.label)
- if (item.label.indexOf('PLC') >= 0) {
- winDataSelectedOption.value = []
- } else {
- winDataSelectedOption.value.push(value)
- }
- }
- })
-}
-const serialNumberOptionDisabled = (item) => {
- return winDataSelectedOption.value.indexOf(item.value) >= 0;
-}
const changeData = (item) => {
return {
equipmentId: item.equipmentId,
@@ -368,7 +289,7 @@ const changeData = (item) => {
const editEquip = debounce(() => {
const loading = ElLoading.service({
lock: true,
- text: '修改中...',
+ text: '开始模拟中',
background: 'rgba(0, 0, 0, 0.7)',
customClass: 'allLoading'
})
@@ -407,23 +328,23 @@ const editEquip = debounce(() => {
newSensor.push(changeData(item))
})
const basicData = {
- tunnelId: tunnelId,
+ projectId: tunnelId,
acquisitionList: newFrequency,
frequencyChangerList: newFan,
windPressureSensorList: newWind,
sensorList: newSensor,
- // shuntList: editFenLiuData.value,
}
- // console.info("🚀 ~ file:index method: line:478 -----",basicData)
- editEquipment(basicData).then(res => {
+ console.info("🚀 ~ file:index method: line:478 -----",basicData)
+ editSimulateEquipment(basicData).then(async res => {
if (res.code === 1000) {
loading.close()
- ElMessage.success('修改成功')
- router.push('/tunnel/' + siteId.value + '/' + type + '/' + userId)
+ // ElMessage.success('开始模拟')
+ let res= await startSimulation(tunnelId)
+ console.log('res',res)
+ emit('submit')
} else {
ElMessage.error(res.msg)
loading.close()
-
}
})
}, 100)
@@ -433,32 +354,24 @@ const handleChangeMenu = (e) => {
}
const getList = async () => {
- const windPressureOption = await getWindPressureOptions()
const loading = ElLoading.service({
lock: true,
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass: 'allLoading'
})
- await getEquipmentList(tunnelId).then(res => {
+ await getSimulateTunnelDetail(tunnelId).then(res => {
if (res.code === 1000) {
- fanData.value = res.data.frequencyChangerList
- res.data.windPressureSensorList?.forEach(item => {
+ fanData.value = res.data.equipmentList.frequencyChangerList
+ res.data.equipmentList.windPressureSensorList?.forEach(item => {
item.offset = item.offset + 4000
})
- winData.value = res.data.windPressureSensorList
- winData.value?.forEach(item => {
- for (const equipmentId in windPressureOption) {
- if (item.equipmentId == equipmentId) {
- item.serialNumberOption = windPressureOption[equipmentId]
- }
- }
- })
- res.data.sensorList?.forEach(item => {
+ winData.value = res.data.equipmentList.windPressureSensorList
+ res.data.equipmentList.sensorList?.forEach(item => {
item.offset = item.offset + 4000
})
- otherData.value = res.data.sensorList
- res.data.acquisitionList.map(item => {
+ otherData.value = res.data.equipmentList.sensorList
+ res.data.equipmentList.acquisitionList?.map(item => {
item.acquisitionPeriod = item.acquisitionPeriod / 1000
if (item.typeKey === 'frequency') {
fanFrequency.value = item.acquisitionPeriod
@@ -472,14 +385,6 @@ const getList = async () => {
loading.close()
})
}
-const getTunnel = () => {
- getTunnelDetail(tunnelId).then((res) => {
- if (res?.code === 1000) {
- siteId.value = res.data.siteId
- }
- });
-}
-getTunnel()
getList()
-
diff --git a/src/views/device-manage/index-or.vue b/src/views/device-manage/index-or.vue
deleted file mode 100644
index cd181e9..0000000
--- a/src/views/device-manage/index-or.vue
+++ /dev/null
@@ -1,860 +0,0 @@
-
-
-
-
-
- {{ tunnelName }}
-
-
-
-
-
-
-
-
- 风机
-
-
- 风压
-
-
- 其他传感器
-
-
-
-
-
-
-
-
-
风机设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
风压设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
其他传感器设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
分流器设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/device-manage/index-origanl.vue b/src/views/device-manage/index-origanl.vue
deleted file mode 100644
index 2fc22e5..0000000
--- a/src/views/device-manage/index-origanl.vue
+++ /dev/null
@@ -1,860 +0,0 @@
-
-
-
-
-
- {{ tunnelName }}
-
-
-
-
-
-
-
-
- 风机
-
-
- 风压
-
-
- 其他传感器
-
-
-
-
-
-
-
-
-
风机设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
风压设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
其他传感器设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
分流器设备管理
-
- 采集频率
-
-
- 秒/次
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/edit/edit-new.vue b/src/views/edit/edit-new.vue
deleted file mode 100644
index f1eed0f..0000000
--- a/src/views/edit/edit-new.vue
+++ /dev/null
@@ -1,415 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/edit/edit-or.vue b/src/views/edit/edit-or.vue
deleted file mode 100644
index 2a964b3..0000000
--- a/src/views/edit/edit-or.vue
+++ /dev/null
@@ -1,342 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/edit/edit-orignal.vue b/src/views/edit/edit-orignal.vue
deleted file mode 100644
index 7aef199..0000000
--- a/src/views/edit/edit-orignal.vue
+++ /dev/null
@@ -1,342 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/tunnel-manage/index-new.vue b/src/views/tunnel-manage/index-new.vue
deleted file mode 100644
index a947744..0000000
--- a/src/views/tunnel-manage/index-new.vue
+++ /dev/null
@@ -1,1093 +0,0 @@
-
-
-
-
-
- {{ siteName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加
-
-
- 全选
-
-
- 删除
-
-
-
-
-
-
- {{ item.tunnelName }}
- 施工长度{{ item.constructionLength }}米 隧道长度{{ item.totalLength }}米
-
- 默认
-
-
-
-
-
-
-
-
-
-
-
-
{{ equItem.name }}:{{ item.tunnelEquipmentAmountInfo[equItem.type] }}
-
-
-
-
-
-
-
-
-
- 暂无图纸~ 请前往站点管理上传图纸~
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/tunnel-manage/index-or.vue b/src/views/tunnel-manage/index-or.vue
deleted file mode 100644
index 546da3f..0000000
--- a/src/views/tunnel-manage/index-or.vue
+++ /dev/null
@@ -1,1060 +0,0 @@
-
-
-
-
-
- {{ siteName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加
-
-
- 全选
-
-
- 删除
-
-
-
-
-
-
- {{ item.tunnelName }}
- 施工长度{{ item.constructionLength }}米 隧道长度{{ item.totalLength }}米
-
- 默认
-
-
-
-
-
-
-
-
-
-
-
-
{{ equItem.name }}:{{ item.tunnelEquipmentAmountInfo[equItem.type] }}
-
-
-
-
-
-
-
-
-
- 暂无图纸~ 请前往站点管理上传图纸~
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/tunnel-manage/index-origanl.vue b/src/views/tunnel-manage/index-origanl.vue
deleted file mode 100644
index 8a122fb..0000000
--- a/src/views/tunnel-manage/index-origanl.vue
+++ /dev/null
@@ -1,1060 +0,0 @@
-
-
-
-
-
- {{ siteName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加
-
-
- 全选
-
-
- 删除
-
-
-
-
-
-
- {{ item.tunnelName }}
- 施工长度{{ item.constructionLength }}米 隧道长度{{ item.totalLength }}米
-
- 默认
-
-
-
-
-
-
-
-
-
-
-
-
{{ equItem.name }}:{{ item.tunnelEquipmentAmountInfo[equItem.type] }}
-
-
-
-
-
-
-
-
-
- 暂无图纸~ 请前往站点管理上传图纸~
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
-
- Hz
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/tunnel-simulate/index.vue b/src/views/tunnel-simulate/index.vue
index c4c54b8..2e68df5 100644
--- a/src/views/tunnel-simulate/index.vue
+++ b/src/views/tunnel-simulate/index.vue
@@ -2,46 +2,31 @@
-
+
隧道总长度: {{ tunnelLength }}米
开始模拟
-
结束模拟
+
+ 模拟爆破
+ 结束模拟
+
-
- 当前站点:
{{ currentSite }}
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
你好!{{ currentUser }}
今天是:{{ currentDate }}
@@ -49,17 +34,19 @@
-
+
+
+
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
@@ -101,6 +89,7 @@
@@ -108,12 +97,14 @@
v-if="showFan"
:list="socketData.sensor"
:windSpeed="socketData.windSpeed"
+ :isSimulate="true"
:air-data="largeScreenData"
/>
@@ -121,24 +112,6 @@
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-