From 896248dc24dd677d17fa6079f75362770656bca6 Mon Sep 17 00:00:00 2001
From: master <master@163.com>
Date: 星期四, 31 三月 2022 20:55:45 +0800
Subject: [PATCH] 添加接口清单、监测统计等页面
---
src/cool/modules/doulunji/views/doulunji_modell.vue | 8 +
src/cool/modules/metadata/views/monitor_statedata.vue | 177 ++++++++++++++++++++++
src/cool/modules/alarm/views/config_interface.vue | 132 ++++++++++++++++
src/cool/modules/working_log/index.ts | 15 +
src/cool/modules/working_log/components/index.ts | 1
src/cool/modules/working_log/pages/index.ts | 1
src/cool/modules/working_log/service/index.ts | 1
src/cool/modules/working_log/store/index.ts | 1
src/cool/modules/working_log/views/index.ts | 1
public/hn3d/example/00_hn_new.html | 7
src/cool/modules/working_log/directives/index.ts | 1
public/hn3d/example/test.html | 85 ++++++++++
12 files changed, 429 insertions(+), 1 deletions(-)
diff --git a/public/hn3d/example/00_hn_new.html b/public/hn3d/example/00_hn_new.html
index 32d3345..fcadad8 100644
--- a/public/hn3d/example/00_hn_new.html
+++ b/public/hn3d/example/00_hn_new.html
@@ -101,6 +101,10 @@
type: 'get',
dataType: 'json',
async: false,//鍚屾
+ headers: {
+ "Access-Control-Allow-Origin": "*"
+ // "Accept": "application/json"
+ },
url: `${data_url}get_dou_params`,
success: function (data) {
console.log(data)
@@ -272,7 +276,8 @@
position: [121.406729, 31.467183, 14], // 妤兼爧浣嶇疆
style: {
- url: "../model/doulunji/dabi/doulunji_dabi.gltf",
+ url: "http://112.74.77.127:9100/hn/doulunji/dabi/doulunji_dabi.gltf",
+ // url: "https://a.amap.com/jsapi_demos/static/gltf/Duck.gltf",
scale: 0.6
},
})
diff --git a/public/hn3d/example/test.html b/public/hn3d/example/test.html
new file mode 100644
index 0000000..c59ae5f
--- /dev/null
+++ b/public/hn3d/example/test.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport"
+ content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0" />
+ <meta name="author" content="鐏槦绉戞妧 http://mars3d.cn " />
+ <meta name="apple-touch-fullscreen" content="yes" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+ <meta name="format-detection" content="telephone=no" />
+ <meta name="x5-fullscreen" content="true" />
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
+ <!-- 鏍囬鍙婃悳绱㈠叧閿瓧 -->
+ <meta name="keywords" content="鐏槦绉戞妧,cesium,3D,GIS,marsgis,涓夌淮,鍦扮悆,鍦板浘,寮�鍙�,妗嗘灦,绯荤粺,绀轰緥,璧勬枡,妯″瀷,绂荤嚎,澶栧寘,鍚堣偉,瀹夊窘,涓浗" />
+ <meta name="description"
+ content="鐏槦绉戞妧 鍚堣偉鐏槦 鍚堣偉鐏槦绉戞妧 鍚堣偉鐏槦绉戞妧鏈夐檺鍏徃 leaflet leaflet妗嗘灦 leaflet寮�鍙� cesium cesium寮�鍙� cesium妗嗘灦 涓夌淮 鍦扮悆 妯″瀷 gis marsgis 鍦板浘绂荤嚎 鍦板浘寮�鍙� 鍦板浘妗嗘灦 鍦板浘澶栧寘 妗嗘灦 寮�鍙� 澶栧寘 鍦板浘绂荤嚎 浜岀淮鍦板浘 涓夌淮鍦板浘 鍏ㄦ櫙婕父 鍦扮悊淇℃伅绯荤粺 浜慓IS 涓夌淮GIS GIS骞冲彴 WebGIS" />
+
+ <link rel="shortcut icon" type="image/x-icon" href="https://muyao1987.gitee.io/cdn/marsgis.cn/favicon/favicon.ico" />
+ <title>鏁欏妤�(BIM寤烘ā) | Mars3D | 涓夌淮鍦板浘 | 鐏槦绉戞妧 | 鍚堣偉鐏槦绉戞妧鏈夐檺鍏徃</title>
+
+ <!--绗笁鏂筶ib-->
+ <script type="text/javascript" src="../lib/include-lib.js" libpath="../lib/" include="jquery"></script>
+
+ <link href="./css/style.css" rel="stylesheet" />
+ <style>
+ .btn-primary {
+ margin: 2px;
+ padding: auto 16px
+ }
+
+ .handle {
+ top: 30%;
+ width: 120px;
+ text-align: center
+ }
+ </style>
+</head>
+
+<body class="dark">
+ <!--鍔犺浇鍓嶈繘琛屾搷浣滄彁绀猴紝浼樺寲鐢ㄦ埛浣撻獙-->
+ <img src="http://112.74.77.127:9100/hn/world.jpg" style="width: 100%;">
+
+ <script type="text/javascript">
+ "use script"; //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
+
+ // var data_url = 'http://112.74.77.127:9100/hn/doulunji/dabi/doulunji_dabi.gltf'
+ // var data_url = 'http://112.74.77.127:9100/hn/world.jpg'
+ var data_url = 'https://a.amap.com/jsapi_demos/static/gltf/Duck.gltf'
+
+
+ // 椤甸潰鍒濆鎵ц鐨勬柟娉�
+ $(document).ready(function () {
+ //plan 1:鐐瑰嚮鎸夐挳寮忚姹傛暟鎹紝骞跺妯″瀷浣嶇疆杩涜绉诲姩
+ $.ajax({
+ type: 'GET',
+ dataType: 'json',
+ // headers: {
+ // // "Access-Control-Allow-Origin": "*",
+ // "Accept": "application/json"
+ // },
+ // async: false,//鍚屾
+ crossDomain: true,
+ beforeSend: function (xhr) {
+ xhr.withCredentials = true;
+ },
+ url: data_url,
+ success: function (data) {
+ console.log('data')
+ },
+ error: function (request, textStatus) {
+
+ }
+ })
+
+ })
+
+ function showData (result) {
+ let data = JSON.stringify(result);
+ }
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/cool/modules/alarm/views/config_interface.vue b/src/cool/modules/alarm/views/config_interface.vue
new file mode 100644
index 0000000..391a614
--- /dev/null
+++ b/src/cool/modules/alarm/views/config_interface.vue
@@ -0,0 +1,132 @@
+<template>
+ <cl-crud :ref="setRefs('crud')"
+ @load="onLoad">
+ <el-row type="flex"
+ align="middle">
+ <!-- 鍒锋柊鎸夐挳 -->
+ <cl-refresh-btn />
+ <!-- 鏂板鎸夐挳 -->
+ <cl-add-btn />
+ <!-- 鍒犻櫎鎸夐挳 -->
+ <cl-multi-delete-btn />
+ <cl-flex1 />
+ <!-- 鍏抽敭瀛楁悳绱� -->
+ <cl-search-key />
+ </el-row>
+
+ <el-row>
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <cl-table :ref="setRefs('table')"
+ v-bind="table" />
+ </el-row>
+
+ <el-row type="flex">
+ <cl-flex1 />
+ <!-- 鍒嗛〉鎺т欢 -->
+ <cl-pagination />
+ </el-row>
+
+ <!-- 鏂板銆佺紪杈� -->
+ <cl-upsert :ref="setRefs('upsert')"
+ v-bind="upsert" />
+ </cl-crud>
+</template>
+
+<script lang="ts">
+import { defineComponent, reactive } from "vue";
+import { CrudLoad, Upsert, Table } from "@cool-vue/crud/types";
+import { useCool } from "/@/cool";
+
+export default defineComponent({
+ setup() {
+ const { refs, setRefs, service } = useCool();
+
+ // 鏂板銆佺紪杈戦厤缃�
+ const upsert = reactive<Upsert>({
+ items: []
+ });
+
+ // 琛ㄦ牸閰嶇疆
+ const table = reactive<Table>({
+ columns: [
+ {
+ type: "selection",
+ align: "center"
+ },
+ {
+ label: "id",
+ prop: "id",
+ sortable: true //鏄惁鎺掑簭鍔熻兘
+ },
+ {
+ label: "鎺ュ彛鍚嶇О",
+ prop: "interface_name"
+ },
+ {
+ label: "鎺ュ彛绫诲瀷",
+ prop: "interface_type"
+ },
+ {
+ label: "鎺ュ彛IP",
+ prop: "interface_ip"
+ },
+ {
+ label: "鎺ュ彛鍗忚",
+ prop: "interface_protocal"
+ },
+ {
+ label: "绔彛",
+ prop: "interfac_port"
+ },
+ {
+ label: "璁よ瘉鏂瑰紡",
+ prop: "interface_auth"
+ },
+ {
+ label: "璐﹀彿",
+ prop: "auth_account"
+ },
+ {
+ label: "瀵嗙爜",
+ prop: "auth_psw"
+ },
+ {
+ label: "鎺ュ彛鍦板潃",
+ prop: "interface_url"
+ },
+ {
+ label: "share鍦板潃",
+ prop: "share_url"
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark"
+ },
+ {
+ prop: "status",
+ label: "鐘舵��"
+ },
+ {
+ label: "鎿嶄綔",
+ type: "op"
+ }
+ ]
+ });
+
+ // crud 鍔犺浇
+ function onLoad({ ctx, app }: CrudLoad) {
+ // 缁戝畾 service
+ ctx.service(service.business.interfacelist).done();
+ app.refresh();
+ }
+
+ return {
+ refs,
+ setRefs,
+ upsert,
+ table,
+ onLoad
+ };
+ }
+});
+</script>
diff --git a/src/cool/modules/doulunji/views/doulunji_modell.vue b/src/cool/modules/doulunji/views/doulunji_modell.vue
new file mode 100644
index 0000000..65eb2e6
--- /dev/null
+++ b/src/cool/modules/doulunji/views/doulunji_modell.vue
@@ -0,0 +1,8 @@
+<template>
+
+ <iframe width=400
+ height=300
+ frameborder=0
+ scrolling=auto
+ src='http://localhost:9100/'></iframe>
+</template>
\ No newline at end of file
diff --git a/src/cool/modules/metadata/views/monitor_statedata.vue b/src/cool/modules/metadata/views/monitor_statedata.vue
new file mode 100644
index 0000000..1ad7bb8
--- /dev/null
+++ b/src/cool/modules/metadata/views/monitor_statedata.vue
@@ -0,0 +1,177 @@
+<template>
+ <cl-crud :ref="setRefs('crud')"
+ @load="onLoad">
+ <el-row type="flex"
+ align="middle">
+ <!-- 鍒锋柊鎸夐挳 -->
+ <cl-refresh-btn />
+ <!-- 鏂板鎸夐挳 -->
+ <cl-add-btn />
+ <!-- 鍒犻櫎鎸夐挳 -->
+ <cl-multi-delete-btn />
+ <cl-flex1 />
+ <!-- 鍏抽敭瀛楁悳绱� -->
+ <cl-search-key />
+ </el-row>
+
+ <el-row>
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <cl-table :ref="setRefs('table')"
+ v-bind="table" />
+ </el-row>
+
+ <el-row type="flex">
+ <cl-flex1 />
+ <!-- 鍒嗛〉鎺т欢 -->
+ <cl-pagination />
+ </el-row>
+
+ <!-- 鏂板銆佺紪杈� -->
+ <cl-upsert :ref="setRefs('upsert')"
+ v-bind="upsert" />
+ </cl-crud>
+</template>
+
+<script lang="ts">
+import { defineComponent, reactive } from "vue";
+import { CrudLoad, Upsert, Table } from "@cool-vue/crud/types";
+import { useCool } from "/@/cool";
+
+export default defineComponent({
+ setup() {
+ const { refs, setRefs, service } = useCool();
+
+ // 鏂板銆佺紪杈戦厤缃�
+ const upsert = reactive<Upsert>({
+ items: []
+ });
+
+ // 琛ㄦ牸閰嶇疆
+ const table = reactive<Table>({
+ columns: [
+ {
+ type: "selection",
+ align: "center"
+ },
+ {
+ label: "id",
+ prop: "id",
+ sortable: true //鏄惁鎺掑簭鍔熻兘
+ },
+ {
+ label: "鏃堕棿绮掑害",
+ prop: "time"
+ },
+ {
+ label: "璧峰鏃堕棿",
+ prop: "start_time"
+ },
+ {
+ label: "鎴鏃堕棿",
+ prop: "end_time"
+ },
+ {
+ label: "骞冲潎鑺辫垂鏃堕棿",
+ prop: "avg_task_time"
+ },
+ {
+ label: "鏁版嵁浼犺緭鏃堕棿",
+ prop: "avg_transmission_time"
+ },
+ {
+ label: "鐐逛簯璁$畻鏃堕棿",
+ prop: "avg_caculater_time"
+ },
+ {
+ label: "cpu鍗犵敤鐜�",
+ prop: "cpu_rate"
+ },
+ {
+ label: "鍐呭瓨",
+ prop: "memory"
+ },
+ {
+ label: "骞冲潎鏂囦欢澶у皬",
+ prop: "avg_filesize"
+ },
+ {
+ label: "浠诲姟绫诲瀷",
+ prop: "task_type",
+ dict: [
+ {
+ label: "鎶撳浘",
+ value: 1,
+ type: "info" //success warning danger info鍙��
+ },
+ {
+ label: "闆疯揪鎵弿",
+ value: 2,
+ type: "success"
+ },
+ {
+ label: "闄ゅ皹",
+ value: 3,
+ type: "warning"
+ }
+ ],
+ filters: [
+ {
+ text: "鎶撳浘",
+ value: 1
+ },
+ {
+ text: "闆疯揪鎵弿",
+ value: 2
+ },
+ {
+ text: "闄ゅ皹",
+ value: 3
+ }
+ ],
+ width: 100
+ },
+ {
+ label: "澶囨敞",
+ prop: "remark"
+ },
+ {
+ prop: "status",
+ label: "鐘舵��",
+ minWidth: 120,
+ dict: [
+ {
+ label: "鍚敤",
+ value: 1,
+ type: "success"
+ },
+ {
+ label: "绂佺敤",
+ value: 0,
+ type: "danger"
+ }
+ ]
+ },
+ {
+ label: "鎿嶄綔",
+ type: "op"
+ }
+ ]
+ });
+
+ // crud 鍔犺浇
+ function onLoad({ ctx, app }: CrudLoad) {
+ // 缁戝畾 service
+ ctx.service(service.business.statdata).done();
+ app.refresh();
+ }
+
+ return {
+ refs,
+ setRefs,
+ upsert,
+ table,
+ onLoad
+ };
+ }
+});
+</script>
diff --git a/src/cool/modules/working_log/components/index.ts b/src/cool/modules/working_log/components/index.ts
new file mode 100644
index 0000000..ff8b4c5
--- /dev/null
+++ b/src/cool/modules/working_log/components/index.ts
@@ -0,0 +1 @@
+export default {};
diff --git a/src/cool/modules/working_log/directives/index.ts b/src/cool/modules/working_log/directives/index.ts
new file mode 100644
index 0000000..ff8b4c5
--- /dev/null
+++ b/src/cool/modules/working_log/directives/index.ts
@@ -0,0 +1 @@
+export default {};
diff --git a/src/cool/modules/working_log/index.ts b/src/cool/modules/working_log/index.ts
new file mode 100644
index 0000000..08b1faf
--- /dev/null
+++ b/src/cool/modules/working_log/index.ts
@@ -0,0 +1,15 @@
+import components from "./components";
+import directives from "./directives";
+import service from "./service";
+import store from "./store";
+import pages from "./pages";
+import views from "./views";
+
+export default {
+ components,
+ directives,
+ service,
+ store,
+ pages,
+ views
+};
diff --git a/src/cool/modules/working_log/pages/index.ts b/src/cool/modules/working_log/pages/index.ts
new file mode 100644
index 0000000..d6d1738
--- /dev/null
+++ b/src/cool/modules/working_log/pages/index.ts
@@ -0,0 +1 @@
+export default [];
diff --git a/src/cool/modules/working_log/service/index.ts b/src/cool/modules/working_log/service/index.ts
new file mode 100644
index 0000000..ff8b4c5
--- /dev/null
+++ b/src/cool/modules/working_log/service/index.ts
@@ -0,0 +1 @@
+export default {};
diff --git a/src/cool/modules/working_log/store/index.ts b/src/cool/modules/working_log/store/index.ts
new file mode 100644
index 0000000..ff8b4c5
--- /dev/null
+++ b/src/cool/modules/working_log/store/index.ts
@@ -0,0 +1 @@
+export default {};
diff --git a/src/cool/modules/working_log/views/index.ts b/src/cool/modules/working_log/views/index.ts
new file mode 100644
index 0000000..d6d1738
--- /dev/null
+++ b/src/cool/modules/working_log/views/index.ts
@@ -0,0 +1 @@
+export default [];
--
Gitblit v1.9.1