Browse Source

Merge remote-tracking branch 'origin/master'

豪豪 3 months ago
parent
commit
b3ee7699bd

+ 10 - 0
package-lock.json

@@ -12,6 +12,7 @@
         "axios": "^1.6.2",
         "element-plus": "^2.2.30",
         "js-base64": "^3.7.5",
+        "js-cookie": "^3.0.5",
         "node-sass": "^9.0.0",
         "pinia": "^2.0.32",
         "postcss-px-to-viewport": "^1.1.1",
@@ -2977,6 +2978,15 @@
       "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz",
       "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA=="
     },
+    "node_modules/js-cookie": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz",
+      "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=14"
+      }
+    },
     "node_modules/js-tokens": {
       "version": "4.0.0",
       "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
     "axios": "^1.6.2",
     "element-plus": "^2.2.30",
     "js-base64": "^3.7.5",
+    "js-cookie": "^3.0.5",
     "node-sass": "^9.0.0",
     "pinia": "^2.0.32",
     "postcss-px-to-viewport": "^1.1.1",

src/assets/imgs/服务加载.png → src/assets/imgs/serviceLoad.png


BIN
src/assets/imgs/其他.png


BIN
src/assets/imgs/工具.png


+ 5 - 1
src/main.js

@@ -1,4 +1,5 @@
 import './assets/main.scss'
+import Cookies from 'js-cookie'
 import 'element-plus/dist/index.css'
 import {createPinia} from "pinia";
 import {router} from "./router";
@@ -8,5 +9,8 @@ import zhCn from 'element-plus/es/locale/lang/zh-cn'
 import ElementPlus from 'element-plus'
 
 createApp(App).use(router).use(createPinia()).use(ElementPlus, {
-    locale: zhCn
+    locale: zhCn,
+    // 支持 large、default、small
+    size: Cookies.get('size') || 'default'
 }).mount('#app')
+

+ 4 - 1
src/router/index.js

@@ -1,5 +1,6 @@
 import {createRouter, createWebHashHistory} from "vue-router";
 import {useLoginStore} from "@/pinia/login";
+import Cookies from "js-cookie";
 
 export const router = createRouter({
     history: createWebHashHistory(),
@@ -38,7 +39,7 @@ export const router = createRouter({
                         },
                         {
                             // 地图基本工具
-                            path: '/gis/geoscene/map',
+                                path: '/gis/geoscene/map',
                             name:'basic-map',
                             component: () => import('../views/power-home/util/gis/gescene/basicMap.vue'),
                         },
@@ -71,6 +72,8 @@ router.beforeEach((to, from) => {
         //  退出
         localStorage.removeItem('userInfoPsdOrUserName')
         localStorage.removeItem('canSeeSystemArr')
+        localStorage.removeItem('yyfnzt_user')
+        Cookies.remove('cim-token')
         const store = useLoginStore()
         store.canSeeSystemArr = []
         store.loginInfo = {}

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

@@ -27,9 +27,8 @@ export function selectInterfaceKoolkitNewMainPageList(RESOURCE_NAME, RESOURCE_TY
             'RESOURCE_TYPE': RESOURCE_TYPE,
             'INTERFACE_STATE': INTERFACE_STATE,
             'TYPE': TYPE,
-            'PAGEINDEX': pageSize,
-            'PAGESIZE': pageIndex,
-            "APPKEY": localStorage.getItem("yml_userkeycode")
+            'pageIndex': pageIndex,
+            'pageSize': pageSize,
         }
     });
 }

+ 3 - 1
src/views/home-page/HomePage.vue

@@ -148,6 +148,7 @@
 
 <script setup>
 import {useRouter} from "vue-router";
+import Cookies from "js-cookie";
 import * as THREE from 'three'
 import imgs1 from '../../assets/imgs/jx.jpg'
 import imgs2 from '../../assets/imgs/mx.jpg'
@@ -788,7 +789,6 @@ function loginIn_yyfnzt() {
 
   loginInYYFNZW(loginPinia.loginInfo.username, encode(loginPinia.loginInfo.psd))
       .then(res => {
-        debugger
         let result = res.msg;
         if (result.length == 0) {
           showMessage({
@@ -798,10 +798,12 @@ function loginIn_yyfnzt() {
           return;
         }
         let rows = result[0].Rows[0];
+        Cookies.set('cim-token', rows.TOKEN)
         localStorage.setItem("yyfnzt_user", JSON.stringify(rows))
       })
       .catch((e) => {
         debugger
+        console.log(e, 123132)
         showMessage({
           type: 'error',
           message: '登录失败'

+ 20 - 6
src/views/power-home/index.vue

@@ -12,11 +12,15 @@
           <!--          循环输出下拉菜单-->
           <div class="more-t">
             <template v-for="(item,index) in headerTitle" :key="item.name">
-<!--              <div class="more-t-item" v-if="!item.children">-->
-<!--                <p @click="() => item.name == '首页' ?router.push(item.linkHref):''">{{ item.name }}</p>-->
-<!--              </div>-->
-              <el-dropdown >
-                <span class="more-t-item" @click="() => item.name == '首页' ?router.push(item.linkHref):''">{{ item.name }}</span>
+              <div v-if="!item.children" class="el-dropdown"><p
+                  @click="() => item.linkHref == '/power-home' ? router.push(item.linkHref):''"
+                  class="more-t-item el-tooltip__trigger el-tooltip__trigger"
+                  aria-haspopup="menu">{{ item.name }}</p>
+              </div>
+              <el-dropdown v-else>
+                <span class="more-t-item">{{
+                    item.name
+                  }}</span>
                 <template #dropdown>
                   <el-dropdown-menu>
                     <el-dropdown-item @click="linkToOther(item2,getDisabled(item2))"
@@ -728,13 +732,18 @@ function linkToOther(item, isDisabled) {
 </script>
 
 <style lang="scss" scoped>
+[class*=el-col-].is-guttered {
+  /* display:block; */
+  min-height: 1px
+}
+
 .el-header {
   background-color: #ffffff;
 }
 
 .el-main {
   background-color: #f0f7ff;
-  --el-main-padding: 0;
+  el-main-padding: 0;
 }
 
 .more-t {
@@ -786,6 +795,10 @@ function linkToOther(item, isDisabled) {
 
 }
 
+:deep [class*=el-col-].is-guttered {
+  display: flex !important;
+}
+
 .user-info {
   display: flex;
   align-items: center;
@@ -796,3 +809,4 @@ function linkToOther(item, isDisabled) {
 }
 </style>
 
+

File diff suppressed because it is too large
+ 142 - 200
src/views/power-home/util/gis/gescene/basicMap.vue


+ 22 - 14
src/views/power-home/util/gis/gescene/biasMapAdd.vue

@@ -24,16 +24,16 @@
             <el-table-column
                 label="共享类型">
               <template #default="scope">
-                <span v-if="scope.row.SHARING_TOOLKIT == '2'">
-                  工具包共享
+                <span v-if="scope.row.SHARING_INTERFACE == '1'">
+                  共享
                 </span>
                 <span v-if="scope.row.SHARING_INTERFACE == '2'">
-                  接口共享
+                  共享
                 </span>
               </template>
             </el-table-column>
             <el-table-column
-                prop="RELEASE_TIMERELEASE_TIME"
+                prop="INSERT_TIME"
                 label="发布时间">
             </el-table-column>
             <el-table-column
@@ -56,7 +56,7 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="共享频率" prop="RESOURCE_NAME">
-                <el-input v-model="applyData.SHARED_FREQUENCY" placeholder="请输入共享频率" clearable
+                <el-input v-model="formData.SHARED_FREQUENCY" placeholder="请输入共享频率" clearable
                           :style="{width: '100%'}">
                 </el-input>
               </el-form-item>
@@ -105,14 +105,14 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="申请人" prop="APPLY_USER_NAME">
+              <el-form-item label="申请人">
                 <el-input disabled v-model="applyData.APPLY_USER_NAME" placeholder="请输入申请人" clearable
                           :style="{width: '100%'}">
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="申请单位" prop="APPLY_UNIT_NAME">
+              <el-form-item label="申请单位">
                 <el-input disabled v-model="applyData.APPLY_UNIT_NAME" placeholder="请输入申请单位" clearable
                           :style="{width: '100%'}">
                 </el-input>
@@ -288,6 +288,7 @@ export default {
 
     function openHandler() {
       let data = localStorage.getItem('gis-map-tool')
+
       if (data) {
         tableData.value = JSON.parse(data)
         tableData.value.forEach(t => {
@@ -436,16 +437,23 @@ export default {
     //提交资源申请信息
 
     function onSave() {
+      if(!ids.value){
+        showMessage({
+          type: 'error',
+          message: '保存失败!'
+        })
+        return
+      }
       batchInterfaceKoolkitApply(
           {
             ids: ids.value,
-            sharedFrequency: applyData.value.SHARED_FREQUENCY,
-            sharedStarTime: applyData.value.SHARED_STARTTIME,
-            sharedEndTime: applyData.value.SHARED_ENDTIME,
-            useTerm: applyData.value.USE_TERM,
-            ipAddress: applyData.value.IP_ADDRESS,
-            concurrency: applyData.value.CONCURRENCY,
-            dayLimit: applyData.value.DAY_LIMIT,
+            sharedFrequency: formData.value.SHARED_FREQUENCY,
+            sharedStarTime: formData.value.SHARED_STARTTIME,
+            sharedEndTime: formData.value.SHARED_ENDTIME,
+            useTerm: formData.value.USE_TERM,
+            ipAddress: formData.value.IP_ADDRESS,
+            concurrency: formData.value.CONCURRENCY,
+            dayLimit: formData.value.DAY_LIMIT,
             applyUser: applyData.value.APPLY_USER,
             applyUnit: applyData.value.APPLY_UNIT,
             applyTime: applyData.value.APPLY_TIME,