Prechádzať zdrojové kódy

Merge branch 'master' of http://47.103.92.60:3003/skyversation/qp_onemap_ui into MicroFunction

# Conflicts:
#	src/App.vue
#	src/api/count.js
#	src/components/AppVue/Header.vue
#	src/main.js
#	src/views/yygl/overview/index.vue
DESKTOP-6LTVLN7\Liumouren 3 týždňov pred
rodič
commit
d2998e35f5

+ 48 - 69
package-lock.json

@@ -9,15 +9,16 @@
       "version": "0.1.0",
       "dependencies": {
         "@element-plus/icons-vue": "^2.0.10",
+        "@vue-office/excel": "^1.7.14",
         "axios": "^0.27.2",
         "echarts": "^5.6.0",
         "element-plus": "^2.2.15",
         "moment": "^2.30.1",
         "vue": "^3.2.13",
+        "vue-demi": "^0.14.10",
         "vue-json-editor": "^1.4.3",
         "vue-json-viewer": "^3.0.4",
         "vue-router": "^4.0.3",
-        "vue3-lottie": "^3.3.1",
         "vuex": "^4.0.0"
       },
       "devDependencies": {
@@ -557,6 +558,23 @@
         "@types/node": "*"
       }
     },
+    "node_modules/@vue-office/excel": {
+      "version": "1.7.14",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/@vue-office/excel/-/excel-1.7.14.tgz",
+      "integrity": "sha512-pVUgt+emDQUnW7q22CfnQ+jl43mM/7IFwYzOg7lwOwPEbiVB4K4qEQf+y/bc4xGXz75w1/e3Kz3G6wAafmFBFg==",
+      "hasInstallScript": true,
+      "license": "MIT",
+      "peerDependencies": {
+        "@vue/composition-api": "^1.7.1",
+        "vue": "^2.0.0 || >=3.0.0",
+        "vue-demi": "^0.14.6"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@vue/cli-overlay": {
       "version": "5.0.9",
       "dev": true,
@@ -945,30 +963,6 @@
         "url": "https://github.com/sponsors/antfu"
       }
     },
-    "node_modules/@vueuse/core/node_modules/vue-demi": {
-      "version": "0.14.10",
-      "hasInstallScript": true,
-      "license": "MIT",
-      "bin": {
-        "vue-demi-fix": "bin/vue-demi-fix.js",
-        "vue-demi-switch": "bin/vue-demi-switch.js"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/antfu"
-      },
-      "peerDependencies": {
-        "@vue/composition-api": "^1.0.0-rc.1",
-        "vue": "^3.0.0-0 || ^2.6.0"
-      },
-      "peerDependenciesMeta": {
-        "@vue/composition-api": {
-          "optional": true
-        }
-      }
-    },
     "node_modules/@vueuse/metadata": {
       "version": "9.13.0",
       "license": "MIT",
@@ -986,30 +980,6 @@
         "url": "https://github.com/sponsors/antfu"
       }
     },
-    "node_modules/@vueuse/shared/node_modules/vue-demi": {
-      "version": "0.14.10",
-      "hasInstallScript": true,
-      "license": "MIT",
-      "bin": {
-        "vue-demi-fix": "bin/vue-demi-fix.js",
-        "vue-demi-switch": "bin/vue-demi-switch.js"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/antfu"
-      },
-      "peerDependencies": {
-        "@vue/composition-api": "^1.0.0-rc.1",
-        "vue": "^3.0.0-0 || ^2.6.0"
-      },
-      "peerDependenciesMeta": {
-        "@vue/composition-api": {
-          "optional": true
-        }
-      }
-    },
     "node_modules/@webassemblyjs/ast": {
       "version": "1.14.1",
       "dev": true,
@@ -3064,6 +3034,7 @@
     },
     "node_modules/fast-deep-equal": {
       "version": "3.1.3",
+      "dev": true,
       "license": "MIT"
     },
     "node_modules/fast-glob": {
@@ -4079,6 +4050,7 @@
     },
     "node_modules/klona": {
       "version": "2.0.6",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 8"
@@ -4367,10 +4339,6 @@
         "node": ">=4"
       }
     },
-    "node_modules/lottie-web": {
-      "version": "5.12.2",
-      "license": "MIT"
-    },
     "node_modules/lower-case": {
       "version": "2.0.2",
       "dev": true,
@@ -4602,7 +4570,7 @@
     },
     "node_modules/moment": {
       "version": "2.30.1",
-      "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/moment/-/moment-2.30.1.tgz",
       "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
       "license": "MIT",
       "engines": {
@@ -7043,6 +7011,32 @@
         }
       }
     },
+    "node_modules/vue-demi": {
+      "version": "0.14.10",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/vue-demi/-/vue-demi-0.14.10.tgz",
+      "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
+      "hasInstallScript": true,
+      "license": "MIT",
+      "bin": {
+        "vue-demi-fix": "bin/vue-demi-fix.js",
+        "vue-demi-switch": "bin/vue-demi-switch.js"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      },
+      "peerDependencies": {
+        "@vue/composition-api": "^1.0.0-rc.1",
+        "vue": "^3.0.0-0 || ^2.6.0"
+      },
+      "peerDependenciesMeta": {
+        "@vue/composition-api": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/vue-hot-reload-api": {
       "version": "2.3.4",
       "dev": true,
@@ -7163,21 +7157,6 @@
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/vue3-lottie": {
-      "version": "3.3.1",
-      "license": "MIT",
-      "dependencies": {
-        "fast-deep-equal": "^3.1.3",
-        "klona": "^2.0.6",
-        "lottie-web": "5.12.2"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "peerDependencies": {
-        "vue": "^3.2"
-      }
-    },
     "node_modules/vuex": {
       "version": "4.1.0",
       "license": "MIT",

+ 2 - 1
package.json

@@ -8,15 +8,16 @@
   },
   "dependencies": {
     "@element-plus/icons-vue": "^2.0.10",
+    "@vue-office/excel": "^1.7.14",
     "axios": "^0.27.2",
     "echarts": "^5.6.0",
     "element-plus": "^2.2.15",
     "moment": "^2.30.1",
     "vue": "^3.2.13",
+    "vue-demi": "^0.14.10",
     "vue-json-editor": "^1.4.3",
     "vue-json-viewer": "^3.0.4",
     "vue-router": "^4.0.3",
-    "vue3-lottie": "^3.3.1",
     "vuex": "^4.0.0"
   },
   "devDependencies": {

+ 32 - 31
public/index.html

@@ -9,12 +9,11 @@
   <title>
     <%= htmlWebpackPlugin.options.title %>
   </title>
-
   <link rel="stylesheet" href="/static/css/reset.css">
   <script src="/static/config/config.js"></script>
-
   <script src="/static/plugins/Cesium/Cesium.js"></script>
   <link rel="stylesheet" href="/static/plugins/Cesium/Widgets/widgets.css">
+  <script src="/static/plugins/createAuth.js"></script>
 </head>
 
 <body>
@@ -27,39 +26,41 @@
 </body>
 
 <style>
-    :root {
-      /* 滚动条整体部分,必须要设置 */
-      ::-webkit-scrollbar {
-        width: 6px;
-        height: 10px;
-        overflow-y: overlay;
-      }
+  :root {
 
-      /* 滚动条里面轨道,能向上向下移动 */
-      ::-webkit-scrollbar-track {
-        background-color: transparent;
-      }
+    /* 滚动条整体部分,必须要设置 */
+    ::-webkit-scrollbar {
+      width: 6px;
+      height: 10px;
+      overflow-y: overlay;
+    }
 
-      /* 滚动条里面轨道,能向上向下移动 */
-      ::-webkit-scrollbar-track-piece {
-        background-color: transparent;
-      }
+    /* 滚动条里面轨道,能向上向下移动 */
+    ::-webkit-scrollbar-track {
+      background-color: transparent;
+    }
 
-      ::-webkit-scrollbar-thumb {
-        display: none;
-        border-radius: 6px;
-      }
+    /* 滚动条里面轨道,能向上向下移动 */
+    ::-webkit-scrollbar-track-piece {
+      background-color: transparent;
+    }
 
-      /* 滚动条里面的小方块,能向上向下移动 */
-      *:hover::-webkit-scrollbar-thumb {
-        display: flex;
-        background-color: rgb(163, 166, 173, 0.5);
-        border-radius: 6px;
-      }
+    ::-webkit-scrollbar-thumb {
+      display: none;
+      border-radius: 6px;
+    }
+
+    /* 滚动条里面的小方块,能向上向下移动 */
+    *:hover::-webkit-scrollbar-thumb {
+      display: flex;
+      background-color: rgb(163, 166, 173, 0.5);
+      border-radius: 6px;
+    }
 
-      *:hover::-webkit-scrollbar-track-piece {
-        background-color: rgb(209, 207, 207,0);
-      }
+    *:hover::-webkit-scrollbar-track-piece {
+      background-color: rgb(209, 207, 207, 0);
     }
-  </style>
+  }
+</style>
+
 </html>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
public/static/plugins/createAuth.js


+ 1 - 2
src/App.vue

@@ -26,9 +26,8 @@ export default {
     api
       .login({
         userName: systemConfig.defaultAccount.userName,
-        password: systemConfig.defaultAccount.password,
+        password: AesEncryptUtil.getPassword(),
         clientId: "1",
-        serviceId: "0",
       })
       .then((result) => {
         if (result.code == 200) {

+ 7 - 2
src/api/common.js

@@ -2,9 +2,14 @@ import {
   postform
 } from '../utils/request'
 
-// 登录
+// // 登录 (用户名,密码)
+// const login = (params) => {
+//   return postform(systemConfig.oauthServiceUrl + '/user/login', params)
+// }
+
+// 登录 (用户名,加密密码)
 const login = (params) => {
-  return postform(systemConfig.oauthServiceUrl + '/user/login', params)
+  return postform(systemConfig.oauthServiceUrl + '/user/pwd/login', params)
 }
 
 const getDmsTypes = (params) => {

+ 32 - 3
src/api/count.js

@@ -222,6 +222,7 @@ export function totalCount(start, end) {
 
     return resolveDmsMultiTableResult(postform(multiSearch, data));
 }
+
 export function totalCountGroupByTime(start, end) {
     let data = {
         "columnId": preCountDmsId,
@@ -254,9 +255,28 @@ export function totalCountGroupByTime(start, end) {
 
     return resolveDmsMultiTableResult(postform(multiSearch, data));
 }
+
 export function countUserData() {
     return resolveoauthResult(get(oauthCountUser))
 }
+export function countUserDataByTime(time1, time2, time3) {
+    let data = {
+        "time": JSON.stringify([
+            {
+                name: "last",
+                start: formatDateToDb(time1),
+                end: formatDateToDb(time2)
+            },
+            {
+                name: "this",
+                start: formatDateToDb(time2),
+                end: formatDateToDb(time3)
+            },
+        ])
+    }
+    return resolveoauthResult(postform(oauthCountUser, data))
+}
+
 function timeCheckers(start, end) {
     let output = []
     if (start != null) {
@@ -299,7 +319,7 @@ async function resolveDmsMultiTableResult(result) {
     } else if (result.code == 202) {
         return [];
     } else {
-        return null;
+        throw new Error(result.message)
     }
 }
 async function resolveoauthResult(result) {
@@ -307,10 +327,9 @@ async function resolveoauthResult(result) {
     if (result.code == 200) {
         return result.content
     } else {
-        return null;
+        throw new Error(result.message)
     }
 }
-
 // 服务类别分布、服务调用TOP10、详细报告。导出数据是另外一个接口?导出数据显示的数据不就是详细报告的数据吗?
 export function serviceInfo(start, end) {
     let data = {
@@ -364,4 +383,14 @@ export function serviceInfo(start, end) {
         ])
     }
     return resolveDmsMultiTableResult(postform(multiSearch, data));
+}
+function formatDateToDb(date) {
+    const year = date.getFullYear();
+    const month = String(date.getMonth() + 1).padStart(2, '0');
+    const day = String(date.getDate()).padStart(2, '0');
+    const hours = String(date.getHours()).padStart(2, '0');
+    const minutes = String(date.getMinutes()).padStart(2, '0');
+    const seconds = String(date.getSeconds()).padStart(2, '0');
+
+    return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 }

+ 84 - 0
src/api/rwgl.js

@@ -0,0 +1,84 @@
+import {
+    postform
+} from '../utils/request'
+import content from './content'
+
+
+const dmsPath = systemConfig.dmsDataProxy
+const multiSearch = dmsPath + "/content/multipleFormsOfJointInvestigation"
+
+const taskDmsId = 1662
+
+export function getTaskStatus() {
+    return resolveResult(content.getCategoryDetail({
+        type: 0,
+        cName: "task_status",
+    }))
+}
+
+export function getTasks(page, pageSize, name, status) {
+    let data = {
+        "columnId": taskDmsId,
+        "autoSelectItem": true,
+        "page": page,
+        "pageSize": pageSize,
+        "columnAlias": "main",
+        "orderBy":"main,c_start_time,desc",
+        "conditionsList": JSON.stringify([
+            ...getNameChecker(name),
+            ...getStatusChecker(status)
+        ]),
+    }
+
+    return resolveDmsMultiTableResult(postform(multiSearch, data));
+}
+
+function getNameChecker(name) {
+    if (name == null||name=="") {
+        return []
+    }
+    return [{
+        "columnId": "main",
+        "columnName": "c_name",
+        "condition": "like",
+        "value": `%${name}%`
+    }]
+}
+function getStatusChecker(status) {
+    
+    if (status == null || status.length == 0) {
+        return []
+    }
+    let output = ["or"]
+    for (let i = 0; i < status.length; i++) {
+        const e = status[i];
+        
+        output.push({
+            "columnId": "main",
+            "columnName": "c_state",
+            "condition": "=",
+            "value": `${e}`
+        })
+    }
+    return [output]
+}
+
+async function resolveResult(result) {
+    result = await result;
+    if (result.code == 200) {
+        return result.content
+    } else {
+        return null;
+    }
+}
+
+async function resolveDmsMultiTableResult(result) {
+    result = await result;
+    if (result.code == 200) {
+        return result.content
+    } else if (result.code == 202) {
+        return [];
+    } else {
+        return null;
+    }
+}

+ 1 - 1
src/components/AppVue/Header.vue

@@ -23,7 +23,7 @@ export default {
       menuList: [
         { index: 1, path: "/", label: "首页", isActive: true },
         { index: 2, path: "/sksjgl", label: "时空数据管理", isActive: false },
-        { index: 3, path: "/skmh/scene", label: "二维GIS引擎", isActive: false },
+        // { index: 3, path: "/skmh/scene", label: "二维GIS引擎", isActive: false },
         { index: 4, path: "/skmh", label: "时空门户", isActive: false },
         { index: 5, path: "/wgn", label: "微功能", isActive: false },
         { index: 6, path: "/yygl", label: "应用管理", isActive: false },

+ 393 - 0
src/components/filePreview/viewPreview.vue

@@ -0,0 +1,393 @@
+<template>
+    <div class="container">
+        <div class="map-container" v-if="isShow == 1">
+            <div id="skysceneryContainer"></div>
+            <div class="infoDialog" v-show="infoDialogShow">
+                <div class="close" @click="closeWin">×</div>
+                <div class="content" v-if="nowPoint != null">
+                    <el-scrollbar>
+                        <div class="item" v-for="info in nowPointInfo" :key="info">{{info.key}}: {{ info.value }}</div>
+                    </el-scrollbar>
+                </div>
+            </div>
+        </div>
+        <div class="page-content" v-if="isShow == 2">
+            <vue-office-excel
+                :src="excelUrl"
+                :options="{
+                    xls: true,
+                    xlsx: true,
+                }"
+                @rendered="onRendered"
+                @error="onError"
+                />
+        </div>
+         <div class="page-content" v-if="isShow == 3">
+            <div style="height: 100%; display: flex; align-items: center; justify-content: center;">
+                <el-empty class="custom-empty" description="不支持的文件类型" />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { ElMessage } from 'element-plus'
+import VueOfficeExcel from '@vue-office/excel'
+import '@vue-office/excel/lib/index.css'
+import { toRaw } from "vue";
+export default {
+    name: "",
+    components: {
+       VueOfficeExcel
+    },
+    data() {
+        return {
+            dataJson:[],
+            pointImg:require('@static/images/point.png'),
+            geometryArr:[],
+            mapHandle:null,
+            infoDialogShow:false,
+            nowPoint: null,
+            nowPointInfo:null,
+            excelUrl:'',
+            loading:false,
+            error:'',
+            isShow:1,
+        };
+    },
+    created() {
+        
+    },
+    mounted() {
+        const queryParams = new URLSearchParams(window.location.search);
+        let url = queryParams.get('url');
+        console.log(queryParams.get('url')); // 输出: value1
+        if(url){
+            let arr = url.split('.');
+            let type = arr[arr.length-1];
+            if(type == 'json' || type == 'geojson'){
+                let param = {url:url}
+                this.isShow = 1
+                window.SkySceneryConfig = {};
+                window.loadScripts([systemConfig.scriptMain]).then(() => {
+                    this.creatMap();
+                    setTimeout(() => {
+                        this.getVectorData(param);
+                    }, 1000)
+                    
+                });
+            }else if(type == 'xlsx' || type == 'xls'){
+                this.isShow = 2
+                this.excelUrl = url
+                this.loadExcel();
+            }else{
+                this.isShow = 3
+                // ElMessage.error('不支持的文件类型')
+            }
+        }
+    },
+   
+    methods: {
+        onRendered() {
+            // ElMessage.success('Excel文件渲染完成')
+        },
+        loadExcel() {
+            if (!this.excelUrl) {
+                // this.error = '请输入Excel文件在线地址'
+                return
+            }
+            this.loading = true
+            this.error = ''
+            // 加载Excel文件,实际加载由VueOfficeExcel组件处理
+            setTimeout(() => {
+                this.loading = false
+            }, 1000)
+        },
+        onError(err) {
+            ElMessage.error('Excel文件加载失败:', err)
+            // this.error = 'Excel文件加载失败,请检查文件地址是否正确'
+            this.loading = false
+        },
+         creatMap() {
+            window.viewer = new SkyScenery.Viewer("skysceneryContainer", {
+                animation: false, //是否创建动画小器件,左下角仪表
+                baseLayerPicker: false, //是否显示图层选择器
+                imageryProvider: new SkyScenery.SingleTileImageryProvider({
+                url: (function createColorCanvas(color) {
+                    var width = 1,
+                    height = 1;
+                    var canvas = document.createElement("canvas");
+                    canvas.width = width;
+                    canvas.height = height;
+                    var ctx = canvas.getContext("2d");
+                    ctx.fillStyle = color;
+                    ctx.fillRect(0, 0, width, height);
+                    return canvas.toDataURL();
+                })("#ffffff00"),
+                rectangle: SkyScenery.Rectangle.fromDegrees(-180.0, -90.0, 180.0, 90.0),
+                }),
+                fullscreenButton: false, //是否显示全屏按钮
+                geocoder: false, //是否显示geocoder小器件,右上角查询按钮
+                homeButton: false, //是否显示Home按钮
+                infoBox: false, //是否显示信息框
+                sceneModePicker: false, //是否显示3D/2D选择器
+                selectionIndicator: false, //是否显示选取指示器组件
+                timeline: false, //是否显示时间轴
+                navigationHelpButton: false, //是否显示右上角的帮助按钮
+                scene3DOnly: true, //如果设置为true,则所有几何图形以3D模式绘制以节约GPU资源
+                shouldAnimate: false, //是否自动播放
+                // 性能优化配置
+                requestRenderMode: true,
+                maximumRenderTimeChange: Infinity,
+                preserveDrawingBuffer: false,
+                useBrowserRecommendedResolution: true,
+            });
+
+            // 添加地图服务
+            viewer.imageryLayers.addImageryProvider(
+                new SkyScenery.ArcGisMapServerImageryProvider({
+                url:
+                    "https://szlszxdt.qpservice.org.cn/internal_map/?servertype=shmap_blue_web&proxyToken=" +
+                    SkySceneryConfig.token,
+                enablePickFeatures: false, // 禁用要素拾取功能以提高性能
+                })
+            );
+
+            // 定位
+            viewer.camera.setView({
+                destination: SkyScenery.Cartesian3.fromDegrees(121.1158994,31.15205574, 30000.0), // 设置位置
+                orientation: {
+                    heading: SkyScenery.Math.toRadians(0.0), // 方向
+                    pitch: SkyScenery.Math.toRadians(-90.0), // 倾斜角度
+                    roll: 0,
+                },
+            });
+            
+        },
+        closeWin() {
+            this.infoDialogShow = false;
+            this.nowPoint = null;
+            this.nowPointInfo = null;
+        },
+        dwanMap(){
+            let that = this;
+            if(that.geometryArr.length>0){
+                that.geometryArr.map(function (info) {
+                    viewer.entities.remove(info)
+                })
+            }
+            that.geometryArr = that.dataJson.features.map(function (info) {
+                if(info.geometry.type == "Point"){
+                    return that.addPoint(info)
+                }else if(info.geometry.type == "LineString"){
+                    return that.addLine(info)
+                }else{
+                    return that.addPolygon(info)
+                }
+                
+            })
+            that.pointTCHandle();
+        },
+        addPolygon(param){
+            let arr = [];
+            param.geometry.coordinates.forEach(element => {
+                element.forEach(e => {
+                    arr.push(e[0]);
+                    arr.push(e[1]);
+                })
+            });
+            return viewer.entities.add(new SkyScenery.Entity({
+                name: " polygon",
+                polygon: {
+                    hierarchy: {
+                        positions: SkyScenery.Cartesian3.fromDegreesArray(arr)
+                    },
+                    heightReference: SkyScenery.HeightReference.CLAMP_TO_GROUND,
+                    material: SkyScenery.Color.CYAN.withAlpha(0.5)
+                },
+                info: {
+                    coor: [arr[0], arr[1]],
+                    properties: param.properties
+                },
+            }));
+        },
+        addLine(param){
+            return viewer.entities.add({
+                name: "line",
+                polyline: {
+                    //经纬度数组转世界坐标,带高度的话是fromDegreesArrayHeights
+                    positions: SkyScenery.Cartesian3.fromDegreesArray(param.geometry.coordinates),
+                    width: 2,
+                    material: SkyScenery.Color.CYAN,
+                    info: {
+                        properties: param.properties
+                    },
+                }
+            });
+        },
+        addPoint(param){
+            let that = this;
+            return viewer.entities.add(new SkyScenery.Entity({
+                name:"point",
+                position: SkyScenery.Cartesian3.fromDegrees(param.geometry.coordinates[0], param.geometry.coordinates[1]),
+                type: "point",
+                info: {
+                  coor: [param.geometry.coordinates[0], param.geometry.coordinates[1]],
+                  properties: param.properties
+                },
+                billboard: {
+                  image: that.pointImg,
+                  disableDepthTestDistance: Number.POSITIVE_INFINITY,
+                  scale: 0.3,
+                  horizontalOrigin: SkyScenery.HorizontalOrigin.CENTER,
+                  verticalOrigin: SkyScenery.VerticalOrigin.BOTTOM,
+                }
+              }));
+        },
+        // 点击事件绑定
+        pointTCHandle() {
+            let that = this;
+            if (!this.mapHandle) {
+                this.mapHandle = new SkyScenery.ScreenSpaceEventHandler(viewer.canvas, this);
+                this.mapHandle.setInputAction(function (movement) {
+                    that.infoDialogShow = false
+                    const pickedObject = viewer.scene.pick(movement.position);
+
+                    let cartesian = viewer.camera.pickEllipsoid(
+                        movement.position,
+                        viewer.scene.globe.ellipsoid
+                    );
+                    // 空间坐标转世界坐标(弧度)
+                    let cartographic = SkyScenery.Cartographic.fromCartesian(cartesian);
+                    // 弧度转为角度(经纬度)
+                    let lon = SkyScenery.Math.toDegrees(cartographic.longitude); // 经度值
+                    let lat = SkyScenery.Math.toDegrees(cartographic.latitude); // 纬度值
+                    let center = [lon,lat]
+                    if (SkyScenery.defined(pickedObject) && SkyScenery.defined(pickedObject.id)) {
+                        const entity = pickedObject.id;
+                        that.infoDialogShow = true
+                        that.nowPoint = entity.info;
+                        that.nowPointInfo =  Object.keys(that.nowPoint.properties).map(key => ({ key, value: that.nowPoint.properties[key] }));
+                        that.nowPoint["type"] = "info";
+                        // let xy = that.lonlatConvertToScreenXY(entity.info.coor)
+                        let xy = that.lonlatConvertToScreenXY(center)
+                        document.querySelector(".infoDialog").style.top = (xy.y - 230) + "px";
+                        document.querySelector(".infoDialog").style.left = (xy.x - 100) + "px";
+                    } else {
+                        // console.log('未拾取到实体');
+                    }
+                }, SkyScenery.ScreenSpaceEventType.LEFT_CLICK);
+                viewer.scene.postRender.addEventListener(that.updatePosition, this);
+            } else {
+                toRaw(this.mapHandle).destroy();
+                this.mapHandle = null
+                that.nowPointInfo = null
+                viewer.scene.postRender.removeEventListener(that.updatePosition, this);
+            }
+        },
+        // 经纬度转屏幕坐标
+        lonlatConvertToScreenXY(lonlat) {
+            // 定义经纬度
+            var longitude = SkyScenery.Math.toRadians(lonlat[0]); // 例如:东经116.391度
+            var latitude = SkyScenery.Math.toRadians(lonlat[1]); // 例如:北纬39.907度
+            var height = 0; // 高度,通常在地表为0
+            // 将经纬度转换为笛卡尔坐标
+            // var cartographic = SkyScenery.Cartographic.fromDegrees(longitude, latitude, height);
+            var cartesian = SkyScenery.Cartesian3.fromRadians(longitude, latitude, height, viewer.scene.globe.ellipsoid);
+            // 将笛卡尔坐标转换为窗口坐标
+            var canvasCoordinates = viewer.scene.cartesianToCanvasCoordinates(cartesian);
+            return canvasCoordinates
+        },
+        // 位置更新
+        updatePosition() {
+            try {
+                if (this.nowPoint != null) {
+                    const obj = toRaw(this.nowPoint);
+                    let xy = this.lonlatConvertToScreenXY(obj.coor)
+                    if (!xy) {
+                        document.querySelector(".infoDialog").style.top = "-9999px";
+                        document.querySelector(".infoDialog").style.left = "-9999px";
+                    } else {
+                        document.querySelector(".infoDialog").style.top = (xy.y - 230) + "px";
+                        document.querySelector(".infoDialog").style.left = (xy.x - 100) + "px";
+                    }
+                }
+            } catch (error) {
+                // debugger
+            }
+        },
+        
+        getVectorData(param){
+            let that = this;
+            fetch(param.url, {
+                method: 'GET',
+            }).then(response => response.json()) // 假设服务器返回 JSON 数据
+                .then(data => {
+                    console.log('[ eee ] >')
+                    that.dataJson = data;
+                    that.closeWin()
+                    that.dwanMap()
+                })
+        },
+    },
+    beforeDestroy() {
+        viewer = undefined
+    }
+};
+</script>
+<style lang="less" scoped>
+.container {
+    width: 100%;
+    height: 100%;
+    padding: 0px;
+    margin: 0 auto;
+    overflow: hidden;
+}
+.map-container {
+    width: 100%;
+    height: 100%;
+}
+.page-content {
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    border-radius: 4px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    overflow: hidden;
+  }
+.infoDialog {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    max-width: 500px;
+    height: 200px;
+    // background: #01346f99;
+    background: #ffffff;
+    border-radius: 10px;
+
+    .close {
+      font-size: 24px;
+      position: absolute;
+      top: 6px;
+      right: 8px;
+      line-height: 24px;
+      width: 24px;
+      height: 24px;
+      cursor: pointer;
+      // color: #ffffff;
+      color: #000000;
+    }
+
+    .content {
+      height: 160px;
+      // color: #ffffff;
+      color: #000000;
+      margin: 30px 0px 10px 20px;
+      overflow: auto;
+      .item {
+        line-height: 30px;
+        margin-right: 20px;
+      }
+    }
+  }
+</style>

+ 16 - 0
src/router/index.js

@@ -71,6 +71,14 @@ const routes = [
           return import('../views/yygl/appCenter.vue')
         }
       },
+      //任务管理
+      {
+        path: 'taskManger',
+        path: 'taskManger',
+        component: function () {
+          return import('../views/rwgl/Index.vue')
+        }
+      },
     ],
   },
   // {
@@ -134,6 +142,14 @@ const routes = [
     component: function () {
       return import('../views/wgn/Example.vue')
     },
+  },
+   // 文件预览功能
+  {
+    path: '/fileView',
+    name: 'fileView',
+    component: function () {
+      return import('../components/filePreview/viewPreview.vue')
+    },
   },
   // 应用管理
   // {

+ 1 - 1
src/views/example/Map.vue

@@ -60,7 +60,7 @@ export default {
             );
             // 定位
             viewer.camera.setView({
-                destination: SkyScenery.Cartesian3.fromDegrees(121.1, 31, 30000.0), // 设置位置
+                destination: SkyScenery.Cartesian3.fromDegrees(121.1158994,31.15205574, 30000.0), // 设置位置
                 orientation: {
                     heading: SkyScenery.Math.toRadians(0.0), // 方向
                     pitch: SkyScenery.Math.toRadians(-90.0), // 倾斜角度

+ 423 - 0
src/views/rwgl/Index.vue

@@ -0,0 +1,423 @@
+<template>
+    <div class="blue-background">
+        <div class="lighter-container">
+            <span>
+                <div>
+                    <div>状态:</div>
+                    <el-tag size="large" :effect="focusTaskStatus.includes('all') ? 'dark' : ''" type="primary"
+                        @click="changeTaskStatus()">
+                        全部
+                    </el-tag>
+                    <template v-for="status in taskStatus" :key="status.index">
+                        <el-tag size="large" :effect="focusTaskStatus.includes(status.index) ? 'dark' : ''" type="primary"
+                            @click="changeTaskStatus(status)">
+                            {{ status.name }}
+                        </el-tag>
+                    </template>
+                </div>
+            </span>
+            <div class="row">
+                <el-input class="searcher" v-model="searcher" placeholder="请输入任务名称相关关键字" />
+                <el-button type="primary" @click="pullTaskData(1)">搜索</el-button>
+                <el-button type="primary" @click="reset(),pullTaskData(1)">重置</el-button>
+            </div>
+        </div>
+        <div class="lighter-container">
+            查询到{{ taskNum }}条任务
+            <el-table table-layout="fixed" :data="taskData" class="table">
+                <el-table-column prop="main_c_name" label="名称" />
+                <el-table-column prop="main_c_comment" label="描述" />
+                <el-table-column prop="main_c_state" label="状态">
+                    <template #default="scope">
+                        <el-tag effect="dark" :type="statusStaticInfo[scope.row.main_c_state]?.tagType ?? ''"
+                            disable-transitions>{{
+                                getStatus(scope.row.main_c_state)?.name ?? '' }}</el-tag>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="main_c_start_time" label="任务开始时间">
+                    <template #default="scope">
+                        {{ timeFormatter(scope.row.main_c_start_time) }}
+                    </template>
+                </el-table-column>
+                <el-table-column prop="main_c_end_time" label="任务结束时间">
+                    <template #default="scope">
+                        {{ timeFormatter(scope.row.main_c_end_time) }}
+                    </template>
+                </el-table-column>
+                <el-table-column prop="main_c_file_name" label="结果">
+                    <template #default="scope">
+                        <span class="link" v-if="scope.row.main_c_file != null && scope.row.main_c_file_name != null"
+                            @click="downloadWithBlob(scope.row.main_c_file, scope.row.main_c_file_name)">
+                            {{ scope.row.main_c_file_name }}
+                        </span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="操作" width="360">
+                    <template #default="scope">
+                        <!-- <el-button  type="primary">
+                            查看详情
+                        </el-button> -->
+                        <template v-if="scope.row.main_c_file != null && scope.row.main_c_file_name != null">
+                            <el-button type="primary"
+                                @click="downloadWithBlob(scope.row.main_c_file, scope.row.main_c_file_name)">
+                                下载结果
+                            </el-button>
+                            <el-button type="primary" @click="preView(scope.row.main_c_file)">
+                                预览结果
+                            </el-button>
+                        </template>
+                    </template>
+
+                </el-table-column>
+            </el-table>
+            <div class="between-row">
+                <div><!--empty div--></div>
+                <el-pagination layout="prev, pager, next" :total="taskNum" @change="page=>pullTaskData(page)"/>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getTasks, getTaskStatus } from '@/api/rwgl';
+
+export default {
+    data() {
+        return {
+            searcher: "",
+            taskStatus: [],
+            focusTaskStatus: ["all"],
+            taskData: [],
+            taskNum: 0,
+            statusStaticInfo: {
+                0: {
+                    tagType: "primary"
+                },
+                1: {
+                    tagType: "primary"
+                },
+                2: {
+                    tagType: "success"
+                },
+                3: {
+                    tagType: "danger"
+                },
+            },
+            page: 1
+        }
+    },
+    mounted() {
+        this.pullTaskStatus()
+        this.pullTaskData(1)
+    },
+    methods: {
+        async pullTaskStatus() {
+            this.taskStatus = (await getTaskStatus()).sort((a, b) => a.index - b.index)
+        },
+        changeTaskStatus(status) {
+            if (status == null) {
+                this.focusTaskStatus = ["all"]
+            } else {
+                let set = new Set(this.focusTaskStatus)
+                set.delete("all")
+                let index = status.index
+                if (this.focusTaskStatus.includes(index)) {
+                    set.delete(index)
+                } else {
+                    set.add(index)
+                }
+                this.focusTaskStatus = Array.from(set)
+            }
+            // if(this.taskStatus.length==this.focusTaskStatus.length){
+            //     this.focusTaskStatus = ["all"]
+            // }
+        },
+        getCheckedStatus() {
+            if (this.focusTaskStatus.includes("all")) {
+                return this.taskStatus.map(t => t.index)
+            } else {
+                return this.focusTaskStatus
+            }
+        },
+        async pullTaskData(page) {
+            if(page!=null)this.page = page
+            let res = await getTasks(this.page, 10, this.searcher, this.getCheckedStatus())
+            this.taskNum = res.count
+            this.taskData = res.data
+        },
+        getStatus(index) {
+            for (let i = 0; i < this.taskStatus.length; i++) {
+                const e = this.taskStatus[i];
+                if (e.index == index) {
+                    return e;
+                }
+            }
+        },
+        timeFormatter(time) {
+            let date = new Date(time)
+            return date.toLocaleString()
+        },
+        async downloadWithBlob(url, filename) {
+            try {
+                const response = await fetch(systemConfig.dmsDataProxy + url);
+                const blob = await response.blob();
+                const blobUrl = window.URL.createObjectURL(blob);
+
+                const link = document.createElement('a');
+                link.href = blobUrl;
+                link.download = filename || 'file';
+                link.click();
+
+                // 清理URL对象
+                window.URL.revokeObjectURL(blobUrl);
+            } catch (error) {
+                console.error('下载失败:', error);
+            }
+        },
+        reset(){
+            this.focusTaskStatus= ["all"]
+            this.searcher = ""
+        },
+        preView(url){
+            window.open("fileView?url="+systemConfig.dmsDataProxy+url,'_blank')
+        }
+    }
+}
+</script>
+
+<style>
+* {
+    --el-table-bg-color: #eeeeee0b;
+    /* 表格背景 */
+    --el-table-header-bg-color: #eeeeee0b;
+    /* 表头背景 */
+    --el-table-tr-bg-color: #eeeeee0b;
+    /* 行背景 */
+    --el-table-row-hover-bg-color: #eeeeee0b;
+    /* 行悬浮背景 */
+    --el-table-header-text-color: #ededed;
+    /* 表头文字颜色 */
+}
+
+.font,
+.title,
+.super-title,
+.title-sub,
+.second-title,
+.third-title,
+.strong-data,
+link {
+    color: #fff;
+}
+
+.icon {
+    color: #fff;
+    fill: currentColor;
+}
+
+.middle {
+    text-align: center;
+}
+
+.darkblue-background,
+.dark-background,
+.bluedark-background,
+.blue-background,
+.image-background {
+    padding-top: 40px;
+    padding-bottom: 40px;
+    margin-left: 0;
+    padding-left: 90px;
+    padding-right: 90px;
+    min-height: 600px;
+}
+
+.darkblue-background {
+    background: linear-gradient(to bottom,
+            #02060c 0%,
+            #0f3460 40%,
+            #0f3460 100%);
+}
+
+.dark-background {
+    background: #0a0a08
+}
+
+.blue-background,
+body {
+    background: #0f3460
+}
+
+.bluedark-background {
+    background: linear-gradient(to bottom,
+            #0f3460 0%,
+            #0f3460 60%,
+            #02060c 100%);
+}
+
+.image-background {
+    background-repeat: no-repeat;
+    background-position: center;
+    background-size: 100% auto;
+}
+
+.lighter-container {
+    background-color: #eeeeee0b;
+    padding: 10px;
+    margin: 15px;
+    vertical-align: middle;
+    border-radius: 3%;
+}
+
+.lightblue-container {
+    border-radius: 3%;
+    padding: 10px;
+    margin: 15px;
+    background: linear-gradient(to bottom,
+            #215476 0%,
+            #28638b 66%,
+            #337aac 100%);
+    font-size: 20px;
+
+    .third-title {
+        font-size: 28px;
+        padding: 0;
+    }
+}
+
+.middle-container {
+    display: flex !important;
+    justify-content: center;
+    flex-direction: column;
+    padding: 0;
+    align-items: stretch;
+}
+
+.row,
+.warp-row,
+.between-row {
+    display: flex !important;
+    justify-content: space-around;
+    padding: 0;
+    align-items: stretch;
+}
+
+.warp-row {
+    flex-wrap: wrap;
+}
+
+.between-row {
+    justify-content: space-between;
+}
+
+.col {
+    display: flex !important;
+    justify-content: space-around;
+    flex-direction: column;
+}
+
+.dense-col {
+    display: flex !important;
+    justify-content: center;
+    flex-direction: column;
+}
+
+.start-reverse-col {
+    display: flex !important;
+    justify-content: start;
+    flex-direction: column-reverse;
+}
+
+.dense-col>*,
+.start-reverse-col>* {
+    margin: 10px;
+}
+
+.grid-2x2 {
+    display: grid !important;
+    grid-template-columns: 1fr 1fr;
+    gap: 12px;
+    width: 100%;
+    height: 80%;
+}
+
+.strong-data {
+    font-size: 32px;
+    font-weight: bold;
+    text-align: center;
+}
+
+.title {
+    font-size: 36px;
+    margin-top: 10px;
+    text-align: center;
+    font-weight: bold;
+}
+
+.super-title {
+    font-size: 44px;
+    margin-top: 10px;
+    text-align: center;
+    font-weight: bold;
+
+}
+
+.title-sub {
+    font-size: 16px;
+    margin-top: 10px;
+    color: rgb(192, 192, 192);
+    text-align: center;
+}
+
+.second-title {
+    font-size: 20px;
+    margin-top: 10px;
+    padding-left: 10px;
+    border-left: 2px solid #3498db;
+    font-weight: bold;
+}
+
+.third-title {
+    font-size: 18px;
+    margin-top: 10px;
+    padding-left: 10px;
+    display: flex;
+    font-weight: bold;
+}
+
+.link {
+    font-weight: bold;
+    /* 字体加粗 */
+    text-decoration: underline;
+    /* 下划线 */
+    cursor: pointer;
+    /* 鼠标悬浮时变为手型(可点击形式) */
+}
+
+.searcher {
+    background-color: #334155;
+    margin-right: 15px;
+}
+
+.blue {
+    color: #3498db;
+}
+
+.grey {
+    color: rgb(192, 192, 192);
+}
+
+.lightgrey {
+    color: rgb(229, 229, 229);
+}
+
+#echart1 {
+    width: 100%;
+    height: 450px;
+}
+
+.container {
+    width: 1920px;
+    margin: 0 auto;
+}
+</style>

+ 1 - 1
src/views/yygl/manage/index.vue

@@ -45,7 +45,7 @@
       <!-- 搜索栏区域 -->
       <div class="search-section">
         <el-input 
-          placeholder="请输入应用名称模块相关关键字" 
+          placeholder="请输入应用名称关键字" 
           v-model="searchKeyword" 
           class="search-input" 
           clearable

+ 15 - 1
src/views/yygl/overview/index.vue

@@ -54,7 +54,11 @@
               <p class="app-description">{{ app.content }}</p>
               <div class="app-footer">
                 <span class="app-date">{{ app.createTime }}</span>
-                <el-button type="primary" size="small" class="visit-button"
+                <el-button
+                  type="primary"
+                  size="small"
+                  class="visit-button"
+                  @click="handleVisit"
                   >访问</el-button
                 >
               </div>
@@ -104,6 +108,16 @@ export default {
       this.getDmsTagSName();
       this.getDmsDataList();
     },
+    handleVisit() {
+      // http://localhost:2027/fileView?url=/proxy_dms/static/1_青浦大数据中心一张图功能表20240531.xlsx
+      // http://localhost:2027/fileView?url=/proxy_dms/static/test.geojson
+      window.open(
+        "fileView?url=" +
+          this.curUrl +
+          "/static/1_青浦大数据中心一张图功能表20240531.xlsx",
+        "_blank"
+      );
+    },
     getDmsTagSName() {
       let requestParams = {
         sName: "tag",

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov