diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssCalcDataController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssCalcDataController.java index b9f1b892..0ee0e92c 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssCalcDataController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssCalcDataController.java @@ -113,6 +113,7 @@ public class GnssCalcDataController extends BasicController implements CommonExc @Override public String tenantIdField() { - return "d.tenantid"; + if(isJoinQuery) return "d.tenantid"; + else return "tenantid"; } } diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/UserController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/UserController.java index 69b367dc..b16c7d64 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/UserController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/UserController.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.imdroid.beidou.common.HttpResult; +import com.imdroid.beidou.common.Role; import com.imdroid.beidou.entity.Tenant; import com.imdroid.beidou.entity.TenantMapper; import com.imdroid.beidou.entity.User; @@ -42,8 +43,9 @@ public class UserController extends BasicController { @RequestMapping("/sys/user/add") public String addUser(Model m, HttpSession session){ initModel(m, session); - - List tenants = tenantMapper.selectList(null); + QueryWrapper queryWrapper = new QueryWrapper<>(); + if(loginRole.equals(Role.ADMIN)) queryWrapper.ne("id",Tenant.SAAS_PROVIDER_ID); + List tenants = tenantMapper.selectList(queryWrapper); m.addAttribute("tenant_list", tenants); return "/page/table/user_add"; @@ -52,7 +54,10 @@ public class UserController extends BasicController { @RequestMapping("/sys/user/edit") public String editUser(Model m, HttpSession session){ initModel(m, session); - List tenants = tenantMapper.selectList(null); + QueryWrapper queryWrapper = new QueryWrapper<>(); + if(loginRole.equals(Role.ADMIN)) queryWrapper.ne("id",Tenant.SAAS_PROVIDER_ID); + List tenants = tenantMapper.selectList(queryWrapper); + m.addAttribute("tenant_list", tenants); return "/page/table/user_add"; } @@ -63,6 +68,7 @@ public class UserController extends BasicController { public JSONObject list(HttpSession session, int page, int limit, String searchParams) { Page pageable = new Page<>(page, limit); QueryWrapper queryWrapper = new QueryWrapper<>(); + if(loginRole.equals(Role.ADMIN)) queryWrapper.ne("role",Role.SUPER_ADMIN); IPage cs = userMapper.selectPage(pageable, queryWrapper); diff --git a/sec-beidou/src/main/resources/static/api/init_enterprise.json b/sec-beidou/src/main/resources/static/api/init_enterprise.json index 9686ace0..979b2ba1 100644 --- a/sec-beidou/src/main/resources/static/api/init_enterprise.json +++ b/sec-beidou/src/main/resources/static/api/init_enterprise.json @@ -4,7 +4,7 @@ "href": "page/device_overview" }, "logoInfo": { - "title": "形变监测平台", + "title": "北斗管理平台", "image": "images/logo.png", "href": "" }, @@ -53,12 +53,6 @@ "icon": "fa fa-gear", "target": "_self", "child": [ - { - "title": "通用参数", - "href": "page/gnss_group_cfg", - "icon": "fa fa-minus", - "target": "_self" - }, { "title": "设备参数", "href": "page/gnss_dev_cfg", @@ -78,24 +72,16 @@ "href": "page/fwd_records", "icon": "fa fa-minus", "target": "_self" + }, + { + "title": "等待推送", + "href": "page/resend_records", + "icon": "fa fa-minus", + "target": "_self" } ] } ] - }, - { - "title": "系统管理", - "icon": "fa fa-lemon-o", - "href": "", - "target": "_self", - "child": [ - { - "title": "操作日志", - "href": "", - "icon": "fa fa-pencil-square-o", - "target": "_self" - } - ] } ] } \ No newline at end of file diff --git a/sec-beidou/src/main/resources/static/api/init.json b/sec-beidou/src/main/resources/static/api/init_super_admin.json similarity index 95% rename from sec-beidou/src/main/resources/static/api/init.json rename to sec-beidou/src/main/resources/static/api/init_super_admin.json index 2b8372f9..424c3567 100644 --- a/sec-beidou/src/main/resources/static/api/init.json +++ b/sec-beidou/src/main/resources/static/api/init_super_admin.json @@ -4,7 +4,7 @@ "href": "page/device_overview" }, "logoInfo": { - "title": "形变监测平台", + "title": "北斗管理平台", "image": "images/logo.png", "href": "" }, @@ -156,12 +156,6 @@ "href": "sys/user", "icon": "fa fa-user", "target": "_self" - }, - { - "title": "操作日志", - "href": "", - "icon": "fa fa-pencil-square-o", - "target": "_self" } ] } diff --git a/sec-beidou/src/main/resources/static/api/init_sys_admin.json b/sec-beidou/src/main/resources/static/api/init_sys_admin.json new file mode 100644 index 00000000..f91a0dd1 --- /dev/null +++ b/sec-beidou/src/main/resources/static/api/init_sys_admin.json @@ -0,0 +1,133 @@ +{ + "homeInfo": { + "title": "首页", + "href": "page/device_overview" + }, + "logoInfo": { + "title": "北斗管理平台", + "image": "images/logo.png", + "href": "" + }, + "menuInfo": [ + { + "title": "设备管理", + "icon": "fa fa-address-book", + "href": "", + "target": "_self", + "child": [ + { + "title": "设备总览", + "href": "page/device_overview", + "icon": "fa fa-home", + "target": "_self" + }, + { + "title": "运行状态", + "href": "page/gnss_status", + "icon": "fa fa-tachometer", + "target": "_self" + }, + { + "title": "告警管理", + "href": "", + "icon": "fa fa-bell-o", + "target": "", + "child": [ + { + "title": "告警消息", + "href": "page/warning", + "icon": "fa fa-minus", + "target": "_self" + }, + { + "title": "告警参数", + "href": "page/warning_cfg", + "icon": "fa fa-minus", + "target": "_self" + } + ] + }, + { + "title": "解算结果", + "href": "page/gnss_data_calc", + "icon": "fa fa-calculator", + "target": "_self" + }, + { + "title": "配置管理", + "href": "", + "icon": "fa fa-gear", + "target": "_self", + "child": [ + { + "title": "通用参数", + "href": "page/gnss_group_cfg", + "icon": "fa fa-minus", + "target": "_self" + }, + { + "title": "设备参数", + "href": "page/gnss_dev_cfg", + "icon": "fa fa-minus", + "target": "_self" + } + ] + }, + { + "title": "设备消息", + "href": "", + "icon": "fa fa-file-text-o", + "target": "_self", + "child": [ + { + "title": "状态消息", + "href": "page/gnss_msg_status", + "icon": "fa fa-minus", + "target": "_self" + }, + { + "title": "统计消息", + "href": "page/gnss_msg_trx", + "icon": "fa fa-minus", + "target": "_self" + } + ] + }, + { + "title": "数据推送", + "href": "", + "icon": "fa fa-send-o", + "target": "_self", + "child": [ + { + "title": "推送记录", + "href": "page/fwd_records", + "icon": "fa fa-minus", + "target": "_self" + }, + { + "title": "等待推送", + "href": "page/resend_records", + "icon": "fa fa-minus", + "target": "_self" + } + ] + } + ] + }, + { + "title": "系统管理", + "icon": "fa fa-lemon-o", + "href": "", + "target": "_self", + "child": [ + { + "title": "用户管理", + "href": "sys/user", + "icon": "fa fa-user", + "target": "_self" + } + ] + } + ] +} \ No newline at end of file diff --git a/sec-beidou/src/main/resources/templates/index.html b/sec-beidou/src/main/resources/templates/index.html index 3fe977d9..5208eefa 100644 --- a/sec-beidou/src/main/resources/templates/index.html +++ b/sec-beidou/src/main/resources/templates/index.html @@ -131,8 +131,11 @@ miniAdmin = layui.miniAdmin; var nav_url; - if([[${role}]] == "SUPER_ADMIN" || [[${role}]] == "ADMIN") { - nav_url = "api/init.json"; + if([[${role}]] == "SUPER_ADMIN" ) { + nav_url = "api/init_super_admin.json"; + } + else if([[${role}]] == "ADMIN") { + nav_url = "api/init_sys_admin.json"; } else { nav_url = "api/init_enterprise.json" diff --git a/sec-beidou/src/main/resources/templates/page/gnss_data_calc.html b/sec-beidou/src/main/resources/templates/page/gnss_data_calc.html index e5560a35..bfd90896 100644 --- a/sec-beidou/src/main/resources/templates/page/gnss_data_calc.html +++ b/sec-beidou/src/main/resources/templates/page/gnss_data_calc.html @@ -89,9 +89,9 @@ {field: 'b562e', title: '原始东', templet: "
{{d.b562e.toFixed(2)}}
"}, {field: 'b562n', title: '原始北', templet: "
{{d.b562n.toFixed(2)}}
"}, {field: 'b562d', title: '原始天', templet: "
{{d.b562d.toFixed(2)}}
"}, - {field: 'rpose', title: '相对东', templet: "
{{d.rpose==null?'':d.rpose.toFixed(2)}}
"}, - {field: 'rposn', title: '相对北', templet: "
{{d.rposn==null?'':d.rposn.toFixed(2)}}
"}, - {field: 'rposd', title: '相对天', templet: "
{{d.rposd==null?'':d.rposd.toFixed(2)}}
"}, + {field: 'rpose', title: '滤波东', templet: "
{{d.rpose==null?'':d.rpose.toFixed(2)}}
"}, + {field: 'rposn', title: '滤波北', templet: "
{{d.rposn==null?'':d.rposn.toFixed(2)}}
"}, + {field: 'rposd', title: '滤波天', templet: "
{{d.rposd==null?'':d.rposd.toFixed(2)}}
"}, //{field: 'auxe', title: '辅助东', templet: "
{{d.auxe==null?'':d.auxe.toFixed(2)}}
"}, //{field: 'auxn', title: '辅助北', templet: "
{{d.auxn==null?'':d.auxn.toFixed(2)}}
"}, //{field: 'auxd', title: '辅助天', templet: "
{{d.auxd==null?'':d.auxd.toFixed(2)}}
"}, diff --git a/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html b/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html index 73e39429..8c2a5a33 100644 --- a/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html +++ b/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html @@ -88,7 +88,7 @@ {field: 'deviceid', title: '设备号', sort: true}, {field: 'name', title: '设备名称'}, {field: 'devicetype', title: '类型',templet: '#typeTrans'}, - {field: 'parentid', title: '父设备号', sort: true}, + {field: 'parentid', title: '基站编号', sort: true}, {field: 'tenantname', title: '所属组织'}, {field: 'project_id', title: '项目号', sort: true}, {field: 'group_id', title: '基本参数组', sort: true}, @@ -99,9 +99,8 @@ {field: 'syn', title: '参数同步',templet: '#synTrans'}, {title: '操作', toolbar: '#currentTableBar', align: "center", minWidth: 120} ]; - if([[${role}]] != "ADMIN" && [[${role}]] != "SUPER_ADMIN" && - !([[${role}]] == "MANAGER" && [[${tenant_id}]] == 0)) { - cfg_cols[9].hide = true; + if([[${role}]] == "USER") { + cfg_cols[12].hide = true; } /** * 初始化表单,要加上,不然刷新部分组件可能会不加载 diff --git a/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html b/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html index f398ac66..9a988cf8 100644 --- a/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html +++ b/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html @@ -42,7 +42,7 @@
- +
@@ -83,7 +83,7 @@
-
+
@@ -114,7 +114,7 @@
-
+
- - + +