Ver Fonte

feat(应用赋能中台):

1.修改样式
2.增加cookies
胡荣基 há 7 meses atrás
pai
commit
f80a94b5ef

+ 10 - 0
package-lock.json

@@ -12,6 +12,7 @@
         "axios": "^1.6.2",
         "axios": "^1.6.2",
         "element-plus": "^2.2.30",
         "element-plus": "^2.2.30",
         "js-base64": "^3.7.5",
         "js-base64": "^3.7.5",
+        "js-cookie": "^3.0.5",
         "node-sass": "^9.0.0",
         "node-sass": "^9.0.0",
         "pinia": "^2.0.32",
         "pinia": "^2.0.32",
         "postcss-px-to-viewport": "^1.1.1",
         "postcss-px-to-viewport": "^1.1.1",
@@ -2977,6 +2978,15 @@
       "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz",
       "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz",
       "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA=="
       "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": {
     "node_modules/js-tokens": {
       "version": "4.0.0",
       "version": "4.0.0",
       "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
       "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",
     "axios": "^1.6.2",
     "element-plus": "^2.2.30",
     "element-plus": "^2.2.30",
     "js-base64": "^3.7.5",
     "js-base64": "^3.7.5",
+    "js-cookie": "^3.0.5",
     "node-sass": "^9.0.0",
     "node-sass": "^9.0.0",
     "pinia": "^2.0.32",
     "pinia": "^2.0.32",
     "postcss-px-to-viewport": "^1.1.1",
     "postcss-px-to-viewport": "^1.1.1",

+ 5 - 1
src/main.js

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

+ 4 - 1
src/router/index.js

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

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

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

+ 12 - 5
src/views/power-home/index.vue

@@ -12,11 +12,18 @@
           <!--          循环输出下拉菜单-->
           <!--          循环输出下拉菜单-->
           <div class="more-t">
           <div class="more-t">
             <template v-for="(item,index) in headerTitle" :key="item.name">
             <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 class="more-t-item" v-if="!item.children">-->
+              <!--                <p @click="() => item.name == '首页' ?router.push(item.linkHref):''">{{ item.name }}</p>-->
+              <!--              </div>-->
+              <div v-if="!item.children" class="el-dropdown"><p
+                  @click="() => item.name == '首页' ?router.push(item.linkHref):''"
+                  class="more-t-item el-tooltip__trigger el-tooltip__trigger"
+                  aria-haspopup="menu">首页</p>
+              </div>
+              <el-dropdown v-else>
+                <span class="more-t-item">{{
+                    item.name
+                  }}</span>
                 <template #dropdown>
                 <template #dropdown>
                   <el-dropdown-menu>
                   <el-dropdown-menu>
                     <el-dropdown-item @click="linkToOther(item2,getDisabled(item2))"
                     <el-dropdown-item @click="linkToOther(item2,getDisabled(item2))"

+ 105 - 80
src/views/power-home/util/gis/gescene/basicMap.vue

@@ -36,75 +36,75 @@
       <template v-slot:card-item>
       <template v-slot:card-item>
         <div style="height: 100%">
         <div style="height: 100%">
           <el-table
           <el-table
+              border
+              id="ftable"
+              :row-style="{backgroundColor:' #e7f2ff'}"
               default-expand-all
               default-expand-all
               v-loading="loading"
               v-loading="loading"
               :show-header="false"
               :show-header="false"
               :data="data_map"
               :data="data_map"
-              :header-cell-style="{backgroundColor:' #e2f0ff',color: '#636a6e'}"
           >
           >
             <el-table-column type="expand">
             <el-table-column type="expand">
               <template #default="props">
               <template #default="props">
-                <el-row :gutter="20">
-                  <!--                  <el-col :span="1"></el-col>-->
-                  <el-col :span="22" :push="2">
-                    <el-table
-                        :show-header="false"
-                        ref="tableRef"
-                        :data="props.row.child">
-                      <el-table-column
-                          width="150">
-                      </el-table-column>
-                      <el-table-column
-                          type="selection"
-                          width="55">
-                      </el-table-column>
-                      <el-table-column>
-                        <template #default="{ row }">
-                          <!--  通过布局分隔-->
-                          <el-row>
-                            <el-col :span="16">
-                              <!-- 展开内容第一列图片-->
-                              <div class="center" style="justify-content: left">
-                                <!--                                <img :src="row.SLT_URL"/>-->
-                                <img src="../../../../../assets/imgs/1720750327521.jpg"/>
-                                <div style="padding-left: 20px">
-                                  <p>
-                                    <span class="title-font">{{ row.RESOURCE_NAME }}</span><br>
-                                    <span class="content-font">{{ row.RELEASE_REMARKS }}</span>
-                                  </p>
-                                </div>
-                                <div class="center expand-column-middle">
-                                  <p>
-                                    <span class="title-font">最近更新时间</span><br>
-                                    <span class="content-font">{{ row.INSERT_TIME }}</span>
-                                  </p>
-                                </div>
-                              </div>
-                            </el-col>
-                            <el-col :span="3" :push="1">
-                              <div class="center" style="justify-content: left">
-                                <i class="iconfont icon-shoucang" style="padding-right: 20px"
-                                   v-if="row.COLLECTION_FLAG == '-1'" @click="collection(row)"></i>
-                                <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="getDetails(row)" plain>查看详情
-                                </el-button>
-                                <el-button class="button-font" type="primary" @click="jumpTool(row)" plain>申请资源
-                                </el-button>
-                              </div>
-                            </el-col>
-                          </el-row>
-                        </template>
-                      </el-table-column>
-                      <template #empty>
-                        <el-empty
-                            description="暂无数据"></el-empty>
-                      </template>
-                    </el-table>
-                  </el-col>
-                </el-row>
+                <el-table
+                    id="stable"
+                    border
+                    :row-style="{backgroundColor:' #f2faff'}"
+                    :show-header="false"
+                    ref="tableRef"
+                    :span-method="objectSpanMethod"
+                    :data="props.row.child">
+                  <el-table-column
+                      min-width="62">
+                  </el-table-column>
+                  <el-table-column
+                      type="selection"
+                      width="35">
+                  </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"/>
+                        <div style="padding-left: 10px">
+                          <p>
+                            <span class="title-font">{{ row.RESOURCE_NAME }}</span><br>
+                            <span class="content-font">{{ row.RELEASE_REMARKS }}</span>
+                          </p>
+                        </div>
+                      </div>
+                    </template>
+                  </el-table-column>
+
+                  <el-table-column min-width="80px">
+                    <template #default="{ row }">
+                      <p>
+                        <span class="title-font">最近更新时间</span><br>
+                        <span class="content-font">{{ row.INSERT_TIME }}</span>
+                      </p>
+                    </template>
+                  </el-table-column>
+                  <el-table-column min-width="120px">
+                    <template #default="{ row }">
+                      <div class="center" style="justify-content: left">
+                        <i class="iconfont icon-shoucang" style="padding-right: 20px"
+                           v-if="row.COLLECTION_FLAG == '-1'" @click="collection(row)"></i>
+                        <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="getDetails(row)" plain>查看详情
+                        </el-button>
+                        <el-button class="button-font" type="primary" @click="jumpTool(row)" plain>申请资源
+                        </el-button>
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <template #empty>
+                    <el-empty
+                        description="暂无数据"></el-empty>
+                  </template>
+                </el-table>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
             <!--          表格的表头-->
             <!--          表格的表头-->
@@ -114,26 +114,31 @@
                      height="100"/>
                      height="100"/>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
-            <el-table-column prop="">
+
+            <el-table-column min-width="190">
               <template #default="{ row }">
               <template #default="{ row }">
-                <el-row>
-                  <el-col :span="12"><br>
-                    <p class="title-font" style=" display: flex;justify-content: center; /* 水平居中 */">{{
-                        row.REMARKS
-                      }}</p></el-col>
-                  <el-col :span="12">
-                    <p class="">
-                      <br>
-                      <span class="title-font">最近更新时间</span><br>
-                      <span class="content-font" style="font-size: 16px">{{ row.INSERT_TIME }}</span>
-                    </p>
-                  </el-col>
-                </el-row>
+                <p class="title-font" style=" display: flex;justify-content: left; /* 水平居中 */">{{
+                    row.REMARKS
+                  }}</p>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
+            <el-table-column min-width="185" style=" display: flex;justify-content: left; /* 水平居中 */">
+              <template #default="{ row }">
+                <p class="title-font">
+                  <span class="title-font">最近更新时间</span>
+                </p>
+                <p class="title-font">
+                  <span class="content-font" style="font-size: 16px">{{ row.INSERT_TIME }}</span>
+                </p>
+              </template>
+            </el-table-column>
+            <template #empty>
+              <el-empty
+                  description="暂无数据"></el-empty>
+            </template>
           </el-table>
           </el-table>
         </div>
         </div>
-        <div class="content">
+        <div class="content" style="padding-top: 20px">
           <el-pagination
           <el-pagination
               class="content"
               class="content"
               @size-change="handleSizeChange"
               @size-change="handleSizeChange"
@@ -494,6 +499,24 @@ function loadInterfaceKoolkitNewMainPageList(response) {
   loading.value = false;
   loading.value = false;
 }
 }
 
 
+// 合并列
+function objectSpanMethod({row, column, rowIndex, columnIndex}) {
+  console.log(rowIndex, 123132)
+  if (columnIndex === 0) {
+    if (rowIndex == 0) {
+      return {
+        rowspan: data_map.value[0].child.length,
+        colspan: 1
+      };
+    } else {
+      return {
+        rowspan: 0,
+        colspan: 0
+      };
+    }
+  }
+}
+
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
@@ -567,7 +590,9 @@ function loadInterfaceKoolkitNewMainPageList(response) {
   font-weight: bold;
   font-weight: bold;
 }
 }
 
 
-//:deep .el-table .el-table__cel{
-//  padding-top: 0;
-//}
+:deep .el-table .el-table__cell {
+  padding-top: 0;
+  padding-bottom: 0;
+}
+
 </style>
 </style>

+ 7 - 0
src/views/power-home/util/gis/gescene/biasMapAdd.vue

@@ -437,6 +437,13 @@ export default {
     //提交资源申请信息
     //提交资源申请信息
 
 
     function onSave() {
     function onSave() {
+      if(!ids.value){
+        showMessage({
+          type: 'error',
+          message: '保存失败!'
+        })
+        return
+      }
       batchInterfaceKoolkitApply(
       batchInterfaceKoolkitApply(
           {
           {
             ids: ids.value,
             ids: ids.value,