Bladeren bron

员工信息导出,一张图

lamphua 10 maanden geleden
bovenliggende
commit
1b1a983b1d

+ 9
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Bestand weergeven

@@ -57,6 +57,15 @@ public class CmcProjectController extends BaseController
57 57
     {
58 58
         startPage();
59 59
         List<CmcProject> list = cmcProjectService.selectCmcProjectList(cmcProject);
60
+        for (CmcProject project : list) {
61
+            String underTakingDept = cmcProject.getUndertakingDept();
62
+            StringBuilder underTakingDeptName = new StringBuilder();
63
+            if (underTakingDept != null && !underTakingDept.equals("") && underTakingDept.split(",").length > 0) {
64
+                for (String dept : underTakingDept.split(","))
65
+                    underTakingDeptName.append(deptService.selectDeptById(Long.parseLong(dept)).getDeptName()).append("、");
66
+                cmcProject.setUndertakingDeptName(underTakingDeptName.substring(0, underTakingDeptName.length() - 1));
67
+            }
68
+        }
60 69
         return getDataTable(list);
61 70
     }
62 71
 

+ 12
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java Bestand weergeven

@@ -9,6 +9,8 @@ import com.alibaba.fastjson2.JSON;
9 9
 import com.alibaba.fastjson2.JSONArray;
10 10
 import com.alibaba.fastjson2.JSONObject;
11 11
 import com.ruoyi.common.utils.DateUtils;
12
+import com.ruoyi.common.utils.IDCard;
13
+import com.ruoyi.framework.web.domain.server.Sys;
12 14
 import com.ruoyi.oa.domain.CmcUserHistory;
13 15
 import com.ruoyi.oa.service.ICmcUserHistoryService;
14 16
 import org.apache.commons.lang3.ArrayUtils;
@@ -86,6 +88,16 @@ public class SysUserController extends BaseController
86 88
     public void export(HttpServletResponse response, SysUser user)
87 89
     {
88 90
         List<SysUser> list = userService.selectUserList(user);
91
+        for (SysUser sysUser : list) {
92
+            sysUser.setAge(IDCard.getBirAgeSex(sysUser.getIdCard()).getInteger("age"));
93
+            sysUser.setBirthday(IDCard.getBirAgeSex(sysUser.getIdCard()).getDate("birthday"));
94
+            StringBuilder postName = new StringBuilder();
95
+            List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
96
+            for (Long post : userPostList)
97
+                postName.append(postService.selectPostById(post).getPostName()).append("、");
98
+            sysUser.setPostNames(postName.substring(0, postName.length() - 1));
99
+            sysUser.setUserId(sysUser.getUserId() - 1);
100
+        }
89 101
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
90 102
         util.exportExcel(response, list, "用户数据");
91 103
     }

+ 27
- 15
oa-back/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java Bestand weergeven

@@ -31,7 +31,7 @@ public class SysUser extends BaseEntity
31 31
     private Long deptId;
32 32
 
33 33
     /** 用户账号 */
34
-    @Excel(name = "登录名称")
34
+//    @Excel(name = "登录名称")
35 35
     private String userName;
36 36
 
37 37
     /** 用户昵称 */
@@ -39,7 +39,7 @@ public class SysUser extends BaseEntity
39 39
     private String nickName;
40 40
 
41 41
     /** 用户邮箱 */
42
-    @Excel(name = "用户邮箱")
42
+//    @Excel(name = "用户邮箱")
43 43
     private String email;
44 44
 
45 45
     /** 手机号码 */
@@ -64,24 +64,19 @@ public class SysUser extends BaseEntity
64 64
     private String delFlag;
65 65
 
66 66
     /** 最后登录IP */
67
-    @Excel(name = "最后登录IP", type = Type.EXPORT)
67
+//    @Excel(name = "最后登录IP", type = Type.EXPORT)
68 68
     private String loginIp;
69 69
 
70 70
     /** 最后登录时间 */
71
-    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
71
+//    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
72 72
     private Date loginDate;
73 73
 
74
-    /** 部门经理级别 */
75
-    @Excel(name = "部门经理级别", readConverterExp = "0=一级,1=二级,2=三级")
76
-    private String pmLevel;
77
-
78
-    /** 岗级 */
79
-    @Excel(name = "岗级", readConverterExp = "0=一岗,1=二岗,2=三岗,3=四岗,4=五岗,5=六岗,6=七岗,7=八岗")
80
-    private String postLevel;
74
+    @Excel(name = "岗位")
75
+    private String postNames;
81 76
 
82
-    /** 薪档 */
83
-    @Excel(name = "薪档", readConverterExp = "0=一档,1=二档,2=三档,3=四档,4=五档,5=六档,6=七档,7=八档")
84
-    private String salaryLevel;
77
+    /** 项目经理级别 */
78
+    @Excel(name = "项目经理级别", readConverterExp = "0=一级,1=二级,2=三级")
79
+    private String pmLevel;
85 80
 
86 81
     /** 工程师岗级 */
87 82
     @Excel(name = "工程师岗级", readConverterExp = "0=一级,1=二级,2=三级,3=四级,4=五级,5=六级")
@@ -91,6 +86,14 @@ public class SysUser extends BaseEntity
91 86
     @Excel(name = "技工等级", readConverterExp = "0=一级,1=二级,2=三级")
92 87
     private String operatorLevel;
93 88
 
89
+    /** 岗级 */
90
+    @Excel(name = "岗级", readConverterExp = "0=一岗,1=二岗,2=三岗,3=四岗,4=五岗,5=六岗,6=七岗,7=八岗")
91
+    private String postLevel;
92
+
93
+    /** 薪档 */
94
+    @Excel(name = "薪档", readConverterExp = "0=一档,1=二档,2=三档,3=四档,4=五档,5=六档,6=七档,7=八档")
95
+    private String salaryLevel;
96
+
94 97
     /** 技术职称 */
95 98
     @Excel(name = "技术职称", readConverterExp = "0=正高级工程师,1=高级工程师,2=中级工程师,3=助理工程师,4=高级会计师,5=会计师,6=助理会计师,7=高级经济师,8=经济师,9=助理经济师,10=工人高级工,11=工人中级工,12=工人初级工,13=无职称")
96 99
     private String titles;
@@ -158,7 +161,7 @@ public class SysUser extends BaseEntity
158 161
     /** 部门对象 */
159 162
     @Excels({
160 163
         @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
161
-        @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
164
+//        @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
162 165
     })
163 166
     private SysDept dept;
164 167
 
@@ -589,6 +592,15 @@ public class SysUser extends BaseEntity
589 592
     {
590 593
         return homePlace;
591 594
     }
595
+    public void setPostNames(String postNames)
596
+    {
597
+        this.postNames = postNames;
598
+    }
599
+
600
+    public String getPostNames()
601
+    {
602
+        return postNames;
603
+    }
592 604
 
593 605
     @Override
594 606
     public String toString() {

+ 47
- 0
oa-back/ruoyi-common/src/main/java/com/ruoyi/common/utils/IDCard.java Bestand weergeven

@@ -0,0 +1,47 @@
1
+package com.ruoyi.common.utils;
2
+
3
+import com.alibaba.fastjson2.JSONObject;
4
+
5
+import java.util.Calendar;
6
+
7
+public class IDCard {
8
+    /**
9
+     * 通过身份证号码获取出生日期、性别、年龄
10
+     * @param certificateNo
11
+     * @return 返回的出生日期格式:1990-01-01 性别格式:F-女,M-男
12
+     */
13
+    public static JSONObject getBirAgeSex(String certificateNo) {
14
+        String birthday = "";
15
+        int age = 0;
16
+        String sexCode = "";
17
+
18
+        int year = Calendar.getInstance().get(Calendar.YEAR);
19
+        int month = Calendar.getInstance().get(Calendar.MONTH) + 1;
20
+        int day = Calendar.getInstance().get(Calendar.DATE);
21
+        char[] number = certificateNo.toCharArray();
22
+        boolean flag = true;
23
+        if (number.length == 18) {
24
+            for (int x = 0; x < number.length - 1; x++) {
25
+                if (!flag)
26
+                    return new JSONObject();
27
+                flag = Character.isDigit(number[x]);
28
+            }
29
+        }
30
+        if (flag && number.length == 18) {
31
+            birthday = certificateNo.substring(6, 10) + "-" + certificateNo.substring(10, 12) + "-"
32
+                    + certificateNo.substring(12, 14);
33
+            sexCode = Integer.parseInt(certificateNo.substring(certificateNo.length() - 4, certificateNo.length() - 1))
34
+                    % 2 == 0 ? "F" : "M";
35
+            if ((Integer.parseInt(certificateNo.substring(10, 12)) < month) || (Integer.parseInt(certificateNo.substring(10, 12)) == month && (Integer.parseInt(certificateNo.substring(12, 14))<= day) )){
36
+                age = year - Integer.parseInt(certificateNo.substring(6, 10));
37
+            }else {
38
+                age = year - Integer.parseInt(certificateNo.substring(6, 10)) - 1;
39
+            }
40
+        }
41
+        JSONObject map = new JSONObject();
42
+        map.put("birthday", birthday);
43
+        map.put("age", age);
44
+        map.put("sexCode", sexCode);
45
+        return map;
46
+    }
47
+}

+ 70
- 52
oa-back/sql/sql.sql Bestand weergeven

@@ -380,11 +380,12 @@ insert into sys_menu values('4', 	'人事管理', '0', '4', 'staff',		null, '',
380 380
 insert into sys_menu values('5', 	'设备管理', '0', '5', 'device',		null, '', 1, 0, 'M', '0', '0', '', 'equipment',	'admin', sysdate(), '', null, '设备管理菜单');
381 381
 insert into sys_menu values('6', 	'车辆管理', '0', '6', 'car',		'oa/car/index', 			'', 1, 0, 'C', '0', '0', 'oa:car:list', 	'car',		'admin', sysdate(), '', null, '车辆管理菜单');
382 382
 insert into sys_menu values('7', 	'投标管理', '0', '7', 'tender',		'oa/tender/index', 			'', 1, 0, 'C', '0', '0', 'oa:tender:list', 	'guide',	'admin', sysdate(), '', null, '投标管理菜单');
383
-insert into sys_menu values('8', 	'合同管理', '0', '8', 'contract',	'oa/contract/index', 		'', 1, 0, 'C', '0', '0', 'oa:contract:list','documentation',	'admin', sysdate(), '', null, '合同管理菜单');
384
-insert into sys_menu values('9', 	'项目台账', '0', '9', 'project',	'oa/project/index', 		'', 1, 0, 'C', '0', '0', 'oa:project:list', 'project',	'admin', sysdate(), '', null, '项目管理菜单');
385
-insert into sys_menu values('10', 	'单价管理', '0', '10', 'price',		'oa/price/index', 			'', 1, 0, 'C', '0', '0', 'oa:price:list', 	'money',	'admin', sysdate(), '', null, '单价管理菜单');
386
-insert into sys_menu values('11', 	'资料管理', '0', '11', 'file', 		'file/filesProject/index',  '', 1, 0, 'C', '0', '0', 'oa:archive:list',	'education','admin', sysdate(), '', NULL, '资料管理菜单');
387
-insert into sys_menu values('12', 	'一张图', 	'0', '12', 'gis', 		'file/index',  				'', 1, 0, 'C', '0', '0', '', 				'international','admin', sysdate(), '', NULL, '一张图菜单');
383
+insert into sys_menu values('8', 	'品牌项目', '0', '8', 'brand',		'oa/brand/brandProject', 	'', 1, 0, 'C', '0', '0', 'oa:brand:list', 	'project',	'admin', sysdate(), '', null, '品牌项目管理菜单');
384
+insert into sys_menu values('9', 	'合同管理', '0', '9', 'contract',	'oa/contract/index', 		'', 1, 0, 'C', '0', '0', 'oa:contract:list','documentation',	'admin', sysdate(), '', null, '合同管理菜单');
385
+insert into sys_menu values('10', 	'项目台账', '0', '10', 'project',	'oa/project/index', 		'', 1, 0, 'C', '0', '0', 'oa:project:list', 'project',	'admin', sysdate(), '', null, '项目管理菜单');
386
+insert into sys_menu values('11', 	'单价管理', '0', '11', 'price',		'oa/price/index', 			'', 1, 0, 'C', '0', '0', 'oa:price:list', 	'money',	'admin', sysdate(), '', null, '单价管理菜单');
387
+insert into sys_menu values('12', 	'资料管理', '0', '12', 'file', 		'file/filesProject/index',  '', 1, 0, 'C', '0', '0', 'oa:archive:list',	'education','admin', sysdate(), '', NULL, '资料管理菜单');
388
+insert into sys_menu values('13', 	'一张图', 	'0', '13', 'gis', 		'file/index',  				'', 1, 0, 'C', '0', '0', '', 				'international','admin', sysdate(), '', NULL, '一张图菜单');
388 389
 
389 390
 -- 二级菜单
390 391
 insert into sys_menu values('100',  '用户管理', '1',   '1', 'user',       'system/user/index',        '', 1, 0, 'C', '0', '0', 'system:user:list',        'user',          'admin', sysdate(), '', null, '用户管理菜单');
@@ -506,42 +507,48 @@ insert into sys_menu values('1074', '投标新增', '7', '2', '#', '', '', 1, 0,
506 507
 insert into sys_menu values('1075', '投标修改', '7', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:tender:edit',            	'#', 'admin', sysdate(), '', null, '');
507 508
 insert into sys_menu values('1076', '投标删除', '7', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:tender:remove',          	'#', 'admin', sysdate(), '', null, '');
508 509
 insert into sys_menu values('1077', '投标导出', '7', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:tender:export',          	'#', 'admin', sysdate(), '', null, '');
510
+-- 品牌项目管理按钮
511
+insert into sys_menu values('1078', '品牌项目查询', '8', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:brand:query',			'#', 'admin', sysdate(), '', null, '');
512
+insert into sys_menu values('1079', '品牌项目新增', '8', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:brand:add',				'#', 'admin', sysdate(), '', null, '');
513
+insert into sys_menu values('1080', '品牌项目修改', '8', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:brand:edit',            '#', 'admin', sysdate(), '', null, '');
514
+insert into sys_menu values('1081', '品牌项目删除', '8', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:brand:remove',          '#', 'admin', sysdate(), '', null, '');
515
+insert into sys_menu values('1082', '品牌项目导出', '8', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:brand:export',          '#', 'admin', sysdate(), '', null, '');
509 516
 -- 合同管理按钮
510
-insert into sys_menu values('1078', '合同查询', '8', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:query',			'#', 'admin', sysdate(), '', null, '');
511
-insert into sys_menu values('1079', '合同新增', '8', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:add',				'#', 'admin', sysdate(), '', null, '');
512
-insert into sys_menu values('1080', '合同修改', '8', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:edit',             '#', 'admin', sysdate(), '', null, '');
513
-insert into sys_menu values('1081', '合同删除', '8', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:remove',           '#', 'admin', sysdate(), '', null, '');
514
-insert into sys_menu values('1082', '合同导出', '8', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:export',           '#', 'admin', sysdate(), '', null, '');
517
+insert into sys_menu values('1083', '合同查询', '9', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:query',			'#', 'admin', sysdate(), '', null, '');
518
+insert into sys_menu values('1084', '合同新增', '9', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:add',				'#', 'admin', sysdate(), '', null, '');
519
+insert into sys_menu values('1085', '合同修改', '9', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:edit',             '#', 'admin', sysdate(), '', null, '');
520
+insert into sys_menu values('1086', '合同删除', '9', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:remove',           '#', 'admin', sysdate(), '', null, '');
521
+insert into sys_menu values('1087', '合同导出', '9', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:contract:export',           '#', 'admin', sysdate(), '', null, '');
515 522
 -- 项目管理按钮
516
-insert into sys_menu values('1083', '项目查询', '9', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:query',				'#', 'admin', sysdate(), '', null, '');
517
-insert into sys_menu values('1084', '项目新增', '9', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:add',				'#', 'admin', sysdate(), '', null, '');
518
-insert into sys_menu values('1085', '项目修改', '9', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:edit',            	'#', 'admin', sysdate(), '', null, '');
519
-insert into sys_menu values('1086', '项目删除', '9', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:remove',          	'#', 'admin', sysdate(), '', null, '');
520
-insert into sys_menu values('1087', '项目导出', '9', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:export',          	'#', 'admin', sysdate(), '', null, '');
523
+insert into sys_menu values('1088', '项目查询', '10', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:query',			'#', 'admin', sysdate(), '', null, '');
524
+insert into sys_menu values('1089', '项目新增', '10', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:add',				'#', 'admin', sysdate(), '', null, '');
525
+insert into sys_menu values('1090', '项目修改', '10', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:edit',            	'#', 'admin', sysdate(), '', null, '');
526
+insert into sys_menu values('1091', '项目删除', '10', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:remove',          	'#', 'admin', sysdate(), '', null, '');
527
+insert into sys_menu values('1092', '项目导出', '10', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:export',          	'#', 'admin', sysdate(), '', null, '');
521 528
 -- 项目管理按钮
522
-insert into sys_menu values('1088', '工资查询', '119', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:query',			'#', 'admin', sysdate(), '', null, '');
523
-insert into sys_menu values('1089', '工资新增', '119', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:add',				'#', 'admin', sysdate(), '', null, '');
524
-insert into sys_menu values('1090', '工资修改', '119', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:edit',            	'#', 'admin', sysdate(), '', null, '');
525
-insert into sys_menu values('1091', '工资删除', '119', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:remove',          	'#', 'admin', sysdate(), '', null, '');
526
-insert into sys_menu values('1092', '工资导出', '119', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:export',          	'#', 'admin', sysdate(), '', null, '');
529
+insert into sys_menu values('1093', '工资查询', '119', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:query',			'#', 'admin', sysdate(), '', null, '');
530
+insert into sys_menu values('1094', '工资新增', '119', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:add',				'#', 'admin', sysdate(), '', null, '');
531
+insert into sys_menu values('1095', '工资修改', '119', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:edit',            	'#', 'admin', sysdate(), '', null, '');
532
+insert into sys_menu values('1096', '工资删除', '119', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:remove',          	'#', 'admin', sysdate(), '', null, '');
533
+insert into sys_menu values('1097', '工资导出', '119', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:salary:export',          	'#', 'admin', sysdate(), '', null, '');
527 534
 -- 资料管理按钮
528
-insert into sys_menu values('1093', '资料查询', '11', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:query',			'#', 'admin', sysdate(), '', null, '');
529
-insert into sys_menu values('1094', '资料新增', '11', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:add',				'#', 'admin', sysdate(), '', null, '');
530
-insert into sys_menu values('1095', '资料修改', '11', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:edit',				'#', 'admin', sysdate(), '', null, '');
531
-insert into sys_menu values('1096', '资料删除', '11', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:remove',			'#', 'admin', sysdate(), '', null, '');
532
-insert into sys_menu values('1097', '资料导出', '11', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:export',			'#', 'admin', sysdate(), '', null, '');
535
+insert into sys_menu values('1098', '资料查询', '12', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:query',			'#', 'admin', sysdate(), '', null, '');
536
+insert into sys_menu values('1099', '资料新增', '12', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:add',				'#', 'admin', sysdate(), '', null, '');
537
+insert into sys_menu values('1100', '资料修改', '12', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:edit',				'#', 'admin', sysdate(), '', null, '');
538
+insert into sys_menu values('1101', '资料删除', '12', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:remove',			'#', 'admin', sysdate(), '', null, '');
539
+insert into sys_menu values('1102', '资料导出', '12', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:archive:export',			'#', 'admin', sysdate(), '', null, '');
533 540
 -- 设备记录按钮
534
-insert into sys_menu values('1098', '记录查询', '5', '3', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:query',			'#', 'admin', sysdate(), '', null, '');
535
-insert into sys_menu values('1099', '记录新增', '5', '4', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:add',			'#', 'admin', sysdate(), '', null, '');
536
-insert into sys_menu values('1100', '记录修改', '5', '5', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:edit',			'#', 'admin', sysdate(), '', null, '');
537
-insert into sys_menu values('1101', '记录删除', '5', '6', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:remove',			'#', 'admin', sysdate(), '', null, '');
538
-insert into sys_menu values('1102', '记录导出', '5', '7', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:export',			'#', 'admin', sysdate(), '', null, '');
541
+insert into sys_menu values('1103', '记录查询', '5', '3', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:query',			'#', 'admin', sysdate(), '', null, '');
542
+insert into sys_menu values('1104', '记录新增', '5', '4', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:add',			'#', 'admin', sysdate(), '', null, '');
543
+insert into sys_menu values('1105', '记录修改', '5', '5', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:edit',			'#', 'admin', sysdate(), '', null, '');
544
+insert into sys_menu values('1106', '记录删除', '5', '6', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:remove',			'#', 'admin', sysdate(), '', null, '');
545
+insert into sys_menu values('1107', '记录导出', '5', '7', '#', '', '', 1, 0, 'F', '0', '0', 'device:record:export',			'#', 'admin', sysdate(), '', null, '');
539 546
 -- 车辆记录按钮
540
-insert into sys_menu values('1103', '记录查询', '6', '6', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:query',				'#', 'admin', sysdate(), '', null, '');
541
-insert into sys_menu values('1104', '记录新增', '6', '7', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:add',				'#', 'admin', sysdate(), '', null, '');
542
-insert into sys_menu values('1105', '记录修改', '6', '8', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:edit',				'#', 'admin', sysdate(), '', null, '');
543
-insert into sys_menu values('1106', '记录删除', '6', '9', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:remove',			'#', 'admin', sysdate(), '', null, '');
544
-insert into sys_menu values('1107', '记录导出', '6', '10', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:export',			'#', 'admin', sysdate(), '', null, '');
547
+insert into sys_menu values('1108', '记录查询', '6', '6', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:query',				'#', 'admin', sysdate(), '', null, '');
548
+insert into sys_menu values('1109', '记录新增', '6', '7', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:add',				'#', 'admin', sysdate(), '', null, '');
549
+insert into sys_menu values('1110', '记录修改', '6', '8', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:edit',				'#', 'admin', sysdate(), '', null, '');
550
+insert into sys_menu values('1111', '记录删除', '6', '9', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:remove',			'#', 'admin', sysdate(), '', null, '');
551
+insert into sys_menu values('1112', '记录导出', '6', '10', '#', '', '', 1, 0, 'F', '0', '0', 'car:record:export',			'#', 'admin', sysdate(), '', null, '');
545 552
 
546 553
 -- ----------------------------
547 554
 -- 6、用户和角色关联表  用户N-1角色
@@ -749,7 +756,7 @@ create table sys_role_menu (
749 756
 -- ----------------------------
750 757
 -- 初始化-角色和菜单关联表数据
751 758
 -- ----------------------------
752
-insert into `sys_role_menu` values (2, 9);
759
+insert into `sys_role_menu` values (2, 10);
753 760
 insert into `sys_role_menu` values (2, 1000);
754 761
 insert into `sys_role_menu` values (2, 1001);
755 762
 insert into `sys_role_menu` values (2, 1017);
@@ -771,11 +778,11 @@ insert into `sys_role_menu` values (4, 1069);
771 778
 insert into `sys_role_menu` values (4, 1070);
772 779
 insert into `sys_role_menu` values (4, 1071);
773 780
 insert into `sys_role_menu` values (4, 1072);
774
-insert into `sys_role_menu` values (4, 1098);
775
-insert into `sys_role_menu` values (4, 1099);
776
-insert into `sys_role_menu` values (4, 1100);
777
-insert into `sys_role_menu` values (4, 1101);
778
-insert into `sys_role_menu` values (4, 1102);
781
+insert into `sys_role_menu` values (4, 1103);
782
+insert into `sys_role_menu` values (4, 1104);
783
+insert into `sys_role_menu` values (4, 1105);
784
+insert into `sys_role_menu` values (4, 1106);
785
+insert into `sys_role_menu` values (4, 1107);
779 786
 insert into `sys_role_menu` values (5, 6);
780 787
 insert into `sys_role_menu` values (5, 1063);
781 788
 insert into `sys_role_menu` values (5, 1064);
@@ -787,12 +794,13 @@ insert into `sys_role_menu` values (5, 1104);
787 794
 insert into `sys_role_menu` values (5, 1105);
788 795
 insert into `sys_role_menu` values (5, 1106);
789 796
 insert into `sys_role_menu` values (5, 1107);
790
-insert into `sys_role_menu` values (6, 11);
791
-insert into `sys_role_menu` values (6, 1093);
792
-insert into `sys_role_menu` values (6, 1094);
793
-insert into `sys_role_menu` values (6, 1095);
794
-insert into `sys_role_menu` values (6, 1096);
795
-insert into `sys_role_menu` values (6, 1097);
797
+insert into `sys_role_menu` values (6, 12);
798
+insert into `sys_role_menu` values (6, 13);
799
+insert into `sys_role_menu` values (6, 1098);
800
+insert into `sys_role_menu` values (6, 1099);
801
+insert into `sys_role_menu` values (6, 1100);
802
+insert into `sys_role_menu` values (6, 1101);
803
+insert into `sys_role_menu` values (6, 1102);
796 804
 insert into `sys_role_menu` values (7, 4);
797 805
 insert into `sys_role_menu` values (7, 5);
798 806
 insert into `sys_role_menu` values (7, 6);
@@ -800,6 +808,9 @@ insert into `sys_role_menu` values (7, 7);
800 808
 insert into `sys_role_menu` values (7, 8);
801 809
 insert into `sys_role_menu` values (7, 9);
802 810
 insert into `sys_role_menu` values (7, 10);
811
+insert into `sys_role_menu` values (7, 11);
812
+insert into `sys_role_menu` values (7, 12);
813
+insert into `sys_role_menu` values (7, 13);
803 814
 insert into `sys_role_menu` values (7, 118);
804 815
 insert into `sys_role_menu` values (7, 119);
805 816
 insert into `sys_role_menu` values (7, 120);
@@ -812,13 +823,14 @@ insert into `sys_role_menu` values (7, 1067);
812 823
 insert into `sys_role_menu` values (7, 1068);
813 824
 insert into `sys_role_menu` values (7, 1072);
814 825
 insert into `sys_role_menu` values (7, 1073);
815
-insert into `sys_role_menu` values (7, 1077);
816 826
 insert into `sys_role_menu` values (7, 1078);
817 827
 insert into `sys_role_menu` values (7, 1082);
818 828
 insert into `sys_role_menu` values (7, 1083);
819 829
 insert into `sys_role_menu` values (7, 1087);
820
-insert into `sys_role_menu` values (7, 1098);
830
+insert into `sys_role_menu` values (7, 1088);
831
+insert into `sys_role_menu` values (7, 1092);
821 832
 insert into `sys_role_menu` values (7, 1103);
833
+insert into `sys_role_menu` values (7, 1108);
822 834
 insert into `sys_role_menu` values (7, 2023);
823 835
 insert into `sys_role_menu` values (7, 2024);
824 836
 insert into `sys_role_menu` values (7, 2025);
@@ -828,6 +840,7 @@ insert into `sys_role_menu` values (7, 2032);
828 840
 insert into `sys_role_menu` values (7, 2033);
829 841
 insert into `sys_role_menu` values (8, 7);
830 842
 insert into `sys_role_menu` values (8, 8);
843
+insert into `sys_role_menu` values (8, 13);
831 844
 insert into `sys_role_menu` values (8, 1073);
832 845
 insert into `sys_role_menu` values (8, 1074);
833 846
 insert into `sys_role_menu` values (8, 1075);
@@ -838,7 +851,12 @@ insert into `sys_role_menu` values (8, 1079);
838 851
 insert into `sys_role_menu` values (8, 1080);
839 852
 insert into `sys_role_menu` values (8, 1081);
840 853
 insert into `sys_role_menu` values (8, 1082);
854
+insert into `sys_role_menu` values (8, 1083);
855
+insert into `sys_role_menu` values (8, 1084);
856
+insert into `sys_role_menu` values (8, 1085);
857
+insert into `sys_role_menu` values (8, 1086);
841 858
 insert into `sys_role_menu` values (8, 1087);
859
+insert into `sys_role_menu` values (8, 1092);
842 860
 
843 861
 -- ----------------------------
844 862
 -- 8、角色和部门关联表  角色1-N部门
@@ -932,9 +950,9 @@ insert into `sys_user_post` values (26, 27);
932 950
 insert into `sys_user_post` values (27, 26);
933 951
 insert into `sys_user_post` values (28, 27);
934 952
 insert into `sys_user_post` values (29, 16);
935
-insert into `sys_user_post` values (30, 25);
936
-insert into `sys_user_post` values (31, 27);
937
-insert into `sys_user_post` values (32, 27);
953
+insert into `sys_user_post` values (30, 28);
954
+insert into `sys_user_post` values (31, 29);
955
+insert into `sys_user_post` values (32, 28);
938 956
 insert into `sys_user_post` values (33, 15);
939 957
 insert into `sys_user_post` values (34, 30);
940 958
 insert into `sys_user_post` values (35, 25);

+ 2
- 0
oa-ui/package.json Bestand weergeven

@@ -60,6 +60,7 @@
60 60
     "js-cookie": "3.0.1",
61 61
     "jsencrypt": "3.0.0-rc.1",
62 62
     "nprogress": "0.2.0",
63
+    "ol": "^6.0.0",
63 64
     "quill": "1.3.7",
64 65
     "screenfull": "5.0.2",
65 66
     "sortablejs": "1.10.2",
@@ -67,6 +68,7 @@
67 68
     "vue": "2.6.12",
68 69
     "vue-count-to": "1.0.13",
69 70
     "vue-cropper": "0.5.5",
71
+    "vue-demi": "^0.14.8",
70 72
     "vue-meta": "2.4.0",
71 73
     "vue-print-nb": "^1.7.5",
72 74
     "vue-router": "3.4.9",

BIN
oa-ui/src/assets/images/gis/home.png Bestand weergeven


BIN
oa-ui/src/assets/images/gis/layers.png Bestand weergeven


BIN
oa-ui/src/assets/images/gis/select.png Bestand weergeven


BIN
oa-ui/src/assets/images/gis/selectM.png Bestand weergeven


+ 1
- 0
oa-ui/src/store/getters.js Bestand weergeven

@@ -24,5 +24,6 @@ const getters = {
24 24
   topbarRouters: state => state.permission.topbarRouters,
25 25
   defaultRoutes: state => state.permission.defaultRoutes,
26 26
   sidebarRouters: state => state.permission.sidebarRouters,
27
+  map: state => state.ol.map
27 28
 }
28 29
 export default getters

+ 3
- 1
oa-ui/src/store/index.js Bestand weergeven

@@ -8,6 +8,7 @@ import permission from './modules/permission'
8 8
 import settings from './modules/settings'
9 9
 import getters from './getters'
10 10
 import projectProcess from './modules/projectProcess'
11
+import ol from './modules/ol'
11 12
 
12 13
 Vue.use(Vuex)
13 14
 
@@ -19,7 +20,8 @@ const store = new Vuex.Store({
19 20
     tagsView,
20 21
     permission,
21 22
     settings,
22
-    projectProcess
23
+    projectProcess,
24
+    ol
23 25
   },
24 26
   getters
25 27
 })

+ 25
- 0
oa-ui/src/store/modules/ol.js Bestand weergeven

@@ -0,0 +1,25 @@
1
+/*
2
+ * @Descripttion: 
3
+ * @version: 
4
+ * @Author: ysh
5
+ * @Date: 2022-10-21 14:24:36
6
+ * @LastEditors: Please set LastEditors
7
+ * @LastEditTime: 2022-10-21 14:55:10
8
+ */
9
+const ol = {
10
+  state: {
11
+    map: null
12
+  },
13
+
14
+  mutations: {
15
+    SET_MAP: (state, map) => {
16
+      state.map = map;
17
+    }
18
+  },
19
+  actions:{
20
+    toggleMap({ commit },map) {
21
+      commit('SET_MAP',map)
22
+    },
23
+  }
24
+}
25
+export default ol

+ 601
- 0
oa-ui/src/views/file/index.vue Bestand weergeven

@@ -0,0 +1,601 @@
1
+<!--
2
+ * @Author: wrh
3
+ * @Date: 2024-06-06 13:40:02
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-06-07 16:00:36
6
+-->
7
+<template>
8
+  <div class="warpper-container">
9
+    <!-- 地图 -->
10
+    <div class="map-container" id="maps" tabindex="0" ref="maps"></div>
11
+    <!-- 鼠标移动坐标 -->
12
+    <div id="mouse-position"></div>
13
+    <!-- 项目信息弹出框 -->
14
+    <InfoBox :datas="datas" @closePopup="closePopup" @open="openAchiList"></InfoBox>
15
+    <!-- 工具栏列表 -->
16
+    <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">
23
+        <el-tooltip effect="dark" content="图层" placement="right">
24
+          <div class="layers" @click="layersOpen = !layersOpen"></div>
25
+        </el-tooltip>
26
+      </div>
27
+      <!-- <div class="item">
28
+        <el-tooltip effect="dark" content="矩形框选" placement="right">
29
+          <div class="select" @click="rectSelect()"></div>
30
+        </el-tooltip>
31
+      </div>
32
+      <div class="item">
33
+        <el-tooltip effect="dark" content="多边形框选" placement="right">
34
+          <div class="selectM" @click="polygonSelect()"></div>
35
+        </el-tooltip>
36
+      </div> -->
37
+    </div>
38
+    <!-- 图层显示 -->
39
+    <transition-group appear name="animate__animated animate__bounce" enter-active-class="animate__fadeInLeft"
40
+      leave-active-class="animate__fadeOutLeft">
41
+      <div class="layer-type dialog_wrap" v-if="layersOpen" @mousedown.stop="move">
42
+        <div class="layer-content">
43
+          <div>
44
+            <el-icon class="close" @click="layersOpen = false">
45
+              <CloseBold />
46
+            </el-icon>
47
+          </div>
48
+          <el-tabs v-model="activeName" class="demo-tabs">
49
+            <el-tab-pane label="项目图层" name="first">
50
+              <ProjectLayer :proTree="proTableData"></ProjectLayer>
51
+            </el-tab-pane>
52
+          </el-tabs>
53
+        </div>
54
+      </div>
55
+    </transition-group>
56
+
57
+    <!-- 地图样式 -->
58
+    <div class="switch-map">
59
+      <SwitchMap></SwitchMap>
60
+    </div>
61
+  </div>
62
+</template>
63
+<script>
64
+
65
+import 'ol/ol.css';
66
+import { Map, View } from 'ol';
67
+import { XYZ, Cluster, Vector as VectorSource } from 'ol/source';
68
+import Overlay from 'ol/Overlay';
69
+import TileLayer from 'ol/layer/Tile';
70
+import VectorLayer from 'ol/layer/Vector';
71
+import { MousePosition, defaults as defaultControls } from 'ol/control';
72
+import { boundingExtent } from 'ol/extent';
73
+import { createStringXY } from 'ol/coordinate';
74
+import Feature from 'ol/Feature';
75
+import { Point } from 'ol/geom';
76
+import { Circle, Fill, Stroke, Style, Text } from 'ol/style';
77
+import ProjectLayer from './index/projectLayer.vue';
78
+import SwitchMap from './index/switchMap.vue';
79
+import InfoBox from './index/infoBox.vue';
80
+import { listProject } from "@/api/file/project";
81
+import { getAchievementByProject } from "@/api/file/achievement";
82
+
83
+export default {
84
+  components: {
85
+    ProjectLayer,
86
+    InfoBox,
87
+    SwitchMap
88
+  },
89
+  data() {
90
+    return {
91
+      map: null,
92
+      clusters: null,
93
+      popup: null,
94
+      mousePositionControl: null,
95
+      proTableData: [],
96
+      allproTableData: [],
97
+      layersOpen: false,
98
+      achiDialogData: [],
99
+      dialogTableVisible: false,
100
+      dialogTitle: '',
101
+      viewCenter: [105.55, 34.18],
102
+      datas: {
103
+        clickFeacture: {},
104
+        selectFeatures: null,
105
+        selectProjectNumber: "",
106
+        type: '',
107
+        infoData: {}
108
+      },
109
+      tileLayers: [
110
+        new TileLayer({
111
+          source: new XYZ({
112
+            url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}"
113
+          }),
114
+          properties: {
115
+            name: '高德'
116
+          },
117
+          visible: true
118
+        }),
119
+        new TileLayer({
120
+          source: new XYZ({
121
+            url: "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s,m&gl=CN&x={x}&y={y}&z={z}"
122
+          }),
123
+          properties: {
124
+            name: '谷歌'
125
+          },
126
+          visible: false
127
+        }),
128
+        new TileLayer({
129
+          source: new XYZ({
130
+            url: "http://t4.tianditu.com/DataServer?T=ter_c&tk=4d02670f819130ba862ebc24a1aebaf3&x={x}&y={y}&l={z}"
131
+          }),
132
+          properties: {
133
+            name: '天地图地形'
134
+          },
135
+          visible: false
136
+        }),
137
+        new TileLayer({
138
+          source: new XYZ({
139
+            url: "http://t4.tianditu.com/DataServer?T=vec_w&tk=81b9a9cf3e4be1df181e7bf54c5949fc&x={x}&y={y}&l={z}"
140
+          }),
141
+          properties: {
142
+            name: '矢量图'
143
+          },
144
+          visible: false
145
+        }),
146
+        new TileLayer({
147
+          source: new XYZ({
148
+            url: 'http://t4.tianditu.com/DataServer?T=img_w&tk=4d02670f819130ba862ebc24a1aebaf3&x={x}&y={y}&l={z}'
149
+          }),
150
+          properties: {
151
+            name: '天地图'
152
+          },
153
+          visible: false
154
+        }),
155
+        new TileLayer({
156
+          source: new XYZ({
157
+            url: "https://tiles1.geovisearth.com/base/v1/img/{z}/{x}/{y}?format=webp&tmsIds=w&token=9b56a7bcb2f51c939753bc066fa6d0e7b7f55cfbf1939fa9e04f53050f4154b9"
158
+          }),
159
+          properties: {
160
+            name: '中科星图'
161
+          },
162
+          visible: false
163
+        }),
164
+        new TileLayer({
165
+          source: new XYZ({
166
+            url: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}"
167
+          }),
168
+          properties: {
169
+            name: 'ArcGIS'
170
+          },
171
+          visible: false
172
+        })
173
+      ],
174
+    };
175
+  },
176
+  watch: {
177
+    map: function (newval, oldval) {
178
+      console.log(oldval);
179
+      console.log(newval);
180
+    }
181
+  },
182
+  mounted() {
183
+  },
184
+  created() {
185
+    this.initMap();
186
+    this.getProTableData()
187
+  },
188
+  methods: {
189
+    initMap() {
190
+      const mousePositionControl = new MousePosition({
191
+        coordinateFormat: createStringXY(4),
192
+        projection: 'EPSG:4326',
193
+        className: 'custom-mouse-position',
194
+        target: document.getElementById('mouse-position'),
195
+      });
196
+      this.popup = new Overlay({
197
+        element: document.getElementById('popup'),
198
+        autoPan: {
199
+          animation: {
200
+            duration: 250,
201
+          },
202
+        },
203
+      });
204
+      this.popup.setPosition(undefined);
205
+      this.map = new Map({
206
+        target: document.getElementById('maps'),
207
+        controls: defaultControls().extend([mousePositionControl]),
208
+        overlays: [this.popup],
209
+        layers: this.tileLayers,
210
+        view: new View({
211
+          projection: "EPSG:4326", // 坐标系,有EPSG:4326和EPSG:3857
212
+          center: this.viewCenters, // 中心点
213
+          // zoom: 5, // // 地图缩放级别(打开页面时默认级别)
214
+          // maxZoom: 20,
215
+          // minZoom: 1,  // 地图缩放最小级别
216
+        })
217
+      });
218
+    },
219
+    getProTableData() {
220
+      let param = {
221
+        pageNum: 1,
222
+        pageSize: 10000,
223
+      }
224
+      listProject(param).then(res => {
225
+        let data = res.rows;
226
+        let features = [];
227
+        let datas = [];
228
+        for (let d of data) {
229
+          if (d.kmlLat && d.kmlLng) {
230
+            let f = new Feature(new Point([Number(d.kmlLng), Number(d.kmlLat)]));
231
+            f.name = d.projectNumber;
232
+            features.push(f);
233
+            datas.push(d);
234
+          }
235
+        }
236
+        this.proTableData = datas;
237
+        this.allproTableData = datas;
238
+        let source = new VectorSource({
239
+          features: features,
240
+        });
241
+        let clusterSource = new Cluster({
242
+          distance: 100,     //群集之间的最小距离(以像素为单位)。
243
+          source: source,	   //数据源
244
+        });
245
+        this.clusters = new VectorLayer({
246
+          name: 'clusters',
247
+          source: clusterSource,
248
+          style: this.clusterStyle(features,),
249
+          zIndex: 99
250
+        })
251
+        this.map.addLayer(this.clusters);
252
+        this.map.on('click', (e) => {
253
+          this.clusters.getFeatures(e.pixel).then((clickedFeatures) => {
254
+            if (clickedFeatures.length) {
255
+              // Get clustered Coordinates
256
+              const features = clickedFeatures[0].get('features');
257
+              if (features.length > 1) {
258
+                const extent = boundingExtent(
259
+                  features.map((r) => r.getGeometry().getCoordinates())
260
+                );
261
+                this.map.getView().fit(extent, { duration: 1000, padding: [100, 100, 100, 100] });
262
+              }
263
+            }
264
+          });
265
+        });
266
+      })
267
+    },
268
+
269
+    clusterStyle(feature, resolution) {
270
+      let styleCache = {};
271
+      const size = feature.length;
272
+      let style = styleCache[size];
273
+      if (!style) {
274
+        style = [
275
+          new Style({
276
+            image: new Circle({
277
+              radius: 20,
278
+              fill: new Fill({
279
+                color: 'rgba(107,72,255,0.4)',
280
+              }),
281
+            }),
282
+            text: new Text({
283
+              text: this.getText(feature, resolution),
284
+              backgroundFill: new Fill({
285
+                color: '#000',
286
+              }),
287
+              fill: new Fill({
288
+                color: '#fff',
289
+              }),
290
+              backgroundStroke: new Stroke({
291
+                color: '#EFDC05',
292
+                width: 2,
293
+              }),
294
+              padding: [0, 5, 0, 5],
295
+              // stroke: new Stroke({
296
+              //   color: 'rgba(0, 0, 0, 0.6)',
297
+              //   width: 3,
298
+              // }),
299
+              font: '18px Calibri,sans-serif',
300
+              offsetY: -30
301
+            })
302
+          }),
303
+          new Style({
304
+            image: new Circle({
305
+              radius: 14,
306
+              fill: new Fill({
307
+                color: 'rgba(107,72,255,0.9)',
308
+              }),
309
+            }),
310
+            text: new Text({
311
+              text: size.toString(),
312
+              fill: new Fill({
313
+                color: '#fff',
314
+              }),
315
+              stroke: new Stroke({
316
+                color: 'rgba(0, 0, 0, 0.6)',
317
+                width: 3,
318
+              }),
319
+            })
320
+          })
321
+        ];
322
+        styleCache[size] = style;
323
+      }
324
+      return style;
325
+    },
326
+    getText(feature, resolution) {
327
+      let features = feature;
328
+      let reo = resolution * 100;
329
+      let text;
330
+      if (reo > 2) {
331
+        text = '';
332
+      } else {
333
+        if (features.length == 1) {
334
+          text = features[0].name;
335
+        }
336
+      }
337
+      return text;
338
+    },
339
+    closePopup() {
340
+      this.popup.setPosition(undefined);
341
+    },
342
+    openAchiList() {
343
+      this.dialogTableVisible = true;
344
+      let projectId = this.datas.clickFeacture.id;
345
+      this.dialogTitle = this.datas.clickFeacture.projectNumber
346
+      getAchievementByProject({ projectId }).then(res => {
347
+        if (res.data.length == 0) {
348
+          this.$message.error('暂无成果,请添加!');
349
+          this.achiDialogData = [];
350
+        } else {
351
+          this.dialogTableVisible = true;
352
+          this.achiDialogData = res.data;
353
+        }
354
+      })
355
+    },
356
+
357
+    // 视角复位
358
+    resetView() {
359
+      this.map.getView().setCenter(this.viewCenter);
360
+      this.map.getView().setZoom(5)
361
+    }
362
+  },
363
+};
364
+</script>
365
+<style lang="scss" scoped>
366
+:deep(.el-descriptions__label) {
367
+  font-weight: bold;
368
+}
369
+
370
+:deep(.el-checkbox__label) {
371
+  color: #fff;
372
+}
373
+
374
+:deep(.el-dialog) {
375
+  margin-top: 10vh !important;
376
+}
377
+
378
+.warpper-container {
379
+  position: relative;
380
+}
381
+
382
+.map-container {
383
+  width: 100%;
384
+  height: calc(100vh - 84px);
385
+}
386
+
387
+.layer-type {
388
+  position: absolute;
389
+  top: 67px;
390
+  left: 53px;
391
+  width: 250px;
392
+  padding: 12px 10px;
393
+  background-color: #fff;
394
+  border-radius: 5px;
395
+  cursor: move;
396
+
397
+  .title {
398
+    font-size: 16px;
399
+    text-align: center;
400
+    line-height: 45px;
401
+  }
402
+
403
+  .layer-content {
404
+    cursor: default;
405
+    position: relative;
406
+
407
+    .close {
408
+      position: absolute;
409
+      top: 0px;
410
+      right: 2px;
411
+      z-index: 12;
412
+    }
413
+
414
+    .close:hover {
415
+      color: #409EFF;
416
+      cursor: pointer;
417
+    }
418
+  }
419
+}
420
+
421
+.right-project {
422
+  width: v-bind('theme.width');
423
+  min-height: 800px;
424
+  max-height: calc(100vh - 110px);
425
+  padding: 10px;
426
+  position: absolute;
427
+  top: 10px;
428
+  right: v-bind('theme.right');
429
+  background-color: #fff;
430
+  box-shadow: v-bind(--el - box - shadow - dark);
431
+  transition: all 0.6s ease-in-out;
432
+
433
+  .header {
434
+    width: 100%;
435
+    text-align: center;
436
+    line-height: 50px;
437
+    font-size: 22px;
438
+    font-weight: 700;
439
+  }
440
+
441
+  .expand-info {
442
+    .desLabel {
443
+      font-weight: bold;
444
+    }
445
+
446
+    .look-achi {
447
+      text-align: right;
448
+      color: #409EFF;
449
+      cursor: pointer;
450
+    }
451
+
452
+    .look-achi:hover {
453
+      color: #1165b8;
454
+    }
455
+  }
456
+
457
+  .result-click {
458
+    width: 36px;
459
+    height: 36px;
460
+    position: absolute;
461
+    top: 0;
462
+    left: -36px;
463
+    font-size: 16px;
464
+    transform: translate(0, 0);
465
+    background-color: #fff;
466
+    text-align: center;
467
+    padding: 10px;
468
+    border-radius: 4px 0 0 4px;
469
+    cursor: pointer;
470
+  }
471
+
472
+  .search-box {
473
+    padding: 0px 15px;
474
+  }
475
+}
476
+
477
+.achi-list {
478
+  width: 425px;
479
+  min-height: 300px;
480
+  background-color: #fff;
481
+  position: absolute;
482
+  top: 55px;
483
+  right: 520px;
484
+  padding: 10px;
485
+  border-radius: 4px;
486
+  box-shadow: 0 0 10px rgba($color: #000000, $alpha: 0.5);
487
+  cursor: move;
488
+
489
+  .achi-content {
490
+    cursor: default;
491
+  }
492
+
493
+  .achi-projectNumber {
494
+    padding-left: 20px;
495
+    font-size: 14px;
496
+    font-family: '微软雅黑';
497
+  }
498
+
499
+  .achi-header {
500
+    text-align: center;
501
+    line-height: 40px;
502
+    font-weight: bold;
503
+    font-family: '黑体';
504
+    position: relative;
505
+
506
+    .close {
507
+      position: absolute;
508
+      right: 20px;
509
+      top: 10px;
510
+    }
511
+
512
+    .close:hover {
513
+      color: #409EFF;
514
+      cursor: pointer;
515
+    }
516
+  }
517
+}
518
+
519
+.tool-box {
520
+  position: absolute;
521
+  top: 60px;
522
+  left: 8px;
523
+  width: 50px;
524
+  border-radius: 5px;
525
+  // background-color: #fff;
526
+
527
+  .item {
528
+    margin-top: 10px;
529
+    width: 40px;
530
+    height: 40px;
531
+    padding: 6px;
532
+    background-color: rgba($color: #000000, $alpha: 0.5);
533
+    border-radius: 50%;
534
+    cursor: pointer;
535
+  }
536
+
537
+  .view {
538
+    width: 100%;
539
+    height: 100%;
540
+    background: url('../../assets/images/gis/home.png') no-repeat;
541
+    background-size: contain;
542
+  }
543
+
544
+  .layers {
545
+    width: 100%;
546
+    height: 100%;
547
+    background: url('../../assets/images/gis/layers.png') no-repeat;
548
+    background-size: contain;
549
+  }
550
+
551
+  .select {
552
+    width: 100%;
553
+    height: 100%;
554
+    background: url('../../assets/images/gis/select.png') no-repeat;
555
+    background-size: contain;
556
+  }
557
+
558
+  .selectM {
559
+    width: 100%;
560
+    height: 100%;
561
+    background: url('../../assets/images/gis/selectM.png') no-repeat;
562
+    background-size: contain;
563
+  }
564
+}
565
+
566
+.projectpoint-switch {
567
+  position: absolute;
568
+  top: 10px;
569
+  left: 60px;
570
+  width: 100px;
571
+  height: 50px;
572
+  color: #fff;
573
+}
574
+
575
+.alter-position {
576
+  width: 470px;
577
+  position: absolute;
578
+  left: 50%;
579
+  top: 10px;
580
+  transform: translate(-50%, 0);
581
+}
582
+
583
+.switch-map {
584
+  position: absolute;
585
+  bottom: 0;
586
+  left: 0;
587
+}
588
+
589
+/* 鼠标移动,坐标样式 */
590
+#mouse-position {
591
+  width: 220px;
592
+  height: 40px;
593
+  line-height: 40px;
594
+  position: absolute;
595
+  top: 0px;
596
+  left: 50%;
597
+  transform: translate(-50%, 0%);
598
+  padding-left: 15px;
599
+  color: #fff;
600
+}
601
+</style>

+ 135
- 0
oa-ui/src/views/file/index/infoBox.vue Bestand weergeven

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

+ 286
- 0
oa-ui/src/views/file/index/projectLayer.vue Bestand weergeven

@@ -0,0 +1,286 @@
1
+<!--
2
+ * @Descripttion: 
3
+ * @version: 
4
+ * @Author: ysh
5
+ * @Date: 2022-10-20 17:27:09
6
+ * @LastEditors: wrh
7
+ * @LastEditTime: 2024-06-07 09:04:52
8
+-->
9
+<template>
10
+  <div class="layer-box">
11
+    <div class="checkList">
12
+      <el-checkbox-group v-model="checkList">
13
+        <el-checkbox label="范围" @change="checkedRange" />
14
+        <el-checkbox label="控制点" @change="checkedCp" />
15
+      </el-checkbox-group>
16
+    </div>
17
+    <div style="margin-top: 10px;">
18
+      <!-- <el-button @click="handleExpand">展开/折叠</el-button> -->
19
+      <el-button @click="handleAllSelect">全选</el-button>
20
+      <el-button @click="handleCancelSelect">全不选</el-button>
21
+    </div>
22
+    <div style="margin-top: 10px;">
23
+      <el-input v-model="filterInput" class="w-50 m-2" placeholder="请输入项目编号" @keyup.enter="handleFilterNode">
24
+        <template #append>
25
+          <el-button icon="Search" @click="handleFilterNode"></el-button>
26
+        </template>
27
+      </el-input>
28
+    </div>
29
+    <el-scrollbar height="400px">
30
+      <el-tree :data="treeDatas" :props="defaultProps" node-key="id" show-checkbox ref="projectTree"
31
+        :default-checked-keys="selectedNodeKey" @check-change="handleCheckChange" default-expand-all
32
+        @node-click="handleNodeClick" highlight-current :filter-node-method="filterNode" />
33
+    </el-scrollbar>
34
+  </div>
35
+</template>
36
+
37
+<script>
38
+import sjx from '@/assets/images/gis/sjd-active.png';
39
+import { listProject, getProjectKml } from "@/api/file/project";
40
+// ------------------------------------------------ol--------------------------------------------------------------------//
41
+import 'ol/ol.css'
42
+import { Map, View } from 'ol';
43
+import KML from 'ol/format/KML';
44
+import Overlay from 'ol/Overlay';
45
+import Feature from 'ol/Feature';
46
+import { toLonLat } from 'ol/proj';
47
+import TileLayer from 'ol/layer/Tile';
48
+import { Select } from "ol/interaction";
49
+import VectorLayer from 'ol/layer/Vector';
50
+import { boundingExtent } from 'ol/extent';
51
+import { Cluster, Vector as VectorSource, XYZ } from 'ol/source';
52
+import { Point, Polygon, MultiPolygon, MultiLineString } from 'ol/geom';
53
+import { toStringXY, createStringXY, toStringHDMS } from 'ol/coordinate';
54
+import { Circle, Fill, Stroke, Style, RegularShape, Icon, Text } from 'ol/style';
55
+import { MousePosition, ScaleLine, defaults as defaultControls } from 'ol/control';
56
+import { linear, easeIn } from 'ol/easing';
57
+// --------------------------------------------------------------------------------------------------------------------//
58
+
59
+export default {
60
+  props: {
61
+    proTree: {
62
+      type: Array,
63
+      required: true
64
+    },
65
+  },
66
+  data() {
67
+    return {
68
+      kmlPath: process.env.VUE_APP_BASE_API,
69
+      treeDatas: [],
70
+      selectedNodeKey: [],
71
+      allNodeKey: [],
72
+      checkList: ['范围', '控制点'],
73
+      filterInput: '',
74
+      defaultProps: { label: 'name', children: 'children' }
75
+    };
76
+  },
77
+  mounted() {
78
+    this.initTree();
79
+  },
80
+  methods: {
81
+    initTree() {
82
+      let param = {
83
+        pageNum: 1,
84
+        pageSize: 99999999
85
+      }
86
+      listProject(param).then(res => {
87
+        if (res.code == 200) {
88
+          let alldata = res.rows;
89
+          let tree = [];
90
+          for (let d of alldata) {
91
+            if (d.kmlLat && d.kmlLng) {
92
+              tree.push(d);
93
+            }
94
+          }
95
+          let list = [];
96
+          let selectList = [];
97
+          for (let t of tree) {
98
+            let kmlUrl = this.kmlPath + "/profile/" + t.projectKml;
99
+            let cpUrl = this.kmlPath + "/profile/" + t.projectCp;
100
+            let obj = {};
101
+            obj.id = t.projectNumber;
102
+            obj.name = t.projectNumber + '-' + t.projectName;
103
+            let color = 'rgba(' + parseInt(Math.random() * 255) + ',' + parseInt(Math.random() * 255) + ',' + parseInt(Math.random() * 255) + ',0.8)';
104
+            obj.range = new VectorLayer({
105
+              title: t.projectNumber,
106
+              style: new Style({
107
+                // fill: new Fill({
108
+                //   color: color,
109
+                // }),
110
+                stroke: new Stroke({
111
+                  color: '#30A9DE',
112
+                  width: 3
113
+                })
114
+              }),
115
+              source: new VectorSource({
116
+                url: kmlUrl,
117
+                format: new KML({
118
+                  extractStyles: false
119
+                }),
120
+                projection: 'EPSG:4326'
121
+              })
122
+            });
123
+            obj.cp = new VectorLayer({
124
+              title: t.projectNumber,
125
+              // style: new Style({
126
+              //   image: new Icon({
127
+              //     src: sjx,
128
+              //     crossOrigin: 'anonymous',
129
+              //   }),
130
+              //   fill: new Fill({
131
+              //     color: '#30A9DE',
132
+              //   })
133
+              // }),
134
+              style: this.cpStyle(obj),
135
+              source: new VectorSource({
136
+                url: cpUrl,
137
+                format: new KML({
138
+                  extractStyles: false,
139
+                  writeStyles: true,
140
+                  showPointNames: true
141
+                }),
142
+                projection: 'EPSG:4326'
143
+              })
144
+            });
145
+            selectList.push(obj.id);
146
+            obj.range.setVisible(false);
147
+            obj.cp.setVisible(false);
148
+            this.$store.getters.map.addLayer(obj.range);
149
+            this.$store.getters.map.addLayer(obj.cp);
150
+            list.push(obj);
151
+            // this.$refs.projectTree.setCheckedKeys(selectList);
152
+          }
153
+          this.treeDatas = list;
154
+          this.allNodeKey = selectList;
155
+        }
156
+      })
157
+    },
158
+    /* 全选 */
159
+    handleAllSelect() {
160
+      this.$refs.projectTree.setCheckedKeys(this.allNodeKey);
161
+    },
162
+    /* 全不选 */
163
+    handleCancelSelect() {
164
+      this.$refs.projectTree.setCheckedKeys([]);
165
+    },
166
+    // 筛选
167
+    filterNode(value, data) {
168
+      if (!value)
169
+        return true
170
+      return data.name.includes(value)
171
+    },
172
+    // 触发筛选
173
+    handleFilterNode() {
174
+      this.$refs.projectTree.filter(filterInput.value)
175
+    },
176
+    handleCheckChange(data, checked, indeterminate) {
177
+      if (this.checkList.indexOf('范围') != -1) {
178
+        data.range.setVisible(checked);
179
+      } else {
180
+        data.range.setVisible(false);
181
+      }
182
+      if (this.checkList.indexOf('控制点') != -1) {
183
+        data.cp.setVisible(checked);
184
+      } else {
185
+        data.cp.setVisible(false);
186
+      }
187
+    },
188
+    handleNodeClick(nodeObj) {
189
+      let checkedKeys = this.$refs.projectTree.getCheckedKeys();
190
+      let currentKey = this.$refs.projectTree.getCurrentKey();
191
+      if (checkedKeys.includes(currentKey)) {
192
+        let view = this.$store.getters.map.getView();
193
+        let source = nodeObj.range.getSource();
194
+        view.fit(source.getExtent());
195
+      } else {
196
+        checkedKeys.push(currentKey);
197
+        this.$refs.projectTree.setCheckedKeys(checkedKeys);
198
+        setTimeout(() => {
199
+          let view = this.$store.getters.map.getView();
200
+          let source = nodeObj.range.getSource();
201
+          view.fit(source.getExtent());
202
+        }, 200);
203
+      }
204
+    },
205
+    checkedRange(val) {
206
+      let datas = this.$refs.projectTree.getCheckedNodes();
207
+      for (let d of datas) {
208
+        d.range.setVisible(val);
209
+      }
210
+    },
211
+    checkedCp(val) {
212
+      let datas = this.$refs.projectTree.getCheckedNodes();
213
+      for (let d of datas) {
214
+        d.cp.setVisible(val);
215
+      }
216
+    },
217
+    cpStyle(obj) {
218
+      let feature = obj[0];
219
+      let resolution = obj[1];
220
+      let style = new Style({
221
+        image: new Icon({
222
+          src: sjx,
223
+          crossOrigin: 'anonymous',
224
+        }),
225
+        fill: new Fill({
226
+          color: '#30A9DE',
227
+        }),
228
+        text: new Text({
229
+          text: this.getText(feature, resolution),
230
+          font: '14px sans-serif',
231
+          textAlign: 'center',
232
+          textBaseline: 'middle',
233
+          justify: 'center',
234
+          // backgroundFill: new Fill({
235
+          //   color: '#fff',
236
+          // }),
237
+          stroke: new Stroke({
238
+            color: '#F9F871',
239
+            width: 2
240
+          }),
241
+          offsetY: -30,
242
+          padding: [1, 1, 1, 1]
243
+        })
244
+      });
245
+      return style
246
+    },
247
+    /* 根据缩放决定text是否显示 */
248
+    getText(feature, resolution) {
249
+      let reo = resolution * 100;
250
+      let text;
251
+      if (reo > 2) {
252
+        text = '';
253
+      } else {
254
+        text = feature.values_.name;
255
+      }
256
+      return text;
257
+    },
258
+  },
259
+}
260
+</script>
261
+
262
+<style lang="scss" scoped>
263
+.checkList {
264
+  display: flex;
265
+  text-align: center;
266
+  justify-content: center;
267
+  border: 1px dashed #bccfec;
268
+}
269
+
270
+:deep(.el-checkbox__label) {
271
+  color: var(--el-tree-text-color) !important;
272
+}
273
+
274
+:deep(.el-tree-node) {
275
+  white-space: normal;
276
+}
277
+
278
+:deep(.el-tree-node__content) {
279
+  height: 100%;
280
+  align-items: baseline;
281
+}
282
+
283
+:deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content) {
284
+  background-color: #bccfec !important;
285
+}
286
+</style>

+ 190
- 0
oa-ui/src/views/file/index/switchMap.vue Bestand weergeven

@@ -0,0 +1,190 @@
1
+<!--
2
+ * @Descripttion: 
3
+ * @version: 
4
+ * @Author: ysh
5
+ * @Date: 2023-06-02 14:13:06
6
+ * @LastEditors: wrh
7
+ * @LastEditTime: 2024-06-07 11:47:21
8
+-->
9
+<template>
10
+  <div class="map-box">
11
+    <div class="open-box" v-if="isClose" @click="closeSwitch">
12
+      <i class="el-icon-d-arrow-right"></i>
13
+    </div>
14
+    <div class="close-box"  @click="closeSwitch">
15
+      <i class="el-icon-d-arrow-left"></i>
16
+    </div>
17
+    <el-tooltip class="box-item" effect="dark" content="高德" placement="top">
18
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('高德')">
19
+      </div>
20
+    </el-tooltip>
21
+    <el-tooltip class="box-item" effect="dark" content="谷歌" placement="top">
22
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('谷歌')">
23
+      </div>
24
+    </el-tooltip>
25
+    <el-tooltip class="box-item" effect="dark" content="天地图" placement="top">
26
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('天地图')">
27
+      </div>
28
+    </el-tooltip>
29
+    <el-tooltip class="box-item" effect="dark" content="中科星图" placement="top">
30
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('中科星图')">
31
+      </div>
32
+    </el-tooltip>
33
+    <el-tooltip class="box-item" effect="dark" content="ArcGIS" placement="top">
34
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('ArcGIS')">
35
+      </div>
36
+    </el-tooltip>
37
+    <el-tooltip class="box-item" effect="dark" content="天地图地形" placement="top">
38
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('天地图地形')">
39
+      </div>
40
+    </el-tooltip>
41
+    <el-tooltip class="box-item" effect="dark" content="矢量图" placement="top">
42
+      <div class="box-item" :class="{ close: isClose }" @click="translateMapBox('矢量图')">
43
+      </div>
44
+    </el-tooltip>
45
+  </div>
46
+</template>
47
+
48
+<script>
49
+import TileLayer from 'ol/layer/Tile';
50
+
51
+export default {
52
+  data() {
53
+    return {
54
+      isClose: true,
55
+    };
56
+  },
57
+  mounted() {
58
+  },
59
+  methods: {
60
+    translateMapBox(type) {
61
+      let layers = this.$store.getters.map.getAllLayers();
62
+      for (let layer of layers) {
63
+        if (layer instanceof TileLayer) {
64
+          layer.setVisible(false);
65
+          let name = layer.getProperties().name;
66
+          if (name == "标注") {
67
+            layer.setVisible(true);
68
+          }
69
+          if (name == type) {
70
+            if (type == '高德') {
71
+              layer.setVisible(true);
72
+            } else if (type == '天地图') {
73
+              layer.setVisible(true);
74
+            } else if (type == '中科星图') {
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);
84
+            }
85
+          }
86
+        }
87
+      }
88
+    },
89
+    closeSwitch() {
90
+      this.isClose = !this.isClose;
91
+    }
92
+  },
93
+}
94
+
95
+</script>
96
+
97
+<style lang="scss" scoped>
98
+.map-box {
99
+  display: flex;
100
+  position: relative;
101
+
102
+  .box-item {
103
+    width: 100px;
104
+    height: 100px;
105
+    margin: 0px 3px;
106
+    border: 1px solid #000;
107
+    cursor: pointer;
108
+  }
109
+}
110
+
111
+.open-box {
112
+  color: #fff;
113
+  position: absolute;
114
+  font-size: 26px;
115
+  right: -132px;
116
+  top: -100px;
117
+  height: 99px;
118
+  line-height: 99px;
119
+  border-radius: 0 3px 3px 0;
120
+  cursor: pointer;
121
+  background-color: rgba($color: #000000, $alpha: 0.5);
122
+  z-index: 13px;
123
+}
124
+
125
+.close-box {
126
+  color: #fff;
127
+  position: absolute;
128
+  font-size: 26px;
129
+  right: -26px;
130
+  top: 1px;
131
+  height: 99px;
132
+  line-height: 99px;
133
+  border-radius: 0 3px 3px 0;
134
+  cursor: pointer;
135
+  background-color: rgba($color: #000000, $alpha: 0.5);
136
+}
137
+
138
+
139
+.box-item:hover {
140
+  border: 2px solid #fff;
141
+}
142
+
143
+.close {
144
+  position: absolute;
145
+  left: 0;
146
+  bottom: 0;
147
+}
148
+
149
+.box-item:nth-child(2) {
150
+  background-image: url('../../../assets/images/gis/高德.png');
151
+  background-size: 100% 100%;
152
+  z-index: 11;
153
+}
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
+}
160
+
161
+.box-item:nth-child(4) {
162
+  background-image: url('../../../assets/images/gis/天地图.png');
163
+  background-size: 100% 100%;
164
+  z-index: 9;
165
+}
166
+
167
+.box-item:nth-child(5) {
168
+  background-image: url('../../../assets/images/gis/中科星图影像.png');
169
+  background-size: 100% 100%;
170
+  z-index: 8;
171
+}
172
+
173
+.box-item:nth-child(6) {
174
+  background-image: url('../../../assets/images/gis/ArcGIS.png');
175
+  background-size: 100% 100%;
176
+  z-index: 7;
177
+}
178
+
179
+.box-item:nth-child(7) {
180
+  background-image: url('../../../assets/images/gis/天地图地形图.png');
181
+  background-size: 100% 100%;
182
+  z-index: 7;
183
+}
184
+
185
+.box-item:nth-child(8) {
186
+  background-image: url('../../../assets/images/gis/矢量图.png');
187
+  background-size: 100% 100%;
188
+  z-index: 7;
189
+}
190
+</style>

+ 6
- 6
oa-ui/src/views/oa/brand/brandProject.vue Bestand weergeven

@@ -95,7 +95,7 @@
95 95
           icon="el-icon-plus"
96 96
           size="mini"
97 97
           @click="handleAdd"
98
-          v-hasPermi="['oa:brandProject:add']"
98
+          v-hasPermi="['oa:brand:add']"
99 99
         >新增</el-button>
100 100
       </el-col>
101 101
       <el-col :span="1.5">
@@ -106,7 +106,7 @@
106 106
           size="mini"
107 107
           :disabled="single"
108 108
           @click="handleUpdate"
109
-          v-hasPermi="['oa:brandProject:edit']"
109
+          v-hasPermi="['oa:brand:edit']"
110 110
         >修改</el-button>
111 111
       </el-col>
112 112
       <el-col :span="1.5">
@@ -117,7 +117,7 @@
117 117
           size="mini"
118 118
           :disabled="multiple"
119 119
           @click="handleDelete"
120
-          v-hasPermi="['oa:brandProject:remove']"
120
+          v-hasPermi="['oa:brand:remove']"
121 121
         >删除</el-button>
122 122
       </el-col>
123 123
       <el-col :span="1.5">
@@ -127,7 +127,7 @@
127 127
           icon="el-icon-download"
128 128
           size="mini"
129 129
           @click="handleExport"
130
-          v-hasPermi="['oa:brandProject:export']"
130
+          v-hasPermi="['oa:brand:export']"
131 131
         >导出</el-button>
132 132
       </el-col>
133 133
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -154,14 +154,14 @@
154 154
             type="text"
155 155
             icon="el-icon-edit"
156 156
             @click="handleUpdate(scope.row)"
157
-            v-hasPermi="['oa:brandProject:edit']"
157
+            v-hasPermi="['oa:brand:edit']"
158 158
           >修改</el-button>
159 159
           <el-button
160 160
             size="mini"
161 161
             type="text"
162 162
             icon="el-icon-delete"
163 163
             @click="handleDelete(scope.row)"
164
-            v-hasPermi="['oa:brandProject:remove']"
164
+            v-hasPermi="['oa:brand:remove']"
165 165
           >删除</el-button>
166 166
         </template>
167 167
       </el-table-column>

Laden…
Annuleren
Opslaan