Commit b352a552 authored by 赵啸非's avatar 赵啸非

修改前端页面与后台部分服务

parent a06f95be
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="" vcs="Git" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -29,7 +29,8 @@ CREATE TABLE `mortals_xhx_menu` ( ...@@ -29,7 +29,8 @@ CREATE TABLE `mortals_xhx_menu` (
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
`url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '连接地址', `url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '连接地址',
`parentId` bigint(20) NULL DEFAULT NULL COMMENT '父菜单ID,一级菜单的该字段值为-1', `parentId` bigint(20) NULL DEFAULT NULL COMMENT '父菜单ID,一级菜单的该字段值为-1',
`orderId` int(11) NULL DEFAULT NULL COMMENT '排序编号', `ancestors` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`orderId` int(9) NULL DEFAULT NULL COMMENT '排序编号',
`status` tinyint(2) NULL DEFAULT 1 COMMENT '菜单状态,0:禁用,1:启用,默认1', `status` tinyint(2) NULL DEFAULT 1 COMMENT '菜单状态,0:禁用,1:启用,默认1',
`linkType` tinyint(2) NULL DEFAULT 0 COMMENT '链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0', `linkType` tinyint(2) NULL DEFAULT 0 COMMENT '链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0',
`groupId` int(11) NULL DEFAULT 1 COMMENT '分组编号,使用菜单分隔符按该值分隔,默认1', `groupId` int(11) NULL DEFAULT 1 COMMENT '分组编号,使用菜单分隔符按该值分隔,默认1',
...@@ -49,16 +50,16 @@ CREATE TABLE `mortals_xhx_menu` ( ...@@ -49,16 +50,16 @@ CREATE TABLE `mortals_xhx_menu` (
-- ---------------------------- -- ----------------------------
-- Records of mortals_xhx_menu -- Records of mortals_xhx_menu
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (91, '系统管理', '', 0, 9999, 1, 0, 0, NULL, 'setting', '', '', 0, 0, 3, NULL, NULL, ''); INSERT INTO `mortals_xhx_menu` VALUES (91, '系统管理', '', 0,'', 9999, 1, 0, 0, NULL, 'setting', '', '', 0, 0, 3, NULL, NULL, '');
INSERT INTO `mortals_xhx_menu` VALUES (108, '区域信息', '/area/list', 91, 65, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (108, '区域信息', '/area/list', 91,'', 65, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9001, '主页', '/index', 90, 10, 1, 0, 1, NULL, '', NULL, NULL, 0, 0, 3, '2019-02-19 16:08:09', 1, 'admin'); INSERT INTO `mortals_xhx_menu` VALUES (9001, '主页', '/index', 90,'', 10, 1, 0, 1, NULL, '', NULL, NULL, 0, 0, 3, '2019-02-19 16:08:09', 1, 'admin');
INSERT INTO `mortals_xhx_menu` VALUES (9101, '用户信息', '/user/list', 91, 10, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9101, '用户信息', '/user/list', 91,'', 10, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9102, '角色信息', '/role/list', 91, 20, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9102, '角色信息', '/role/list', 91,'', 20, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9103, '资源信息', '/resource/list', 91, 30, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9103, '资源信息', '/resource/list', 91,'', 30, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9104, '菜单信息', '/menu/list', 91, 40, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9104, '菜单信息', '/menu/list', 91,'', 40, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9105, '参数信息', '/param/list', 91, 50, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9105, '参数信息', '/param/list', 91,'', 50, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9106, '任务信息', '/task/list', 91, 60, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9106, '任务信息', '/task/list', 91,'', 60, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9107, '操作日志', '/oper/log/list', 91, 70, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9107, '操作日志', '/oper/log/list', 91,'', 70, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
......
-- ---------------------------- -- ----------------------------
-- 人员发现记录菜单 SQL -- 人员发现记录菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '人员发现记录', '/realtime/dataflow/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '人员发现记录', '/realtime/dataflow/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 人员发现记录资源路径 SQL -- 人员发现记录资源路径 SQL
...@@ -17,7 +17,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否预约', 'RealtimeDataflow' ...@@ -17,7 +17,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否预约', 'RealtimeDataflow'
-- ---------------------------- -- ----------------------------
-- 预约签到记录菜单 SQL -- 预约签到记录菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约签到记录', '/appointment/records/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约签到记录', '/appointment/records/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约签到记录资源路径 SQL -- 预约签到记录资源路径 SQL
...@@ -33,7 +33,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '签到方式', 'AppointmentRecord ...@@ -33,7 +33,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '签到方式', 'AppointmentRecord
-- ---------------------------- -- ----------------------------
-- 预约关怀记录菜单 SQL -- 预约关怀记录菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约关怀记录', '/care/records/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约关怀记录', '/care/records/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约关怀记录资源路径 SQL -- 预约关怀记录资源路径 SQL
...@@ -44,13 +44,13 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约关怀记录-菜单管 ...@@ -44,13 +44,13 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约关怀记录-菜单管
-- ---------------------------- -- ----------------------------
-- 预约关怀记录参数 SQL -- 预约关怀记录参数 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '排队中.排队中', '排队中.排队中', 1, 4, 0, 'processStatus', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '排队中', '排队中', 1, 4, 0, 'processStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '办理中.办理中', '办理中.办理中', 1, 4, 0, 'processStatus', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '办理中', '办理中', 1, 4, 0, 'processStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '接件结束.接件结束', '接件结束.接件结束', 1, 4, 0, 'processStatus', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '接件结束', '接件结束', 1, 4, 0, 'processStatus', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置菜单 SQL -- 预约自动签到配置菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置', '/appointment/config/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置', '/appointment/config/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置资源路径 SQL -- 预约自动签到配置资源路径 SQL
...@@ -80,7 +80,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'Appointment ...@@ -80,7 +80,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'Appointment
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置时间段菜单 SQL -- 预约自动签到配置时间段菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置时间段', '/appointment/config/times/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置时间段', '/appointment/config/times/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置时间段资源路径 SQL -- 预约自动签到配置时间段资源路径 SQL
...@@ -94,7 +94,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约自动签到配置时间 ...@@ -94,7 +94,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约自动签到配置时间
-- ---------------------------- -- ----------------------------
-- 主动关怀配置菜单 SQL -- 主动关怀配置菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀配置', '/care/config/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀配置', '/care/config/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀配置资源路径 SQL -- 主动关怀配置资源路径 SQL
...@@ -121,12 +121,12 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig' ...@@ -121,12 +121,12 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig'
INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig', 'saturday', '1', '是', 1, 4, 0, 'saturday', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig', 'saturday', '1', '是', 1, 4, 0, 'saturday', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '0', '否', 1, 4, 0, 'sunday', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '0', '否', 1, 4, 0, 'sunday', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '1', '是', 1, 4, 0, 'sunday', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '1', '是', 1, 4, 0, 'sunday', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '办事群众.办事群众', '办事群众.办事群众', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '办事群众', '办事群众', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '管理员.管理员', '管理员.管理员', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '管理员', '管理员', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀时间段菜单 SQL -- 主动关怀时间段菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀时间段', '/care/config/times/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀时间段', '/care/config/times/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀时间段资源路径 SQL -- 主动关怀时间段资源路径 SQL
...@@ -140,7 +140,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀时间段-菜单 ...@@ -140,7 +140,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀时间段-菜单
-- ---------------------------- -- ----------------------------
-- 预约自动签到服务约束菜单 SQL -- 预约自动签到服务约束菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到服务约束', '/appointment/constraint/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到服务约束', '/appointment/constraint/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到服务约束资源路径 SQL -- 预约自动签到服务约束资源路径 SQL
...@@ -158,7 +158,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否约束 ', 'AppointmentConst ...@@ -158,7 +158,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否约束 ', 'AppointmentConst
-- ---------------------------- -- ----------------------------
-- 主动关怀服务约束菜单 SQL -- 主动关怀服务约束菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务约束', '/care/constraint/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务约束', '/care/constraint/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀服务约束资源路径 SQL -- 主动关怀服务约束资源路径 SQL
...@@ -176,7 +176,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否追踪 ', 'CareConstraint', ...@@ -176,7 +176,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否追踪 ', 'CareConstraint',
-- ---------------------------- -- ----------------------------
-- 主动关怀服务追踪菜单 SQL -- 主动关怀服务追踪菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务追踪', '/care/constraint/track/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务追踪', '/care/constraint/track/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀服务追踪资源路径 SQL -- 主动关怀服务追踪资源路径 SQL
...@@ -190,7 +190,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀服务追踪-菜 ...@@ -190,7 +190,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀服务追踪-菜
-- ---------------------------- -- ----------------------------
-- 注册人员菜单 SQL -- 注册人员菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '注册人员', '/person/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '注册人员', '/person/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 注册人员资源路径 SQL -- 注册人员资源路径 SQL
...@@ -212,7 +212,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否添加到海康人脸库', ...@@ -212,7 +212,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否添加到海康人脸库',
-- ---------------------------- -- ----------------------------
-- 设备业务菜单 SQL -- 设备业务菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '设备业务', '/device/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '设备业务', '/device/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 设备业务资源路径 SQL -- 设备业务资源路径 SQL
......
...@@ -102,7 +102,7 @@ PRIMARY KEY (`id`) ...@@ -102,7 +102,7 @@ PRIMARY KEY (`id`)
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_appointment_config_times`; DROP TABLE IF EXISTS `mortals_xhx_appointment_config_times`;
CREATE TABLE mortals_xhx_appointment_config_times( CREATE TABLE mortals_xhx_appointment_config_times(
`Id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`aotoCheckCfgId` bigint(20) COMMENT '自动签到配置id', `aotoCheckCfgId` bigint(20) COMMENT '自动签到配置id',
`serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间', `serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间',
`serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间', `serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间',
...@@ -111,7 +111,7 @@ CREATE TABLE mortals_xhx_appointment_config_times( ...@@ -111,7 +111,7 @@ CREATE TABLE mortals_xhx_appointment_config_times(
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`Id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预约自动签到配置时间段'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预约自动签到配置时间段';
-- ---------------------------- -- ----------------------------
-- 主动关怀配置表 -- 主动关怀配置表
...@@ -145,7 +145,7 @@ PRIMARY KEY (`id`) ...@@ -145,7 +145,7 @@ PRIMARY KEY (`id`)
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_care_config_times`; DROP TABLE IF EXISTS `mortals_xhx_care_config_times`;
CREATE TABLE mortals_xhx_care_config_times( CREATE TABLE mortals_xhx_care_config_times(
`Id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`careCfgId` bigint(20) COMMENT '主动关怀配置id', `careCfgId` bigint(20) COMMENT '主动关怀配置id',
`serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间', `serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间',
`serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间', `serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间',
...@@ -154,7 +154,7 @@ CREATE TABLE mortals_xhx_care_config_times( ...@@ -154,7 +154,7 @@ CREATE TABLE mortals_xhx_care_config_times(
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`Id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='主动关怀时间段'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='主动关怀时间段';
-- ---------------------------- -- ----------------------------
-- 预约自动签到服务约束表 -- 预约自动签到服务约束表
......
platform-eleme
eleme
delete-solid
delete
s-tools
setting
user-solid
user
phone
phone-outline
more
more-outline
star-on
star-off
s-goods
goods
warning
warning-outline
question
info
remove
circle-plus
success
error
zoom-in
zoom-out
remove-outline
circle-plus-outline
circle-check
circle-close
s-help
help
minus
plus
check
close
picture
picture-outline
picture-outline-round
upload
upload2
download
camera-solid
camera
video-camera-solid
video-camera
message-solid
bell
s-cooperation
s-order
s-platform
s-fold
s-unfold
s-operation
s-promotion
s-home
s-release
s-ticket
s-management
s-open
s-shop
s-marketing
s-flag
s-comment
s-finance
s-claim
s-custom
s-opportunity
s-data
s-check
s-grid
menu
share
d-caret
caret-left
caret-right
caret-bottom
caret-top
bottom-left
bottom-right
back
right
bottom
top
top-left
top-right
arrow-left
arrow-right
arrow-down
arrow-up
d-arrow-left
d-arrow-right
video-pause
video-play
refresh
refresh-right
refresh-left
finished
sort
sort-up
sort-down
rank
loading
view
c-scale-to-original
date
edit
edit-outline
folder
folder-opened
folder-add
folder-remove
folder-delete
folder-checked
tickets
document-remove
document-delete
document-copy
document-checked
document
document-add
printer
paperclip
takeaway-box
search
monitor
attract
mobile
scissors
umbrella
headset
brush
mouse
coordinate
magic-stick
reading
data-line
data-board
pie-chart
data-analysis
collection-tag
film
suitcase
suitcase-1
receiving
collection
files
notebook-1
notebook-2
toilet-paper
office-building
school
table-lamp
house
no-smoking
smoking
shopping-cart-full
shopping-cart-1
shopping-cart-2
shopping-bag-1
shopping-bag-2
sold-out
sell
present
box
bank-card
money
coin
wallet
discount
price-tag
news
guide
male
female
thumb
cpu
link
connection
open
turn-off
set-up
chat-round
chat-line-round
chat-square
chat-dot-round
chat-dot-square
chat-line-square
message
postcard
position
turn-off-microphone
microphone
close-notification
bangzhu
time
odometer
crop
aim
switch-button
full-screen
copy-document
mic
stopwatch
medal-1
medal
trophy
trophy-1
first-aid-kit
discover
place
location
location-outline
location-information
add-location
delete-location
map-location
alarm-clock
timer
watch-1
watch
lock
unlock
key
service
mobile-phone
bicycle
truck
ship
basketball
football
soccer
baseball
wind-power
light-rain
lightning
heavy-rain
sunrise
sunrise-1
sunset
sunny
cloudy
partly-cloudy
cloudy-and-sunny
moon
moon-night
dish
dish-1
food
chicken
fork-spoon
knife-fork
burger
tableware
sugar
dessert
ice-cream
hot-water
water-cup
coffee-cup
cold-drink
goblet
goblet-full
goblet-square
goblet-square-full
refrigerator
grape
watermelon
cherry
apple
pear
orange
coffee
ice-tea
ice-drink
milk-tea
potato-strips
lollipop
ice-cream-square
ice-cream-round
...@@ -47,8 +47,6 @@ export default { ...@@ -47,8 +47,6 @@ export default {
this.form = Object.assign({}, this.form, res.entity); this.form = Object.assign({}, this.form, res.entity);
this.dict = Object.assign({}, this.dict, res.dict); this.dict = Object.assign({}, this.dict, res.dict);
console.log(this.form)
this.afterRender(res); this.afterRender(res);
}) })
.catch(error => { .catch(error => {
......
...@@ -103,6 +103,33 @@ const find = (list, key, val) => { ...@@ -103,6 +103,33 @@ const find = (list, key, val) => {
} }
} }
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
* @param {*} rootId 根Id 默认 0
*/
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id'
parentId = parentId || 'parentId'
children = children || 'children'
rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0
//对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data))
//循环所有项
const treeData = cloneData.filter(father => {
let branchArr = cloneData.filter(child => {
//返回每一项的子级数组
return father[id] === child[parentId]
});
branchArr.length > 0 ? father.children = branchArr : '';
//返回第一层
return father[parentId] === rootId;
});
return treeData != '' ? treeData : data;
};
export { export {
formatter, formatter,
...@@ -110,4 +137,5 @@ export { ...@@ -110,4 +137,5 @@ export {
formatterDate, formatterDate,
formatterDateOnly, formatterDateOnly,
find, find,
handleTree
}; };
...@@ -69,15 +69,15 @@ export default { ...@@ -69,15 +69,15 @@ export default {
let urlArray = this.$route.path.split('/'); let urlArray = this.$route.path.split('/');
const type = urlArray.pop(); const type = urlArray.pop();
group.unshift({ // group.unshift({
name: "政务在线考试学习系统" // name: "智慧大厅系统"
}) // })
if(types[type]) { // if(types[type]) {
group.push({ // group.push({
name: types[type] // name: types[type]
}) // })
} // }
console.log("group",group) // console.log("group",group)
return group return group
}, },
menu() { menu() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</template> </template>
<style lang="less"> <style lang="less">
@media screen and (max-width: 800px){ @media screen and (max-width: 1440px){
.layout-form{ .layout-form{
form{ form{
width: 100%!important; width: 100%!important;
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
border-bottom: 1px solid #ededed; border-bottom: 1px solid #ededed;
} }
form{ form{
width: 800px; width: 1440px;
&[loading]{ &[loading]{
pointer-events: none; pointer-events: none;
.el-button{ .el-button{
......
...@@ -68,32 +68,28 @@ ...@@ -68,32 +68,28 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter}, {label: "启用", prop: "used",formatter: this.formatter},
{label: "站点名称", prop: "siteName"}, {label: "周一", prop: "monday",formatter: this.formatter},
{label: "是否启用该服务", prop: "used",formatter: this.formatter}, {label: "周二", prop: "tuesday",formatter: this.formatter},
{label: "一是否监测", prop: "monday",formatter: this.formatter}, {label: "", prop: "wednesday",formatter: this.formatter},
{label: "二是否监测", prop: "tuesday",formatter: this.formatter}, {label: "", prop: "thursday",formatter: this.formatter},
{label: "三是否监测", prop: "wednesday",formatter: this.formatter}, {label: "", prop: "friday",formatter: this.formatter},
{label: "四是否监测", prop: "thursday",formatter: this.formatter}, {label: "", prop: "saturday",formatter: this.formatter},
{label: "五是否监测", prop: "friday",formatter: this.formatter}, {label: "", prop: "sunday",formatter: this.formatter},
{label: "周六是否监测", prop: "saturday",formatter: this.formatter}, {label: "最大人数", prop: "maxServicePersonNum"},
{label: "周日是否监测", prop: "sunday",formatter: this.formatter}, {label: "累计预警", prop: "alertServiceNum"},
{label: "单日服务最大人数设置", prop: "maxServicePersonNum",formatter: this.formatter}, {label: "创建时间", prop: "createUserTime", formatter: this.formatterDate},
{label: "配置时间段",
{label: "累计服务频次预警", prop: "alertServiceNum",formatter: this.formatter},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "预约自动签到配置时间段",
width: 120, width: 120,
prop: "subColumns", prop: "subColumns",
formatter: (row) => { formatter: (row) => {
......
<template>
<layout-form>
<el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
<el-row>
<Field :sapn="24" label="是否启用该服务" prop="used" v-model="form.used" type="select" :enumData="dict.used" placeholder="请选择是否启用该服务"/>
<el-row>
<Field :span="4" label="周一">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.monday"
></el-checkbox>
</Field>
<Field :span="4" label="周二">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.tuesday"
></el-checkbox>
</Field>
<Field :span="4" label="周三">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.tuesday"
></el-checkbox>
</Field>
<Field :span="4" label="周四">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.thursday"
></el-checkbox>
</Field>
</el-row>
<Field label="周一是否监测" prop="monday" v-model="form.monday" type="select" :enumData="dict.monday" placeholder="请选择周一是否监测"/>
<Field label="周二是否监测" prop="tuesday" v-model="form.tuesday" type="select" :enumData="dict.tuesday" placeholder="请选择周二是否监测"/>
<Field label="周三是否监测" prop="wednesday" v-model="form.wednesday" type="select" :enumData="dict.wednesday" placeholder="请选择周三是否监测"/>
<Field label="周四是否监测" prop="thursday" v-model="form.thursday" type="select" :enumData="dict.thursday" placeholder="请选择周四是否监测"/>
<Field label="周五是否监测" prop="friday" v-model="form.friday" type="select" :enumData="dict.friday" placeholder="请选择周五是否监测"/>
<Field label="周六是否监测" prop="saturday" v-model="form.saturday" type="select" :enumData="dict.saturday" placeholder="请选择周六是否监测"/>
<Field label="周日是否监测" prop="sunday" v-model="form.sunday" type="select" :enumData="dict.sunday" placeholder="请选择周日是否监测"/>
<Field label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/>
<Field label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
</el-row>
<el-divider content-position="center">预约自动签到配置时间段信息</el-divider>
<br/>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddAppointmentConfigTimes">添加</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteAppointmentConfigTimes">删除</el-button>
</el-col>
</el-row>
<el-table :data="appointmentConfigTimesList" :row-class-name="rowAppointmentConfigTimesIndex" @selection-change="handleAppointmentConfigTimesSelectionChange" ref="appointmentConfigTimes">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="备注" prop="serviceTimeStart">
<template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeStart" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="备注" prop="serviceTimeEnd">
<template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template>
</el-table-column>
</el-table>
<form-buttons @submit='submitForm' :noSaveBtn="pageInfo.type === 'view'"/>
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
components: {
},
methods: {
/** 预约自动签到配置时间段序号 */
rowAppointmentConfigTimesIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 预约自动签到配置时间段添加按钮操作 */
handleAddAppointmentConfigTimes() {
let obj = {};
obj.serviceTimeStart = "";
obj.serviceTimeEnd = "";
obj.remark = "";
obj.createUserId = "";
obj.createTime = "";
obj.updateUserId = "";
obj.updateTime = "";
this.appointmentConfigTimesList.push(obj);
},
/** 预约自动签到配置时间段删除按钮操作 */
handleDeleteAppointmentConfigTimes() {
if (this.checkedAppointmentConfigTimes.length == 0) {
this.$alert("请先选择要删除的预约自动签到配置时间段数据", "提示", { confirmButtonText: "确定", });
} else {
this.appointmentConfigTimesList.splice(this.checkedAppointmentConfigTimes[0].index - 1, 1);
}
},
/** 单选框选中数据 */
handleAppointmentConfigTimesSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.appointmentConfigTimes.clearSelection();
this.$refs.appointmentConfigTimes.toggleRowSelection(selection.pop());
} else {
this.checkedAppointmentConfigTimes = selection;
}
},
// 渲染前置处理
beforeRender(data) {
if(data.entity.appointmentConfigTimesList) {
this.appointmentConfigTimesList = data.entity.appointmentConfigTimesList;
}
return data
},
},
data() {
return {
toString:[
"used",
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
],
// 子表选中数据
checkedAppointmentConfigTimes: [],
// 预约自动签到配置时间段表格数据
appointmentConfigTimesList: [],
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
}
};
</script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/> <Field :span="20" label="个人信息" prop="personId" v-model="form.personId" style="width:100%" type="select" :enumData="dict.personId" placeholder="请输入个人信息ID"/>
<Field label="个人信息ID" prop="personId" v-model="form.personId" placeholder="请输入个人信息ID"/> <Field :span="20" label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field label="姓名" prop="name" v-model="form.name" placeholder="请输入姓名"/> <Field :span="20" label="证件类型" prop="idCardType" v-model="form.idCardType" type="radio" :enumData="dict.idCardType" placeholder="请输入证件类型"/>
<Field label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/> <Field :span="20" label="证件号码" prop="idCardNo" v-model="form.idCardNo" placeholder="请输入证件号码"/>
<Field label="证件类型" prop="idCardType" v-model="form.idCardType" placeholder="请输入证件类型"/> <!--
<Field label="证件号码" prop="idCardNo" v-model="form.idCardNo" placeholder="请输入证件号码"/> <Field :span="20" label="累计次数" prop="accumulative" v-model="form.accumulative" placeholder="请输入累计次数"/>
<Field label="累计次数" prop="accumulative" v-model="form.accumulative" placeholder="请输入累计次数"/> <Field :span="20" label="约束时间" prop="constraintTime" v-model="form.constraintTime" type="date" />
<Field label="约束时间" prop="constraintTime" v-model="form.constraintTime" type="date" /> <Field :span="20" label="创建方式" prop="createMethod" v-model="form.createMethod" type="select" :enumData="dict.createMethod" placeholder="请选择创建方式"/>
<Field label="创建方式" prop="createMethod" v-model="form.createMethod" type="select" :enumData="dict.createMethod" placeholder="请选择创建方式"/> <Field :span="20" label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/>
<Field label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/> <Field :span="20" label="是否约束" prop="constraint" v-model="form.constraint" type="select" :enumData="dict.constraint" placeholder="请选择是否约束"/>
<Field label="是否约束 " prop="constraint" v-model="form.constraint" type="select" :enumData="dict.constraint" placeholder="请选择是否约束 "/> -->
</el-row> </el-row>
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
toString:[ toString:[
"createMethod", "createMethod",
"constraint", "constraint",
"idCardType",
"personId",
], ],
// 表单校验 // 表单校验
rules: { rules: {
...@@ -88,6 +90,11 @@ ...@@ -88,6 +90,11 @@
this.open = true; this.open = true;
}, },
beforeSubmit(data){
data.name=this.dict['personId'][data.personId];
return data;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
......
...@@ -34,6 +34,33 @@ ...@@ -34,6 +34,33 @@
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
handleConstraint(row,type) {
let _this = this
this.$confirm('取消约束后,系统将不向该群众推送此项服务,是否确认?', "系统服务", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
//todo
_this.$post("/appointment/constraint/save", {
id: row.id,
constraint: type,
})
.then((res) => {
if (res.code == 1) {
_this.$message.success("更改成功!");
_this.getData();
}
})
.catch((error) => {
this.$message.error(error.message);
});
}).then(response => {
})
}
}, },
data() { data() {
return { return {
...@@ -44,12 +71,6 @@ ...@@ -44,12 +71,6 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "个人信息ID", prop: "personId", formatter: this.formatter},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contact"}, {label: "联系方式", prop: "contact"},
...@@ -64,15 +85,43 @@ ...@@ -64,15 +85,43 @@
{label: "创建方式", prop: "createMethod",formatter: this.formatter}, {label: "创建方式", prop: "createMethod",formatter: this.formatter},
{label: "约束服务", prop: "constraint",formatter: this.formatter},
{label: "操作人员", prop: "operator"}, {label: "操作人员", prop: "operator"},
{label: "是否约束 ", prop: "constraint",formatter: this.formatter},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<span> </span>
{row.constraint === 0 ? (
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.handleConstraint(row,1);
}}
>
约束
</el-button>
) : (
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.handleConstraint(row,0);
}}
>
取消约束
</el-button>
)}
</div>
); );
} }
} }
......
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "dataDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "监测预警",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
type="danger"
@click="monitorWarn"
>监测预警</el-button
>
</LayoutTable> </LayoutTable>
<drawer-show ref="dataDrawerShow" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
...@@ -11,12 +23,13 @@ ...@@ -11,12 +23,13 @@
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import drawerShow from "./dataDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "AppointmentRecordsList", name: "AppointmentRecordsList",
components: { components: {
dialogShow dialogShow,drawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
}, },
...@@ -33,21 +46,69 @@ ...@@ -33,21 +46,69 @@
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
/** 监测预警 */
monitorWarn(row) {
this.$refs.dataDrawerShow.view(row);
},
serviceConstraint(row) {
let _this=this
this.$confirm('服务约束后,系统将停止向该群众推送此项服务,是否确认?', "系统服务", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
//todo
_this.$post("/appointment/records", { id: [row.id] })
.then((res) => {
if (res && res.code && res.code == 1) {
_this.getList();
_this.$message.success("停止服务成功");
}
})
.catch((error) => {
_this.$message.error(error.message);
});
}).then(response => {
})
}
}, },
data() { data() {
return { return {
config: { config: {
search: [ search: [
{
name: "device",
type: "select",
label: "监测设备",
},
{
name: "detectTimeStart",
type: "datetime",
label: "开始时间",
},
{
name: "detectTimeEnd",
type: "datetime",
label: "结束时间",
},
{
name: "name",
type: "text",
label: "姓名",
fuzzy: true,
},
], ],
columns: [ columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contactInfo"}, {label: "联系方式", prop: "contactInfo"},
...@@ -64,13 +125,34 @@ ...@@ -64,13 +125,34 @@
{label: "签到方式", prop: "checkInMethod",formatter: this.formatter}, {label: "签到方式", prop: "checkInMethod",formatter: this.formatter},
{label: "监测凭证", prop: "monitorCertificate"}, {label: "监测凭证", prop: "monitorCertificate",formatter: (row) => {
return row.monitorCertificate != "" ? (
<el-image
style="width: 70px; height: 70px"
src={row.monitorCertificate}
preview-src-list={[row.monitorCertificate]}
></el-image>
) : (
"--"
);
},},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.serviceConstraint(row);
}}
>
服务约束
</el-button>
</div>
); );
} }
} }
......
...@@ -68,35 +68,30 @@ ...@@ -68,35 +68,30 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter}, {label: "启用服务", prop: "used",formatter: this.formatter},
{label: "站点名称", prop: "siteName"}, {label: "周一", prop: "monday",formatter: this.formatter},
{label: "是否启用该服务", prop: "used",formatter: this.formatter}, {label: "周二", prop: "tuesday",formatter: this.formatter},
{label: "一是否监测", prop: "monday",formatter: this.formatter}, {label: "", prop: "wednesday",formatter: this.formatter},
{label: "二是否监测", prop: "tuesday",formatter: this.formatter}, {label: "", prop: "thursday",formatter: this.formatter},
{label: "三是否监测", prop: "wednesday",formatter: this.formatter}, {label: "", prop: "friday",formatter: this.formatter},
{label: "四是否监测", prop: "thursday",formatter: this.formatter}, {label: "", prop: "saturday",formatter: this.formatter},
{label: "周五是否监测", prop: "friday",formatter: this.formatter}, {label: "周日", prop: "sunday",formatter: this.formatter},
{label: "周六是否监测", prop: "saturday",formatter: this.formatter},
{label: "周日是否监测", prop: "sunday",formatter: this.formatter},
{label: "单日服务最大人数设置", prop: "maxServicePersonNum",formatter: this.formatter}, {label: "单日服务最大人数设置", prop: "maxServicePersonNum",formatter: this.formatter},
{label: "服务阈值设置,单位分钟", prop: "serviceThreshold", formatter: this.formatter}, {label: "服务阈值设置(分钟)", prop: "serviceThreshold", formatter: this.formatter},
{label: "累计服务频次预警", prop: "alertServiceNum",formatter: this.formatter}, {label: "累计服务频次预警", prop: "alertServiceNum",formatter: this.formatter},
{label: "消息发送对象", prop: "msgRecipients"}, {label: "消息发送对象", prop: "msgRecipients"},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "主动关怀时间段", {label: "主动关怀时间段",
width: 120, width: 120,
prop: "subColumns", prop: "subColumns",
......
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field :span="20" label="个人信息" prop="personId" v-model="form.personId" style="width:100%" type="select" :enumData="dict.personId" placeholder="请输入个人信息ID"/>
<Field :span="20" label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field :span="20" label="证件类型" prop="idCardType" v-model="form.idCardType" type="radio" :enumData="dict.idCardType" placeholder="请输入证件类型"/>
<Field :span="20" label="证件号码" prop="idCardNo" v-model="form.idCard" placeholder="请输入证件号码"/>
<!--
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/> <Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/> <Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/>
<Field label="人员ID" prop="personId" v-model="form.personId" placeholder="请输入人员ID"/> <Field label="人员ID" prop="personId" v-model="form.personId" placeholder="请输入人员ID"/>
...@@ -14,9 +21,10 @@ ...@@ -14,9 +21,10 @@
<Field label="创建方式" prop="createWay" v-model="form.createWay" type="select" :enumData="dict.createWay" placeholder="请选择创建方式"/> <Field label="创建方式" prop="createWay" v-model="form.createWay" type="select" :enumData="dict.createWay" placeholder="请选择创建方式"/>
<Field label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/> <Field label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/>
<Field label="是否追踪 " prop="track" v-model="form.track" type="select" :enumData="dict.track" placeholder="请选择是否追踪 "/> <Field label="是否追踪 " prop="track" v-model="form.track" type="select" :enumData="dict.track" placeholder="请选择是否追踪 "/>
-->
</el-row> </el-row>
<el-divider content-position="center">主动关怀服务追踪信息</el-divider> <!-- <el-divider content-position="center">主动关怀服务追踪信息</el-divider>
<br/> <br/>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -75,7 +83,7 @@ ...@@ -75,7 +83,7 @@
<el-input v-model="scope.row.updateUserId" placeholder="请输入更新人ID" /> <el-input v-model="scope.row.updateUserId" placeholder="请输入更新人ID" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -108,71 +116,23 @@ ...@@ -108,71 +116,23 @@
toString:[ toString:[
"createWay", "createWay",
"track", "track",
"idCardType",
"personId",
], ],
// 表单校验 // 表单校验
rules: { rules: {
name: [
{required: true,message: "请输入姓名", trigger: "blur" },
{max: 50,message: "最多只能录入50个字符",trigger: "blur",},
],
contact: [
{required: true,message: "请输入联系方式", trigger: "blur" },
{max: 50,message: "最多只能录入50个字符",trigger: "blur",},
],
idCard: [ idCard: [
{required: true,message: "请输入身份证号码", trigger: "blur" }, {required: true,message: "请输入身份证号码", trigger: "blur" },
{max: 18,message: "最多只能录入18个字符",trigger: "blur",}, {max: 18,message: "最多只能录入18个字符",trigger: "blur",},
], ],
trackingTime: [
{required: true,message: "请选择跟踪时间" },
],
createWay: [
{required: true,message: "请输入创建方式", trigger: "blur" },
],
operator: [
{required: true,message: "请输入操作人员", trigger: "blur" },
{max: 50,message: "最多只能录入50个字符",trigger: "blur",},
],
} }
}; };
}, },
methods: { methods: {
/** 主动关怀服务追踪序号 */
rowCareConstraintTrackIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 主动关怀服务追踪添加按钮操作 */
handleAddCareConstraintTrack() {
let obj = {};
obj.feedbackId = "";
obj.feedbackName = "";
obj.feedback = "";
obj.feedbackTime = "";
obj.createMethod = "";
obj.createTime = "";
obj.createUserId = "";
obj.updateTime = "";
obj.updateUserId = "";
this.careConstraintTrackList.push(obj);
},
/** 主动关怀服务追踪删除按钮操作 */
handleDeleteCareConstraintTrack() {
if (this.checkedCareConstraintTrack.length == 0) {
this.$alert("请先选择要删除的主动关怀服务追踪数据", "提示", { confirmButtonText: "确定", });
} else {
this.careConstraintTrackList.splice(this.checkedCareConstraintTrack[0].index - 1, 1);
}
},
/** 单选框选中数据 */
handleCareConstraintTrackSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.careConstraintTrack.clearSelection();
this.$refs.careConstraintTrack.toggleRowSelection(selection.pop());
} else {
this.checkedCareConstraintTrack = selection;
}
},
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.careConstraintTrackList) { if(data.entity.careConstraintTrackList) {
...@@ -215,6 +175,11 @@ ...@@ -215,6 +175,11 @@
this.open = true; this.open = true;
}, },
beforeSubmit(data){
data.name=this.dict['personId'][data.personId]
return data;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
...@@ -229,6 +194,7 @@ ...@@ -229,6 +194,7 @@
name : "", name : "",
contact : "", contact : "",
idCard : "", idCard : "",
idCardType : "居民身份证",
serviceFrequency : null, serviceFrequency : null,
trackingTime : null, trackingTime : null,
createWay : null, createWay : null,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable> </LayoutTable>
<track-drawer-show ref="trackDrawerShow" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
...@@ -11,11 +11,12 @@ ...@@ -11,11 +11,12 @@
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import trackDrawerShow from "./trackDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CareConstraintList", name: "CareConstraintList",
components: { components: {
dialogShow dialogShow,trackDrawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
...@@ -51,6 +52,39 @@ ...@@ -51,6 +52,39 @@
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
handleTrack(row) {
this.$refs.trackDrawerShow.view(row);
},
cancelTrack(row) {
let _this = this
this.$confirm('取消跟踪后,系统将从0开始计算服务频次,是否确认?', "系统服务", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
//todo
_this.$post("/care/constraint/save", {
id: row.id,
serviceFrequency: 0,
track: 0,
})
.then((res) => {
if (res.code == 1) {
_this.$message.success("取消追踪成功!");
_this.getData();
}
})
.catch((error) => {
_this.$message.error(error.message);
});
}).then(response => {
})
}
}, },
data() { data() {
return { return {
...@@ -70,12 +104,6 @@ ...@@ -70,12 +104,6 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "人员ID", prop: "personId", formatter: this.formatter},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contact"}, {label: "联系方式", prop: "contact"},
...@@ -91,28 +119,38 @@ ...@@ -91,28 +119,38 @@
{label: "操作人员", prop: "operator"}, {label: "操作人员", prop: "operator"},
{label: "是否追踪 ", prop: "track",formatter: this.formatter}, {label: "是否追踪 ", prop: "track",formatter: this.formatter},
{label: "主动关怀服务追踪",
width: 120,
prop: "subColumns",
formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width);
}, 50);
return (
<el-popover placement="right" width={widthsize} trigger="click">
{this.renderTable(row.careConstraintTrackList)}
<el-button type="text" slot="reference">详细</el-button>
</el-popover>
);
},
},
{ {
label: "操作", label: "操作",
width: 240, width: 320,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
); <table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.handleTrack(row);
}}
>
跟踪反馈
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.cancelTrack(row);
}}
>
取消跟踪
</el-button>
</div>);
} }
} }
] ]
......
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "trackDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "跟踪反馈数据",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "dataDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "监测预警",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
</LayoutTable>
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
type="danger"
@click="monitorWarn"
>监测预警</el-button
>
<drawer-show ref="dataDrawerShow" />
<track-dialog-show ref="trackdialogform" @ok="getData" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</LayoutTable>
</div> </div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import trackdialogShow from "./trackdialogshow";
import drawerShow from "./dataDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CareRecordsList", name: "CareRecordsList",
components: { components: {
dialogShow dialogShow,drawerShow,trackdialogShow},
},
mixins: [table], mixins: [table],
created() { created() {
}, },
...@@ -33,23 +49,68 @@ ...@@ -33,23 +49,68 @@
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
/** 监测预警 */
monitorWarn(row) {
this.$refs.dataDrawerShow.view(row);
},
toNotice(row){
let _this=this
this.$confirm(
'负责人姓名:刘琳琳 联系电话:15244845448',
"通知负责人",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(function () {
_this.$post("/care/records/notice", { id: [row.id] })
.then((res) => {
if (res && res.code && res.code == 1) {
_this.getList();
_this.$message.success("通知成功");
}
})
.catch((error) => {
_this.$message.error(error.message);
});
});
},
/** 打开跟踪反馈 */
toTrack(row) {
this.$refs.trackdialogform.view(row);
},
}, },
data() { data() {
return { return {
config: { config: {
search: [ search: [
{
name: "detectTimeStart",
type: "datetime",
label: "开始时间",
},
{
name: "detectTimeEnd",
type: "datetime",
label: "结束时间",
},
{
name: "name",
type: "text",
label: "姓名",
fuzzy: true,
},
], ],
columns: [ columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "个人信息ID", prop: "personId", formatter: this.formatter},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contact"}, {label: "联系方式", prop: "contact"},
...@@ -64,7 +125,7 @@ ...@@ -64,7 +125,7 @@
{label: "监测设备", prop: "monitorDevice"}, {label: "监测设备", prop: "monitorDevice"},
{label: "最终等待时长,秒", prop: "waitTime", formatter: this.formatter}, {label: "最终等待时长", prop: "waitTime", formatter: this.formatter},
{label: "办理状态", prop: "processStatus"}, {label: "办理状态", prop: "processStatus"},
{ {
...@@ -72,7 +133,48 @@ ...@@ -72,7 +133,48 @@
width: 240, width: 240,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
{row.processStatus === '排队中' ? (<div>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.reCare(row);
}}
>
再次关怀
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.notice(row);
}}
>
通知负责人
</el-button>
</div>
) : (
""
)}
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.toTrack(row);
}}
>
跟踪反馈
</el-button>
</div>
); );
} }
} }
......
<template>
<!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/>
<Field label="个人信息ID" prop="personId" v-model="form.personId" placeholder="请输入个人信息ID"/>
<Field label="姓名" prop="name" v-model="form.name" placeholder="请输入姓名"/>
<Field label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field label="身份证号码" prop="idCard" v-model="form.idCard" placeholder="请输入身份证号码"/>
<Field label="办理业务" prop="service" v-model="form.service" placeholder="请输入办理业务"/>
<Field label="排队编号" prop="queueNo" v-model="form.queueNo" placeholder="请输入排队编号"/>
<Field label="监测时间" prop="monitorTime" v-model="form.monitorTime" type="date" />
<Field label="监测设备id" prop="monitorDeviceId" v-model="form.monitorDeviceId" placeholder="请输入监测设备id"/>
<Field label="监测设备" prop="monitorDevice" v-model="form.monitorDevice" placeholder="请输入监测设备"/>
<Field label="最终等待时长,秒" prop="waitTime" v-model="form.waitTime" placeholder="请输入最终等待时长,秒"/>
<Field label="办理状态" prop="processStatus" v-model="form.processStatus" type="select" :enumData="dict.processStatus" placeholder="请选择办理状态"/>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow";
export default {
mixins: [form],
components: {
dialogShow ,
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "预约关怀记录",
// 是否显示弹出层
open: false,
toString:[
],
// 表单校验
rules: {
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="care/records/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改预约关怀记录";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "care/records/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增预约关怀记录";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="care/records/view";
this.getData();
this.pageInfo.type="view"
this.title = "预约关怀记录详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
siteId : null,
siteName : "",
personId : null,
name : "",
contact : "",
idCard : "",
service : "",
queueNo : "",
monitorTime : null,
monitorDeviceId : null,
monitorDevice : "",
waitTime : null,
processStatus : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable ref="layoutTable" :data="tableData" :config="tableConfig" notDel /> <LayoutTable notPagination ref="layoutTable" :data="tableData" :config="tableConfig" notDel />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
......
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "dataDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "监测预警",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
</LayoutTable> <el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
type="danger"
@click="monitorWarn"
>监测预警</el-button
>
</LayoutTable>
<drawer-show ref="dataDrawerShow" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
</template> </template>
...@@ -11,11 +21,13 @@ ...@@ -11,11 +21,13 @@
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import drawerShow from "./dataDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "RealtimeDataflowList", name: "RealtimeDataflowList",
components: { components: {
dialogShow dialogShow,drawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
...@@ -34,11 +46,32 @@ ...@@ -34,11 +46,32 @@
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
monitorWarn(row) {
this.$refs.dataDrawerShow.view(row);
},
}, },
data() { data() {
return { return {
config: { config: {
search: [ search: [
{
name: "device",
type: "select",
label: "监测设备",
},
{
name: "detectTimeStart",
type: "datetime",
label: "开始时间",
},
{
name: "detectTimeEnd",
type: "datetime",
label: "结束时间",
},
], ],
columns: [ columns: [
{type: "selection", width: 60}, {type: "selection", width: 60},
......
// 添加,编辑设备
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="35%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form <el-form ref="form" :model="form" :rules="rules" label-width="120px">
ref="form"
:model="form"
:rules="rules"
label-width="110px"
label-position="right"
>
<el-row> <el-row>
<Field <el-col :span="24" v-if="form.parentId !== 0">
:span="22" <el-form-item label="上级节点" prop="parentId">
label="ID" <treeselect
prop="id"
v-model="form.id"
v-if="pageInfo.type !== 'add'"
disabled
/>
<Field :span="22" label="名称" prop="name" v-model="form.name" />
<Field
:span="22"
label="权限类型"
prop="authType"
v-model="form.authType"
:enumData="dict.authType"
type="select"
/>
<Field
:span="22"
label="父级菜单"
prop="parentId"
v-model="form.parentId" v-model="form.parentId"
:enumData="menu" :options="menuOptions"
type="select" :normalizer="normalizer"
/> placeholder="选择上级菜单信息"
<Field :span="22" label="访问地址" prop="url" v-model="form.url" />
<Field
:span="22"
label="状态"
prop="status"
v-model="form.status"
:enumData="dict.status"
type="radio"
/> />
</el-form-item>
</el-col>
<Field <!-- <Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled />
:span="22" --> <Field label="名称" prop="name" v-model="form.name"/>
label="图标" <Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' />
placeholder="请输入图标名称" <Field label="访问地址" prop="url" v-model="form.url" />
prop="imgPath" <Field label="状态" prop="status" v-model="form.status" :enumData='dict.status' type='radio' />
v-model="form.imgPath" <Field class="radio-group-container" label="图标" prop="imgPath" :span='24'>
/> <el-radio-group v-model="form.imgPath" class='form-el-radio-group'>
<!-- <Field v-else :span="22" label="图标" prop="imgPath"> <el-radio-button style="width: 180px" label="">不需要图标</el-radio-button>
<el-radio-group v-model="form.imgPath" class="form-el-radio-group"> <el-radio-button style="width: 180px" v-for='(icon, index) in icons' :key='index' :label="icon">
<el-radio-button label="">不需要图标</el-radio-button> <i :class="'el-icon-'+icon" style="font-size: 20px"></i>
<el-radio-button {{icon}}
v-for="(icon, index) in icons"
:key="index"
:label="icon"
>
<i :class="'el-icon-' + icon"></i>
{{ icon }}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
</Field> --> </Field>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button <el-button type="primary" @click="submitForm">确 定</el-button>
type="primary"
v-if="pageInfo.type !== 'view'"
@click="submitForm"
>确 定</el-button
>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -81,55 +39,84 @@ ...@@ -81,55 +39,84 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import axios from 'axios'
export default { export default {
mixins: [form], mixins: [form],
components: { components: {
dialogShow, Treeselect,
}, },
computed: { data() {
menu() { return {
let menu = { 0: "" }; fileContent:"",
this.$store.state.userData.barList.forEach((item) => { icons: [
menu[item.id + ""] = item.name; 'info', 'error', 'success', 'warning', 'question',
}); 'tickets', 'document', 'goods', 'sold-out', 'news',
return menu; 'message', 'date', 'printer', 'time', 'bell',
'mobile-phone', 'service', 'view', 'menu', 'star-on',
'location', 'phone', 'picture', 'delete', 'search',
'edit', 'rank', 'refresh', 'share', 'setting',
'upload', 'upload2', 'download', 'loading',
],
menuOptions: [],
// 遮罩层
loading: true,
// 弹出层标题
title: "菜单信息",
// 是否显示弹出层
open: false,
id:null,
toString:[
"status",
"linkType",
"commMenu",
"menuType",
"authType",
],
// 表单校验
rules: {
}
};
}, },
created() {
axios.get('/icon.txt')
.then(response => {
this.fileContent = response.data
this.icons = this.fileContent.split('\n')
})
}, },
methods: { methods: {
afterSubmit() {
this.$store.dispatch("login");
this.$router.go(-1);
},
/** 编辑 */ /** 编辑 */
edit(row) { edit(row, menuOptions) {
this.reset(); this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = this.pageInfo.editUrl; this.urls.currUrl =this.pageInfo.editUrl;;
this.getData(); this.getData();
this.pageInfo.type = "edit"; this.menuOptions = menuOptions;
this.title = "修改菜单"; this.title = "修改菜单信息";
}, },
/** 新增 */ /** 新增 */
add(row) { async add(row, menuOptions) {
this.reset(); this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = this.pageInfo.addUrl; this.urls.currUrl = this.pageInfo.addUrl;
this.getData(); this.getData();
this.pageInfo.type = "add"; if(row.id){
this.open = true; this.id=row.id
this.title = "新增菜单"; this.form.parentId=row.id
}
this.menuOptions = menuOptions;
this.title = "新增菜单信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row, menuOptions) {
this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = this.pageInfo.viewUrl; this.urls.currUrl =this.pageInfo.viewUrl;;
this.getData(); this.getData();
this.pageInfo.type = "view"; this.menuOptions = menuOptions;
this.open = true; this.title = "菜单信息详细";
this.title = "菜单详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
...@@ -137,16 +124,46 @@ export default { ...@@ -137,16 +124,46 @@ export default {
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
if(this.id){
this.form.parentId=this.id
}
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
/** 转换菜单信息数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.id,
label: node.name,
children: node.children,
};
},
// 表单重置 // 表单重置
reset() { reset() {
// this.form={} this.form = {
name : '',
url : '',
ancestors : '',
parentId : 0,
orderId : 1,
status : 1,
linkType : 0,
groupId : 1,
groupName : '',
imgPath : '',
buttonImgPath : '',
imgCommPath : '',
commMenu : 0,
menuType : 0,
authType : 3,
};
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
...@@ -155,74 +172,42 @@ export default { ...@@ -155,74 +172,42 @@ export default {
} }
}, },
}, },
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "菜单",
// 是否显示弹出层
open: false,
toString: ["parentId", "authType", "status"],
icons: [
"info",
"error",
"success",
"warning",
"question",
"tickets",
"document",
"goods",
"sold-out",
"news",
"message",
"date",
"printer",
"time",
"bell",
"mobile-phone",
"service",
"view",
"menu",
"star-on",
"location",
"phone",
"picture",
"delete",
"search",
"edit",
"rank",
"refresh",
"share",
"setting",
"upload",
"upload2",
"download",
"loading",
"reading",
],
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
},
};
},
}; };
</script> </script>
<style lang="less"> <style lang="scss">
.el-select { .ml-row {
width: 100%; margin-bottom: 5px;
}
.el-date-editor.el-input {
width: 100%;
}
.form-el-radio-group.label {
width: 160px;
} }
.el-radio-button__inner { .el-radio-button__inner {
border: 0; // width: 82px;
height: 36px;
border-radius: 4px 0px 0px 4px;
border: 1px solid rgba(0, 0, 0, 0) !important;
border-radius: 2px !important;
background-color: rgba(0, 0, 0, 0);
font-size: 14px;
font-weight: 400;
color: #606677;
line-height: 14px;
outline: none;
box-shadow: none;
} }
</style>
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
background: rgba(0, 0, 0, 0);
border: 1px solid #3E7BFA !important;
color: #3E7BFA;
line-height: 14px;
outline: none;
box-shadow: none;
}
.ml-top-button {
border-color: #ffffff;
background: rgba(0, 0, 0, 0);
font-size: 16px;
margin: 0 10px 0 10px;
}
</style>
<template> <template>
<div class="page"> <div className="page">
<LayoutTable :data='tableData' :config='tableConfig' notPagination /> <LayoutTable notPagination ref="layoutTable" :data="tableData" :config="tableConfig"/>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData"/>
</div> </div>
</template> </template>
<script> <script>
import table from '@/assets/mixins/table'; import {handleTree} from "@/assets/utils/table";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import table from "@/assets/mixins/table";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
export default { export default {
name: "Menu",
mixins: [table], mixins: [table],
components: { dialogShow }, components: {Treeselect, dialogShow},
methods: { created() {
beforeRender(data) { this.query={"page":1,"size":-1}
this.allMenu = this.sortByGroup(this.util_copy(data.data));
// 存在查询条件,展开全部
if(Object.keys(this.$route.query).length) {
this.select = this.allMenu.filter(i=>!i.parentId).map(i=>i.id);
}
return data;
},
afterRender() {
this.showChild();
},
// 按parentId排序分组
sortByGroup(data) {
return data.filter(i=>!i.parentId).reduce((prev, item)=>{
return prev.concat([item], data.filter(i=>i.parentId == item.id));
}, [])
},
// 查看下级菜单
selectHandler({id}) {
// 如果已展开,则关闭
const index = this.select.indexOf(id);
if(index > -1) {
this.select.splice(index, 1);
}else{
this.select.push(id);
}
this.showChild();
},
showChild() {
this.tableData.data = this.allMenu.filter(item=>{
return !item.parentId || this.select.indexOf(item.parentId) > -1
});
},
// 展示菜单图标
showIcon(row, column) {
return <i class={'el-icon-'+row.imgPath}></i>
},
// 操作菜单状态
changeStatus(row, column) {
return (
<my-switch
confirm
url='/menu/save'
row={row}
onChange={this.statusChange}
value={this.tableData.data}
onInput={(data)=>{
this.tableData.data = data;
}}/>
)
}, },
afterDel(id) { methods: {
this.$store.dispatch('login'); afterRender(data) {
}, console.log(data)
statusChange() { data.data = handleTree(data.data, "id", "parentId");
this.$store.dispatch('login'); console.log("tree data:",data.data)
this.menuOptions = data.data;
this.$refs.layoutTable.showType = "treetable"
}, },
handleUp(data) { handleUp(data) {
let type = 0; let type = 0;
let url = "/menu/upOrDown"; let url = "/menu/upOrDown";
...@@ -92,7 +51,6 @@ export default { ...@@ -92,7 +51,6 @@ export default {
if (res && res.code && res.code == 1) { if (res && res.code && res.code == 1) {
this.getData() this.getData()
this.loading = false; this.loading = false;
this.$message.success("更新排序成功!"); this.$message.success("更新排序成功!");
} }
}) })
...@@ -101,54 +59,79 @@ export default { ...@@ -101,54 +59,79 @@ export default {
this.$message.error(error.message); this.$message.error(error.message);
}); });
}, },
handleAdd(row) {
this.$refs.dialogform.add(row, this.menuOptions);
},
handleRowClick(row){
console.log(row)
//if(row.children || row.children.length === 0) return ;
//this.$refs.layoutTable.toggleRowExpansion(row,true)
},
/** 重写新增方法 */ /** 重写新增方法 */
// toAdd(row) { toAdd(row) {
// this.$refs.dialogform.add(row); this.$refs.dialogform.add(row, this.menuOptions);
// }, },
// /** 重写编辑方法 */ /** 重写编辑方法 */
// toEdit(row) { toEdit(row) {
// this.$refs.dialogform.edit(row); this.loading = true;
// }, this.$post(this.pageInfo.exclude, {id: row.id})
// /** 重写查看方法 */ .then((res) => {
// toView(row) { if (res && res.code && res.code == 1) {
// this.$refs.dialogform.view(row); this.menuOptions = handleTree(res.data.data);
// }, this.$refs.dialogform.edit(row, this.menuOptions);
this.loading = false;
}
})
.catch((error) => {
this.$message.error(error.message);
});
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row, this.menuOptions);
},
// 展示菜单图标
showIcon(row, column) {
return <i class={'el-icon-'+row.imgPath}></i>
},
// 操作菜单状态
changeStatus(row, column) {
return (
<my-switch
confirm
url='/menu/save'
row={row}
onChange={this.statusChange}
value={this.tableData.data}
onInput={(data)=>{
this.tableData.data = data;
}}/>
)
},
statusChange() {
this.$store.dispatch('login');
},
}, },
data() { data() {
return { return {
allMenu: [], // 经过分组排序的表格数据
select: [], // 当前展开的树节点
query: {
'size': -1
},
config: { config: {
search: [ /** 树表是否默认展开 */
{ expand: false,
name: 'name', showType: "treetable",
type: 'text', search: [],
label: '菜单名称',
},
],
columns: [ columns: [
{ type: "selection",reserveSelection:true, width: 60 },
{ type: "index", label: "序号",align:"center", width: 50 },
{ {
type: 'selection',
width: 60, width: 60,
formatter: row => {
const icon = this.select.indexOf(row.id) === -1 ? 'right' : 'down';
return (
!row.parentId
? <div onClick={()=>{this.selectHandler(row)}}>
<i class={'el-icon-arrow-'+icon}></i>
</div>
: ''
)
}
}, },
{ {
prop: 'id', prop: 'id',
label: 'ID', label: 'ID',
width: 60, width: 120,
}, },
{ {
prop: 'name', prop: 'name',
...@@ -158,8 +141,8 @@ export default { ...@@ -158,8 +141,8 @@ export default {
{ {
prop: 'imgPath', prop: 'imgPath',
label: '图标', label: '图标',
width: 120, width: 50,
// formatter: this.showIcon, formatter: this.showIcon,
}, },
{ {
prop: 'authType', prop: 'authType',
...@@ -180,11 +163,28 @@ export default { ...@@ -180,11 +163,28 @@ export default {
width: 100, width: 100,
formatter: this.changeStatus, formatter: this.changeStatus,
}, },
// {label: "菜单名称", prop: "name"},
// {label: "连接地址", prop: "url"},
// {label: "当前节点父id路径,“,”分割,服务端生成", prop: "ancestors"},
// {label: "父菜单ID,一级菜单的该字段值为-1", prop: "parentId", formatter: this.formatterString},
// {label: "排序编号", prop: "orderId"},
// {label: "菜单状态,0:禁用,1:启用,默认1", prop: "status"},
// {label: "链接方式,0:普通,1:弹出,2:脚本", prop: "linkType"},
// {label: "分组编号,使用菜单分隔符按该值分隔,默认1", prop: "groupId", formatter: this.formatterString},
// {label: "", prop: "groupName"},
// {label: "主菜单图标,主菜单图标的css样式名", prop: "imgPath"},
// {label: "按钮图标,按钮图标的css样式名", prop: "buttonImgPath"},
// {label: "常用菜单图标,常用菜单图标的css样式名", prop: "imgCommPath"},
// {label: "是否常用菜单,0:非常用,1:常用,默认0", prop: "commMenu"},
// {label: "菜单类型,0:主菜单,1:非主菜单", prop: "menuType"},
// {label: "权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3", prop: "authType"},
// {label: "创建用户名称", prop: "createUserName"},
{ {
label: '操作', label: "操作",
formatter: (row)=> { width: 280,
formatter: row => {
return ( return (
<div> <div>
<el-link <el-link
style="margin-right:5px;margin-left:5px" style="margin-right:5px;margin-left:5px"
...@@ -203,17 +203,31 @@ export default { ...@@ -203,17 +203,31 @@ export default {
></el-link> ></el-link>
<table-buttons noView row={row} onEdit={this.toEdit} onDel={this.toDel} /> <el-button
size="mini"
type="text"
icon="el-icon-edit-outline"
onClick={() => {
this.handleAdd(row);
}}
>
新增
</el-button>
<table-buttons
noAdd
noView
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
</div> </div>
) );
}, }
},
],
},
} }
]
} }
} };
}
};
</script> </script>
<template> <template>
<layout-form> <layout-form >
<el-form <el-form
:model="form" :model="form"
:loading="loading" :loading="loading"
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
label-width='100px' label-width='100px'
ref="form" ref="form"
> >
<el-row> <el-row :span='20'>
<Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled /> <Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled />
<Field label="名称" prop="name" v-model="form.name"/> <Field label="名称" prop="name" v-model="form.name"/>
<Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' /> <Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' />
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-radio-group v-model="form.imgPath" class='form-el-radio-group'> <el-radio-group v-model="form.imgPath" class='form-el-radio-group'>
<el-radio-button label="">不需要图标</el-radio-button> <el-radio-button label="">不需要图标</el-radio-button>
<el-radio-button v-for='(icon, index) in icons' :key='index' :label="icon"> <el-radio-button v-for='(icon, index) in icons' :key='index' :label="icon">
<i :class="'el-icon-'+icon"></i> <i :class="'el-icon-'+icon" style="font-size: 20px"></i>
{{icon}} {{icon}}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<script> <script>
import form from '@/assets/mixins/form'; import form from '@/assets/mixins/form';
import axios from 'axios'
export default { export default {
mixins: [form], mixins: [form],
methods: { methods: {
...@@ -41,6 +41,15 @@ export default { ...@@ -41,6 +41,15 @@ export default {
this.$router.go(-1); this.$router.go(-1);
}, },
}, },
created() {
axios.get('/icon.txt')
.then(response => {
this.fileContent = response.data
this.icons = this.fileContent.split('\n')
//this.lines.map(i=>console.log(i))
})
},
computed: { computed: {
menu() { menu() {
let menu = {'0': ''}; let menu = {'0': ''};
...@@ -50,8 +59,17 @@ export default { ...@@ -50,8 +59,17 @@ export default {
return menu; return menu;
} }
}, },
// mounted() {
// axios.get('/icon.txt')
// .then(response => {
// this.fileContent = response.data
// this.lines = this.fileContent.split('\n')
// this.lines.map(i=>console.log(i))
// })
// },
data() { data() {
return { return {
fileContent:"",
toString: ['parentId', 'authType', 'status'], toString: ['parentId', 'authType', 'status'],
icons: [ icons: [
'info', 'error', 'success', 'warning', 'question', 'info', 'error', 'success', 'warning', 'question',
......
/**
* 文件:MenuDao.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.dao; package com.mortals.xhx.base.system.menu.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import java.util.List;
/** /**
* <p>Title: 菜单信息</p> * 菜单信息Dao
* <p>Description: MenuDao DAO接口 </p> * 菜单信息 DAO接口
* <p>Copyright: Copyright &reg; </p> *
* <p>Company: </p> * @author zxfei
* @author * @date 2023-04-10
* @version 1.0.0 */
*/
public interface MenuDao extends ICRUDDao<MenuEntity,Long> { public interface MenuDao extends ICRUDDao<MenuEntity,Long>{
/**
* 查询子节点
*
* @param
* @return
*/
List<MenuEntity> selectChildrenMenuById(String menuId);
} }
/**
* 文件:MenuDaoImpl.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.dao.ibatis; package com.mortals.xhx.base.system.menu.dao.ibatis;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.base.system.menu.dao.MenuDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.base.system.menu.dao.MenuDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/** /**
* <p>Title: 菜单信息</p> * 菜单信息DaoImpl DAO接口
* <p>Description: MenuDaoImpl DAO接口 </p> *
* <p>Copyright: Copyright &reg; </p> * @author zxfei
* <p>Company: </p> * @date 2023-04-10
* @author */
* @version 1.0.0
*/
@Repository("menuDao") @Repository("menuDao")
public class MenuDaoImpl extends BaseCRUDDaoMybatis<MenuEntity,Long> implements MenuDao { public class MenuDaoImpl extends BaseCRUDDaoMybatis<MenuEntity,Long> implements MenuDao {
@Override
public List<MenuEntity> selectChildrenMenuById(String menuId) {
return getSqlSession().selectList(getSqlId("selectChildrenMenuById"), menuId);
}
} }
package com.mortals.xhx.base.system.menu.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
import java.util.stream.Collectors;
/**
* 菜单信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-04-10
*/
@Data
public class MenuTreeSelect implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 节点ID
*/
private Long id;
/**
* 节点名称
*/
private String label;
/**
* 子节点
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<MenuTreeSelect> children;
public MenuTreeSelect(MenuEntity entity) {
this.id = entity.getId();
this.label = entity.getName();
this.children = entity.getChildList().stream().map(MenuTreeSelect::new).collect(Collectors.toList());
}
}
\ No newline at end of file
package com.mortals.xhx.base.system.menu.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 菜单信息视图对象
*
* @author zxfei
* @date 2023-04-10
*/
@Data
public class MenuVo extends BaseEntityLong {
/** 子菜单信息 */
private List<MenuEntity> childList = new ArrayList<>();
private Integer type;
}
\ No newline at end of file
/**
* 文件:MenuService.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.service; package com.mortals.xhx.base.system.menu.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
/** /**
* <p>Title: 菜单信息</p> * MenuService
* <p>Description: MenuService service接口 </p> * <p>
* <p>Copyright: Copyright &reg; </p> * 菜单信息 service接口
* <p>Company: </p> *
* @author * @author zxfei
* @version 1.0.0 * @date 2023-04-10
*/ */
public interface MenuService extends ICRUDService<MenuEntity, Long> {
public interface MenuService extends ICRUDService<MenuEntity,Long> {
/** /**
* 获取所有可用菜单 * 获取所有可用菜单
* *
...@@ -56,8 +50,47 @@ public interface MenuService extends ICRUDService<MenuEntity,Long> { ...@@ -56,8 +50,47 @@ public interface MenuService extends ICRUDService<MenuEntity,Long> {
/** /**
* 更新排列顺序 * 更新排列顺序
*
* @param id * @param id
* @param type * @param type
*/ */
void upOrDown(Long id, Integer type); void upOrDown(Long id, Integer type);
/**
* 是否存在菜单信息节点
*
* @param menuId 菜单信息ID
* @return 结果
*/
boolean hasChildByMenuId(Long menuId);
/**
* 查询菜单信息数据
*
* @param menu 菜单信息
* @return 菜单信息集合
*/
List<MenuEntity> selectMenuList(MenuEntity menu);
/**
* 构建前端所需要下拉树结构
*
* @param menuList 菜单信息列表
* @return 下拉树结构列表
*/
List<MenuTreeSelect> buildMenuTreeSelect(List<MenuEntity> menuList);
/**
* 根据父id查询子节点
*
* @param parentId
* @param context
* @return
*/
List<MenuTreeSelect> getListByParentId(Long parentId, Context context);
Set<Long> getPathSetById(Long id, Context context);
} }
\ No newline at end of file
/**
* 文件:MenuServiceImpl.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.service.impl; package com.mortals.xhx.base.system.menu.service.impl;
import com.mortals.framework.common.code.YesNo; import com.mortals.framework.common.code.YesNo;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.YesNoEnum;
import org.springframework.stereotype.Service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.common.code.SatusEnum;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.base.system.menu.dao.MenuDao; import com.mortals.xhx.base.system.menu.dao.MenuDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuQuery; import com.mortals.xhx.base.system.menu.model.MenuQuery;
import com.mortals.xhx.base.system.menu.service.MenuService; import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import com.mortals.xhx.common.code.YesNoEnum; import org.springframework.util.ObjectUtils;
import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* <p>Title: 菜单信息</p> * MenuService
* <p>Description: MenuServiceImpl service接口 </p> * 菜单信息 service实现
* <p>Copyright: Copyright &reg; </p> *
* <p>Company: </p> * @author zxfei
* * @date 2023-04-10
* @author */
* @version 1.0.0
*/
@Service("menuService") @Service("menuService")
public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity, Long> implements MenuService { public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity, Long> implements MenuService {
...@@ -168,16 +157,203 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity ...@@ -168,16 +157,203 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
} }
@Override @Override
protected void saveBefore(MenuEntity entity, Context context) throws AppException { protected void saveBefore(MenuEntity entity, Context context) throws AppException {
MenuQuery query = new MenuQuery(); MenuQuery query = new MenuQuery();
query.setParentId(entity.getParentId()); query.setParentId(entity.getParentId());
Comparator<Integer> comparator = Comparator.comparing(Integer::intValue); Comparator<Integer> comparator = Comparator.comparing(Integer::intValue);
Optional<Integer> maxOptional = this.find(query).stream().map(MenuEntity::getOrderId).filter(f->f!=9999).max(comparator); Optional<Integer> maxOptional = this.find(query).stream().map(item->{
if(ObjectUtils.isEmpty(item.getOrderId())) return 1;
return item.getOrderId();
}).filter(f->f!=9999).max(comparator);
maxOptional.ifPresent(e -> { maxOptional.ifPresent(e -> {
e=e+1; e=e+1;
entity.setOrderId(e); entity.setOrderId(e);
}); });
MenuEntity parentMenuEntity = this.get(entity.getParentId());
if (!ObjectUtils.isEmpty(parentMenuEntity) && SatusEnum.DISENABLE.getValue() == parentMenuEntity.getStatus()) {
throw new AppException("菜单信息停用,不允许新增");
}
if (!ObjectUtils.isEmpty(parentMenuEntity)) {
entity.setAncestors(parentMenuEntity.getAncestors() + "," + entity.getParentId());
}
super.saveBefore(entity, context); super.saveBefore(entity, context);
} }
@Override
protected void updateBefore(MenuEntity entity, Context context) throws AppException {
MenuEntity newParentEntity = this.get(entity.getParentId());
MenuEntity oldEntity = this.get(entity.getId());
if (!ObjectUtils.isEmpty(newParentEntity) && !ObjectUtils.isEmpty(oldEntity)) {
String newAncestors = newParentEntity.getAncestors() + "," + newParentEntity.getId();
String oldAncestors = oldEntity.getAncestors();
entity.setAncestors(newAncestors);
updateMenuChildren(entity.getId(), newAncestors, oldAncestors, context);
}
super.updateBefore(entity, context);
}
@Override
protected void updateAfter(MenuEntity entity, Context context) throws AppException {
if (SatusEnum.ENABLE.getValue() == entity.getStatus()) {
entity= this.get(entity.getId());
updateParentMenuStatus(entity, context);
}
super.updateAfter(entity, context);
}
/**
* 修改该菜单信息的父级菜单信息状态
*
* @param menu 当前菜单信息
*/
private void updateParentMenuStatus(MenuEntity menu, Context context) {
MenuEntity menuEntity = this.get(menu.getParentId());
if(!ObjectUtils.isEmpty(menuEntity)){
menuEntity.setStatus(SatusEnum.ENABLE.getValue());
menuEntity.setUpdateTime(new Date());
menuEntity.setUpdateUser(context.getUser().getLoginName());
MenuEntity condition = new MenuEntity();
condition.setId(menuEntity.getId());
this.updateBatch(menuEntity, condition, context);
}
}
/**
* 修改子元素关系
*
* @param menuId 被修改的菜单信息ID
* @param newAncestors 新的父ID集合
* @param oldAncestors 旧的父ID集合
*/
public void updateMenuChildren(Long menuId, String newAncestors, String oldAncestors, Context context) {
List<MenuEntity> children = getDao().selectChildrenMenuById(menuId.toString());
for (MenuEntity child : children) {
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
}
if (children.size() > 0) {
this.updateAfter(children, context);
}
}
@Override
protected void removeBefore(Long[] ids, Context context) throws AppException {
//有子节点 禁止删除
if (hasChildByMenuId(ids[0])) {
throw new AppException("存在下级菜单信息,不允许删除");
}
super.removeBefore(ids, context);
}
@Override
public boolean hasChildByMenuId(Long menuId) {
List<MenuEntity> list = this.find(new MenuQuery().parentId(menuId));
return list.size() > 0 ? true : false;
}
@Override
public List<MenuEntity> selectMenuList(MenuEntity menu) {
return this.find(new MenuQuery());
}
@Override
public List<MenuTreeSelect> buildMenuTreeSelect(List<MenuEntity> list) {
List<MenuEntity> returnList = new ArrayList<>();
List<Long> tempList = list.stream().map(MenuEntity::getId).collect(Collectors.toList());
for (Iterator<MenuEntity> iterator = list.iterator(); iterator.hasNext(); ) {
MenuEntity menuEntity = iterator.next();
if (!tempList.contains(menuEntity.getParentId())) {
recursionFn(list, menuEntity);
returnList.add(menuEntity);
}
}
if (returnList.isEmpty()) {
returnList = list;
}
return returnList.stream().map(MenuTreeSelect::new).collect(Collectors.toList());
}
/**
* 递归列表
*/
private void recursionFn(List<MenuEntity> list, MenuEntity t) {
// 得到子节点列表
List<MenuEntity> childList = getChildList(list, t);
t.setChildList(childList);
for (MenuEntity tChild : childList) {
if (hasChild(list, tChild)) {
recursionFn(list, tChild);
}
}
}
/**
* 判断是否有子节点
*/
private boolean hasChild(List<MenuEntity> list, MenuEntity t) {
return getChildList(list, t).size() > 0 ? true : false;
}
/**
* 得到子节点列表
*/
private List<MenuEntity> getChildList(List<MenuEntity> list, MenuEntity t) {
return list.stream().map(item->{
if (!ObjectUtils.isEmpty(item.getParentId()) && item.getParentId() == t.getId()) {
return item;
}
return null;
}).filter(f->f!=null).collect(Collectors.toList());
}
@Override
public List<MenuTreeSelect> getListByParentId(Long parentId, Context context) {
if (ObjectUtils.isEmpty(parentId)) {
parentId = 0L;
}
//只做一层
List<MenuTreeSelect> collect = this.find(new MenuQuery().parentId(parentId), context).stream().map(item -> new MenuTreeSelect(item)
).collect(Collectors.toList());
if ("0".equals(parentId)) {
return collect;
}
return collect;
}
@Override
public Set<Long> getPathSetById(Long id, Context context) {
Set<Long> idSet = new HashSet<>();
//idSet.add(id);
MenuEntity menuEntity = this.get(id, context);
if(!ObjectUtils.isEmpty(menuEntity)){
return extracted(context, idSet, menuEntity);
}
return idSet;
}
private Set<Long> extracted(Context context, Set<Long> idSet, MenuEntity menuEntity) {
MenuEntity parentMenu = this.get(menuEntity.getParentId(), context);
if(!ObjectUtils.isEmpty(parentMenu)){
idSet.add(parentMenu.getId());
return extracted(context,idSet,parentMenu);
}
return idSet;
}
} }
\ No newline at end of file
package com.mortals.xhx.base.system.menu.web; package com.mortals.xhx.base.system.menu.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.base.system.menu.model.MenuQuery; import com.mortals.xhx.base.system.menu.model.MenuQuery;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.service.MenuService; import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.common.code.DataSatus; import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import com.mortals.xhx.common.code.MenuAuthType; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.xhx.common.code.MenuComm; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.MenuLinkType;
import com.mortals.xhx.common.code.MenuType;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import static com.mortals.framework.ap.SysConstains.*;
/** /**
* 菜单信息 *
* * 菜单信息
* @author: zxfei *
* @date: 2021/11/30 10:02 * @author zxfei
*/ * @date 2023-04-10
*/
@RestController @RestController
@RequestMapping("menu") @RequestMapping("menu")
public class MenuController extends BaseCRUDJsonBodyMappingController<MenuService, MenuEntity, Long> { public class MenuController extends BaseCRUDJsonBodyMappingController<MenuService,MenuEntity,Long> {
public MenuController() { @Autowired
super.setModuleDesc("菜单信息"); private ParamService paramService;
}
@Override @Override
...@@ -65,7 +60,7 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic ...@@ -65,7 +60,7 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
* 改变状态 * 改变状态
*/ */
@RequestMapping(value = "change/status") @RequestMapping(value = "change/status")
public String changeStatus(@RequestBody MenuEntity query) { public String changeStatus(@RequestBody com.mortals.xhx.base.system.menu.model.MenuEntity query) {
JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
Context context = getContext(); Context context = getContext();
try { try {
...@@ -110,4 +105,88 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic ...@@ -110,4 +105,88 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
} }
return ret.toJSONString(); return ret.toJSONString();
} }
@PostMapping("list/exclude")
public String excludeList(@RequestBody MenuEntity query) {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
try {
//查询所有菜单 排除当前菜单路径
Set<Long> idSet = new HashSet<>();
idSet.add(query.getId());
//Set<Long> idSets = this.service.getPathSetById(query.getId(), getContext());
List<MenuEntity> collect = this.service.find(new MenuQuery()).stream().map(item -> {
if(idSet.contains(item.getId())) return null;
//if(idSets.contains(item.getId())) return null;
//ArrayUtils.contains()
// if(ObjectUtils.isEmpty(item.getAncestors())){
// return null;
// }
// if (item.getId().intValue() == id || ArrayUtils.contains(StringUtils.split(item.getAncestors(), ","), id + "")) {
// return null;
// }
return item;
}).filter(f -> f != null).collect(Collectors.toList());
model.put("data", collect);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/**
* 获取站点下拉树列表
*/
@PostMapping("treeselect")
public String treeselect(MenuEntity query) {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
try {
List<MenuEntity> list = this.service.find(new MenuQuery());
List<MenuTreeSelect> treeSelects = this.service.buildMenuTreeSelect(list);
model.put("result", treeSelects);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/**
* 根据parentId查询子信息
*/
@GetMapping(value = "getListByParentId")
public String getListByParentId(Long parentId) {
JSONObject ret = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = "查询" + this.getModuleDesc()+"子节点";
try {
List<MenuTreeSelect> treeList = this.service.getListByParentId(parentId, getContext());
model.put(RESULT_KEY,treeList);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_DATA, model);
recordSysLog(request, busiDesc+"【成功】");
} catch (Exception e) {
log.error("根据parentId查询子信息错误", e);
this.doException(request, busiDesc, model, e);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, e.getMessage());
}
return ret.toJSONString();
}
} }
\ No newline at end of file
/**
* 文件:MenuForm.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuQuery;
/**
* <p>Title: 菜单信息</p>
* <p>Description: MenuForm </p>
* <p>Copyright: Copyright &reg; </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public class MenuForm extends BaseCRUDFormLong<MenuEntity> {
private MenuEntity entity = new MenuEntity();
private MenuQuery query = new MenuQuery();
public MenuForm(){
}
@Override
public MenuEntity getEntity() {
return entity;
}
public void setEntity(MenuEntity entity) {
this.entity = entity;
}
@Override
public MenuQuery getQuery() {
return query;
}
public void setQuery(MenuQuery query) {
this.query = query;
}
}
\ No newline at end of file
...@@ -4,24 +4,23 @@ import java.util.LinkedHashMap; ...@@ -4,24 +4,23 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
/** /**
* 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)枚举类 * 证件类型()枚举类
* *
* @author zxfei * @author zxfei
*/ */
public enum ProjectTypeEnum { public enum IdCardTypeEnum {
法律法规(0, "法律法规"), 身份证("居民身份证", "居民身份证"),
业务知识(1, "业务知识"), 军官证("军官证", "军官证"),
行业知识(2, "行业知识"), ;
通用知识(3, "通用知识"); private String value;
private Integer value;
private String desc; private String desc;
ProjectTypeEnum(Integer value, String desc) { IdCardTypeEnum(String value, String desc) {
this.value = value; this.value = value;
this.desc = desc; this.desc = desc;
} }
public Integer getValue() { public String getValue() {
return this.value; return this.value;
} }
...@@ -29,10 +28,10 @@ public enum ProjectTypeEnum { ...@@ -29,10 +28,10 @@ public enum ProjectTypeEnum {
return this.desc; return this.desc;
} }
public static ProjectTypeEnum getByValue(Integer value) { public static IdCardTypeEnum getByValue(String value) {
for (ProjectTypeEnum projectTypeEnum : ProjectTypeEnum.values()) { for (IdCardTypeEnum processStatusEnum : IdCardTypeEnum.values()) {
if (projectTypeEnum.getValue() == value) { if (processStatusEnum.getValue() == value) {
return projectTypeEnum; return processStatusEnum;
} }
} }
return null; return null;
...@@ -44,12 +43,12 @@ public enum ProjectTypeEnum { ...@@ -44,12 +43,12 @@ public enum ProjectTypeEnum {
* @param eItem 不包含项 * @param eItem 不包含项
* @return * @return
*/ */
public static Map<String, String> getEnumMap(Integer... eItem) { public static Map<String, String> getEnumMap(String... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>(); Map<String, String> resultMap = new LinkedHashMap<>();
for (ProjectTypeEnum item : ProjectTypeEnum.values()) { for (IdCardTypeEnum item : IdCardTypeEnum.values()) {
try { try {
boolean hasE = false; boolean hasE = false;
for (Integer e : eItem) { for (String e : eItem) {
if (item.getValue() == e) { if (item.getValue() == e) {
hasE = true; hasE = true;
break; break;
......
package com.mortals.xhx.common.code;
/**
* @author karlhoo
*/
public enum OneThingRespCodeEnum {
/** 接收成功 */
SUCCESS(200, "成功"),
/** 执行失败 */
FAILED(400,"执行失败"),
;
private final Integer value;
private final String label;
OneThingRespCodeEnum(Integer value, String label) {
this.value = value;
this.label = label;
}
public int getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum OneThingTypeEnum {
UNSUBMIT(1, "资料上传"),
SUBMIT(2, "确认提交");
private int value;
private String desc;
private OneThingTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static OneThingTypeEnum getByValue(int value) {
OneThingTypeEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
OneThingTypeEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
OneThingTypeEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
OneThingTypeEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum PublishStatusEnum implements IBaseEnum{
PRODUCT_PENDING(0, "待发布"),
PRODUCT_AUDITING(1, "审核中"),
PRODUCT_SUCESS(2, "审核通过"),
PRODUCT_REJECT(3, "审核拒绝");
private int value;
private String desc;
PublishStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static PublishStatusEnum getByValue(int value) {
for (PublishStatusEnum YesNoEnum : PublishStatusEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (PublishStatusEnum item : PublishStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code; package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
public enum OneThingStatusEnum implements IBaseEnum{ /**
* 状态
BOM_EDIT(401, "修订中"), * @author
BOM_AUDIT(402, "审核中"), *
BOM_PUBLISH(403, "已发布"); */
public enum SatusEnum {
DISENABLE(0, "禁用"),
ENABLE(1, "启用");
private int value; private int value;
private String desc; private String desc;
OneThingStatusEnum(int value, String desc) {
SatusEnum(int value, String desc) {
this.value = value; this.value = value;
this.desc = desc; this.desc = desc;
} }
@Override
public int getValue() { public int getValue() {
return this.value; return this.value;
} }
...@@ -28,10 +30,10 @@ public enum OneThingStatusEnum implements IBaseEnum{ ...@@ -28,10 +30,10 @@ public enum OneThingStatusEnum implements IBaseEnum{
return desc; return desc;
} }
public static OneThingStatusEnum getByValue(int value) { public static SatusEnum getByValue(int value) {
for (OneThingStatusEnum YesNoEnum : OneThingStatusEnum.values()) { for (SatusEnum examStatus : SatusEnum.values()) {
if (YesNoEnum.getValue() == value) { if (examStatus.getValue() == value) {
return YesNoEnum; return examStatus;
} }
} }
return null; return null;
...@@ -42,8 +44,9 @@ public enum OneThingStatusEnum implements IBaseEnum{ ...@@ -42,8 +44,9 @@ public enum OneThingStatusEnum implements IBaseEnum{
* @return * @return
*/ */
public static Map<String,String> getEnumMap(int... eItem) { public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>(); Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (OneThingStatusEnum item : OneThingStatusEnum.values()) { for (SatusEnum item : SatusEnum.values()) {
try{ try{
boolean hasE = false; boolean hasE = false;
for (int e : eItem){ for (int e : eItem){
...@@ -60,5 +63,4 @@ public enum OneThingStatusEnum implements IBaseEnum{ ...@@ -60,5 +63,4 @@ public enum OneThingStatusEnum implements IBaseEnum{
} }
return resultMap; return resultMap;
} }
} }
...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel; ...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.appointment.model.vo.AppointmentConfigTimesVo; import com.mortals.xhx.module.appointment.model.vo.AppointmentConfigTimesVo;
/** /**
* 预约自动签到配置时间段实体对象 * 预约自动签到配置时间段实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-11
*/ */
public class AppointmentConfigTimesEntity extends AppointmentConfigTimesVo { public class AppointmentConfigTimesEntity extends AppointmentConfigTimesVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -4,26 +4,26 @@ import java.util.Date; ...@@ -4,26 +4,26 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity; import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity;
/** /**
* 预约自动签到配置时间段查询对象 * 预约自动签到配置时间段查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-11
*/ */
public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity { public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
private Long IdStart; private Long idStart;
/** 结束 序号,主键,自增长 */ /** 结束 序号,主键,自增长 */
private Long IdEnd; private Long idEnd;
/** 增加 序号,主键,自增长 */ /** 增加 序号,主键,自增长 */
private Long IdIncrement; private Long idIncrement;
/** 序号,主键,自增长列表 */ /** 序号,主键,自增长列表 */
private List <Long> IdList; private List <Long> idList;
/** 序号,主键,自增长排除列表 */ /** 序号,主键,自增长排除列表 */
private List <Long> IdNotList; private List <Long> idNotList;
/** 开始 自动签到配置id */ /** 开始 自动签到配置id */
private Long aotoCheckCfgIdStart; private Long aotoCheckCfgIdStart;
...@@ -109,82 +109,82 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity { ...@@ -109,82 +109,82 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity {
/** /**
* 获取 开始 序号,主键,自增长 * 获取 开始 序号,主键,自增长
* @return IdStart * @return idStart
*/ */
public Long getIdStart(){ public Long getIdStart(){
return this.IdStart; return this.idStart;
} }
/** /**
* 设置 开始 序号,主键,自增长 * 设置 开始 序号,主键,自增长
* @param IdStart * @param idStart
*/ */
public void setIdStart(Long IdStart){ public void setIdStart(Long idStart){
this.IdStart = IdStart; this.idStart = idStart;
} }
/** /**
* 获取 结束 序号,主键,自增长 * 获取 结束 序号,主键,自增长
* @return $IdEnd * @return $idEnd
*/ */
public Long getIdEnd(){ public Long getIdEnd(){
return this.IdEnd; return this.idEnd;
} }
/** /**
* 设置 结束 序号,主键,自增长 * 设置 结束 序号,主键,自增长
* @param IdEnd * @param idEnd
*/ */
public void setIdEnd(Long IdEnd){ public void setIdEnd(Long idEnd){
this.IdEnd = IdEnd; this.idEnd = idEnd;
} }
/** /**
* 获取 增加 序号,主键,自增长 * 获取 增加 序号,主键,自增长
* @return IdIncrement * @return idIncrement
*/ */
public Long getIdIncrement(){ public Long getIdIncrement(){
return this.IdIncrement; return this.idIncrement;
} }
/** /**
* 设置 增加 序号,主键,自增长 * 设置 增加 序号,主键,自增长
* @param IdIncrement * @param idIncrement
*/ */
public void setIdIncrement(Long IdIncrement){ public void setIdIncrement(Long idIncrement){
this.IdIncrement = IdIncrement; this.idIncrement = idIncrement;
} }
/** /**
* 获取 序号,主键,自增长 * 获取 序号,主键,自增长
* @return IdList * @return idList
*/ */
public List<Long> getIdList(){ public List<Long> getIdList(){
return this.IdList; return this.idList;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdList * @param idList
*/ */
public void setIdList(List<Long> IdList){ public void setIdList(List<Long> idList){
this.IdList = IdList; this.idList = idList;
} }
/** /**
* 获取 序号,主键,自增长 * 获取 序号,主键,自增长
* @return IdNotList * @return idNotList
*/ */
public List<Long> getIdNotList(){ public List<Long> getIdNotList(){
return this.IdNotList; return this.idNotList;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdNotList * @param idNotList
*/ */
public void setIdNotList(List<Long> IdNotList){ public void setIdNotList(List<Long> idNotList){
this.IdNotList = IdNotList; this.idNotList = idNotList;
} }
...@@ -593,55 +593,55 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity { ...@@ -593,55 +593,55 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity {
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param Id * @param id
*/ */
public AppointmentConfigTimesQuery Id(Long Id){ public AppointmentConfigTimesQuery id(Long id){
setId(Id); setId(id);
return this; return this;
} }
/** /**
* 设置 开始 序号,主键,自增长 * 设置 开始 序号,主键,自增长
* @param IdStart * @param idStart
*/ */
public AppointmentConfigTimesQuery IdStart(Long IdStart){ public AppointmentConfigTimesQuery idStart(Long idStart){
this.IdStart = IdStart; this.idStart = idStart;
return this; return this;
} }
/** /**
* 设置 结束 序号,主键,自增长 * 设置 结束 序号,主键,自增长
* @param IdEnd * @param idEnd
*/ */
public AppointmentConfigTimesQuery IdEnd(Long IdEnd){ public AppointmentConfigTimesQuery idEnd(Long idEnd){
this.IdEnd = IdEnd; this.idEnd = idEnd;
return this; return this;
} }
/** /**
* 设置 增加 序号,主键,自增长 * 设置 增加 序号,主键,自增长
* @param IdIncrement * @param idIncrement
*/ */
public AppointmentConfigTimesQuery IdIncrement(Long IdIncrement){ public AppointmentConfigTimesQuery idIncrement(Long idIncrement){
this.IdIncrement = IdIncrement; this.idIncrement = idIncrement;
return this; return this;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdList * @param idList
*/ */
public AppointmentConfigTimesQuery IdList(List<Long> IdList){ public AppointmentConfigTimesQuery idList(List<Long> idList){
this.IdList = IdList; this.idList = idList;
return this; return this;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdNotList * @param idNotList
*/ */
public AppointmentConfigTimesQuery IdNotList(List<Long> IdNotList){ public AppointmentConfigTimesQuery idNotList(List<Long> idNotList){
this.IdNotList = IdNotList; this.idNotList = idNotList;
return this; return this;
} }
......
...@@ -296,7 +296,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo { ...@@ -296,7 +296,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo {
this.contact = ""; this.contact = "";
this.idCardType = ""; this.idCardType = "居民身份证";
this.idCardNo = ""; this.idCardNo = "";
...@@ -304,7 +304,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo { ...@@ -304,7 +304,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo {
this.constraintTime = null; this.constraintTime = null;
this.createMethod = null; this.createMethod = 1;
this.operator = ""; this.operator = "";
......
package com.mortals.xhx.module.appointment.service; package com.mortals.xhx.module.appointment.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity; import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
/** /**
* AppointmentConstraintService * AppointmentConstraintService
* *
...@@ -11,4 +15,7 @@ import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity; ...@@ -11,4 +15,7 @@ import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
*/ */
public interface AppointmentConstraintService extends ICRUDService<AppointmentConstraintEntity,Long>{ public interface AppointmentConstraintService extends ICRUDService<AppointmentConstraintEntity,Long>{
Rest<String> constraintService(AppointmentConstraintEntity appointmentConstraintEntity, Context context);
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.service; package com.mortals.xhx.module.appointment.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity; import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
import org.springframework.web.bind.annotation.RequestBody;
/** /**
* AppointmentRecordsService * AppointmentRecordsService
* *
...@@ -11,4 +15,12 @@ import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity; ...@@ -11,4 +15,12 @@ import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
*/ */
public interface AppointmentRecordsService extends ICRUDService<AppointmentRecordsEntity,Long>{ public interface AppointmentRecordsService extends ICRUDService<AppointmentRecordsEntity,Long>{
/**
* 停止群众预约推送服务
* @param appointmentRecordsEntity
* @param context
* @return
*/
Rest<String> stopService(AppointmentRecordsEntity appointmentRecordsEntity, Context context);
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.service.impl; package com.mortals.xhx.module.appointment.service.impl;
import com.mortals.framework.common.Rest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -16,4 +17,9 @@ import com.mortals.xhx.module.appointment.service.AppointmentRecordsService; ...@@ -16,4 +17,9 @@ import com.mortals.xhx.module.appointment.service.AppointmentRecordsService;
@Service("appointmentRecordsService") @Service("appointmentRecordsService")
public class AppointmentRecordsServiceImpl extends AbstractCRUDServiceImpl<AppointmentRecordsDao, AppointmentRecordsEntity, Long> implements AppointmentRecordsService { public class AppointmentRecordsServiceImpl extends AbstractCRUDServiceImpl<AppointmentRecordsDao, AppointmentRecordsEntity, Long> implements AppointmentRecordsService {
@Override
public Rest<String> stopService(AppointmentRecordsEntity appointmentRecordsEntity, Context context) {
//todo 停止群众推送服务
return Rest.ok("服务停止成功");
}
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.web; package com.mortals.xhx.module.appointment.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -54,4 +58,7 @@ public class AppointmentConfigController extends BaseCRUDJsonBodyMappingControll ...@@ -54,4 +58,7 @@ public class AppointmentConfigController extends BaseCRUDJsonBodyMappingControll
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment