Browse Source

feat(上海cim平台):

1.页面数据录入调整优化
胡荣基 8 months ago
parent
commit
be1e6ceec9

src/assets/imgs/工具.png → src/assets/imgs/interfaceTool.png


+ 21 - 20
src/router/index.js

@@ -28,36 +28,37 @@ export const router = createRouter({
                             component: () => import('../views/power-home/home.vue')
                         },
                         {
-                            // cesium工具
-                            path: '/gis/cesium',
-                            component: () => import('../views/power-home/util/gis/cesium/CesiumUtil.vue')
+                            // 接口大类
+                            path: '/gis/interface/:type',
+                            name:'interface',
+                            title:'工具类型',
+                            component: () => import('../views/power-home/interface/InterfaceUtil.vue')
                         },
                         {
-                            // geoscene工具
-                            path: '/gis/geoscene',
-                            component: () => import('../views/power-home/util/gis/gescene/GeosceneUtil.vue')
+                            // 接口列表
+                            path: '/gis/interfacePage/:type/:action',
+                            name:'interface-page',
+                            title:'工具列表',
+                            component: () => import('../views/power-home/interface/interface-page.vue'),
                         },
-                        {
-                            // 地图基本工具
-                                path: '/gis/geoscene/map',
-                            name:'basic-map',
-                            component: () => import('../views/power-home/util/gis/gescene/basicMap.vue'),
-                        },
-                        {// 地图基本工具详情
-                            path: '/gis/geoscene/map-details',
-                            name:'map-details',
-                            component: () => import('../views/power-home/util/gis/gescene/biasMapDetails.vue')
+                        {// 接口工具详情
+                            path: '/gis/interface-details',
+                            name:'interface-details',
+                            title:'工具详情',
+                            component: () => import('../views/power-home/interface/interface-details.vue')
                         },
-                        {// 地图基本工具申请
-                            path: '/gis/geoscene/map-application',
-                            name:'map-application',
-                            component: () => import('../views/power-home/util/gis/gescene/biasMapAdd.vue')
+                        {// 接口工具申请
+                            path: '/gis/interface-application',
+                            name:'interface-application',
+                            title:'工具申请',
+                            component: () => import('../views/power-home/interface/interface-application.vue')
                         }
                     ]
                 },
                 {
                     path: '/cim-home',
                     name:'cim',
+                    title:'首页',
                     component: () => import('../views/cim/index.vue')
                 },
             ]

+ 2 - 4
src/service/power-home/basicMap.js

@@ -38,16 +38,15 @@ export function selectInterfaceKoolkitParameter(UUID) {
         url: '/ptjkInterface/selectInterfaceKoolkitParameter',
         data: {
             'INTERFACE_UUID': UUID,
-            "appkey": localStorage.getItem("ywxt_userkeycode")
         }
     });
 }
 
-export function selectInterfaceKooleitMainType() {
+export function selectInterfaceKooleitMainType(type) {
     return requestInstance_YYFN({
         url: '/ptjkInterface/selectInterfaceKooleitMainType',
         data: {
-            "appkey": localStorage.getItem("yml_userkeycode")
+            TYPE:type
         }
     });
 }
@@ -57,7 +56,6 @@ export function selectInterfaceKoolkitMain(UUID) {
         url: '/ptjkInterface/selectInterfaceKoolkitMain',
         data: {
             'UUID': UUID,
-            "appkey": localStorage.getItem("ywxt_userkeycode")
         }
     });
 }

+ 21 - 13
src/views/cim/index.vue

@@ -11,6 +11,9 @@ const menuIndex = ref(0)
 // 工具栏选中key
 const utilToolIndex = ref(0)
 
+const layerFlag = ref(false)
+const weatherFlag = ref(false)
+
 // 菜单栏菜单回调
 function handleMenuSelect(key, keyPath) {
   if (key == menuIndex.value) {
@@ -22,7 +25,6 @@ function handleMenuSelect(key, keyPath) {
 
 // 工具栏菜单回调
 function handleUtilMenuSelect(key, keyPath) {
-  console.log(123123, key)
   if (key == utilToolIndex.value) {
     utilToolIndex.value = 0
     return
@@ -31,7 +33,17 @@ function handleUtilMenuSelect(key, keyPath) {
 }
 
 // 根据参数选择模板
-function selectParameterTemplate(key, keyPath) {
+function componentDisplayFlag(type, flag) {
+  switch (type) {
+    case 'parameter' :
+      layerFlag.value = !flag;
+      weatherFlag.value = false
+      break;
+    case 'weather' :
+      weatherFlag.value = !flag;
+      layerFlag.value = false;
+      break;
+  }
 
 }
 </script>
@@ -74,13 +86,13 @@ function selectParameterTemplate(key, keyPath) {
     </div>
 
     <div>
-<!--      这里用布局只是为了让成为行内块,display修改样式和里面子组件会有问题-->
+      <!--      这里用布局只是为了让成为行内块,display修改样式和里面子组件会有问题-->
       <el-row>
         <el-col :span="8">
-          <condition/>
+          <condition v-if="layerFlag"/>
         </el-col>
         <el-col :span="8">
-          <weather/>
+          <weather v-if="weatherFlag"/>
         </el-col>
         <el-col :span="8">
           <!--  工具栏具体内容  -->
@@ -88,13 +100,13 @@ function selectParameterTemplate(key, keyPath) {
             <el-menu @select="handleUtilMenuSelect" background-color="transparent" :collapse="true">
               <el-menu-item :index="1">
                 <!-- 图层 -->
-                <img src="../../assets/imgs/cim/layer1.png" v-if="utilToolIndex != 1">
-                <img src="../../assets/imgs/cim/layer2.png" v-if="utilToolIndex == 1">
+                <img src="../../assets/imgs/cim/layer1.png" v-if="utilToolIndex != 1"  @click="componentDisplayFlag('parameter',layerFlag)">
+                <img src="../../assets/imgs/cim/layer2.png" v-if="utilToolIndex == 1" @click="componentDisplayFlag('parameter',layerFlag)">
               </el-menu-item>
               <el-menu-item :index="2">
                 <!-- 天气 -->
-                <img src="../../assets/imgs/cim/weather1.png" v-if="utilToolIndex != 2">
-                <img src="../../assets/imgs/cim/weather2.png" v-if="utilToolIndex == 2">
+                <img src="../../assets/imgs/cim/weather1.png" v-if="utilToolIndex != 2" @click="componentDisplayFlag('weather',weatherFlag)">
+                <img src="../../assets/imgs/cim/weather2.png" v-if="utilToolIndex == 2" @click="componentDisplayFlag('weather',weatherFlag)">
               </el-menu-item>
               <el-menu-item :index="3">
                 <!-- 侧面 -->
@@ -140,10 +152,6 @@ function selectParameterTemplate(key, keyPath) {
   position: fixed;
   right: 10px;
   top: 80px;
-
-  el-button {
-
-  }
 }
 
 // 菜单鼠标悬浮样式

+ 4 - 3
src/views/cim/template/weather.vue

@@ -40,8 +40,9 @@ import {ref} from "vue";
           </el-card>
         </el-col>
       </el-row>
-      <hr>
-      <div >
+      <el-divider></el-divider>
+
+      <div>
         <el-row type="flex" class="row-bg" justify="space-around">
           <el-col :span="8">
             <el-card :body-style="{ padding: '0px' }">
@@ -142,7 +143,7 @@ import {ref} from "vue";
 .div-head {
   position: absolute;
   left: 45px;
-  top: 100px;
+  top: 90px;
   max-width: 80%;
   max-height: 80%;
 }

+ 63 - 54
src/views/power-home/index.vue

@@ -70,6 +70,7 @@ import {handleMes, showMessage} from "@/unit/element-ui/tip";
 
 const router = useRouter()
 
+
 function loginZHFXFN(type, url) {
 
   loginInSjfxfn(loginPinia.loginInfo.username, encode(loginPinia.loginInfo.psd), type).then(res => {
@@ -129,7 +130,7 @@ function toPage(item, isDisabled) {
     if (path.indexOf("http://") > -1 || path.indexOf("https://") > -1) {
       window.open(path, path)
     } else {
-      router.push(path)
+      router.push({name: 'interface', params: {type: item.type}})
     }
     return
   }
@@ -184,7 +185,7 @@ function toPage(item, isDisabled) {
       loginZHFXFN(3, path, "ed698aa9d09e4ac7b35df02a2d73985f");
       break
     case '603':   //城市体检
-      loginKj(9,path,"47e0971bb15b4420bf1f351510378c72");
+      loginKj(9, path, "47e0971bb15b4420bf1f351510378c72");
       break
 
   }
@@ -515,7 +516,7 @@ function loginKj(type, url, systemType) {
           return;
         }
         let rows = result[0].Rows;
-        if(type == "1"){
+        if (type == "1") {
           //获取用户信息
           var usercode = rows[0].USERID;
           var unitcode = rows[0].UNIT;
@@ -533,26 +534,26 @@ function loginKj(type, url, systemType) {
           var change_time = rows[0].CHANGE_TIME;
           //保存用户信息
           const loginUserInfo = {
-            ywxt_usercode:usercode,
-            ywxt_username:username,
-            ywxt_unitcode:unitcode,
-            ywxt_unitname:unitname,
-            ywxt_contact:contact,
-            ywxt_telephone:telephone,
-            ywxt_email:email,
-            ywxt_identify:identify,
-            ywxt_userkeycode:userkeycode,
-            ptjk_changetime:change_time,
-            password:password
+            ywxt_usercode: usercode,
+            ywxt_username: username,
+            ywxt_unitcode: unitcode,
+            ywxt_unitname: unitname,
+            ywxt_contact: contact,
+            ywxt_telephone: telephone,
+            ywxt_email: email,
+            ywxt_identify: identify,
+            ywxt_userkeycode: userkeycode,
+            ptjk_changetime: change_time,
+            password: password
           }
           // 根据user_id获取角色
-          localStorage.setItem('loginUserInfoSpace',JSON.stringify(loginUserInfo))
-          loginKj_log(unitcode,usercode, "运维系统-登录", "登录系统成功", "系统登录");
+          localStorage.setItem('loginUserInfoSpace', JSON.stringify(loginUserInfo))
+          loginKj_log(unitcode, usercode, "运维系统-登录", "登录系统成功", "系统登录");
           //空间运维系统 登录成功后 需要缓存用户权限
-          selectUserRole(usercode,url);
+          selectUserRole(usercode, url);
           return;
         }
-        if(type == "2"){
+        if (type == "2") {
           //获取用户信息
           var usercode = rows[0].USERID;
           var username = rows[0].USERNAME;
@@ -570,25 +571,25 @@ function loginKj(type, url, systemType) {
           var changetime = rows[0]["CHANGE_TIME"];
 
           const loginUserInfo = {
-            gxjh_usercode:usercode,
-            gxjh_username:username,
-            gxjh_unitcode:unitcode,
-            gxjh_unitname:unitname,
-            gxjh_contact:contact?decode(contact):'',
-            gxjh_telephone:telephone?decode(telephone):'',
-            gxjh_email:email?decode(email):'',
-            gxjh_identify:identify,
-            gxjh_userkeycode:userkeycode,
-            gxjh_changetime:changetime,
+            gxjh_usercode: usercode,
+            gxjh_username: username,
+            gxjh_unitcode: unitcode,
+            gxjh_unitname: unitname,
+            gxjh_contact: contact ? decode(contact) : '',
+            gxjh_telephone: telephone ? decode(telephone) : '',
+            gxjh_email: email ? decode(email) : '',
+            gxjh_identify: identify,
+            gxjh_userkeycode: userkeycode,
+            gxjh_changetime: changetime,
           }
-          localStorage.setItem('exchangeUserInfo',JSON.stringify(loginUserInfo))
-          loginKj_log(unitcode,usercode, "浏览系统-登录", "登录系统成功", "系统登录");
+          localStorage.setItem('exchangeUserInfo', JSON.stringify(loginUserInfo))
+          loginKj_log(unitcode, usercode, "浏览系统-登录", "登录系统成功", "系统登录");
           //切换首页
-          window.open(url,url)
+          window.open(url, url)
           // window.location.href = url;
           return;
         }
-        if(type == "9"){
+        if (type == "9") {
           //获取用户信息
           var usercode = rows[0].USERID;
           var username = rows[0].USERNAME;
@@ -602,8 +603,8 @@ function loginKj(type, url, systemType) {
           var unit_level = rows[0].UNIT_LEVEL;
           var unit_level_name = rows[0].UNIT_LEVEL_NAME;
           debugger
-          var roleId =  rows[0].ROLE_LIST.map(obj => obj.ROLE_ID).join(',');
-          var roleUUID =  rows[0].ROLE_LIST.map(obj =>obj.UUID).join(',');
+          var roleId = rows[0].ROLE_LIST.map(obj => obj.ROLE_ID).join(',');
+          var roleUUID = rows[0].ROLE_LIST.map(obj => obj.UUID).join(',');
 
           localStorage.setItem("cstj_usercode", usercode);
           localStorage.setItem("cstj_username", username);
@@ -620,24 +621,24 @@ function loginKj(type, url, systemType) {
           localStorage.setItem("cstj_unit_level", unit_level);
           localStorage.setItem("cstj_unit_level_name", unit_level_name);
 
-          let userInfoObj ={
-            'cstj_usercode':usercode,
-            cstj_username:username,
-            cstj_unitcode:unitcode,
-            cstj_unitname:unitname,
+          let userInfoObj = {
+            'cstj_usercode': usercode,
+            cstj_username: username,
+            cstj_unitcode: unitcode,
+            cstj_unitname: unitname,
             //cstj_password:password,
-            cstj_lasttime:lasttime,
-            cstj_role:roleId,
-            cstj_name:name,
-            cstj_phone:phone,
-            cstj_mail:mail,
-            cstj_changetime:change_time,
-            cstj_role_uuid:roleUUID,
+            cstj_lasttime: lasttime,
+            cstj_role: roleId,
+            cstj_name: name,
+            cstj_phone: phone,
+            cstj_mail: mail,
+            cstj_changetime: change_time,
+            cstj_role_uuid: roleUUID,
           }
-          localStorage.setItem('cstjUserInfo',JSON.stringify(userInfoObj))
-          loginKj_log(unitcode,usercode, "城市体检-登录", "登录系统成功", "系统登录");
+          localStorage.setItem('cstjUserInfo', JSON.stringify(userInfoObj))
+          loginKj_log(unitcode, usercode, "城市体检-登录", "登录系统成功", "系统登录");
           //切换首页
-          window.open(url,url)
+          window.open(url, url)
           // window.location.href = url;
           return;
         }
@@ -665,13 +666,15 @@ const headerTitle = ref([
         name: 'Geoscene工具',
         moduleId: '716',
         isZi: false,
-        linkHref: '/gis/geoscene'
+        linkHref: '/gis/interface',
+        type: 1
       },
       {
         name: 'cesium工具',
-        // moduleId: '717',
-        isZi: true,
-        linkHref: '/power-home'
+        moduleId: '717',
+        isZi: false,
+        linkHref: '/gis/interface',
+        type: 2
       },
     ]
   },
@@ -679,7 +682,13 @@ const headerTitle = ref([
     name: 'BIM', children: [
       {name: '轻量化'},
       {name: '可视化'},
-      {name: '应用工具'},
+      {
+        name: '应用工具',
+        moduleId: '753',
+        isZi: false,
+        linkHref: '/gis/interface',
+        type: 3
+      },
     ]
   },
   {

+ 154 - 0
src/views/power-home/interface/InterfaceUtil.vue

@@ -0,0 +1,154 @@
+<template>
+  <div class="container">
+    <div>
+      <el-row>
+        <el-col :span="4" :push="2" style="padding-bottom: 10px">
+          <el-page-header @back="goBack" :content="title">
+          </el-page-header>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="3">
+          <div class="grid-content bg-purple"></div>
+        </el-col>
+        <el-col :span="20">
+          <el-row>
+            <el-col :span="8" v-for="item in data">
+              <div class="frame">
+                <img :src="item.ICON_IMAGE">
+              </div>
+              <div class="button-div">
+                <el-button class="font-ht" type="primary" @click="jump('interface-page',item.CODE,item.NAME)">
+                  {{ item.NAME }}({{ item.TOTAL }})个
+                </el-button>
+              </div>
+            </el-col>
+          </el-row>
+        </el-col>
+        <el-col :span="2">
+          <div class="grid-content bg-purple"></div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+
+</template>
+
+<script setup>
+import {ref, onMounted, watch} from "vue";
+import {useRoute, useRouter} from "vue-router";
+import {
+  selectInterfaceKooleitMainType,
+} from '@/service/power-home/basicMap'
+
+const route = useRoute()
+const router = useRouter()
+
+const title = ref('')
+
+const data = ref([])
+
+function goBack() {
+  router.go(-1)
+}
+
+function jump(name, type, action) {
+  router.push({name: name, params: {type: type, action: action}})
+}
+
+watch(route, (newRoute, oldRoute) => {
+  listByType()
+})
+
+onMounted(() => {
+  listByType()
+})
+
+function listByType() {
+  let type = route.params.type
+
+  switch (type) {
+    case '1':
+      title.value = 'Geoscene工具'
+      break;
+    case '2':
+      title.value = 'cesium工具'
+      break;
+    case '3':
+      title.value = '应用工具'
+      break;
+    case '4':
+      title.value = ''
+      break;
+  }
+
+  selectInterfaceKooleitMainType(type).then(response => {
+    data.value = response.msg[0].Rows
+
+  });
+}
+</script>
+
+<style scoped lang="scss">
+// 图片外边框
+.frame {
+  border: 2px solid;
+  border-color: #4a9dfd;
+  display: inline-block
+}
+
+.button-div {
+  position: relative;
+  left: 20%;
+  bottom: 10%;
+}
+
+// 设置标签定位,颜色,字体颜色
+.el-button {
+  margin: 10px;
+  min-width: 210px;
+  min-height: 40px;
+  border-radius: 30px;
+  background-color: #4a9dfd;
+  color: #ffffff;
+  font-size: 30px;
+}
+
+img {
+  margin: 6px
+}
+
+.el-col {
+  border-radius: 4px;
+}
+
+.bg-purple-dark {
+  background: #99a9bf;
+}
+
+.bg-purple {
+  background: #d3dce6;
+}
+
+.bg-purple-light {
+  background: #e5e9f2;
+}
+
+.bg-purple[data-v-c6133f18] {
+  background: #f0f7ff;
+}
+
+.grid-content {
+  border-radius: 4px;
+  min-height: 36px;
+}
+
+//垂直水平居中,占满父元素的高度
+.container {
+  display: flex;
+  justify-content: center; /* 水平居中 */
+  align-items: center; /* 垂直居中 */
+  height: 100%; /* Full height */
+  width: 95%;
+}
+</style>

+ 15 - 3
src/views/power-home/util/gis/gescene/biasMapAdd.vue

@@ -4,7 +4,7 @@
       <template v-slot:card-header>
         <div style="padding-bottom: 15px;font-size: 22px;">
           <span class="title-font">接口共享 / 新增</span>
-          <img @click="onback" style="float: right; padding: 3px 0" src="../../../../../assets/imgs/返回.png">
+          <img @click="onback" style="float: right; padding: 3px 0" src="../../../assets/imgs/返回.png">
         </div>
       </template>
       <template v-slot:card-item>
@@ -145,6 +145,7 @@ import {
 } from '@/service/power-home/basicMap'
 import {useRouter} from "vue-router";
 
+
 export default {
   name: 'biasMapAdd',
   components: {
@@ -437,7 +438,7 @@ export default {
     //提交资源申请信息
 
     function onSave() {
-      if(!ids.value){
+      if (!ids.value) {
         showMessage({
           type: 'error',
           message: '保存失败!'
@@ -477,7 +478,7 @@ export default {
     }
 
     function onback() {
-      router.push({name: 'basic-map'});
+      router.go(-1);
       removeItem()
     }
 
@@ -533,6 +534,10 @@ export default {
   color: #5c6160;
 }
 
+.el-select {
+  width: 100%;
+}
+
 // 输入框调整颜色
 :deep .el-input__wrapper {
   background-color: #f2faff !important;
@@ -552,4 +557,11 @@ export default {
 :deep .el-date-editor.el-input, .el-date-editor.el-input__wrapper {
   min-width: 100%;
 }
+
+[class*=el-col-].is-guttered {
+  display: inline !important;
+}
+ .el-form-item__content {
+  display: inline!important;
+}
 </style>

+ 3 - 3
src/views/power-home/util/gis/gescene/biasMapDetails.vue

@@ -4,7 +4,7 @@
       <template v-slot:card-header>
         <div style="padding-bottom: 15px;font-size: 22px;">
           <span class="title-font">接口共享 / 详情</span>
-          <img @click="onback" style="float: right; padding: 3px 0" src="../../../../../assets/imgs/返回.png">
+          <img @click="onback" style="float: right; padding: 3px 0" src="../../../assets/imgs/返回.png">
         </div>
       </template>
       <template v-slot:card-item>
@@ -362,7 +362,7 @@ export default {
     // 关闭对话框
     const onback = (data) => {
       resetForm()
-      router.push({name: 'basic-map'});
+      router.go(-1);
     };
 
     // 初始化对话框
@@ -585,7 +585,7 @@ export default {
             if (formData.value.SHARING_TOOLKIT == "2") {
               show_toolkit.value = true;
             }
-            if (formData.value.SHARING_INTERFACE == "2") {
+              if (formData.value.SHARING_INTERFACE == "2") {
               show_interface.value = true;
             }
             selectInterfaceKoolkitWarrant();

+ 58 - 49
src/views/power-home/util/gis/gescene/basicMap.vue

@@ -59,14 +59,12 @@
                   </el-table-column>
                   <el-table-column
                       type="selection"
-                      width="35">
+                      width="45">
                   </el-table-column>
                   <el-table-column min-width="220">
                     <template #default="{ row }">
                       <div class="center" style="justify-content: left">
-                        <!--                                <img :src="row.SLT_URL"/>-->
-                        <img :src="row.SLT_URL" v-if="row.SLT_URL"/>
-                        <img src="../../../../../assets/imgs/工具.png" v-else/>
+                        <img :src="row.SLT_URL" @error="onImageError" style="min-width: 346px"/>
                         <div style="padding-left: 10px">
                           <p>
                             <span class="title-font">{{ row.RESOURCE_NAME }}</span><br>
@@ -93,7 +91,7 @@
                         <i class="iconfont icon-shoucang1" @click="canceltCollection(row.COLLECTION_FLAG)"
                            v-else
                            style="color: #edd25b;padding-right: 20px"></i>
-                        <el-button class="button-font" type="primary" plain disabled>在线测试</el-button>
+                        <el-button class="button-font" type="primary" @click="onLineTest(row)" plain :disabled="!!!row.TEXT_ADDRESS">在线测试</el-button>
                         <el-button class="button-font" type="primary" @click="getDetails(row)" plain>查看详情
                         </el-button>
                         <el-button class="button-font" type="primary" @click="jumpTool(row)" plain>申请资源
@@ -111,7 +109,7 @@
             <!--          表格的表头-->
             <el-table-column width="175px">
               <template #default="{ row }">
-                <img src="../../../../../assets/imgs/serviceLoad.png" width="100"
+                <img src="../../../assets/imgs/serviceLoad.png" width="100"
                      height="100"/>
               </template>
             </el-table-column>
@@ -190,12 +188,12 @@ import {
   insertKoolkitCollect,
   canceltKoolkitCollect,
   koolkitCollectList
-} from '@/service/power-home/basicMap'
-import {ref, onMounted} from 'vue'
-import {useRouter} from "vue-router";
+} from '@/service/power-home/basicMap';
+import {ref, onMounted, watch} from "vue";
+import {useRoute, useRouter} from "vue-router";
 
 const router = useRouter()
-
+const route = useRoute()
 // 表单绑定对象
 const formData = ref({RESOURCE_NAME: ''});
 
@@ -211,8 +209,6 @@ const dialogTableVisible = ref(false);
 // 待申请数据
 const gridData = ref([])
 
-// 子组件
-const childRef = ref(null);
 
 // map
 const type_map = ref({});
@@ -220,22 +216,16 @@ const data_map = ref([]);
 // 表格
 const tableRef = ref()
 
+// type类型
+const type = ref()
+// action
+const action = ref()
 // 待申请列表ref
 const pendingTableRef = ref()
 
-const multipleSelection = ref([])
 // 表单ref
 const formDataRef = ref()
-const show_map = ref({
-  "1": false,
-  "2": false,
-  "3": false,
-  "4": false,
-  "5": false,
-  "6": false,
-  "7": false,
-  "8": false
-});
+
 // 数据对象
 const tableData = ref([]);
 // 类型map
@@ -248,8 +238,20 @@ const page = ref({
 
 // dom加载完成
 onMounted(() => {
+  type.value = route.params.type
+  action.value = route.params.action
   selectInterfaceKooleitMainTypeList()
 });
+watch(route, (newRoute, oldRoute) => {
+  type.value = route.params.type
+  action.value = route.params.action
+  selectInterfaceKooleitMainTypeList()
+})
+
+function onImageError(event) {
+  event.target.src = '/src/assets/imgs/interfaceTool.png'
+}
+
 
 //重置
 function reset() {
@@ -262,6 +264,17 @@ function removeItem() {
   localStorage.removeItem("gis-map-tool")
 }
 
+//在线测试
+function onLineTest(data) {
+  if (data == null) {
+    showMessage({
+      type: 'error',
+      message: '数据损坏!'
+    })
+    return
+  }
+  window.open(data.TEXT_ADDRESS)
+}
 // 查看详情
 function getDetails(data) {
   if (data == null) {
@@ -269,6 +282,7 @@ function getDetails(data) {
       type: 'error',
       message: '数据损坏!'
     })
+    return
   }
 
   var json_para = {
@@ -276,14 +290,14 @@ function getDetails(data) {
     type: "details"
   };
   localStorage.setItem("JSON_PARA", JSON.stringify(json_para));
-  router.push({name: 'map-details'})
+  router.push({name: 'interface-details'})
 }
 
 // 申请工具
 function jumpTool(data) {
   try { // 存到内存
     localStorage.setItem("gis-map-tool", JSON.stringify([data]))
-    router.push({name: 'map-application'})
+    router.push({name: 'interface-application'})
   } catch (e) {
     showMessage({
       type: 'error',
@@ -304,7 +318,7 @@ function batchTool() {
     }
     let tableData = tableRef.value.getSelectionRows();
     localStorage.setItem("gis-map-tool", JSON.stringify(tableData))
-    router.push({name: 'map-application'})
+    router.push({name: 'interface-application'})
   } catch (e) {
     showMessage({
       type: 'error',
@@ -333,7 +347,7 @@ function pendingBatchTool() {
       tableData.push(data)
     })
     localStorage.setItem("gis-map-tool", JSON.stringify(tableData))
-    router.push({name: 'map-application'})
+    router.push({name: 'interface-application'})
   } catch (e) {
     showMessage({
       type: 'error',
@@ -346,14 +360,6 @@ function pendingBatchTool() {
 // 每页条数变化时回调函数
 function handleSizeChange(val) {
   page.value.pageIndex = val;
-  // selectInterfaceKoolkitNewMainPageList(
-  //     formData.value.RESOURCE_NAME,
-  //     '',
-  //     2, 1,
-  //     page.value.pageIndex,
-  //     page.value.currentPage).then(response => {
-  //   this.loadInterfaceKoolkitNewMainPageList(response);
-  // });
   commit()
 }
 
@@ -361,15 +367,6 @@ function handleSizeChange(val) {
 function handleCurrentChange(val) {
   page.value.currentPage = val;
   commit()
-  // selectInterfaceKoolkitNewMainPageList(
-  //     formData.value.RESOURCE_NAME,
-  //     '',
-  //     '2', '',
-  //     page.value.pageIndex,
-  //     page.value.currentPage
-  // ).then(response => {
-  //   this.loadInterfaceKoolkitNewMainPageList(response);
-  // });
 }
 
 // 加载就绪触发
@@ -391,7 +388,7 @@ function commit() {
   selectInterfaceKoolkitNewMainPageList(
       formData.value.RESOURCE_NAME,
       '',
-      2, 1,
+      2, type.value,
       page.value.pageIndex,
       page.value.currentPage).then(response => {
     loadInterfaceKoolkitNewMainPageList(response);
@@ -491,13 +488,15 @@ function loadInterfaceKoolkitNewMainPageList(response) {
     }
     data_map.value = data_map.value.filter(item => {
       // 根据你的过滤条件进行过滤,这里以搜索关键词为例
-      return item.NAME.includes("地图基本功能");
+      return item.NAME.includes(action.value);
     });
   } else {
-    data_map.value[0].child = []
+    loading.value = false;
+    // data_map.value[0].child = []
     tableData.value = [];
   }
   loading.value = false;
+
 }
 
 // 合并列
@@ -592,8 +591,18 @@ function objectSpanMethod({row, column, rowIndex, columnIndex}) {
 }
 
 :deep .el-table .el-table__cell {
-  padding-top: 0;
-  padding-bottom: 0;
+  padding-top: 2px;
+  padding-bottom: 5px;
+}
+
+// 设置隐藏行背景色
+:deep .el-table {
+  background-color: transparent !important;
 }
 
+// 修改鼠标经过表格的颜色
+:deep .el-table tbody tr:hover > td {
+  // 选择隐藏
+  background-color: transparent !important;
+}
 </style>

+ 0 - 133
src/views/power-home/util/gis/cesium/CesiumUtil.vue

@@ -1,133 +0,0 @@
-<script setup>
-
-</script>
-
-<template>
-  <div class="container">
-    <div>
-      <el-row>
-        <el-col :span="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/basicFunction.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">地图基本功能</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="3">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/location.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">定位</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/mapDrawing.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">地图绘制</el-button>
-          </div>
-        </el-col>
-      </el-row>
-      <el-row style="padding-top: 5%;">
-        <el-col :span="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/spatialAnalysis.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">空间分析</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="3">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/commonTools.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">常用工具</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/special.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">专题图</el-button>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
-  </div>
-
-</template>
-
-<style scoped lang="scss">
-// 图片外边框
-.frame {
-  border: 1px solid;
-  border-color: #4a9dfd;
-  display: inline-block
-}
-.button-div{
-  position: relative;
-  left: 29%;
-  bottom: 8%;
-}
-// 设置标签定位,颜色,字体颜色
-.el-button{
-  margin: 10px;
-  min-width: 210px;
-  min-height: 43px;
-  border-radius: 30px;
-  background-color: #4a9dfd;
-  color: #ffffff;
-  font-size: 30px;
-}
-//这里主要是拉满父元素的高度,不会影响到其他页面
-html, body, #app {
-  height: 100%;
-  margin: 0;
-  width: 100%
-}
-
-//垂直水平居中,占满父元素的高度
-.container {
-  display: flex;
-  justify-content: center; /* 水平居中 */
-  align-items: center; /* 垂直居中 */
-  height: 100%; /* Full height */
-  width: 95%;
-}
-
-img {
-  margin: 5px
-}
-
-.el-col {
-  border-radius: 4px;
-}
-
-.bg-purple-dark {
-  background: #99a9bf;
-}
-
-.bg-purple {
-  background: #d3dce6;
-}
-
-.bg-purple-light {
-  background: #e5e9f2;
-}
-
-.bg-purple[data-v-c6133f18] {
-  background: #f0f7ff;
-}
-
-.grid-content {
-  border-radius: 4px;
-  min-height: 36px;
-}
-
-
-</style>

+ 0 - 139
src/views/power-home/util/gis/gescene/GeosceneUtil.vue

@@ -1,139 +0,0 @@
-<template>
-  <div class="container">
-    <div>
-      <el-row>
-        <el-col :span="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/basicFunction.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary" @click="jump('/gis/geoscene/map')">地图基本功能</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="3">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/location.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">定位</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/mapDrawing.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">地图绘制</el-button>
-          </div>
-        </el-col>
-      </el-row>
-      <el-row style="padding-top: 5%;">
-        <el-col :span="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/spatialAnalysis.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">空间分析</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="3">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/commonTools.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">常用工具</el-button>
-          </div>
-        </el-col>
-        <el-col :span="6" :push="6">
-          <div class="frame">
-            <img src="../../../../../assets/imgs/special.png">
-          </div>
-          <div class="button-div">
-            <el-button class="font-ht" type="primary">专题图</el-button>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
-  </div>
-
-</template>
-
-<script setup>
-import {useRouter} from "vue-router";
-
-const router = useRouter()
-function jump(url) {
-  router.push(url)
-}
-</script>
-
-<style scoped lang="scss">
-// 图片外边框
-.frame {
-  border: 2px solid;
-  border-color: #4a9dfd;
-  display: inline-block
-}
-
-.button-div {
-  position: relative;
-  left: 25%;
-  bottom: 9%;
-}
-
-// 设置标签定位,颜色,字体颜色
-.el-button {
-  margin: 10px;
-  min-width: 210px;
-  min-height: 30px;
-  border-radius: 30px;
-  background-color: #4a9dfd;
-  color: #ffffff;
-  font-size: 30px;
-}
-
-img {
-  margin: 6px
-}
-
-.el-col {
-  border-radius: 4px;
-}
-
-.bg-purple-dark {
-  background: #99a9bf;
-}
-
-.bg-purple {
-  background: #d3dce6;
-}
-
-.bg-purple-light {
-  background: #e5e9f2;
-}
-
-.bg-purple[data-v-c6133f18] {
-  background: #f0f7ff;
-}
-
-.grid-content {
-  border-radius: 4px;
-  min-height: 36px;
-}
-
-//这里主要是拉满父元素的高度,不会影响到其他页面
-html, body, #app {
-  height: 100%;
-  margin: 0;
-  width: 100%
-}
-
-//垂直水平居中,占满父元素的高度
-.container {
-  display: flex;
-  justify-content: center; /* 水平居中 */
-  align-items: center; /* 垂直居中 */
-  height: 100%; /* Full height */
-  width: 95%;
-}
-</style>

+ 2 - 2
vite.config.js

@@ -13,8 +13,8 @@ export default defineConfig({
       // 代理所有 /api 的请求,该求情将被代理到 target 中
       '/api': {
         // 代理请求之后的请求地址(你的真实接口地址)
-        target: 'https://cimweb.zjw.sh.cegn.cn:2007/data-business-prod/',
-        //target: 'http://localhost:9250/',
+        // target: 'https://cimweb.zjw.sh.cegn.cn:2007/data-business-prod/',
+        target: 'http://localhost:9250/',
         secure: false,
         ws: true,
         // 跨域