From 08d0c4ca9064c27be7b3e488bec497e87a05cc18 Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期三, 27 三月 2024 09:56:01 +0800 Subject: [PATCH] 代码更新 --- src/views/index.vue | 13 package-lock.json | 148 ++++---- src/components/xgzs/zdmax.vue | 5 src/components/BJlist.vue | 202 +++++++++--- src/views/menus.vue | 1 src/utils/request.js | 4 src/api/api.js | 15 + src/components/xgzs/weekzdmax.vue | 6 src/components/YJlist.vue | 3 public/config/config.js | 7 src/assets/js/menuData.js | 6 src/components/PreCusPage.vue | 423 ++++++++++++++++++++++++++++ src/components/xgzs/dayzdmax.vue | 5 src/assets/js/menuTool.js | 3 14 files changed, 702 insertions(+), 139 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40d613b..7bf4d11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1373,11 +1373,6 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", "dev": true }, - "@popperjs/core": { - "version": "npm:@sxzz/popperjs-es@2.11.7", - "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", - "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" - }, "@soda/friendly-errors-webpack-plugin": { "version": "1.8.1", "resolved": "https://registry.npmmirror.com/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.1.tgz", @@ -1961,6 +1956,51 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, "ssri": { "version": "8.0.1", "resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz", @@ -1968,6 +2008,28 @@ "dev": true, "requires": { "minipass": "^3.1.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" } } } @@ -5094,6 +5156,13 @@ "lodash-unified": "^1.0.2", "memoize-one": "^6.0.0", "normalize-wheel-es": "^1.2.0" + }, + "dependencies": { + "@popperjs/core": { + "version": "npm:@sxzz/popperjs-es@2.11.7", + "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", + "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" + } } }, "elliptic": { @@ -12700,75 +12769,6 @@ "big.js": "^5.2.2", "emojis-list": "^3.0.0", "json5": "^1.0.1" - } - } - } - }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.3", - "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", - "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" } } } diff --git a/public/config/config.js b/public/config/config.js index dbb4e39..4936f8b 100644 --- a/public/config/config.js +++ b/public/config/config.js @@ -3,7 +3,7 @@ const mapUrl = "http://localhost:8084/"; // const mapUrl = "http://192.168.20.99:8084/"; //ue鍦板浘杩炴帴鍦板潃 // const BASE_URL = "http://183.162.245.49:2228/yssh/"; //鍚庣鎺ュ彛鍦板潃 -const BASE_URL = "http://192.168.20.228:8082/yssh/"; //鍚庣鎺ュ彛鍦板潃 +const BASE_URL = "http://192.168.11.206:8082/yssh/"; //鍚庣鎺ュ彛鍦板潃 const jsonUrl = "/json"; //鍘熻姹傛湰鍦癹son鏂囦欢鍦板潃锛岀幇鍦ㄤ笉鐢ㄤ簡 // const imgUrl = "http://10.101.5.98:8080/"; // const mapUrl = "http://10.101.5.98:8085/"; @@ -11,6 +11,11 @@ // const jsonUrl = "http://10.101.5.98:8080"; // const getTokenUrl = "http://10.101.5.98:8080/gettoken"; +// const websocketUrl = "ws://192.168.124.132:8765/" +const websocketUrl = "ws://192.168.124.135:8888/" + +const scope = 200000; +const val_step = -90; const videoJS = "config/鐕曞北鐭冲寲绯荤粺鍔熻兘灞曠ず.mp4"; const SMvideoJS = "config/绯荤粺璇存槑.mp4"; //浜岀淮鐑姏鍥惧崐寰� diff --git a/src/api/api.js b/src/api/api.js index e8d9c1b..6ced522 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -247,6 +247,13 @@ params: params, }); } +//id鏃ユ湡鏌ヨ蹇�熸函婧� +export function selectFastByld(params) { + //璇锋眰鍦板潃 + return request.get(`suYuan/selectFastById`, { + params: params, + }); +} //鏍规嵁缁忕含搴︽煡璇㈠湴鍚� export function selectAddrByXY(params) { //璇锋眰鍦板潃 @@ -287,3 +294,11 @@ params: params, }); } +//鍙戦�佹秷鎭� +export function sendMsg(params) { + //璇锋眰鍦板潃 + return request.get(`/suYuan/sendMsg`, { + params: params, + }); +} + diff --git a/src/assets/js/menuData.js b/src/assets/js/menuData.js index 69c4fba..277046b 100644 --- a/src/assets/js/menuData.js +++ b/src/assets/js/menuData.js @@ -66,6 +66,12 @@ isActive: true, name: "姹℃煋鐗╂墿鏁h秼鍔�", }, + { + id: "b5", + num: 23, + isActive: true, + name: "鑷畾涔夋ā鎷�", + }, ], }, { diff --git a/src/assets/js/menuTool.js b/src/assets/js/menuTool.js index 4e64359..5d32daa 100644 --- a/src/assets/js/menuTool.js +++ b/src/assets/js/menuTool.js @@ -49,6 +49,9 @@ heading: -90, }); break; + case "b5": //鑷畾涔� + debugger + break; case "c2": //棰勮淇℃伅 break; case "c3": //鎶ヨ淇℃伅 diff --git a/src/components/BJlist.vue b/src/components/BJlist.vue index e138018..c2ab83b 100644 --- a/src/components/BJlist.vue +++ b/src/components/BJlist.vue @@ -8,72 +8,33 @@ <div class="list_title">鎶ヨ鐐逛綅鍒楄〃</div> <div class="inp_box"> <span>閫夋嫨鏃堕棿娈碉細</span> - <el-date-picker - size="large" - v-model="selectform.value1" - type="datetimerange" - @change="changeTime" - value-format="YYYY-MM-DD HH" - format="YYYY-MM-DD HH" - /> + <el-date-picker size="large" v-model="selectform.value1" type="datetimerange" @change="changeTime" + value-format="YYYY-MM-DD HH" format="YYYY-MM-DD HH" /> </div> <div class="table_box"> - <el-table - :data="data.tableData" - style="width: 100%" - height="100%" - @row-click="flytoPoi" - > - <el-table-column - prop="name" - label="鍚嶇О" - show-overflow-tooltip - align="center" - /> + <el-table :data="data.tableData" style="width: 100%" height="100%" @row-click="flytoPoi"> + <el-table-column prop="name" label="鍚嶇О" show-overflow-tooltip align="center" /> <!-- <el-table-column prop="name" label="鍚嶇О" show-overflow-tooltip />--> - <el-table-column - prop="lon" - label="缁忓害" - show-overflow-tooltip - align="center" - /> - <el-table-column - prop="lat" - label="绾害" - show-overflow-tooltip - align="center" - /> - <el-table-column - prop="value" - label="鏁板��" - show-overflow-tooltip - align="center" - /> - <el-table-column - prop="time" - label="鏃堕棿" - show-overflow-tooltip - :formatter="dateFormatter" - align="center" - /> - <el-table-column label="鎿嶄綔"> + <el-table-column prop="lon" label="缁忓害" show-overflow-tooltip align="center" /> + <el-table-column prop="lat" label="绾害" show-overflow-tooltip align="center" /> + <el-table-column prop="value" label="鏁板��" show-overflow-tooltip align="center" /> + <el-table-column prop="time" label="鏃堕棿" show-overflow-tooltip :formatter="dateFormatter" align="center" /> + <el-table-column label="鎿嶄綔" width="180px"> <template #default="scope"> - <el-button - link - type="primary" - size="small" - @click.stop="listClick(scope.row)" - >姹℃煋婧�</el-button - > + <el-button link type="primary" size="small" @click.stop="listClick(scope.row)" :disabled="scope.row.isSuYuan == 0 || scope.row.isSuYuan == null + ">姹℃煋婧�</el-button> + + <el-button link type="primary" size="small" @click.stop="kssyClick(scope.row)">蹇�熸函婧�</el-button> </template> </el-table-column> </el-table> </div> </div> </div> + <!-- :disabled="scope.row.isFast == 0 || scope.row.isFast == null" --> </template> - +// <script> import { Search } from "@element-plus/icons-vue"; // svg鍥炬爣 // import type { FormInstance, FormRules } from "element-plus"; @@ -83,6 +44,7 @@ ysshSuYuanX00Controller, getCoordByName, selectSuYuan46ById, + selectFastByld, } from "@/api/api.js"; import menuTool from "@/assets/js/menuTool"; import { useStore } from "vuex"; @@ -116,6 +78,15 @@ const listClick = (row) => { SYWG(row); + sgworld.Core.postMessage({ + func_name: "SetSmallWind", + lon: "", + lat: "", + alt: 300, + Scope: scope, + Direction: "", + Hidden: "true", + }); window.sgworld.Core.postMessage("Type=customewinds;Bool=false;"); window.sgworld.Core.postMessage( `Type=customewinds;Bool=true;Year=${row.time.slice( @@ -124,13 +95,104 @@ )};Mouth=${row.time.slice(4, 6)};Day=${row.time.slice( 6, 8 - )};Hour=${row.time.slice(8, 10)};Density=${BJFC.Density};Speed=${ - BJFC.Speed - };d1=0;d2=30;Corp=1;Lon=${row.lon};Lat=${row.lat};Length=${ - BJFC.Length + )};Hour=${row.time.slice(8, 10)};Density=${BJFC.Density};Speed=${BJFC.Speed + };d1=0;d2=30;Corp=1;Lon=${row.lon};Lat=${row.lat};Length=${BJFC.Length };` ); }; + /** + * 蹇�熸函婧� + */ + const kssyClick = (row) => { + kssyOperator(row); + }; + + const kssyOperator = async (POIobj) => { + sgworld.Core.postMessage({ type: "delete" }); + + const dt1 = await getCoordByName(POIobj.name); + + var date = insertStr(POIobj.time) + ":00:00"; + // const dt = await ysshSuYuanX00Controller( + // { name: POIobj.name, date: date }, + // 100 + // ); + // console.log("蹇�熸函婧�-鑾峰彇婧簮鍒楄〃", dt); + + // if (dt1.result) { + sgworld.Core.postMessage({ func_name: "RemoveGridLines", id: "" }); + //鍒犻櫎杈圭晫 + sgworld.Core.postMessage({ func_name: "RemoveGridSide", id: "" }); + + const dt2 = await selectFastByld({ + id: dt1.result.id.slice(0, -2) + "_0", + date: date, + }); + + window.sgworld.Core.postMessage("Type=customewinds;Bool=false;"); + sgworld.Core.postMessage({ + func_name: "SetSmallWind", + lon: "", + lat: "", + alt: 300, + Scope: scope, + Direction: "", + Hidden: "true", + }); + + console.log("蹇�熸函婧�-鑾峰彇婧簮璇︽儏", dt2); + if (dt2.result) { + + dt2.result.map((item) => { + console.log("val_step",item.dir); + var dir = item.dir + val_step; + console.log("val_step",dir); + sgworld.Core.postMessage({ + func_name: "SetSmallWind", + lon: item.x, + lat: item.y, + alt: 300, + Scope: scope, + Direction: dir, + Hidden: "false", + }); + }); + console.log("蹇�熸函婧�-鑾峰彇缁忕含搴︼紝", dt2); + + + sgworld.Navigate.flyToPosition(dt2.result[0].x, dt2.result[0].y, 500, { + heading: 270, + pitch: -89.5, + roll: 0, + }); + } + + // dt.result.data.forEach(async (e) => { + // const dt2 = await selectFastByld({ + // id: e.id, + // date: date, + // }); + // console.log("蹇�熸函婧�-鑾峰彇婧簮璇︽儏", dt2); + // if (dt2.result) { + // dt2.result.nap((item) => { + // sgworld.Core.postMessage({ + // func_name: "SetSmallWind", + // lon: item.x, + // lat: item.y, + // alt: 300, + // Scope: 300000, + // Direction: item.dir, + // Hidden: "false", + // }); + // }); + // } + // }); + + // } else { + // return ElMessage.error("璇锋鏌ユ槸鍚︽湁鏁版嵁"); + // } + }; + const SYWG = async (POIobj) => { // data.time = insertStr(POIobj.time) + ":00:00"; var date = insertStr(POIobj.time) + ":00:00"; @@ -300,6 +362,8 @@ flytoPoi, selectform, changeTime, + kssyClick, + kssyOperator, }; }, }; @@ -307,6 +371,7 @@ <style lang="less" scoped> //@import url(); 寮曞叆鍏叡css绫� .BJlist_box { + // position: absolute; // right: 20px; // top: 490px; @@ -337,12 +402,14 @@ font-size: 16px; font-weight: 600; } + .text { font-size: 24px; font-weight: 400; color: #ffffff; } } + .list_box { width: calc(775px * 1.8); height: calc(472px * 1.8); @@ -351,6 +418,7 @@ background-size: 100% 100%; padding: calc(45px * 1.5); position: relative; + .list_close { width: 22px; height: 22px; @@ -361,12 +429,14 @@ right: 80px; top: 80px; } + .list_title { font-size: 30px; margin-bottom: 20px; font-weight: bold; color: #ffffff; } + .table_box { width: 100%; height: 80%; @@ -377,26 +447,32 @@ // z-index: 10; overflow: auto; } + .el-table { // height: 370px; width: 100%; overflow: auto; background-color: transparent; } + .el-table::before { height: 0; } + .el-table /deep/ .el-tooltip { padding: 0; } + .el-table /deep/ th, .el-table /deep/ tr { background-color: transparent; color: white; } - .el-table /deep/ tr:hover > td { + + .el-table /deep/ tr:hover>td { background-color: rgba(0, 0, 0, 1) !important; } + /deep/ .el-table__body { width: 100% !important; } @@ -405,6 +481,7 @@ width: 100% !important; } } + .inp_box { span { font-size: 24px; @@ -412,6 +489,7 @@ color: #ffffff; padding-right: 10px; } + /deep/ .el-input__wrapper { // width: 460px; background: rgba(0, 0, 0, 0.2); @@ -421,21 +499,26 @@ padding: 0; padding-left: 3px; } + /deep/ .el-input__inner, /deep/ .el-textarea__inner { // background-color: rgba(134, 132, 132, 0.5); color: #ffffff; font-size: 24px; } + /deep/.el-range-input { color: white; } + /deep/ .el-range-separator { color: white; } + .el-select { width: 180px; } + .el-select /deep/ .el-input__wrapper { background: rgba(0, 0, 0, 0.2); border: 2px solid #2e58cc; @@ -444,6 +527,7 @@ padding: 0; padding-left: 6px; } + .el-select /deep/ .el-input__inner { color: #ffffff; font-size: 24px; diff --git a/src/components/PreCusPage.vue b/src/components/PreCusPage.vue new file mode 100644 index 0000000..b1c59c5 --- /dev/null +++ b/src/components/PreCusPage.vue @@ -0,0 +1,423 @@ +<template> + <div class="PreCusPage_box"> + <div class="list_box" id="list_box1"> + <div class="list_title">鑷畾涔墈{ timeInter }}</div> + <div class="inp_box"> + <span>缁� 绾細</span> + <input v-model="selectform.x" type="text" placeholder="璇疯緭鍏ョ粡搴�" /> + </div> + <div class="inp_box" style="margin-top: 5px"> + <span>缁� 搴︼細</span> + <input + size="large" + v-model="selectform.y" + type="text" + placeholder="璇疯緭鍏ョ淮搴�" + /> + </div> + <div class="inp_box" style="margin-top: 5px"> + <span>姹℃煋鍊硷細</span> + <input + size="large" + v-model="selectform.value" + type="text" + placeholder="璇疯緭鍏ユ薄鏌撳��" + /> + </div> + + <div class="inp_box" style="margin-top: 5px"> + <!-- <span + > </span + > --> + <el-button + class="btnsubmit" + type="primary" + :disabled="btnDisabled" + @click="submitBtn" + > + 鎻愪氦 + </el-button> + <el-button + class="btnsubmit" + type="primary" + :disabled="mnBtnDisabled" + @click="submitBtnMN" + > + 妯℃嫙 + </el-button> + </div> + </div> + </div> +</template> + +<script> +import { Search } from "@element-plus/icons-vue"; // svg鍥炬爣 +// import type { FormInstance, FormRules } from "element-plus"; +import { reactive, onMounted, watch, ref, onUnmounted } from "vue"; +import { FormInstance, ElMessage, ElMessageBox } from "element-plus"; + +import menuTool from "@/assets/js/menuTool"; +import { useStore } from "vuex"; +import { + ysshSuYuanX00Controller, + getCoordByName, + selectSuYuan46ById, + sendMsg, +} from "@/api/api.js"; +export default { + //import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { Search }, + props: ["POIListData"], + setup(props, { emit }) { + const store = useStore(); + // 杩欎釜鏄啓鍦╯etup()閲岀殑锛侊紒 + + const timeInter = ref(""); + const formRef = ref < FormInstance > ""; + const selectform = reactive({ + x: "", + y: "", + value: "", + }); + const btnDisabled = ref(false); + const btnLoading = ref(false); + const mnBtnDisabled = ref(false); + let data = reactive({ + tableData: [], + dialogFormVisible: false, + activeName: "first", + chart_isshow: false, + time: "", + WGlist: [], + }); + const flytoPoi = (row) => { + sgworld.Navigate.flyToPosition(row.lon, row.lat, 500, { + heading: 270, + pitch: -89.5, + roll: 0, + }); + }; + const submitBtnMN = () => { + // console.log(selectform.x, selectform.y, 8000) + sgworld.Navigate.flyToPosition(selectform.x, selectform.y, 8000, { + heading: 270, + pitch: -89.5, + roll: 0, + }); + + sgworld.Core.postMessage({ + func_name: "StartImage", + TypeL1: "End", + Year: "", + Mouth: "", + Day: "", + Hour: "", + }); + + // sgworld.Core.postMessage({ + // func_name: "StartImage", + // TypeL1: "Start", + // Year: "2023", + // Mouth: "10", + // Day: "26", + // Hour: "18", + // }); + + if (window.socketMsg) { + sgworld.Core.postMessage({ + func_name: "StartImage", + TypeL1: "Start", + Year: window.socketMsg.Year, + Mouth: window.socketMsg.Mouth, + Day: window.socketMsg.Day, + Hour: window.socketMsg.Hour, + }); + } + }; + + const submitBtn = () => { + if (selectform.x == "") { + ElMessage.error("璇疯緭鍏ョ粡搴�"); + return; + } else if (selectform.y == "") { + ElMessage.error("璇疯緭鍏ョ淮搴�"); + return; + } else if (selectform.value == "") { + ElMessage.error("璇疯緭鍏ユ薄鏌撳��"); + return; + } + + // ElMessage.success("鏁版嵁宸叉彁浜わ紝璇风◢鍊�20鍒嗛挓"); + ElMessage.success("鏁版嵁宸叉彁浜�"); + timeInter.value = "(鏁版嵁宸叉彁浜�,璇风◢鍊�)"; + btnDisabled.value = true; + btnLoading.value = true; + mnBtnDisabled.value = true; + + sendMsg({ msg: JSON.stringify(selectform) }).then((res) => { + btnDisabled.value = false; + btnLoading.value = false; + mnBtnDisabled.value = false; + + ElMessage.success("鏁版嵁鐢熸垚鎴愬姛!"); + + console.log(res); + let str = "2023102618"; + str = res.result + ""; + const year = str.slice(0, 4); + const month = str.slice(4, 6); + const day = str.slice(6, 8); + const hour = str.slice(8, 10); + + window.socketMsg = { + Year: year, + Mouth: month, + Day: day, + Hour: hour, + }; + }); + + // // window.timeInterNumer = 20 * 60; + // // window.timeInterIntervalId = setInterval(() => { + // // timeInter.value = "鏁版嵁闇�瑕佺瓑寰�" + --window.timeInterNumer + "绉掑悗鐢熸垚"; + // // }, 1000); + + // // setTimeout(() => { + + // // mnBtnDisabled.value = false; + // // btnLoading.value = false; + + // // clearInterval(window.timeInterIntervalId); + // // }, 20 * 60 * 1000); + + // if (window.socket) { + // window.socket.close(); + // } + // // 瀹炰緥鍖杝ocket + // console.log("websocketUrl", websocketUrl); + // window.socket = new WebSocket(websocketUrl); + // // 鐩戝惉socket杩炴帴 + // window.socket.onopen = function () { + // debugger + // window.socket.send(JSON.stringify(selectform)); + // }; + // // 鐩戝惉socket閿欒淇℃伅 + // window.socket.onerror = function (error) { + // console.log("socket open error"); + // console.log(error); + // }; + // // 鐩戝惉socket娑堟伅 + // window.socket.onmessage = function (msg) { + // ElMessage.success("鏁版嵁鐢熸垚鎴愬姛!"); + + // mnBtnDisabled.value = false; + // btnLoading.value = false; + + // console.log(msg); + // clearInterval(window.timeInterIntervalId); + // mnBtnDisabled.value = false; + // btnLoading.value = false; + // window.socketMsg = JSON.parse(msg.data); + // }; + }; + + onMounted(() => { + // data.tableData = store.state.YJlist; + }); + onUnmounted(() => { + sgworld.Core.postMessage({ + func_name: "StartImage", + TypeL1: "End", + Year: "", + Mouth: "", + Day: "", + Hour: "", + }); + }); + + return { + data, + formRef, + flytoPoi, + selectform, + submitBtn, + submitBtnMN, + btnDisabled, + btnLoading, + mnBtnDisabled, + timeInter, + }; + }, +}; +</script> +<style lang="less" scoped> +//@import url(); 寮曞叆鍏叡css绫� +.PreCusPage_box { + // position: absolute; + // right: 20px; + // top: 490px; + + position: fixed; + left: 1.66rem; + top: 0.88573rem; + input[type="text"] { + height: 0.16rem; + background-color: rgb(103, 109, 124); + border: 1px solid white; + color: white; + } + input[type="text"]:focus { + height: 0.16rem; + border: 1px solid blue; + } + + input[type="text"]::placeholder { + color: white; + } + + .btnsubmit { + height: 0.16rem; + width: 0.55rem; + font-size: 0.05688rem; + } + .bjtext { + margin-left: 35px; + width: calc(723px * 1.8); + height: 80px; + background: rgba(24, 25, 12, 0.8); + border: 2px solid rgba(255, 114, 0); + border-radius: 10px; + padding: 30px; + box-sizing: border-box; + margin-bottom: 10px; + display: flex; + align-items: center; + + .ico { + width: 33px; + height: 33px; + background: #ff7200; + border-radius: 50%; + margin-right: 10px; + display: flex; + align-items: center; + justify-content: center; + // text-align: center; + color: #fff; + font-size: 16px; + font-weight: 600; + } + .text { + font-size: 24px; + font-weight: 400; + color: #ffffff; + } + } + .list_box { + // width: calc(775px * 1.8); + // height: calc(472px * 1.8); + box-sizing: border-box; + background: url("../assets/img/bgk.png") no-repeat center; + background-size: 100% 100%; + padding: calc(45px * 1.5); + position: relative; + overflow: auto; + .list_close { + width: 22px; + height: 22px; + cursor: pointer; + background: url("../assets/img/close.png") center no-repeat; + background-size: 100% 100%; + position: absolute; + right: 80px; + top: 80px; + } + .list_title { + font-size: 30px; + margin-bottom: 20px; + font-weight: bold; + color: #ffffff; + } + .table_box { + width: 100%; + height: 80%; + // position: absolute; + // top: 110px; + // left: 50%; + // transform: translateX(-50%); + // z-index: 10; + } + .el-table { + // height: 370px; + width: 100%; + overflow: auto; + background-color: transparent; + } + .el-table::before { + height: 0; + } + .el-table /deep/ .el-tooltip { + padding: 0; + } + .el-table /deep/ th, + .el-table /deep/ tr { + background-color: transparent; + color: white; + } + .el-table /deep/ tr:hover > td { + background-color: rgba(0, 0, 0, 1) !important; + } + /deep/ .el-table__body { + width: 100% !important; + } + + /deep/ .el-table__header { + width: 100% !important; + } + } + .inp_box { + span { + font-size: 24px; + font-weight: 400; + color: #ffffff; + padding-right: 10px; + } + /deep/ .el-input__wrapper { + // width: 460px; + background: rgba(0, 0, 0, 0.2); + border: 2px solid #2e58cc; + border-radius: 10px; + color: #ffffff; + padding: 0; + padding-left: 3px; + } + /deep/ .el-input__inner, + /deep/ .el-textarea__inner { + // background-color: rgba(134, 132, 132, 0.5); + color: #ffffff; + font-size: 24px; + } + /deep/.el-range-input { + color: white; + } + /deep/ .el-range-separator { + color: white; + } + .el-select { + width: 180px; + } + .el-select /deep/ .el-input__wrapper { + background: rgba(0, 0, 0, 0.2); + border: 2px solid #2e58cc; + border-radius: 10px; + color: #ffffff; + padding: 0; + padding-left: 6px; + } + .el-select /deep/ .el-input__inner { + color: #ffffff; + font-size: 24px; + } + } +} +</style> diff --git a/src/components/YJlist.vue b/src/components/YJlist.vue index 101a619..de8ea53 100644 --- a/src/components/YJlist.vue +++ b/src/components/YJlist.vue @@ -57,12 +57,13 @@ :formatter="dateFormatter" align="center" /> - <el-table-column label="鎿嶄綔"> + <el-table-column label="鎿嶄綔" width="180px"> <template #default="scope"> <el-button link type="primary" size="small" + :disabled="scope.row.isSuYuan == 0" @click.stop="listClick(scope.row)" >姹℃煋婧�</el-button > diff --git a/src/components/xgzs/dayzdmax.vue b/src/components/xgzs/dayzdmax.vue index 7c6564b..fb07eb2 100644 --- a/src/components/xgzs/dayzdmax.vue +++ b/src/components/xgzs/dayzdmax.vue @@ -47,7 +47,10 @@ "-" + item.time.slice(4, 6) + "-" + - item.time.slice(6, 8); + item.time.slice(6, 8) + + + " "+ + item.time.slice(8,10); return [item.name, item.value, item.time]; }); data.sort(this.sequence); diff --git a/src/components/xgzs/weekzdmax.vue b/src/components/xgzs/weekzdmax.vue index 3aae574..e9dc053 100644 --- a/src/components/xgzs/weekzdmax.vue +++ b/src/components/xgzs/weekzdmax.vue @@ -37,18 +37,22 @@ }, async getWaringList() { let dt = await getweekTop(); + if (dt.code === 200 && dt.result.length > 0) { // console.log(dt); const sotrArr = dt.result.sort((a, b) => b - a); let result = sotrArr.slice(0, 10); const data = result.map((item) => { + item.value = Number(item.value).toFixed(2); item.time = item.time.slice(0, 4) + "-" + item.time.slice(4, 6) + "-" + - item.time.slice(6, 8); + item.time.slice(6, 8)+ + " "+ + item.time.slice(8,10); return [item.name, item.value, item.time]; }); data.sort(this.sequence); diff --git a/src/components/xgzs/zdmax.vue b/src/components/xgzs/zdmax.vue index 912a004..e994cb2 100644 --- a/src/components/xgzs/zdmax.vue +++ b/src/components/xgzs/zdmax.vue @@ -47,7 +47,10 @@ "-" + item.time.slice(4, 6) + "-" + - item.time.slice(6, 8); + item.time.slice(6, 8) + + + " "+ + item.time.slice(8,10); return [item.name, item.value, item.time]; }); data.sort(this.sequence); diff --git a/src/utils/request.js b/src/utils/request.js index 077fcad..f0384c0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -12,7 +12,9 @@ // create an axios instance const service = axios.create({ baseURL: BASE_URL, // api鐨刡ase_url - timeout: 1200000, // 璇锋眰瓒呮椂鏃堕棿 + timeout: 120000000, // 璇锋眰瓒呮椂鏃堕棿 + // timeout: 10, // 璇锋眰瓒呮椂鏃堕棿 + // headers: { // "content-type": "application/json;charset=UTF-8", // }, diff --git a/src/views/index.vue b/src/views/index.vue index 3cb4e50..ddf071e 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -63,6 +63,7 @@ <YJlist v-if="checkMenuFlag == 'c2'"></YJlist> <gjfx v-if="checkMenuFlag == 'f1'"></gjfx> <zdmax v-if="checkMenuFlag == 'f1'"></zdmax> + <PreCusPage v-if="checkMenuFlag == 'b5'"></PreCusPage> </div> </div> </div> @@ -112,6 +113,7 @@ //棰勮鎶ヨ import BJlist from "@/components/BJlist.vue"; import YJlist from "@/components/YJlist.vue"; +import PreCusPage from "@/components/PreCusPage.vue"; //鐐逛綅鍒楄〃 import poiList from "@/components/poiList.vue"; //缁熻鍥� @@ -146,6 +148,7 @@ reportList, dayzdmax, weekzdmax, + PreCusPage }, setup(props, { emit }) { const store = useStore(); @@ -232,6 +235,16 @@ if (res.id == "e5") { videoUrl.value = window.location.href.split("#")[0] + SMvideoJS; } + + sgworld.Core.postMessage({ + func_name: "SetSmallWind", + lon: "", + lat: "", + alt: 300, + Scope: "", + Direction: "", + Hidden: "true", + }); }; const toggleFK = (params) => { diff --git a/src/views/menus.vue b/src/views/menus.vue index 1921875..6cc0e61 100644 --- a/src/views/menus.vue +++ b/src/views/menus.vue @@ -97,6 +97,7 @@ emit("menusData", res); }; const setMenuChildClick = (res) => { + debugger; if (childMenuOptions.value && childMenuOptions.value == res.id) { if (checkMenuChildFlag.value != null) { if (checkMenuChildFlag.value[0] == res.id[0]) { -- Gitblit v1.9.3