Selaa lähdekoodia

资料管理系统

lamphua 9 kuukautta sitten
vanhempi
commit
6d7db8446f

+ 6
- 4
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java Näytä tiedosto

@@ -129,12 +129,14 @@ public class FilesAchievementController extends BaseController
129 129
                 if (filesAchievement.getId() == null || !IdList.contains(filesAchievement.getId()))
130 130
                     filesAchievement.setId(new SnowFlake().generateId());
131 131
                 CmcProject cmcProject = new CmcProject();
132
-                cmcProject = cmcProjectService.selectCmcProjectByProjectNumber(filesAchievement.getProjectNumber());
133
-                if(cmcProject != null){
132
+                String[] projectNumbers = new String[1];
133
+                projectNumbers[0] = filesAchievement.getProjectNumber();
134
+                if (cmcProjectService.selectCmcProjectByProjectNumbers(projectNumbers).size() > 0)
135
+                    cmcProject = cmcProjectService.selectCmcProjectByProjectNumbers(projectNumbers).get(0);
136
+                if (cmcProject != null)
134 137
                     filesAchievement.setProjectId(cmcProject.getProjectId());
135
-                }else{
138
+                else
136 139
                     filesAchievement.setProjectId(null);
137
-                }
138 140
                 String storageAddress = filesAchievement.getStorageAddress();
139 141
                 if (storageAddress != null && !storageAddress.equals("")) {
140 142
                     filesAchievement.setStorageId(new SnowFlake().generateId());

+ 9
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java Näytä tiedosto

@@ -12,6 +12,7 @@ import com.ruoyi.oa.domain.CmcProject;
12 12
 import com.ruoyi.oa.service.ICmcProjectService;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14 14
 import org.springframework.beans.factory.annotation.Value;
15
+import org.springframework.security.access.prepost.PreAuthorize;
15 16
 import org.springframework.web.bind.annotation.*;
16 17
 import org.springframework.web.multipart.MultipartFile;
17 18
 
@@ -188,4 +189,12 @@ public class FilesProjectController extends BaseController {
188 189
     public AjaxResult remove(@PathVariable String[] ids) {
189 190
         return toAjax(cmcProjectService.deleteCmcProjectByProjectIds(ids));
190 191
     }
192
+
193
+    /**
194
+     * 根据项目编号查询项目信息
195
+     */
196
+    @GetMapping("/query/{projectNumbers}")
197
+    public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers){
198
+        return AjaxResult.success(cmcProjectService.selectCmcProjectByProjectNumbers(projectNumbers));
199
+    }
191 200
 }

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcProjectMapper.java Näytä tiedosto

@@ -22,10 +22,10 @@ public interface CmcProjectMapper
22 22
     /**
23 23
      * 查询cmc项目
24 24
      *
25
-     * @param projectNumber cmc项目编号
26
-     * @return cmc项目
25
+     * @param projectNumbers cmc项目编号
26
+     * @return cmc项目列表
27 27
      */
28
-    public CmcProject selectCmcProjectByProjectNumber(String projectNumber);
28
+    public List<CmcProject> selectCmcProjectByProjectNumbers(String[] projectNumbers);
29 29
 
30 30
     /**
31 31
      * 查询cmc项目列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProjectService.java Näytä tiedosto

@@ -24,9 +24,9 @@ public interface ICmcProjectService
24 24
      * 查询cmc项目
25 25
      *
26 26
      * @param projectNumber cmc项目编号
27
-     * @return cmc项目
27
+     * @return cmc项目列表
28 28
      */
29
-    public CmcProject selectCmcProjectByProjectNumber(String projectNumber);
29
+    public List<CmcProject> selectCmcProjectByProjectNumbers(String[] projectNumber);
30 30
 
31 31
     /**
32 32
      * 查询cmc项目列表

+ 4
- 4
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProjectServiceImpl.java Näytä tiedosto

@@ -37,13 +37,13 @@ public class CmcProjectServiceImpl implements ICmcProjectService
37 37
     /**
38 38
      * 查询cmc项目
39 39
      *
40
-     * @param projectNumber cmc项目编号
41
-     * @return cmc项目
40
+     * @param projectNumbers cmc项目编号
41
+     * @return cmc项目列表
42 42
      */
43 43
     @Override
44
-    public CmcProject selectCmcProjectByProjectNumber(String projectNumber)
44
+    public List<CmcProject> selectCmcProjectByProjectNumbers(String[] projectNumbers)
45 45
     {
46
-        return cmcProjectMapper.selectCmcProjectByProjectNumber(projectNumber);
46
+        return cmcProjectMapper.selectCmcProjectByProjectNumbers(projectNumbers);
47 47
     }
48 48
 
49 49
     /**

+ 5
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml Näytä tiedosto

@@ -119,10 +119,13 @@
119 119
         where p.project_id = #{projectId}
120 120
     </select>
121 121
 
122
-    <select id="selectCmcProjectByProjectNumber" parameterType="String" resultMap="CmcProjectResult">
122
+    <select id="selectCmcProjectByProjectNumbers" parameterType="String" resultMap="CmcProjectResult">
123 123
         <include refid="selectCmcProjectVo"/>
124 124
         where
125
-        (p.project_number REGEXP '^[0-9]+W[0-9]' or p.project_number REGEXP '^[0-9]+C[0-9]') AND NOT (p.project_number REGEXP '[/\\*-]') and p.project_number = #{projectNumber}
125
+        (p.project_number REGEXP '^[0-9]+W[0-9]' or p.project_number REGEXP '^[0-9]+C[0-9]') AND NOT (p.project_number REGEXP '[/\\*-]') and p.project_number in
126
+        <foreach item="projectNumber" collection="array" open="(" separator="," close=")">
127
+            #{projectNumber}
128
+        </foreach>
126 129
     </select>
127 130
 
128 131
     <insert id="insertCmcProject" parameterType="CmcProject">

+ 9
- 1
oa-ui/src/api/file/project.js Näytä tiedosto

@@ -89,4 +89,12 @@ export function getProjectKml(url) {
89 89
     url: url,
90 90
     method: 'get',
91 91
   })
92
-}
92
+}
93
+
94
+// 根据项目编号查询项目信息
95
+export function getInfoByProjectNumbers(projectNumbers) {
96
+  return request({
97
+    url: '/file/project/query/' + projectNumbers,
98
+    method: 'get'
99
+  })
100
+}

+ 222
- 44
oa-ui/src/views/file/index.vue Näytä tiedosto

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:49
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-03 16:08:10
5
+ * @LastEditTime: 2024-09-05 10:46:23
6 6
 -->
7 7
 <template>
8 8
   <div class="warpper-container">
@@ -10,15 +10,12 @@
10 10
     <div class="map-container" id="maps" tabindex="0"></div>
11 11
     <!-- 鼠标移动坐标 -->
12 12
     <div id="mouse-position"></div>
13
-    <!-- 项目信息弹出框 -->
14
-    <info-box :datas="clickFeature" :maps="map" @closePopup="closePopup" @open="openProject"></info-box>
13
+    <!-- 项目点位是否显示 -->
14
+    <div class="projectpoint-switch">
15
+      <el-checkbox fill="#fff" v-model="checkedCluster" label="项目点位" border size="large" @change="switchCluster" />
16
+    </div>
15 17
     <!-- 工具栏列表 -->
16 18
     <div class="tool-box">
17
-      <div class="item">
18
-        <el-tooltip effect="dark" content="视角复位" placement="right">
19
-          <div class="view" @click="resetView()"></div>
20
-        </el-tooltip>
21
-      </div>
22 19
       <div class="item">
23 20
         <el-tooltip effect="dark" content="图层" placement="right">
24 21
           <div class="layers" @click="layersOpen = !layersOpen"></div>
@@ -34,27 +31,38 @@
34 31
           <div class="selectM" @click="polygonSelect()"></div>
35 32
         </el-tooltip>
36 33
       </div>
34
+      <div class="item">
35
+        <el-tooltip effect="dark" content="视角复位" placement="right">
36
+          <div class="view" @click="resetView()"></div>
37
+        </el-tooltip>
38
+      </div>
37 39
     </div>
38
-    <transition-group appear name="animate__animated animate__bounce" enter-active-class="animate__fadeInLeft"
39
-      leave-active-class="animate__fadeOutLeft">
40
-      <div class="layer-type dialog_wrap" v-if="layersOpen" @mousedown.stop="move">
41
-        <div class="layer-content">
42
-          <div>
43
-            <el-icon class="close" @click="layersOpen = false">
44
-              <CloseBold />
45
-            </el-icon>
46
-          </div>
47
-          <el-tabs v-model="activeName" class="demo-tabs">
48
-            <el-tab-pane label="项目图层" name="first">
49
-              <project-layer :proTree="projectList" :maps="map"></project-layer>
50
-            </el-tab-pane>
51
-          </el-tabs>
40
+    <!-- 信息提示框 -->
41
+    <el-alert class="alter-position" title="开始矩形框选,按下ESC取消框选,按下Enter搜索框选范围内的项目" type="warning" show-icon
42
+      v-if="selectedInfo" @close="selectedInfo = false" />
43
+    <!-- 地图样式 -->
44
+    <div class="switch-map">
45
+      <switch-map></switch-map>
46
+    </div>
47
+    <!-- <transition-group appear name="animate__animated animate__bounce" enter-active-class="animate__fadeInLeft"
48
+      leave-active-class="animate__fadeOutLeft"> -->
49
+    <div class="layer-type dialog_wrap" v-if="layersOpen" @mousedown.stop="move">
50
+      <div class="layer-content">
51
+        <div class="layer-header">
52
+          图层管理
53
+          <span class="layer-closer" @click="closeLayer"></span>
52 54
         </div>
55
+        <el-tabs v-model="activeName" class="demo-tabs">
56
+          <el-tab-pane label="项目图层" name="first">
57
+            <project-layer :proTree="projectList" :maps="map"></project-layer>
58
+          </el-tab-pane>
59
+        </el-tabs>
53 60
       </div>
54
-    </transition-group>
61
+    </div>
62
+    <!-- </transition-group> -->
55 63
     <!-- 项目信息弹出框 -->
56 64
     <div id="popup" class="ol-popup" v-if="clickFeature != null">
57
-      <span id="popup-closer" class="ol-popup-closer" @click="closePopup"></span>
65
+      <span class="ol-popup-closer" @click="closePopup"></span>
58 66
       <div id="popup-content">
59 67
         <el-descriptions :column="1" border v-if="clickFeature.type == 'projectPoint'">
60 68
           <el-descriptions-item label="项目编号" width="130px">
@@ -81,7 +89,7 @@
81 89
           </el-descriptions>
82 90
         </div>
83 91
       </div>
84
-      <div class="look-achi" @click="" v-if="clickFeature.type == 'projectPoint'">成果目录>></div>
92
+      <div class="look-achi" @click="openProject" v-if="clickFeature.type == 'projectPoint'">成果目录>></div>
85 93
     </div>
86 94
     <!-- 项目目录 -->
87 95
     <div class="right-project" :class="{ closeProBox: isOpenPro }">
@@ -194,9 +202,7 @@
194 202
           <div class="achi-content">
195 203
             <div class="achi-header">
196 204
               成果目录
197
-              <el-icon class="close" @click="dialogTableVisible = false">
198
-                <CloseBold />
199
-              </el-icon>
205
+              <span class="achi-closer" @click="closeAchi"></span>
200 206
             </div>
201 207
             <div class="achi-projectNumber">项目编号:{{ dialogTitle }}</div>
202 208
             <el-table :data="achiDialogData" height="400px">
@@ -259,8 +265,9 @@
259 265
 <script>
260 266
 import { Tianditu, ZhongKe, ArcGISBlue, Autonavi, google, terrain, vect } from '@/utils/maps'
261 267
 import { listProject, getProject } from '@/api/oa/project/project'
262
-import infoBox from './index/infoBox.vue';
268
+import { getInfoByProjectNumbers } from '@/api/file/project'
263 269
 import ProjectLayer from './index/projectLayer.vue';
270
+import SwitchMap from './index/switchMap.vue';
264 271
 import sjxActive from '@/assets/images/gis/sjd.png';
265 272
 // ---------------------------------ol引用------------------------------------------------
266 273
 import 'ol/ol.css'
@@ -285,7 +292,7 @@ import { Circle, Fill, Stroke, Style, RegularShape, Icon, Text } from 'ol/style'
285 292
 import { MousePosition, ScaleLine, defaults as defaultControls } from 'ol/control';
286 293
 import { getAchievementByProject, listAchievement } from "@/api/file/achievement";
287 294
 export default {
288
-  components: { infoBox, ProjectLayer },
295
+  components: { SwitchMap, ProjectLayer },
289 296
   dicts: ['cmc_achi_type', 'cmc_scale_grade'],
290 297
   data() {
291 298
     return {
@@ -299,6 +306,7 @@ export default {
299 306
       select: null,
300 307
       popup: null,
301 308
       clusters: null,
309
+      checkedCluster: true,
302 310
       drawBox: null,
303 311
       activeName: 'first',
304 312
       isDrawing: false,
@@ -309,10 +317,12 @@ export default {
309 317
       searchType: '',
310 318
       projectList: [],
311 319
       allproTableData: [],
320
+      achiDialogData: [],
312 321
       clusters: null,
313 322
       total: 0,
314 323
       loading: true,
315 324
       tableHeight: 0,
325
+      selectedInfo: false,
316 326
       clickFeature: {},
317 327
       clickDatas: {
318 328
         selectFeatures: null,
@@ -390,6 +400,7 @@ export default {
390 400
         ],
391 401
         view: this.view,
392 402
       })
403
+      this.$store.commit('SET_MAP', this.map)
393 404
       this.map.addOverlay(this.popup);
394 405
       this.mapClick(this.map);
395 406
       // this.clickFeaturePopInfo();
@@ -477,7 +488,32 @@ export default {
477 488
           });
478 489
         }
479 490
       })
491
+
492
+      /* 键盘事件 */
493
+      document.onkeydown = function (event) {
494
+        let e = event || window.event || arguments.callee.caller.arguments[0];
495
+        if (e && e.keyCode == 27) {
496
+          if (that.drawBox.getActive()) {
497
+            that.drawBox.finishDrawing();
498
+            that.selectedInfo = false;
499
+            that.map.removeInteraction(that.drawBox);
500
+          }
501
+        } else if (e && e.keyCode == 13) {
502
+          let newArray = [...new Set(that.seletctedCluters)];
503
+          getInfoByProjectNumbers(newArray).then(res => {
504
+            if (res.data) {
505
+              that.projectList = res.data;
506
+              if (that.isOpenPro == true) {
507
+                that.isOpenPro = false;
508
+              }
509
+            } else {
510
+              that.projectList = that.allproTableData;
511
+            }
512
+          })
513
+        }
514
+      };
480 515
     },
516
+
481 517
     clickFeaturePopInfo() {
482 518
       let that = this;
483 519
       if (that.select !== null) {
@@ -509,10 +545,20 @@ export default {
509 545
     closePopup() {
510 546
       this.popup.setPosition(undefined);
511 547
     },
548
+    /* 关闭成果框 */
549
+    closeAchi() {
550
+      this.dialogTableVisible = false;
551
+      this.dialogTitle = '';
552
+      this.achiDialogData = [];
553
+    },
554
+    /* 关闭图层框 */
555
+    closeLayer() {
556
+      this.layersOpen = false;
557
+    },
512 558
     openProject() {
513 559
       this.dialogTableVisible = true;
514
-      // let projectId = datas.clickFeature.id;
515
-      // this.dialogTitle = datas.clickFeature.projectNumber
560
+      let projectId = this.clickFeature.projectId;
561
+      this.dialogTitle = this.clickFeature.projectNumber;
516 562
       listAchievement({ projectId }).then(res => {
517 563
         if (res.total == 0) {
518 564
           this.$message.error('暂无成果,请添加');
@@ -555,6 +601,7 @@ export default {
555 601
         geometryFunction: createBox()
556 602
       });
557 603
       that.drawBox.on('drawstart', function () {
604
+        that.selectedInfo = true;
558 605
         that.seletctedCluters = [];
559 606
         that.select.getFeatures().clear();
560 607
         that.isDrawing = true;
@@ -575,7 +622,7 @@ export default {
575 622
           let selectedFeatures = that.select.getFeatures();
576 623
           for (let i = 0; i < selectedFeatures.getLength(); i++) {
577 624
             let feature = selectedFeatures.item(i);
578
-            feature = feature.values_.features;
625
+            feature = feature.get('features');
579 626
             if (feature.length == 1) {
580 627
               let name = feature[0].name;
581 628
               selected.push(name);
@@ -594,7 +641,63 @@ export default {
594 641
       that.map.addInteraction(that.drawBox);
595 642
     },
596 643
     polygonSelect() {
597
-
644
+      let that = this;
645
+      that.select = new Select({
646
+        condition: never,
647
+        style: that.selectedStyle
648
+      });
649
+      // 创建框选图层
650
+      let drawLayer = new VectorLayer({
651
+        source: new VectorSource(),
652
+      });
653
+      // 创建绘制工具
654
+      that.drawBox = new Draw({
655
+        source: drawLayer.getSource(),
656
+        type: 'Polygon',
657
+      });
658
+      that.drawBox.on('drawstart', function () {
659
+        that.selectedInfo = true;
660
+        that.seletctedCluters = [];
661
+        that.select.getFeatures().clear();
662
+        that.isDrawing = true;
663
+        // drawLayer.getSource().clear();
664
+      });
665
+      // 结束绘制
666
+      that.drawBox.on('drawend', function (e) {
667
+        if (e.feature) {
668
+          // 获取框选范围
669
+          let geometry = e.feature.getGeometry();
670
+          let extent = geometry.getExtent();
671
+          // 查询框选范围内的所有点
672
+          that.getLayerByName('clusters').getSource().forEachFeatureIntersectingExtent(extent, function (feature) {
673
+            let coordinates = feature.getGeometry().getCoordinates();
674
+            // 判断该点是否在圆内部
675
+            if (geometry.intersectsCoordinate(coordinates)) {
676
+              that.select.getFeatures().push(feature);
677
+            }
678
+          });
679
+          // 遍历被选中的要素
680
+          let selected = [];
681
+          let selectedFeatures = that.select.getFeatures();
682
+          for (let i = 0; i < selectedFeatures.getLength(); i++) {
683
+            let feature = selectedFeatures.item(i);
684
+            feature = feature.get('features');
685
+            if (feature.length == 1) {
686
+              let name = feature[0].name;
687
+              selected.push(name);
688
+            } else {
689
+              for (let f of feature) {
690
+                let name = f.name;
691
+                selected.push(name);
692
+              }
693
+            }
694
+            that.seletctedCluters = selected;
695
+          }
696
+        }
697
+        that.isDrawing = false;
698
+      })
699
+      that.map.addInteraction(that.select);
700
+      that.map.addInteraction(that.drawBox);
598 701
     },
599 702
     /* 通过图层名称获取图层 */
600 703
     getLayerByName(name) {
@@ -810,7 +913,7 @@ export default {
810 913
       }
811 914
     },
812 915
     getText(feature, resolution) {
813
-      let features = feature.values_.features;
916
+      let features = feature.get('features');
814 917
       let reo = resolution * 100;
815 918
       let text;
816 919
       if (reo > 2) {
@@ -849,6 +952,10 @@ export default {
849 952
         this.projectList = data;
850 953
       })
851 954
     },
955
+    /* 开关聚合项目点 */
956
+    switchCluster(val) {
957
+      this.clusters.setVisible(val);
958
+    },
852 959
     tableRowClassName() {
853 960
 
854 961
     },
@@ -863,10 +970,7 @@ export default {
863 970
           this.$message.error('暂无成果,请添加');
864 971
           this.achiDialogData = [];
865 972
         } else {
866
-          if (this.dialogTableVisible == false)
867
-            this.dialogTableVisible = true;
868
-          else
869
-            this.dialogTableVisible = false;
973
+          this.dialogTableVisible = true;
870 974
           this.achiDialogData = res.rows;
871 975
         }
872 976
       })
@@ -914,6 +1018,15 @@ export default {
914 1018
 <style lang="scss" scoped>
915 1019
 .warpper-container {
916 1020
   position: relative;
1021
+
1022
+  .projectpoint-switch {
1023
+    position: absolute;
1024
+    top: 10px;
1025
+    left: 60px;
1026
+    width: 100px;
1027
+    height: 50px;
1028
+    color: #fff;
1029
+  }
917 1030
 }
918 1031
 
919 1032
 .map-container {
@@ -963,16 +1076,21 @@ export default {
963 1076
     font-family: '黑体';
964 1077
     position: relative;
965 1078
 
966
-    .close {
1079
+    .achi-closer {
1080
+      text-decoration: none;
967 1081
       position: absolute;
968
-      right: 20px;
969
-      top: 10px;
1082
+      top: 2px;
1083
+      right: 8px;
970 1084
     }
971 1085
 
972
-    .close:hover {
973
-      color: #409EFF;
1086
+    .achi-closer:after {
1087
+      content: "✖";
974 1088
       cursor: pointer;
975 1089
     }
1090
+
1091
+    .achi-closer:hover:after {
1092
+      color: #409EFF;
1093
+    }
976 1094
   }
977 1095
 
978 1096
 }
@@ -1154,4 +1272,64 @@ export default {
1154 1272
   transform: translate(-50%, 0);
1155 1273
   margin-left: -11px;
1156 1274
 }
1275
+
1276
+.layer-type {
1277
+  position: absolute;
1278
+  top: 70px;
1279
+  left: 53px;
1280
+  width: 300px;
1281
+  padding: 12px 10px;
1282
+  background-color: #fff;
1283
+  border-radius: 5px;
1284
+  cursor: move;
1285
+
1286
+  .title {
1287
+    font-size: 16px;
1288
+    text-align: center;
1289
+    line-height: 45px;
1290
+  }
1291
+
1292
+  .layer-content {
1293
+    cursor: default;
1294
+    position: relative;
1295
+
1296
+    .layer-header {
1297
+      text-align: center;
1298
+      line-height: 40px;
1299
+      font-weight: bold;
1300
+      font-family: '黑体';
1301
+      position: relative;
1302
+
1303
+      .layer-closer {
1304
+        text-decoration: none;
1305
+        position: absolute;
1306
+        top: 2px;
1307
+        right: 8px;
1308
+      }
1309
+
1310
+      .layer-closer:after {
1311
+        content: "✖";
1312
+        cursor: pointer;
1313
+      }
1314
+
1315
+      .layer-closer:hover:after {
1316
+        color: #409EFF;
1317
+      }
1318
+    }
1319
+  }
1320
+}
1321
+
1322
+.alter-position {
1323
+  width: 470px;
1324
+  position: absolute;
1325
+  left: 50%;
1326
+  top: 10px;
1327
+  transform: translate(-50%, 0);
1328
+}
1329
+
1330
+.switch-map {
1331
+  position: absolute;
1332
+  bottom: 0;
1333
+  left: 0;
1334
+}
1157 1335
 </style>

+ 0
- 139
oa-ui/src/views/file/index/infoBox.vue Näytä tiedosto

@@ -1,139 +0,0 @@
1
-<!--
2
- * @Descripttion: 
3
- * @version: 
4
- * @Author: ysh
5
- * @Date: 2022-11-22 11:41:47
6
- * @LastEditors: Please set LastEditors
7
- * @LastEditTime: 2024-06-28 16:04:26
8
--->
9
-<template>
10
-  <div id="popup" class="ol-popup">
11
-    <span id="popup-closer" class="ol-popup-closer" @click="$emit('closePopup')"></span>
12
-    <div id="popup-content">
13
-      <el-descriptions :column="1" border v-if="datas.type == 'projectPoint'">
14
-        <el-descriptions-item label="项目编号" width="130px">
15
-          {{ datas.projectNumber }}
16
-        </el-descriptions-item>
17
-        <el-descriptions-item label="项目名称" width="130px">
18
-          {{ datas.projectName }}
19
-        </el-descriptions-item>
20
-        <el-descriptions-item label="项目负责人" width="130px">
21
-          {{ datas.projectLeader }}
22
-        </el-descriptions-item>
23
-        <el-descriptions-item label="存放地址" width="130px">
24
-          {{ datas.storageAddress == '' || datas.storageAddress == null ? '暂无' :
25
-      datas.storageAddress }}
26
-        </el-descriptions-item>
27
-      </el-descriptions>
28
-
29
-      <div v-if="datas.type == 'featurePoint'">
30
-        <div class="title">项目编号:{{ datas.projectNumber }}</div>
31
-        <el-descriptions :column="1" border>
32
-          <el-descriptions-item label="名称" width="130px">
33
-            {{ datas.selectFeatures.values_.name }}
34
-          </el-descriptions-item>
35
-        </el-descriptions>
36
-      </div>
37
-    </div>
38
-    <div class="look-achi" @click="$emit('open')" v-if="datas.type == 'projectPoint'">成果目录>></div>
39
-  </div>
40
-</template>
41
-
42
-<script>
43
-
44
-
45
-export default {
46
-  props: {
47
-    datas: {
48
-      type: Object,
49
-      required: true
50
-    },
51
-  },
52
-  data() {
53
-    return {
54
-    };
55
-  },
56
-  watch: {
57
-    'datas.type'(val){
58
-    }
59
-  },
60
-  mounted() {
61
-  },
62
-  methods: {},
63
-}
64
-
65
-</script>
66
-
67
-<style lang="scss" scoped>
68
-// 弹出框
69
-.ol-popup {
70
-  position: absolute;
71
-  background-color: #fff;
72
-  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
73
-  padding: 22px;
74
-  border-radius: 10px;
75
-  // border: 1px solid #cccccc;
76
-  bottom: 17px;
77
-  left: -129px;
78
-  min-width: 280px;
79
-  width: 200px;
80
-
81
-  .ol-popup-closer {
82
-    text-decoration: none;
83
-    position: absolute;
84
-    top: 2px;
85
-    right: 8px;
86
-  }
87
-
88
-  .ol-popup-closer:after {
89
-    content: "✖";
90
-    cursor: pointer;
91
-  }
92
-
93
-  .ol-popup-closer:hover:after {
94
-    color: #409EFF;
95
-  }
96
-}
97
-
98
-
99
-.ol-popup:after,
100
-.ol-popup:before {
101
-  top: 100%;
102
-  border: solid transparent;
103
-  content: " ";
104
-  height: 0;
105
-  width: 0;
106
-  position: absolute;
107
-  pointer-events: none;
108
-}
109
-
110
-.ol-popup:after {
111
-  border-top-color: #fff;
112
-  border-width: 10px;
113
-  left: 50%;
114
-  transform: translate(-50%, 0);
115
-  margin-left: -10px;
116
-}
117
-
118
-.ol-popup:before {
119
-  border-top-color: #fff;
120
-  border-width: 11px;
121
-  left: 50%;
122
-  transform: translate(-50%, 0);
123
-  margin-left: -11px;
124
-}
125
-
126
-.look-achi {
127
-  text-align: right;
128
-  color: #409EFF;
129
-  cursor: pointer;
130
-  font-size: 14px;
131
-  margin-top: 10px;
132
-  font-family: '微软雅黑';
133
-}
134
-
135
-.title {
136
-  font-size: 14px;
137
-  font-family: 'Times New Roman', '黑体', Times, serif, ;
138
-}
139
-</style>

+ 75
- 13
oa-ui/src/views/file/index/projectLayer.vue Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
  * @Author: ysh
5 5
  * @Date: 2022-10-20 17:27:09
6 6
  * @LastEditors: wrh
7
- * @LastEditTime: 2024-06-07 09:04:52
7
+ * @LastEditTime: 2024-09-04 15:01:44
8 8
 -->
9 9
 <template>
10 10
   <div class="layer-box">
@@ -22,12 +22,12 @@
22 22
     <div style="margin-top: 10px;">
23 23
       <el-input v-model="filterInput" class="w-50 m-2" placeholder="请输入项目编号" @keyup.enter="handleFilterNode">
24 24
         <template #append>
25
-          <el-button icon="Search" @click="handleFilterNode"></el-button>
25
+          <el-button icon="el-icon-search" @click="handleFilterNode"></el-button>
26 26
         </template>
27 27
       </el-input>
28 28
     </div>
29
-    <el-scrollbar height="400px">
30
-      <el-tree :data="treeDatas" :props="defaultProps" node-key="id" show-checkbox ref="projectTree"
29
+    <el-scrollbar class="list-tree-div">
30
+      <el-tree class="filter-tree" :data="treeDatas" :props="defaultProps" node-key="id" show-checkbox ref="projectTree"
31 31
         :default-checked-keys="selectedNodeKey" @check-change="handleCheckChange" default-expand-all
32 32
         @node-click="handleNodeClick" highlight-current :filter-node-method="filterNode" />
33 33
     </el-scrollbar>
@@ -95,8 +95,8 @@ export default {
95 95
           let list = [];
96 96
           let selectList = [];
97 97
           for (let t of tree) {
98
-            let kmlUrl = this.kmlPath + "/profile/" + t.projectKml;
99
-            let cpUrl = this.kmlPath + "/profile/" + t.projectCp;
98
+            let kmlUrl = this.kmlPath + "/profile/upload" + t.projectKml;
99
+            let cpUrl = this.kmlPath + "/profile/upload" + t.projectCp;
100 100
             let obj = {};
101 101
             obj.id = t.projectNumber;
102 102
             obj.name = t.projectNumber + '-' + t.projectName;
@@ -171,7 +171,7 @@ export default {
171 171
     },
172 172
     // 触发筛选
173 173
     handleFilterNode() {
174
-      this.$refs.projectTree.filter(filterInput.value)
174
+      this.$refs.projectTree.filter(this.filterInput)
175 175
     },
176 176
     handleCheckChange(data, checked, indeterminate) {
177 177
       if (this.checkList.indexOf('范围') != -1) {
@@ -215,8 +215,7 @@ export default {
215 215
       }
216 216
     },
217 217
     cpStyle(obj) {
218
-      let feature = obj[0];
219
-      let resolution = obj[1];
218
+      let feature = obj;
220 219
       let style = new Style({
221 220
         image: new Icon({
222 221
           src: sjx,
@@ -226,7 +225,7 @@ export default {
226 225
           color: '#30A9DE',
227 226
         }),
228 227
         text: new Text({
229
-          text: this.getText(feature, resolution),
228
+          text: this.getText(feature),
230 229
           font: '14px sans-serif',
231 230
           textAlign: 'center',
232 231
           textBaseline: 'middle',
@@ -251,7 +250,7 @@ export default {
251 250
       if (reo > 2) {
252 251
         text = '';
253 252
       } else {
254
-        text = feature.values_.name;
253
+        text = feature.name;
255 254
       }
256 255
       return text;
257 256
     },
@@ -267,6 +266,70 @@ export default {
267 266
   border: 1px dashed #bccfec;
268 267
 }
269 268
 
269
+.list-tree-div {
270
+  width: 280px;
271
+  height: 660px;
272
+  overflow: auto;
273
+  background: none;
274
+  flex-grow: 1;
275
+  display: flex;
276
+
277
+  .el-scrollbar {
278
+    display: flex;
279
+    padding: 2.6px 16px 16px 0;
280
+    width: 280px;
281
+
282
+    .el-scrollbar__wrap {
283
+      overflow-x: hidden;
284
+      overflow-y: auto;
285
+      min-width: 250px;
286
+
287
+      .el-tree.filter-tree {
288
+        .el-tree-node {
289
+          >.el-tree-node__content {
290
+            /* 让纵向滚动条与内容最右边界限之间留有8px的宽度,使效果更好看。 */
291
+            padding: 0 8px 0 0;
292
+
293
+            .el-tree-node__expand-icon {
294
+              margin: -2 0 0 3px;
295
+              padding: 0;
296
+            }
297
+
298
+            >label.el-checkbox {
299
+              margin-right: 4px;
300
+              margin-bottom: 0px;
301
+              font-size: 12px;
302
+            }
303
+
304
+            .el-tree-node__label {
305
+              font-size: 12px;
306
+              line-height: 12px;
307
+            }
308
+          }
309
+
310
+          .el-tree-node__children {
311
+            /* 出现横轴滚动条 */
312
+            display: inline-block;
313
+            min-width: 100%;
314
+          }
315
+
316
+        }
317
+      }
318
+
319
+    }
320
+
321
+    .el-scrollbar__bar {
322
+      &.is-horizontal {
323
+        bottom: 0;
324
+      }
325
+
326
+      &.is-vertical {
327
+        right: 0;
328
+      }
329
+    }
330
+  }
331
+}
332
+
270 333
 :deep(.el-checkbox__label) {
271 334
   color: var(--el-tree-text-color) !important;
272 335
 }
@@ -282,5 +345,4 @@ export default {
282 345
 
283 346
 :deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content) {
284 347
   background-color: #bccfec !important;
285
-}
286
-</style>
348
+}</style>

+ 22
- 22
oa-ui/src/views/file/index/switchMap.vue Näytä tiedosto

@@ -4,33 +4,33 @@
4 4
  * @Author: ysh
5 5
  * @Date: 2023-06-02 14:13:06
6 6
  * @LastEditors: wrh
7
- * @LastEditTime: 2024-06-07 11:47:21
7
+ * @LastEditTime: 2024-09-04 16:36:38
8 8
 -->
9 9
 <template>
10 10
   <div class="map-box">
11 11
     <div class="open-box" v-if="isClose" @click="closeSwitch">
12 12
       <i class="el-icon-d-arrow-right"></i>
13 13
     </div>
14
-    <div class="close-box"  @click="closeSwitch">
14
+    <div class="close-box" @click="closeSwitch">
15 15
       <i class="el-icon-d-arrow-left"></i>
16 16
     </div>
17 17
     <el-tooltip class="box-item" effect="dark" content="高德" placement="top">
18 18
       <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('高德')">
19 19
       </div>
20 20
     </el-tooltip>
21
-    <el-tooltip class="box-item" effect="dark" content="谷歌" placement="top">
21
+    <!-- <el-tooltip class="box-item" effect="dark" content="谷歌" placement="top">
22 22
       <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('谷歌')">
23 23
       </div>
24 24
     </el-tooltip>
25 25
     <el-tooltip class="box-item" effect="dark" content="天地图" placement="top">
26 26
       <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('天地图')">
27 27
       </div>
28
-    </el-tooltip>
28
+    </el-tooltip> -->
29 29
     <el-tooltip class="box-item" effect="dark" content="中科星图" placement="top">
30 30
       <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('中科星图')">
31 31
       </div>
32 32
     </el-tooltip>
33
-    <el-tooltip class="box-item" effect="dark" content="ArcGIS" placement="top">
33
+    <!-- <el-tooltip class="box-item" effect="dark" content="ArcGIS" placement="top">
34 34
       <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('ArcGIS')">
35 35
       </div>
36 36
     </el-tooltip>
@@ -41,7 +41,7 @@
41 41
     <el-tooltip class="box-item" effect="dark" content="矢量图" placement="top">
42 42
       <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('矢量图')">
43 43
       </div>
44
-    </el-tooltip>
44
+    </el-tooltip> -->
45 45
   </div>
46 46
 </template>
47 47
 
@@ -69,18 +69,18 @@ export default {
69 69
           if (name == type) {
70 70
             if (type == '高德') {
71 71
               layer.setVisible(true);
72
-            } else if (type == '天地图') {
73
-              layer.setVisible(true);
72
+            // } else if (type == '天地图') {
73
+            //   layer.setVisible(true);
74 74
             } else if (type == '中科星图') {
75 75
               layer.setVisible(true);
76
-            } else if (type == '谷歌') {
77
-              layer.setVisible(true);
78
-            } else if (type == 'ArcGIS') {
79
-              layer.setVisible(true);
80
-            } else if (type == '天地图地形') {
81
-              layer.setVisible(true);
82
-            } else if (type == '矢量图') {
83
-              layer.setVisible(true);
76
+            // } else if (type == '谷歌') {
77
+            //   layer.setVisible(true);
78
+            // } else if (type == 'ArcGIS') {
79
+            //   layer.setVisible(true);
80
+            // } else if (type == '天地图地形') {
81
+            //   layer.setVisible(true);
82
+            // } else if (type == '矢量图') {
83
+            //   layer.setVisible(true);
84 84
             }
85 85
           }
86 86
         }
@@ -152,11 +152,11 @@ export default {
152 152
   z-index: 11;
153 153
 }
154 154
 
155
-.box-item:nth-child(3) {
156
-  background-image: url('../../../assets/images/gis/谷歌影像.png');
157
-  background-size: 100% 100%;
158
-  z-index: 10;
159
-}
155
+// .box-item:nth-child(3) {
156
+//   background-image: url('../../../assets/images/gis/谷歌影像.png');
157
+//   background-size: 100% 100%;
158
+//   z-index: 10;
159
+// }
160 160
 
161 161
 .box-item:nth-child(4) {
162 162
   background-image: url('../../../assets/images/gis/天地图.png');
@@ -164,7 +164,7 @@ export default {
164 164
   z-index: 9;
165 165
 }
166 166
 
167
-.box-item:nth-child(5) {
167
+.box-item:nth-child(3) {
168 168
   background-image: url('../../../assets/images/gis/中科星图影像.png');
169 169
   background-size: 100% 100%;
170 170
   z-index: 8;

+ 1
- 1
oa-ui/src/views/oa/device/detail.vue Näytä tiedosto

@@ -283,7 +283,7 @@
283 283
           <el-select v-model="expenseForm.expenseType" placeholder="请选择" clearable @change="expenseTypePath">
284 284
             <el-option label="保险费" value="0"></el-option>
285 285
             <el-option label="维修/保养费" value="1"></el-option>
286
-            <el-option label="检定费" value="2"></el-option>
286
+            <el-option label="检定费" value="3"></el-option>
287 287
           </el-select>
288 288
         </el-form-item>
289 289
         <el-form-item label="费用金额" prop="expense">

Loading…
Peruuta
Tallenna