瀏覽代碼

资料管理系统

lamphua 9 月之前
父節點
當前提交
6d7db8446f

+ 6
- 4
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java 查看文件

129
                 if (filesAchievement.getId() == null || !IdList.contains(filesAchievement.getId()))
129
                 if (filesAchievement.getId() == null || !IdList.contains(filesAchievement.getId()))
130
                     filesAchievement.setId(new SnowFlake().generateId());
130
                     filesAchievement.setId(new SnowFlake().generateId());
131
                 CmcProject cmcProject = new CmcProject();
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
                     filesAchievement.setProjectId(cmcProject.getProjectId());
137
                     filesAchievement.setProjectId(cmcProject.getProjectId());
135
-                }else{
138
+                else
136
                     filesAchievement.setProjectId(null);
139
                     filesAchievement.setProjectId(null);
137
-                }
138
                 String storageAddress = filesAchievement.getStorageAddress();
140
                 String storageAddress = filesAchievement.getStorageAddress();
139
                 if (storageAddress != null && !storageAddress.equals("")) {
141
                 if (storageAddress != null && !storageAddress.equals("")) {
140
                     filesAchievement.setStorageId(new SnowFlake().generateId());
142
                     filesAchievement.setStorageId(new SnowFlake().generateId());

+ 9
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java 查看文件

12
 import com.ruoyi.oa.service.ICmcProjectService;
12
 import com.ruoyi.oa.service.ICmcProjectService;
13
 import org.springframework.beans.factory.annotation.Autowired;
13
 import org.springframework.beans.factory.annotation.Autowired;
14
 import org.springframework.beans.factory.annotation.Value;
14
 import org.springframework.beans.factory.annotation.Value;
15
+import org.springframework.security.access.prepost.PreAuthorize;
15
 import org.springframework.web.bind.annotation.*;
16
 import org.springframework.web.bind.annotation.*;
16
 import org.springframework.web.multipart.MultipartFile;
17
 import org.springframework.web.multipart.MultipartFile;
17
 
18
 
188
     public AjaxResult remove(@PathVariable String[] ids) {
189
     public AjaxResult remove(@PathVariable String[] ids) {
189
         return toAjax(cmcProjectService.deleteCmcProjectByProjectIds(ids));
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 查看文件

22
     /**
22
     /**
23
      * 查询cmc项目
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
      * 查询cmc项目列表
31
      * 查询cmc项目列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProjectService.java 查看文件

24
      * 查询cmc项目
24
      * 查询cmc项目
25
      *
25
      *
26
      * @param projectNumber cmc项目编号
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
      * 查询cmc项目列表
32
      * 查询cmc项目列表

+ 4
- 4
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProjectServiceImpl.java 查看文件

37
     /**
37
     /**
38
      * 查询cmc项目
38
      * 查询cmc项目
39
      *
39
      *
40
-     * @param projectNumber cmc项目编号
41
-     * @return cmc项目
40
+     * @param projectNumbers cmc项目编号
41
+     * @return cmc项目列表
42
      */
42
      */
43
     @Override
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 查看文件

119
         where p.project_id = #{projectId}
119
         where p.project_id = #{projectId}
120
     </select>
120
     </select>
121
 
121
 
122
-    <select id="selectCmcProjectByProjectNumber" parameterType="String" resultMap="CmcProjectResult">
122
+    <select id="selectCmcProjectByProjectNumbers" parameterType="String" resultMap="CmcProjectResult">
123
         <include refid="selectCmcProjectVo"/>
123
         <include refid="selectCmcProjectVo"/>
124
         where
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
     </select>
129
     </select>
127
 
130
 
128
     <insert id="insertCmcProject" parameterType="CmcProject">
131
     <insert id="insertCmcProject" parameterType="CmcProject">

+ 9
- 1
oa-ui/src/api/file/project.js 查看文件

89
     url: url,
89
     url: url,
90
     method: 'get',
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 查看文件

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-06-21 18:51:49
3
  * @Date: 2024-06-21 18:51:49
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-03 16:08:10
5
+ * @LastEditTime: 2024-09-05 10:46:23
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="warpper-container">
8
   <div class="warpper-container">
10
     <div class="map-container" id="maps" tabindex="0"></div>
10
     <div class="map-container" id="maps" tabindex="0"></div>
11
     <!-- 鼠标移动坐标 -->
11
     <!-- 鼠标移动坐标 -->
12
     <div id="mouse-position"></div>
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
     <div class="tool-box">
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
       <div class="item">
19
       <div class="item">
23
         <el-tooltip effect="dark" content="图层" placement="right">
20
         <el-tooltip effect="dark" content="图层" placement="right">
24
           <div class="layers" @click="layersOpen = !layersOpen"></div>
21
           <div class="layers" @click="layersOpen = !layersOpen"></div>
34
           <div class="selectM" @click="polygonSelect()"></div>
31
           <div class="selectM" @click="polygonSelect()"></div>
35
         </el-tooltip>
32
         </el-tooltip>
36
       </div>
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
     </div>
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
         </div>
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
       </div>
60
       </div>
54
-    </transition-group>
61
+    </div>
62
+    <!-- </transition-group> -->
55
     <!-- 项目信息弹出框 -->
63
     <!-- 项目信息弹出框 -->
56
     <div id="popup" class="ol-popup" v-if="clickFeature != null">
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
       <div id="popup-content">
66
       <div id="popup-content">
59
         <el-descriptions :column="1" border v-if="clickFeature.type == 'projectPoint'">
67
         <el-descriptions :column="1" border v-if="clickFeature.type == 'projectPoint'">
60
           <el-descriptions-item label="项目编号" width="130px">
68
           <el-descriptions-item label="项目编号" width="130px">
81
           </el-descriptions>
89
           </el-descriptions>
82
         </div>
90
         </div>
83
       </div>
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
     </div>
93
     </div>
86
     <!-- 项目目录 -->
94
     <!-- 项目目录 -->
87
     <div class="right-project" :class="{ closeProBox: isOpenPro }">
95
     <div class="right-project" :class="{ closeProBox: isOpenPro }">
194
           <div class="achi-content">
202
           <div class="achi-content">
195
             <div class="achi-header">
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
             </div>
206
             </div>
201
             <div class="achi-projectNumber">项目编号:{{ dialogTitle }}</div>
207
             <div class="achi-projectNumber">项目编号:{{ dialogTitle }}</div>
202
             <el-table :data="achiDialogData" height="400px">
208
             <el-table :data="achiDialogData" height="400px">
259
 <script>
265
 <script>
260
 import { Tianditu, ZhongKe, ArcGISBlue, Autonavi, google, terrain, vect } from '@/utils/maps'
266
 import { Tianditu, ZhongKe, ArcGISBlue, Autonavi, google, terrain, vect } from '@/utils/maps'
261
 import { listProject, getProject } from '@/api/oa/project/project'
267
 import { listProject, getProject } from '@/api/oa/project/project'
262
-import infoBox from './index/infoBox.vue';
268
+import { getInfoByProjectNumbers } from '@/api/file/project'
263
 import ProjectLayer from './index/projectLayer.vue';
269
 import ProjectLayer from './index/projectLayer.vue';
270
+import SwitchMap from './index/switchMap.vue';
264
 import sjxActive from '@/assets/images/gis/sjd.png';
271
 import sjxActive from '@/assets/images/gis/sjd.png';
265
 // ---------------------------------ol引用------------------------------------------------
272
 // ---------------------------------ol引用------------------------------------------------
266
 import 'ol/ol.css'
273
 import 'ol/ol.css'
285
 import { MousePosition, ScaleLine, defaults as defaultControls } from 'ol/control';
292
 import { MousePosition, ScaleLine, defaults as defaultControls } from 'ol/control';
286
 import { getAchievementByProject, listAchievement } from "@/api/file/achievement";
293
 import { getAchievementByProject, listAchievement } from "@/api/file/achievement";
287
 export default {
294
 export default {
288
-  components: { infoBox, ProjectLayer },
295
+  components: { SwitchMap, ProjectLayer },
289
   dicts: ['cmc_achi_type', 'cmc_scale_grade'],
296
   dicts: ['cmc_achi_type', 'cmc_scale_grade'],
290
   data() {
297
   data() {
291
     return {
298
     return {
299
       select: null,
306
       select: null,
300
       popup: null,
307
       popup: null,
301
       clusters: null,
308
       clusters: null,
309
+      checkedCluster: true,
302
       drawBox: null,
310
       drawBox: null,
303
       activeName: 'first',
311
       activeName: 'first',
304
       isDrawing: false,
312
       isDrawing: false,
309
       searchType: '',
317
       searchType: '',
310
       projectList: [],
318
       projectList: [],
311
       allproTableData: [],
319
       allproTableData: [],
320
+      achiDialogData: [],
312
       clusters: null,
321
       clusters: null,
313
       total: 0,
322
       total: 0,
314
       loading: true,
323
       loading: true,
315
       tableHeight: 0,
324
       tableHeight: 0,
325
+      selectedInfo: false,
316
       clickFeature: {},
326
       clickFeature: {},
317
       clickDatas: {
327
       clickDatas: {
318
         selectFeatures: null,
328
         selectFeatures: null,
390
         ],
400
         ],
391
         view: this.view,
401
         view: this.view,
392
       })
402
       })
403
+      this.$store.commit('SET_MAP', this.map)
393
       this.map.addOverlay(this.popup);
404
       this.map.addOverlay(this.popup);
394
       this.mapClick(this.map);
405
       this.mapClick(this.map);
395
       // this.clickFeaturePopInfo();
406
       // this.clickFeaturePopInfo();
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
     clickFeaturePopInfo() {
517
     clickFeaturePopInfo() {
482
       let that = this;
518
       let that = this;
483
       if (that.select !== null) {
519
       if (that.select !== null) {
509
     closePopup() {
545
     closePopup() {
510
       this.popup.setPosition(undefined);
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
     openProject() {
558
     openProject() {
513
       this.dialogTableVisible = true;
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
       listAchievement({ projectId }).then(res => {
562
       listAchievement({ projectId }).then(res => {
517
         if (res.total == 0) {
563
         if (res.total == 0) {
518
           this.$message.error('暂无成果,请添加');
564
           this.$message.error('暂无成果,请添加');
555
         geometryFunction: createBox()
601
         geometryFunction: createBox()
556
       });
602
       });
557
       that.drawBox.on('drawstart', function () {
603
       that.drawBox.on('drawstart', function () {
604
+        that.selectedInfo = true;
558
         that.seletctedCluters = [];
605
         that.seletctedCluters = [];
559
         that.select.getFeatures().clear();
606
         that.select.getFeatures().clear();
560
         that.isDrawing = true;
607
         that.isDrawing = true;
575
           let selectedFeatures = that.select.getFeatures();
622
           let selectedFeatures = that.select.getFeatures();
576
           for (let i = 0; i < selectedFeatures.getLength(); i++) {
623
           for (let i = 0; i < selectedFeatures.getLength(); i++) {
577
             let feature = selectedFeatures.item(i);
624
             let feature = selectedFeatures.item(i);
578
-            feature = feature.values_.features;
625
+            feature = feature.get('features');
579
             if (feature.length == 1) {
626
             if (feature.length == 1) {
580
               let name = feature[0].name;
627
               let name = feature[0].name;
581
               selected.push(name);
628
               selected.push(name);
594
       that.map.addInteraction(that.drawBox);
641
       that.map.addInteraction(that.drawBox);
595
     },
642
     },
596
     polygonSelect() {
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
     getLayerByName(name) {
703
     getLayerByName(name) {
810
       }
913
       }
811
     },
914
     },
812
     getText(feature, resolution) {
915
     getText(feature, resolution) {
813
-      let features = feature.values_.features;
916
+      let features = feature.get('features');
814
       let reo = resolution * 100;
917
       let reo = resolution * 100;
815
       let text;
918
       let text;
816
       if (reo > 2) {
919
       if (reo > 2) {
849
         this.projectList = data;
952
         this.projectList = data;
850
       })
953
       })
851
     },
954
     },
955
+    /* 开关聚合项目点 */
956
+    switchCluster(val) {
957
+      this.clusters.setVisible(val);
958
+    },
852
     tableRowClassName() {
959
     tableRowClassName() {
853
 
960
 
854
     },
961
     },
863
           this.$message.error('暂无成果,请添加');
970
           this.$message.error('暂无成果,请添加');
864
           this.achiDialogData = [];
971
           this.achiDialogData = [];
865
         } else {
972
         } else {
866
-          if (this.dialogTableVisible == false)
867
-            this.dialogTableVisible = true;
868
-          else
869
-            this.dialogTableVisible = false;
973
+          this.dialogTableVisible = true;
870
           this.achiDialogData = res.rows;
974
           this.achiDialogData = res.rows;
871
         }
975
         }
872
       })
976
       })
914
 <style lang="scss" scoped>
1018
 <style lang="scss" scoped>
915
 .warpper-container {
1019
 .warpper-container {
916
   position: relative;
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
 .map-container {
1032
 .map-container {
963
     font-family: '黑体';
1076
     font-family: '黑体';
964
     position: relative;
1077
     position: relative;
965
 
1078
 
966
-    .close {
1079
+    .achi-closer {
1080
+      text-decoration: none;
967
       position: absolute;
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
       cursor: pointer;
1088
       cursor: pointer;
975
     }
1089
     }
1090
+
1091
+    .achi-closer:hover:after {
1092
+      color: #409EFF;
1093
+    }
976
   }
1094
   }
977
 
1095
 
978
 }
1096
 }
1154
   transform: translate(-50%, 0);
1272
   transform: translate(-50%, 0);
1155
   margin-left: -11px;
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
 </style>
1335
 </style>

+ 0
- 139
oa-ui/src/views/file/index/infoBox.vue 查看文件

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 查看文件

4
  * @Author: ysh
4
  * @Author: ysh
5
  * @Date: 2022-10-20 17:27:09
5
  * @Date: 2022-10-20 17:27:09
6
  * @LastEditors: wrh
6
  * @LastEditors: wrh
7
- * @LastEditTime: 2024-06-07 09:04:52
7
+ * @LastEditTime: 2024-09-04 15:01:44
8
 -->
8
 -->
9
 <template>
9
 <template>
10
   <div class="layer-box">
10
   <div class="layer-box">
22
     <div style="margin-top: 10px;">
22
     <div style="margin-top: 10px;">
23
       <el-input v-model="filterInput" class="w-50 m-2" placeholder="请输入项目编号" @keyup.enter="handleFilterNode">
23
       <el-input v-model="filterInput" class="w-50 m-2" placeholder="请输入项目编号" @keyup.enter="handleFilterNode">
24
         <template #append>
24
         <template #append>
25
-          <el-button icon="Search" @click="handleFilterNode"></el-button>
25
+          <el-button icon="el-icon-search" @click="handleFilterNode"></el-button>
26
         </template>
26
         </template>
27
       </el-input>
27
       </el-input>
28
     </div>
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
         :default-checked-keys="selectedNodeKey" @check-change="handleCheckChange" default-expand-all
31
         :default-checked-keys="selectedNodeKey" @check-change="handleCheckChange" default-expand-all
32
         @node-click="handleNodeClick" highlight-current :filter-node-method="filterNode" />
32
         @node-click="handleNodeClick" highlight-current :filter-node-method="filterNode" />
33
     </el-scrollbar>
33
     </el-scrollbar>
95
           let list = [];
95
           let list = [];
96
           let selectList = [];
96
           let selectList = [];
97
           for (let t of tree) {
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
             let obj = {};
100
             let obj = {};
101
             obj.id = t.projectNumber;
101
             obj.id = t.projectNumber;
102
             obj.name = t.projectNumber + '-' + t.projectName;
102
             obj.name = t.projectNumber + '-' + t.projectName;
171
     },
171
     },
172
     // 触发筛选
172
     // 触发筛选
173
     handleFilterNode() {
173
     handleFilterNode() {
174
-      this.$refs.projectTree.filter(filterInput.value)
174
+      this.$refs.projectTree.filter(this.filterInput)
175
     },
175
     },
176
     handleCheckChange(data, checked, indeterminate) {
176
     handleCheckChange(data, checked, indeterminate) {
177
       if (this.checkList.indexOf('范围') != -1) {
177
       if (this.checkList.indexOf('范围') != -1) {
215
       }
215
       }
216
     },
216
     },
217
     cpStyle(obj) {
217
     cpStyle(obj) {
218
-      let feature = obj[0];
219
-      let resolution = obj[1];
218
+      let feature = obj;
220
       let style = new Style({
219
       let style = new Style({
221
         image: new Icon({
220
         image: new Icon({
222
           src: sjx,
221
           src: sjx,
226
           color: '#30A9DE',
225
           color: '#30A9DE',
227
         }),
226
         }),
228
         text: new Text({
227
         text: new Text({
229
-          text: this.getText(feature, resolution),
228
+          text: this.getText(feature),
230
           font: '14px sans-serif',
229
           font: '14px sans-serif',
231
           textAlign: 'center',
230
           textAlign: 'center',
232
           textBaseline: 'middle',
231
           textBaseline: 'middle',
251
       if (reo > 2) {
250
       if (reo > 2) {
252
         text = '';
251
         text = '';
253
       } else {
252
       } else {
254
-        text = feature.values_.name;
253
+        text = feature.name;
255
       }
254
       }
256
       return text;
255
       return text;
257
     },
256
     },
267
   border: 1px dashed #bccfec;
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
 :deep(.el-checkbox__label) {
333
 :deep(.el-checkbox__label) {
271
   color: var(--el-tree-text-color) !important;
334
   color: var(--el-tree-text-color) !important;
272
 }
335
 }
282
 
345
 
283
 :deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content) {
346
 :deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content) {
284
   background-color: #bccfec !important;
347
   background-color: #bccfec !important;
285
-}
286
-</style>
348
+}</style>

+ 22
- 22
oa-ui/src/views/file/index/switchMap.vue 查看文件

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

+ 1
- 1
oa-ui/src/views/oa/device/detail.vue 查看文件

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

Loading…
取消
儲存