diff --git a/.drone.yml b/.drone.yml index e02f857..17c406f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,9 @@ kind: pipeline type: docker name: tunnel-cloud-web +platform: + os: linux + arch: amd64 steps: - name: build-package image: registry.cn-chengdu.aliyuncs.com/claywang/node:16.20.0 diff --git a/src/api/tunnel.js b/src/api/tunnel.js index c06d5d4..fe871f0 100644 --- a/src/api/tunnel.js +++ b/src/api/tunnel.js @@ -1,8 +1,17 @@ -import request from '@/utils/request.js' +import request from "@/utils/request.js"; export const getTunnelOption = (siteId) => { return request({ url: `/tunnel/tunnel/option/${siteId}`, - method: 'get' - }) -} + method: "get", + }); +}; + +// 数据3d隧道模拟接口渲染数据源 +export const getTunnelSimulateData = (siteId) => { + return request({ + url: `/tunnel/tunnel/data/${siteId}`, + method: "get", + params, + }); +}; diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 232a863..f199c59 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -119,6 +119,7 @@ body, width: 100%; display: flex; justify-content: center; + align-items: center; font-size: 50px; //font-weight: bold; color: #0BE9FA; diff --git a/src/components/content/fanInfo/FanInfo.vue b/src/components/content/fanInfo/FanInfo.vue index 2f88969..29257db 100644 --- a/src/components/content/fanInfo/FanInfo.vue +++ b/src/components/content/fanInfo/FanInfo.vue @@ -71,20 +71,20 @@
-
- -
-
-
- {{ index + 1 }}号分流阀值 - -
+
+ + + + + + + + + + + +
diff --git a/src/components/content/tunnelScene/PreviewScene.vue b/src/components/content/tunnelScene/PreviewScene.vue index 3e7c494..ec25897 100644 --- a/src/components/content/tunnelScene/PreviewScene.vue +++ b/src/components/content/tunnelScene/PreviewScene.vue @@ -1,35 +1,49 @@ diff --git a/src/components/content/tunnelScene/TunnelScene.vue b/src/components/content/tunnelScene/TunnelScene.vue index 9419cfc..3bfa10c 100644 --- a/src/components/content/tunnelScene/TunnelScene.vue +++ b/src/components/content/tunnelScene/TunnelScene.vue @@ -3,17 +3,34 @@
- - + + " + >

是否确定删除该设备

@@ -61,7 +78,13 @@ const loader = new OBJLoader(); let hdrLoader = new RGBELoader(); let backColorSet = three.sRGBEncoding; const modelStore = useModelSceneStore(); -const params = defineProps(["isedit", "tunnelId", "tunnelLength", "form"]); //接收参数看是不是编辑模式,如果是编辑模式,则需要做一些处理 +const params = defineProps([ + "isedit", + "tunnelId", + "tunnelLength", + "form", + "devRealtimeData", +]); //接收参数看是不是编辑模式,如果是编辑模式,则需要做一些处理 let isedit = ref(params.isedit); let tunnelId = reactive(params.tunnelId); @@ -114,13 +137,12 @@ async function handleMounted() { params.form ); // modelList.value = await initData(params.tunnelId, params.form); - console.log("test", modelList.value); + // console.log("test", modelList.value); demo.editTunnelInit(toRaw(modelList.value)); - demo.SignsInf(params.form.tunnelAlias, String(params.tunnelLength)) + demo.SignsInf(params.form.tunnelAlias, String(params.tunnelLength)); } catch (err) { - console.log(err); ElMessage({ - message: "场景初始化异常---!", + message: "场景初始化异常!", type: "warning", }); } @@ -134,7 +156,7 @@ function loadModel(path) { (obj) => { resolve(obj); }, - (xhr) => { }, + (xhr) => {}, (err) => { reject(err); } @@ -247,14 +269,13 @@ function handleConfirmAddEqu() { type: "success", }); }) - .catch( - (res) => { - console.log(res); - ElMessage({ - message: "删除失败!", - type: "warning", - }); + .catch((res) => { + console.log(res); + ElMessage({ + message: "删除失败!", + type: "warning", }); + }); } // 处理取消关闭编辑框事件 function handleCancel() { @@ -291,6 +312,11 @@ const ThreeConfig = { }, msg: "dda", }; + +//=================实时更新数据 +watch(params.devRealtimeData, () => { + // console.log("devRealtimeData:", params.devRealtimeData); +}); + + diff --git a/src/views/tunnel-simulate/tunnel-list.vue b/src/views/tunnel-simulate/tunnel-list.vue new file mode 100644 index 0000000..8450329 --- /dev/null +++ b/src/views/tunnel-simulate/tunnel-list.vue @@ -0,0 +1,968 @@ + + + + + diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index 067aaa3..4503123 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -1,7 +1,12 @@