Merge remote-tracking branch 'origin/fix_bug_first_stage' into fix_bug_first_stage
This commit is contained in:
@@ -386,7 +386,7 @@ ALTER TABLE `laws_weilai`.`sys_user`
|
||||
DROP INDEX `uniq_sys_user_phone`,
|
||||
DROP INDEX `uniq_sys_user_email`;
|
||||
|
||||
-- 参数项清单 修改字段长度 2022-07-17
|
||||
-- 参数项清单 修改字段长度 2022-07-17 2022-07-20 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`params_info`
|
||||
MODIFY COLUMN `params_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名称' AFTER `is_must`,
|
||||
MODIFY COLUMN `description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`;
|
||||
@@ -417,4 +417,80 @@ ALTER TABLE `laws_weilai`.`params_report_detail`
|
||||
|
||||
ALTER TABLE `laws_weilai`.`report_cert_category_params_info`
|
||||
MODIFY COLUMN `params_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名称' AFTER `params_number`,
|
||||
MODIFY COLUMN `description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`;
|
||||
MODIFY COLUMN `description` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`;
|
||||
|
||||
-- 文档翻译表 2022-07-20 已同步生产环境
|
||||
CREATE TABLE `laws_weilai`.`doc_translation` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`buss_document_library_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id',
|
||||
`text_status` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文本状态',
|
||||
`file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
|
||||
`source_language` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '翻译前语言(源语言)',
|
||||
`target_language` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '翻译后语言(目标语言)',
|
||||
`translation_result` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '翻译结果',
|
||||
`translation_time` datetime NULL DEFAULT NULL COMMENT '转换时间',
|
||||
`release_condition` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布情况',
|
||||
`source_file_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '源文件id',
|
||||
`target_file_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '目标文件id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文档翻译表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- 文档翻译-源语言数据字典
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550306517749547010', '文档翻译-翻译语言-源语言', 'source_language', '文档翻译-翻译语言-源语言', 0, 'admin', '2022-07-22 10:27:32', 'admin', '2022-07-22 10:29:17', NULL, NULL, 1, 0, '1', 2);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030756958032691412', '1550306517749547010', '中文', 'zh', '中文', 2, 1, 'admin', '2022-07-22 10:31:43', 'admin', '2022-07-22 10:31:59', 1, NULL, NULL, '0', 'Chinese');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030763691987763313', '1550306517749547010', '英文', 'en', '英文', 1, 1, 'admin', '2022-07-22 10:31:59', NULL, NULL, 1, NULL, NULL, '0', 'English');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030778369954611414', '1550306517749547010', '日语', 'ja', '日语', 3, 1, 'admin', '2022-07-22 10:32:34', NULL, NULL, 1, NULL, NULL, '0', 'Japanese');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030790598028493015', '1550306517749547010', '俄语', 'ru', '俄语', 4, 1, 'admin', '2022-07-22 10:33:03', NULL, NULL, 1, NULL, NULL, '0', 'Russian');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('155030797657042124916', '1550306517749547010', '德语', 'de', '德语', 5, 1, 'admin', '2022-07-22 10:33:20', 'admin', '2022-07-22 10:34:58', 1, NULL, NULL, '0', 'German');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503088022275522577', '1550306517749547010', '法语', 'fr', '法语', 6, 1, 'admin', '2022-07-22 10:36:36', NULL, NULL, 1, NULL, NULL, '0', 'French');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503112074344038418', '1550306517749547010', '意大利语', 'it', '意大利语', 7, 1, 'admin', '2022-07-22 10:46:10', NULL, NULL, 1, NULL, NULL, '0', 'Italian');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503112704622100509', '1550306517749547010', '波兰语', 'pl', '波兰语', 8, 1, 'admin', '2022-07-22 10:46:25', NULL, NULL, 1, NULL, NULL, '0', 'Polish');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503114101073674251', '1550306517749547010', '泰语', 'th', '泰语', 9, 1, 'admin', '2022-07-22 10:46:58', NULL, NULL, 1, NULL, NULL, '0', 'Thai language');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503115557294080012', '1550306517749547010', '印地语', 'hi', '印地语', 11, 1, 'admin', '2022-07-22 10:47:33', NULL, NULL, 1, NULL, NULL, '0', 'Hindi');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503116395022417943', '1550306517749547010', '印尼语', 'id', '印尼语', 12, 1, 'admin', '2022-07-22 10:47:53', NULL, NULL, 1, NULL, NULL, '0', 'Indonesian');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503117185522892814', '1550306517749547010', '西班牙语', 'es', '西班牙语', 13, 1, 'admin', '2022-07-22 10:48:12', NULL, NULL, 1, NULL, NULL, '0', 'Spanish language');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503118402584084505', '1550306517749547010', '葡萄牙语', 'pt', '葡萄牙语', 17, 1, 'admin', '2022-07-22 10:48:41', 'admin', '2022-07-22 10:49:21', 1, NULL, NULL, '0', 'Portuguese');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503119403009474586', '1550306517749547010', '朝鲜语', 'ko', '朝鲜语', 15, 1, 'admin', '2022-07-22 10:49:05', NULL, NULL, 1, NULL, NULL, '0', 'Korean');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503120084961361947', '1550306517749547010', '越南语', 'vi', '越南语', 16, 1, 'admin', '2022-07-22 10:49:21', NULL, NULL, 1, NULL, NULL, '0', 'Vietnamese');
|
||||
|
||||
-- 文档翻译-目标语言数据字典
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550306581909815297', '文档翻译-翻译语言-目标语言', 'target_language', '文档翻译-翻译语言-目标语言', 0, 'admin', '2022-07-22 10:27:47', 'admin', '2022-07-22 10:29:13', NULL, NULL, 1, 0, '1', 1);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503075695803269141', '1550306581909815297', '中文', 'zh', '中文', 2, 1, 'admin', '2022-07-22 10:31:43', 'admin', '2022-07-22 10:31:59', 1, NULL, NULL, '0', 'Chinese');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503076369198776331', '1550306581909815297', '英文', 'en', '英文', 1, 1, 'admin', '2022-07-22 10:31:59', NULL, NULL, 1, NULL, NULL, '0', 'English');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503077836995461141', '1550306581909815297', '日语', 'ja', '日语', 3, 1, 'admin', '2022-07-22 10:32:34', NULL, NULL, 1, NULL, NULL, '0', 'Japanese');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503079059802849301', '1550306581909815297', '俄语', 'ru', '俄语', 4, 1, 'admin', '2022-07-22 10:33:03', NULL, NULL, 1, NULL, NULL, '0', 'Russian');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('15503079765704212491', '1550306581909815297', '德语', 'de', '德语', 5, 1, 'admin', '2022-07-22 10:33:20', 'admin', '2022-07-22 10:34:58', 1, NULL, NULL, '0', 'German');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550308802227552257', '1550306581909815297', '法语', 'fr', '法语', 6, 1, 'admin', '2022-07-22 10:36:36', NULL, NULL, 1, NULL, NULL, '0', 'French');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311207434403841', '1550306581909815297', '意大利语', 'it', '意大利语', 7, 1, 'admin', '2022-07-22 10:46:10', NULL, NULL, 1, NULL, NULL, '0', 'Italian');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311270462210050', '1550306581909815297', '波兰语', 'pl', '波兰语', 8, 1, 'admin', '2022-07-22 10:46:25', NULL, NULL, 1, NULL, NULL, '0', 'Polish');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311410107367425', '1550306581909815297', '泰语', 'th', '泰语', 9, 1, 'admin', '2022-07-22 10:46:58', NULL, NULL, 1, NULL, NULL, '0', 'Thai language');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311555729408001', '1550306581909815297', '印地语', 'hi', '印地语', 11, 1, 'admin', '2022-07-22 10:47:33', NULL, NULL, 1, NULL, NULL, '0', 'Hindi');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311639502241794', '1550306581909815297', '印尼语', 'id', '印尼语', 12, 1, 'admin', '2022-07-22 10:47:53', NULL, NULL, 1, NULL, NULL, '0', 'Indonesian');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311718552289281', '1550306581909815297', '西班牙语', 'es', '西班牙语', 13, 1, 'admin', '2022-07-22 10:48:12', NULL, NULL, 1, NULL, NULL, '0', 'Spanish language');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311840258408450', '1550306581909815297', '葡萄牙语', 'pt', '葡萄牙语', 17, 1, 'admin', '2022-07-22 10:48:41', 'admin', '2022-07-22 10:49:21', 1, NULL, NULL, '0', 'Portuguese');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550311940300947458', '1550306581909815297', '朝鲜语', 'ko', '朝鲜语', 15, 1, 'admin', '2022-07-22 10:49:05', NULL, NULL, 1, NULL, NULL, '0', 'Korean');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550312008496136194', '1550306581909815297', '越南语', 'vi', '越南语', 16, 1, 'admin', '2022-07-22 10:49:21', NULL, NULL, 1, NULL, NULL, '0', 'Vietnamese');
|
||||
|
||||
-- 文档翻译-发布情况数据字典
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550314527293128705', '文档翻译-发布情况', 'release_condition', '文档翻译-发布情况', 0, 'admin', '2022-07-22 10:59:21', 'admin', '2022-07-22 11:01:07', NULL, NULL, 1, 0, '1', 2);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550314666682433537', '1550314527293128705', '已发布', 'published', '已发布', 1, 1, 'admin', '2022-07-22 10:59:55', NULL, NULL, 1, NULL, NULL, '0', 'Have published');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550314731320852482', '1550314527293128705', '草稿', 'draft', '草稿', 2, 1, 'admin', '2022-07-22 11:00:10', NULL, NULL, 1, NULL, NULL, '0', 'Draft');
|
||||
|
||||
-- 文档翻译-翻译结果数据字典
|
||||
INSERT INTO `laws_weilai`.`sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1550314971079852034', '文档翻译-翻译结果', 'translation_result', '文档翻译-翻译结果', 0, 'admin', '2022-07-22 11:01:07', NULL, NULL, NULL, NULL, 1, 0, '1', 1);
|
||||
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550315090797871105', '1550314971079852034', '翻译中', 'In the translation', '翻译中', 1, 1, 'admin', '2022-07-22 11:01:36', NULL, NULL, 1, NULL, NULL, '0', 'In the translation');
|
||||
INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`) VALUES ('1550315193285689345', '1550314971079852034', '翻译完成', 'Translation done', '翻译完成', 2, 1, 'admin', '2022-07-22 11:02:00', NULL, NULL, 1, NULL, NULL, '0', 'Translation done');
|
||||
|
||||
-- 文档翻译表-增加字段 编号、标题
|
||||
ALTER TABLE `laws_weilai`.`doc_translation`
|
||||
ADD COLUMN `serial_number` varchar(255) NULL COMMENT '编号' AFTER `buss_document_library_id`,
|
||||
ADD COLUMN `title` varchar(255) NULL COMMENT '标题' AFTER `serial_number`;
|
||||
|
||||
+26
-8
@@ -381,13 +381,24 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
@ApiOperation(value="参数项收集清单-下发收集", notes="参数项收集清单-下发收集")
|
||||
@PostMapping(value = "/issueCollection")
|
||||
// @RequiresPermissions("params:collectManifest:issue")
|
||||
public Result<?> issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
boolean isSuccess = paramsCollectManifestEOService.issueCollection(paramsCollectManifestVO);
|
||||
if (isSuccess) {
|
||||
return Result.OK("下发收集成功!");
|
||||
} else {
|
||||
return Result.error("下发收集失败!");
|
||||
}
|
||||
public Result<List<String>> issueCollection(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
List<String> msgList = paramsCollectManifestEOService.issueCollection(paramsCollectManifestVO);
|
||||
return Result.OK(msgList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 一键下发收集
|
||||
*
|
||||
* @param paramsCollectManifestVO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "参数项收集清单-一键下发收集")
|
||||
@ApiOperation(value="参数项收集清单-一键下发收集", notes="参数项收集清单-一键下发收集")
|
||||
@PostMapping(value = "/issueCollectionAll")
|
||||
// @RequiresPermissions("params:collectManifest:issue")
|
||||
public Result<List<String>> issueCollectionAll(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
List<String> msgList = paramsCollectManifestEOService.issueCollectionAll(paramsCollectManifestVO);
|
||||
return Result.OK(msgList);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -511,7 +522,14 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
return Result.OK("带入工程接口人成功!");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "参数项收集清单-全部导出")
|
||||
@GetMapping(value = "/exportAll")
|
||||
// @RequiresPermissions("report:detail:export:normal")
|
||||
public void exportAll(ParamsCollectManifestVO paramsCollectManifestVO,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
paramsCollectManifestEOService.exportAll(paramsCollectManifestVO, response, request);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+1
@@ -83,6 +83,7 @@ public class ParamsManifestEOController extends JeroController<ParamsManifestEO,
|
||||
// 处理 状态 中英文
|
||||
Map<String, String> stateMap = ManifestStateEnum.toMap(cut);
|
||||
rows.forEach(manifestEO -> {
|
||||
manifestEO.setProjectName(paramsManifestEOService.getProjectById(manifestEO.getProjectId()).getProjectName());
|
||||
manifestEO.setState(stateMap.get(manifestEO.getState()));
|
||||
});
|
||||
return Result.OK(cut, pageList);
|
||||
|
||||
-3
@@ -1,8 +1,6 @@
|
||||
package com.jero.modules.cert.collect.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -121,7 +119,6 @@ public class ParamsCollectManifestBaseEO implements Serializable {
|
||||
/**工程接口人*/
|
||||
@Excel(name = "工程接口人", width = 15)
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String sdt;
|
||||
|
||||
/**填写人*/
|
||||
|
||||
+3
@@ -100,4 +100,7 @@ public class ParamsManifestEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -6,6 +6,7 @@ import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 参数收集清单
|
||||
@@ -17,6 +18,8 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
||||
|
||||
List<ParamsCollectManifestEO> listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
List<Map<String, Object>> listInfoForExport(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
// 查询控件类型为 标题的 参数项
|
||||
List<ParamsCollectManifestEO> listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId);
|
||||
|
||||
|
||||
+2
@@ -23,4 +23,6 @@ public interface ParamsManifestEOMapper extends BaseMapper<ParamsManifestEO> {
|
||||
|
||||
List<ParamsManifestVO> listInfoAll(@Param("idList") List<String> idList);
|
||||
|
||||
ParamsManifestVO getProjectById(@Param("projectId") String projectId);
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -80,6 +80,14 @@
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="listInfoForExport" resultType="java.util.LinkedHashMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
<include refid="BaseQuerySql"/>
|
||||
and control_type != '11'
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="listInfoOfTitle" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
|
||||
+12
@@ -112,4 +112,16 @@
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getProjectById" resultMap="ParamsManifestEOResultMapForCopy">
|
||||
select tmp_tb.* from(
|
||||
select
|
||||
plb.id as project_id,
|
||||
concat(pni.project_name,'-',pyni.year_name,' ',target_market) as project_name
|
||||
from project_library_base plb
|
||||
left join project_name_info as pni on plb.project_name_id = pni.id
|
||||
left join project_year_name_info as pyni on plb.year_name_id = pyni.id
|
||||
) tmp_tb
|
||||
where project_id = #{projectId}
|
||||
</select>
|
||||
</mapper>
|
||||
+8
-1
@@ -6,6 +6,7 @@ import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -126,7 +127,10 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
boolean updateDreBatch(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
// 下发收集
|
||||
boolean issueCollection(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
List<String> issueCollection(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
// 一键下发收集
|
||||
List<String> issueCollectionAll(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
// 配置-下拉选项
|
||||
List<Map<String, String>> getConfigLabelList(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
@@ -145,4 +149,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
|
||||
// 带入工程接口人
|
||||
boolean bringSdtInto(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
// 全部导出
|
||||
void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request);
|
||||
}
|
||||
|
||||
+3
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.collect.entity.ParamsManifestEO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestVO;
|
||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -79,4 +80,6 @@ public interface IParamsManifestEOService extends IService<ParamsManifestEO> {
|
||||
IPage getAllManifest(IPage page, String projectName);
|
||||
|
||||
ParamsManifestEO copy(ParamsManifestEO paramsManifestEO, String sourceManifestId);
|
||||
|
||||
ParamsManifestVO getProjectById(String projectId);
|
||||
}
|
||||
|
||||
+797
-71
File diff suppressed because it is too large
Load Diff
+6
@@ -20,6 +20,7 @@ import com.jero.modules.cert.collect.mapper.ParamsConfigEOMapper;
|
||||
import com.jero.modules.cert.collect.mapper.ParamsManifestEOMapper;
|
||||
import com.jero.modules.cert.collect.service.*;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsManifestVO;
|
||||
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||
@@ -618,4 +619,9 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
|
||||
return paramsManifestEO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParamsManifestVO getProjectById(String projectId) {
|
||||
return paramsManifestEOMapper.getProjectById(projectId);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -22,7 +22,7 @@ public class ParamsCollectManifestVO {
|
||||
private String paramsTemplateId; // 参数模板id
|
||||
|
||||
@ApiModelProperty(value = "参数模板发布版本")
|
||||
private String paramsTemplatePublishVersion; // 参数模板发布版本
|
||||
private Integer paramsTemplatePublishVersion; // 参数模板发布版本
|
||||
|
||||
@ApiModelProperty(value = "nio编号")
|
||||
private String nioNumber; // nio编号
|
||||
@@ -71,4 +71,10 @@ public class ParamsCollectManifestVO {
|
||||
private String targetConfigIds; // 引用参数专用
|
||||
|
||||
private String cut; // 引用参数专用
|
||||
|
||||
private String exportName; // 导出文件名
|
||||
|
||||
@ApiModelProperty(value = "用户类型")
|
||||
private String userTypes; // 用户类型
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -65,11 +65,11 @@ public class ParamsExportTemplateEOController extends JeroController<ParamsExpor
|
||||
.orderByDesc(ParamsExportTemplateEO::getCreateTime);
|
||||
Page<ParamsExportTemplateEO> page = new Page<ParamsExportTemplateEO>(pageNo, pageSize);
|
||||
IPage<ParamsExportTemplateEO> pageList = paramsExportTemplateEOService.page(page, queryWrapper);
|
||||
List<ParamsExportTemplateEO> rows = pageList.getRecords();
|
||||
// 处理 状态 中英文
|
||||
List<ParamsExportTemplateEO> rows = pageList.getRecords();
|
||||
Map<String, String> stateMap = ExportTemplateStateEnum.toMap(cut);
|
||||
rows.forEach(exportTemplateEO -> {
|
||||
exportTemplateEO.setState(stateMap.get(exportTemplateEO.getState()));
|
||||
exportTemplateEO.setState_dictText(stateMap.get(exportTemplateEO.getState()));
|
||||
});
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+30
-10
@@ -1,15 +1,21 @@
|
||||
package com.jero.modules.cert.report.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.cert.report.entity.ParamsExportTemplateEO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
|
||||
import com.jero.modules.cert.report.entity.ParamsReportDetailEO;
|
||||
import com.jero.modules.cert.report.service.IParamsExportTemplateEOService;
|
||||
import com.jero.modules.cert.report.service.IParamsReportConfigEOService;
|
||||
import com.jero.modules.cert.report.service.IParamsReportDetailEOService;
|
||||
import com.jero.modules.cert.report.vo.ParamsReportDetailVO;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -43,6 +49,13 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@Autowired
|
||||
private IParamsReportConfigEOService paramsReportConfigEOService;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@Autowired
|
||||
private IParamsExportTemplateEOService paramsExportTemplateEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
@@ -150,17 +163,24 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
public void exportCustom(ParamsReportDetailVO paramsReportDetailVO,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
paramsReportDetailEOService.exportCustom(paramsReportDetailVO, response, request);
|
||||
}
|
||||
// 判断模板类型是word 还是 excel
|
||||
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsExportTemplateEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||
String fileName = ossFiles.get(0).getFileName();
|
||||
String templateFileType = fileName.substring(fileName.lastIndexOf("."));
|
||||
if (".doc,.DOC,.docx,.DOCX".contains(templateFileType)) {
|
||||
paramsReportDetailEOService.exportCustomWord(paramsReportDetailVO, response, request);
|
||||
|
||||
// @ApiOperation(value = "上报库参数项-自定义导出excel")
|
||||
// @GetMapping(value = "/exportCustomExcel")
|
||||
//// @RequiresPermissions("report:detail:export:custom")
|
||||
// public void exportCustomExcel(ParamsReportDetailVO paramsReportDetailVO,
|
||||
// HttpServletResponse response,
|
||||
// HttpServletRequest request) {
|
||||
// paramsReportDetailEOService.exportCustomExcel(paramsReportDetailVO, response, request);
|
||||
// }
|
||||
} else if (".xls, .XLS,.xlsx,.XLSX".contains(templateFileType)) {
|
||||
paramsReportDetailEOService.exportCustomExcel(paramsReportDetailVO, response, request);
|
||||
|
||||
}
|
||||
} else {
|
||||
throw new JeroBootException("没有找到导出模板!");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
|
||||
+3
@@ -82,4 +82,7 @@ public class ParamsExportTemplateEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String state_dictText;
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -50,6 +50,9 @@ public interface IParamsReportDetailEOService extends IService<ParamsReportDetai
|
||||
// 导出模板下拉选项
|
||||
List<Map<String, String>> getTemplateLabelList();
|
||||
|
||||
void exportCustom(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
|
||||
// 自定义导出-word模板
|
||||
void exportCustomWord(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
void exportCustomExcel(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
}
|
||||
|
||||
+220
-59
@@ -23,23 +23,25 @@ import com.jero.modules.cert.report.entity.*;
|
||||
import com.jero.modules.cert.report.enums.ExportTypeEnum;
|
||||
import com.jero.modules.cert.report.mapper.ParamsReportDetailEOMapper;
|
||||
import com.jero.modules.cert.report.service.*;
|
||||
import com.jero.modules.cert.report.util.Docx4jUtil;
|
||||
import com.jero.modules.cert.report.vo.ParamsReportDetailVO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.util.ExcelUtil;
|
||||
import com.jero.modules.project.util.WordUtil;
|
||||
import com.jero.modules.split.common.ReadExcel;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.poi.hssf.util.HSSFColor;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.*;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.docx4j.Docx4J;
|
||||
import org.docx4j.openpackaging.exceptions.Docx4JException;
|
||||
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
@@ -504,7 +506,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
//创建临时文件夹
|
||||
String fileNowPath = uploadpath + "/tempZip/" + UUID.randomUUID().toString().replace("-","") + File.separator + fileOriName;
|
||||
File nowFile = new File(fileNowPath);
|
||||
if (nowFile.exists()){
|
||||
if (nowFile.exists()) {
|
||||
nowFile.delete();
|
||||
}
|
||||
nowFile.mkdirs();
|
||||
@@ -669,7 +671,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportCustom(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request) {
|
||||
public void exportCustomWord(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
OutputStream wordOS = null;
|
||||
String fileOriName = "上报库参数项自定义导出信息";
|
||||
@@ -691,6 +693,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
// 查询导出数据
|
||||
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
||||
Map<String, String> params = allParamsInfoList.get(0);
|
||||
List<Map<String, Object>> imgListAll = (List<Map<String, Object>>) allParamsInfoList.get(1).get("imgListAll");
|
||||
|
||||
String templateUrl = "";
|
||||
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
||||
@@ -702,7 +705,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
// 替换模板中的占位符
|
||||
try {
|
||||
//下载关联文件内容
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(1).get("fileListAll");
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(2).get("fileListAll");
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + "导出文件");
|
||||
@@ -713,23 +716,15 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||
if (CosBootUtil.doesObjectExist(templateUrl)) {
|
||||
InputStream wordTemplate = CosBootUtil.download(templateUrl);
|
||||
com.qcloud.cos.utils.IOUtils.copy(wordTemplate, wordOS);
|
||||
}
|
||||
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(wordTemplate);
|
||||
// 替换占位符内容
|
||||
WordUtil.replacePictureBatch(wordMLPackage, imgListAll);
|
||||
WordUtil.replaceVariable(wordMLPackage, params);
|
||||
Docx4J.save(wordMLPackage, wordOS);
|
||||
|
||||
// 替换占位符内容
|
||||
byte[] wordContent = Docx4jUtil.of(fileNowPath + File.separator + repFileName)
|
||||
.addParams(params)
|
||||
.get();
|
||||
ByteArrayInputStream wordis = new ByteArrayInputStream(wordContent);
|
||||
OutputStream wordFileOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||
int len1 = 0;
|
||||
while ((len1 = wordis.read()) != -1) {
|
||||
wordFileOS.write(len1);
|
||||
wordOS.flush();
|
||||
wordOS.close();
|
||||
}
|
||||
wordOS.flush();
|
||||
wordOS.close();
|
||||
wordFileOS.flush();
|
||||
wordFileOS.close();
|
||||
|
||||
// 打包导出压缩包
|
||||
response.setHeader("Content-Disposition",
|
||||
@@ -745,16 +740,18 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
|
||||
// 添加导出历史
|
||||
/*String uploadFileName = fileOriName + ".zip";
|
||||
MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, ContentType.APPLICATION_OCTET_STREAM.toString(), fis); // 用于上传
|
||||
String uploadFileName = fileOriName + ".zip";
|
||||
InputStream uploadFileio = new FileInputStream(new File(fileNowPath+".zip"));
|
||||
MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/report", "", CutEnum.CN.getValue()); // 上传导出的压缩包
|
||||
ParamsReportExportHistoryEO paramsReportExportHistoryEO = new ParamsReportExportHistoryEO();
|
||||
paramsReportExportHistoryEO.setExportType(ExportTypeEnum.NORMAL.getValue());
|
||||
paramsReportExportHistoryEO.setExportType(ExportTypeEnum.CUSTOM.getValue());
|
||||
paramsReportExportHistoryEO.setExportFileId(ossFile.getId());
|
||||
paramsReportExportHistoryEO.setParamsManifestId(paramsReportDetailVO.getParamsManifestId());
|
||||
paramsReportExportHistoryEO.setExportTime(new Date());
|
||||
paramsReportExportHistoryEOService.add(paramsReportExportHistoryEO);*/
|
||||
paramsReportExportHistoryEOService.add(paramsReportExportHistoryEO);
|
||||
|
||||
uploadFileio.close();
|
||||
os.flush();
|
||||
os.close(); // 后开先关
|
||||
fis.close(); // 先开后关
|
||||
@@ -775,6 +772,102 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportCustomExcel(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
OutputStream wordOS = null;
|
||||
String fileOriName = "上报库参数项自定义导出信息";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
fileOriName = "Params report custom data";
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getExportName())) {
|
||||
fileOriName = paramsReportDetailVO.getExportName();
|
||||
}
|
||||
//创建临时文件夹
|
||||
String fileNowPath = uploadpath + "/tempZip/" + UUID.randomUUID().toString().replace("-","") + File.separator + fileOriName;
|
||||
File nowFile = new File(fileNowPath);
|
||||
if (nowFile.exists()){
|
||||
nowFile.delete();
|
||||
}
|
||||
nowFile.mkdirs();
|
||||
String fileName = fileOriName + ".xlsx";
|
||||
|
||||
// 查询导出数据
|
||||
List<Map> allParamsInfoList = queryForExportCustom(paramsReportDetailVO);
|
||||
HashMap<String, String> params = (HashMap<String, String>) allParamsInfoList.get(0);
|
||||
|
||||
String templateUrl = "";
|
||||
ParamsExportTemplateEO paramsExportTemplateEO = paramsExportTemplateEOService.getById(paramsReportDetailVO.getExportTemplateId());
|
||||
List<OSSFile> ossFiles = ossFileService.getFileInfosByConnectId(paramsExportTemplateEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFiles)) {
|
||||
templateUrl = ossFiles.get(0).getUrl();
|
||||
}
|
||||
|
||||
// 替换模板中的占位符
|
||||
try {
|
||||
|
||||
//下载关联文件内容
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(2).get("fileListAll");
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + "导出文件");
|
||||
}
|
||||
|
||||
// 拿取模板
|
||||
String repFileName = fileName.replaceAll("/","_");
|
||||
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||
if (CosBootUtil.doesObjectExist(templateUrl)) {
|
||||
InputStream wordTemplate = CosBootUtil.download(templateUrl);
|
||||
// com.qcloud.cos.utils.IOUtils.copy(wordTemplate, wordOS);
|
||||
|
||||
ExcelUtil.variableReplace(wordTemplate, wordOS, params);
|
||||
|
||||
}
|
||||
|
||||
// 替换占位符内容
|
||||
// poi方式
|
||||
// TemplateExportParams templateExportParams = new TemplateExportParams();
|
||||
// templateExportParams.setTemplateUrl(fileNowPath + File.separator + repFileName);
|
||||
// Workbook workbook = ExcelExportUtil.exportExcel(templateExportParams, params);
|
||||
|
||||
|
||||
// OutputStream word = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||
// workbook.write(word);
|
||||
wordOS.flush();
|
||||
wordOS.close();
|
||||
// word.flush();
|
||||
// word.close();
|
||||
|
||||
// 打包导出压缩包
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
|
||||
response.setContentType("application/force-download");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
|
||||
FileInputStream fis = new FileInputStream(fileNowPath+".zip");
|
||||
int len2 = 0;
|
||||
while ((len2 = fis.read()) != -1) {
|
||||
os.write(len2);
|
||||
}
|
||||
|
||||
os.flush();
|
||||
os.close(); // 后开先关
|
||||
fis.close(); // 先开后关
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
IOUtils.closeQuietly(wordOS);
|
||||
File tempZipFile = new File(uploadpath + "/tempZip");
|
||||
FileUtil.deleteContents(tempZipFile);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void downLoadFileList(List<OSSFile> allRelevFileList,String fileNowPath) {
|
||||
File nowFile = new File(fileNowPath);
|
||||
if (nowFile.exists()){
|
||||
@@ -852,23 +945,23 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&");
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&");
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(ossFileList.get(0).getFileName()).append("&");
|
||||
configDataBuilder.append(ossFileList.get(0).getFileName()).append("#");
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
|
||||
String configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
if (configData.contains("#")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||
}
|
||||
|
||||
record1.put(paramsConfigEO.getId(), configData);
|
||||
@@ -902,17 +995,17 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("&");
|
||||
configDataBuilder.append(textDatas).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("&");
|
||||
configDataBuilder.append(pullDatas).append("#");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("&");
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("#");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
if (configData.contains("#")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||
}
|
||||
record1.put("params_value", configData);
|
||||
|
||||
@@ -925,77 +1018,145 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
|
||||
private List<Map> queryForExportCustom(ParamsReportDetailVO paramsReportDetailVO) {
|
||||
paramsReportDetailVO.setSeparator("&"); // 设置分隔符
|
||||
paramsReportDetailVO.setSeparator("*"); // 设置分隔符
|
||||
|
||||
List<String> idList = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getIds())) {
|
||||
idList = Arrays.asList(paramsReportDetailVO.getIds().split(","));
|
||||
}
|
||||
List<String> configIdList = Arrays.asList(paramsReportDetailVO.getConfigIds().split(","));
|
||||
List<Map<String, Object>> dataList = paramsReportDetailEOMapper.listInfoForExport(idList, paramsReportDetailVO);
|
||||
List<String> configIdList = Arrays.asList(paramsReportDetailVO.getConfigIds().split(",")); // 需要导出的配置列
|
||||
List<Map<String, Object>> dataList = paramsReportDetailEOMapper.listInfoForExport(idList, paramsReportDetailVO); // 查询需要导出的数据
|
||||
|
||||
List<ParamsReportConfigEO> paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列
|
||||
|
||||
List<Map> resultList = new ArrayList<>();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
List<OSSFile> fileListAll = new ArrayList<>();
|
||||
|
||||
List<Map<String, Object>> imgListAll = new ArrayList<>(); // 存放图片信息
|
||||
List<OSSFile> fileListAll = new ArrayList<>(); // 存放文件
|
||||
String fileTypeStr = ".png,.PNG,.jfif,.JFIF,.pjpeg,.PJPEG,.jpeg,.JPEG,.pjp,.PJP,.jpg,.JPG";
|
||||
// 查询配置列数据
|
||||
for (Map<String, Object> record1 : dataList) {
|
||||
|
||||
String paramsCollectManifestId = (String) record1.get("id");
|
||||
String nioNumber = (String) record1.get("nio_number");
|
||||
String controlType = (String) record1.get("control_type");
|
||||
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||
List<OSSFile> fileList = new ArrayList<>();
|
||||
List<OSSFile> imgFileList = new ArrayList<>();
|
||||
|
||||
// 合并配置数据
|
||||
String configData = "";
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
||||
|
||||
String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData()))
|
||||
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合文本数据
|
||||
|
||||
String pullDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getPullData()))
|
||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); // 整合下拉数据
|
||||
|
||||
List<String> fileNameList = new ArrayList<>();
|
||||
paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> {
|
||||
for (ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOS) { // 获取”导出文件夹“下的文件
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
fileNameList.add(ossFileList.get(0).getFileName());
|
||||
String fileName = ossFileList.get(0).getFileName();
|
||||
if (!fileTypeStr.contains(fileName.substring(fileName.lastIndexOf(".")))) { // 图片不放入”导出文件夹“下,直接插入正文
|
||||
fileNameList.add(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
fileList.addAll(ossFileList);
|
||||
} else {
|
||||
imgFileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
fileListAll.addAll(fileList);
|
||||
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("&");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("&");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, ",")).append("&");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
}
|
||||
resultMap.put(nioNumber, configData);
|
||||
if ((ControlTypeEnum.FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) && CollectionUtil.isNotEmpty(imgFileList)) {
|
||||
|
||||
// 获取图片字节
|
||||
// 附件为图片类型的配置数据,直接插入正文
|
||||
Map<String, Object> imgMap = new HashMap<>();
|
||||
List<byte[]> bytesList =new ArrayList<>();
|
||||
|
||||
fileListAll.addAll(fileList);
|
||||
int lengthTotal = 0; // 总长度
|
||||
for (OSSFile ossFile : imgFileList){
|
||||
if (CosBootUtil.doesObjectExist(ossFile.getUrl())) {
|
||||
InputStream is = CosBootUtil.download(ossFile.getUrl());
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
try {
|
||||
IOUtils.copy(is, os);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new JeroBootException(e.getMessage());
|
||||
}
|
||||
byte[] bytes = os.toByteArray();
|
||||
lengthTotal += bytes.length;
|
||||
bytesList.add(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
// 合并多个bytes
|
||||
byte[] totalByte = new byte[lengthTotal];
|
||||
int begin = 0;
|
||||
for (byte[] bytes : bytesList){
|
||||
System.arraycopy(bytes, 0, totalByte, begin, bytes.length);
|
||||
begin += bytes.length;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#"); //
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("#"); //
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("#")) { //
|
||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||
}
|
||||
|
||||
imgMap.put("key", nioNumber);
|
||||
imgMap.put("text", configData);
|
||||
imgMap.put("bytes", totalByte);
|
||||
|
||||
imgListAll.add(imgMap);
|
||||
|
||||
} else {
|
||||
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("#");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, ",")).append("#");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("#")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||
}
|
||||
|
||||
resultMap.put(nioNumber, configData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> imgMap = new HashMap<>();
|
||||
imgMap.put("imgListAll", imgListAll);
|
||||
Map<String, Object> fileMap = new HashMap<>();
|
||||
fileMap.put("fileListAll", fileListAll);
|
||||
|
||||
resultList.add(resultMap);
|
||||
resultList.add(imgMap);
|
||||
resultList.add(fileMap);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
+2
@@ -151,4 +151,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
List<SysUser> queryByDepIds(@Param("departIds")List<String> departIds,@Param("username") String username);
|
||||
|
||||
List<SysUser> getPPEmployeeList(@Param("thirdType") String thirdType);
|
||||
|
||||
void updateByIdPP (SysUser sysUser);
|
||||
}
|
||||
|
||||
+22
@@ -200,4 +200,26 @@
|
||||
select * from sys_user where third_type = #{thirdType}
|
||||
</select>
|
||||
|
||||
<update id="updateByIdPP">
|
||||
UPDATE
|
||||
sys_user
|
||||
SET
|
||||
username = #{username},
|
||||
realname = #{realname},
|
||||
status = #{status},
|
||||
del_flag = #{delFlag},
|
||||
third_id = #{thirdId},
|
||||
work_no = #{workNo},
|
||||
worker_type = #{workerType},
|
||||
create_time = #{createTime},
|
||||
update_time = #{updateTime},
|
||||
job_code = #{jobCode},
|
||||
job_title = #{jobTitle},
|
||||
org_code = #{orgCode},
|
||||
email = #{email},
|
||||
telephone = #{telephone}
|
||||
WHERE
|
||||
id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -519,7 +519,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
sysUserDepartMapper.insert(sysUserDepart);
|
||||
|
||||
// 添加用户角色关系
|
||||
SysUserRole userRole = new SysUserRole(sysUser.getId(), "1534020318437208065"); // 新增用户默认角色均为工程师
|
||||
SysUserRole userRole = new SysUserRole(sysUser.getId(), "1550369502225551361"); // 新增用户默认角色均为一般用户
|
||||
sysUserRoleMapper.insert(userRole);
|
||||
|
||||
// 添加用户信息
|
||||
@@ -562,7 +562,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
}
|
||||
|
||||
updateById(sysUser);
|
||||
this.baseMapper.updateByIdPP(sysUser);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.jero.modules.docTranslation.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-20
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档翻译表")
|
||||
@RestController
|
||||
@RequestMapping("/docTranslation/docTranslationEO")
|
||||
@Slf4j
|
||||
public class DocTranslationEOController extends JeroController<DocTranslationEO, IDocTranslationEOService> {
|
||||
@Autowired
|
||||
private IDocTranslationEOService docTranslationEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-分页列表查询")
|
||||
@ApiOperation(value="文档翻译表-分页列表查询", notes="文档翻译表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(DocTranslationEO docTranslationEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DocTranslationEO> queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap());
|
||||
Page<DocTranslationEO> page = new Page<DocTranslationEO>(pageNo, pageSize);
|
||||
IPage<DocTranslationEO> pageList = docTranslationEOService.page(page, queryWrapper);
|
||||
return Result.OK(cut,pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-列表查询")
|
||||
@ApiOperation(value="文档翻译表-列表查询", notes="文档翻译表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<DocTranslationEO>> queryList() {
|
||||
List<DocTranslationEO> list = docTranslationEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-添加")
|
||||
@ApiOperation(value="文档翻译表-添加", notes="文档翻译表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody DocTranslationEO docTranslationEO) {
|
||||
docTranslationEOService.add(docTranslationEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-编辑")
|
||||
@ApiOperation(value="文档翻译表-编辑", notes="文档翻译表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody DocTranslationEO docTranslationEO) {
|
||||
docTranslationEOService.editById(docTranslationEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-通过id删除")
|
||||
@ApiOperation(value="文档翻译表-通过id删除", notes="文档翻译表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
docTranslationEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-批量删除")
|
||||
@ApiOperation(value="文档翻译表-批量删除", notes="文档翻译表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.docTranslationEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-通过id查询")
|
||||
@ApiOperation(value="文档翻译表-通过id查询", notes="文档翻译表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DocTranslationEO docTranslationEO = docTranslationEOService.queryById(id);
|
||||
if(docTranslationEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(docTranslationEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param docTranslationEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DocTranslationEO docTranslationEO) {
|
||||
return super.exportXls(request, docTranslationEO, DocTranslationEO.class, "文档翻译表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DocTranslationEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.jero.modules.docTranslation.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-20
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("doc_translation")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="doc_translation对象", description="文档翻译表")
|
||||
public class DocTranslationEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**文档库id*/
|
||||
@Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private java.lang.String bussDocumentLibraryId;
|
||||
|
||||
/**编号*/
|
||||
@Excel(name = "编号", width = 15)
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String serialNumber;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**文本状态*/
|
||||
@Dict(dicCode = "state")
|
||||
@Excel(name = "文本状态", width = 15)
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private java.lang.String textStatus;
|
||||
|
||||
/**文件名称*/
|
||||
@Excel(name = "文件名称", width = 15)
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private java.lang.String fileName;
|
||||
|
||||
/**翻译前语言(源语言)*/
|
||||
@Dict(dicCode = "source_language")
|
||||
@Excel(name = "翻译前语言(源语言)", width = 15)
|
||||
@ApiModelProperty(value = "翻译前语言(源语言)")
|
||||
private java.lang.String sourceLanguage;
|
||||
|
||||
/**翻译后语言(目标语言)*/
|
||||
@Dict(dicCode = "target_language")
|
||||
@Excel(name = "翻译后语言(目标语言)", width = 15)
|
||||
@ApiModelProperty(value = "翻译后语言(目标语言)")
|
||||
private java.lang.String targetLanguage;
|
||||
|
||||
/**翻译结果*/
|
||||
@Dict(dicCode = "translation_result")
|
||||
@Excel(name = "翻译结果", width = 15)
|
||||
@ApiModelProperty(value = "翻译结果")
|
||||
private java.lang.String translationResult;
|
||||
|
||||
/**转换时间*/
|
||||
@Excel(name = "转换时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "转换时间")
|
||||
private java.util.Date translationTime;
|
||||
|
||||
/**发布情况*/
|
||||
@Dict(dicCode = "release_condition")
|
||||
@Excel(name = "发布情况", width = 15)
|
||||
@ApiModelProperty(value = "发布情况")
|
||||
private java.lang.String releaseCondition;
|
||||
|
||||
/**源文件id*/
|
||||
@Excel(name = "源文件id", width = 15)
|
||||
@ApiModelProperty(value = "源文件id")
|
||||
private java.lang.String sourceFileId;
|
||||
|
||||
/**目标文件id*/
|
||||
@Excel(name = "目标文件id", width = 15)
|
||||
@ApiModelProperty(value = "目标文件id")
|
||||
private java.lang.String targetFileId;
|
||||
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.docTranslation.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 发布情况枚举类
|
||||
*/
|
||||
public enum ReleaseConditionEnum {
|
||||
|
||||
PUBLISHED("已发布","published","Have published"),
|
||||
DRAFT("草稿","draft","Draft"),
|
||||
;
|
||||
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private ReleaseConditionEnum(String cnName, String value, String enName) {
|
||||
this.cnName = cnName;
|
||||
this.value = value;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
ReleaseConditionEnum[] values = values();
|
||||
for (ReleaseConditionEnum releaseConditionEnum : values) {
|
||||
if (releaseConditionEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return releaseConditionEnum.cnName;
|
||||
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
|
||||
return releaseConditionEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.docTranslation.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 翻译结果枚举类
|
||||
*/
|
||||
public enum TranslationResultEnum {
|
||||
|
||||
IN_THE_TRANSLATION("翻译中","In the translation","In the translation"),
|
||||
TRANSLATION_DONE("翻译完成","Translation done","Translation done"),
|
||||
;
|
||||
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private TranslationResultEnum(String cnName, String value, String enName) {
|
||||
this.cnName = cnName;
|
||||
this.value = value;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
TranslationResultEnum[] values = values();
|
||||
for (TranslationResultEnum translationResultEnum : values) {
|
||||
if (translationResultEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return translationResultEnum.cnName;
|
||||
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
|
||||
return translationResultEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.docTranslation.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-20
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DocTranslationEOMapper extends BaseMapper<DocTranslationEO> {
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.docTranslation.mapper.DocTranslationEOMapper">
|
||||
<resultMap id="DocTranslationEOResultMap" type="com.jero.modules.docTranslation.entity.DocTranslationEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="buss_document_library_id" property="bussDocumentLibraryId" />
|
||||
<result column="text_status" property="textStatus" />
|
||||
<result column="file_name" property="fileName" />
|
||||
<result column="source_language" property="sourceLanguage" />
|
||||
<result column="target_language" property="targetLanguage" />
|
||||
<result column="translation_result" property="translationResult" />
|
||||
<result column="translation_time" property="translationTime" />
|
||||
<result column="release_condition" property="releaseCondition" />
|
||||
<result column="source_file_id" property="sourceFileId" />
|
||||
<result column="target_file_id" property="targetFileId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.docTranslation.service;
|
||||
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-20
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDocTranslationEOService extends IService<DocTranslationEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @return
|
||||
*/
|
||||
void add(DocTranslationEO docTranslationEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @return
|
||||
*/
|
||||
void editById(DocTranslationEO docTranslationEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
DocTranslationEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<DocTranslationEO> queryList();
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.jero.modules.docTranslation.service.impl;
|
||||
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.enums.ReleaseConditionEnum;
|
||||
import com.jero.modules.docTranslation.enums.TranslationResultEnum;
|
||||
import com.jero.modules.docTranslation.mapper.DocTranslationEOMapper;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.jero.modules.docTranslation.utils.TranslationDocumentUtils;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-20
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMapper, DocTranslationEO> implements IDocTranslationEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(DocTranslationEO docTranslationEO) {
|
||||
Date now = new Date();
|
||||
docTranslationEO.setCreateTime(now);
|
||||
docTranslationEO.setUpdateTime(now);
|
||||
docTranslationEO.setTranslationTime(now);
|
||||
docTranslationEO.setReleaseCondition(ReleaseConditionEnum.DRAFT.getValue());
|
||||
//翻译文档,将翻译后的文件id设置到当前对象中。
|
||||
OSSFile translateAfterFile = TranslationDocumentUtils.translationDocument(docTranslationEO);
|
||||
//如果翻译后的文件不为空,则证明翻译成功
|
||||
if(!Objects.isNull(translateAfterFile)){
|
||||
docTranslationEO.setTargetFileId(translateAfterFile.getId());
|
||||
docTranslationEO.setTranslationResult(TranslationResultEnum.TRANSLATION_DONE.getValue());
|
||||
}
|
||||
save(docTranslationEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param docTranslationEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(DocTranslationEO docTranslationEO) {
|
||||
Date now = new Date();
|
||||
docTranslationEO.setUpdateTime(now);
|
||||
saveOrUpdate(docTranslationEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public DocTranslationEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DocTranslationEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package com.jero.modules.docTranslation.utils;
|
||||
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 翻译文档工具类
|
||||
* @Author: wzj
|
||||
* @Date: 2022/7/22 13:53
|
||||
**/
|
||||
@Component
|
||||
public class TranslationDocumentUtils {
|
||||
private final static Logger logger= LoggerFactory.getLogger(TranslationDocumentUtils.class);
|
||||
|
||||
|
||||
private static String uploadpath;
|
||||
@Value(value = "${jero.path.upload}")
|
||||
public void setUploadpath(String uploadpath){
|
||||
TranslationDocumentUtils.uploadpath = uploadpath;
|
||||
}
|
||||
|
||||
private static IOSSFileService iossFileService;
|
||||
@Autowired
|
||||
public void setIossFileService(IOSSFileService iossFileService){
|
||||
TranslationDocumentUtils.iossFileService = iossFileService;
|
||||
}
|
||||
|
||||
private static IFeishuService feishuService;
|
||||
@Autowired
|
||||
public void setFeishuService(IFeishuService feishuService){
|
||||
TranslationDocumentUtils.feishuService = feishuService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 翻译文档
|
||||
* @param docTranslationEO
|
||||
*/
|
||||
public static OSSFile translationDocument(DocTranslationEO docTranslationEO){
|
||||
OSSFile translateAfterFile = null;
|
||||
//翻译文档
|
||||
String sourceFileId = docTranslationEO.getSourceFileId();
|
||||
List<OSSFile> sourceFileList = iossFileService.getFileInfos(sourceFileId);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(sourceFileList)){
|
||||
OSSFile sourceOssFile = sourceFileList.get(0);
|
||||
String translateFrontText = ReadWordUtil.readWord(sourceOssFile.getUrl(),uploadpath);
|
||||
|
||||
String translateAfter ="";
|
||||
StringBuffer translateAfterSb = new StringBuffer();
|
||||
|
||||
String tenantAccessToken = "";
|
||||
try {
|
||||
tenantAccessToken = feishuService.getTenantAccessToken();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Map<String,Object> feishuTranslateParamsMap = new HashMap<>();
|
||||
feishuTranslateParamsMap.put("sourceLanguage",docTranslationEO.getSourceLanguage());
|
||||
feishuTranslateParamsMap.put("targetLanguage",docTranslationEO.getTargetLanguage());
|
||||
feishuTranslateParamsMap.put("tenantAccessToken",tenantAccessToken);
|
||||
|
||||
//分隔长度
|
||||
int splitLength = 1000;
|
||||
if(translateFrontText.length() > splitLength){
|
||||
//计算出能分隔几次
|
||||
int translateArrLength = translateFrontText.length() / splitLength + 1;
|
||||
String translateFrontTextSplit = "";
|
||||
for (int i = 0; i < translateArrLength; i ++){
|
||||
if(i == 0){
|
||||
translateFrontTextSplit = translateFrontText.substring(0,splitLength);
|
||||
}else {
|
||||
//如果长度不够根据splitLength再截取一次。
|
||||
if(translateFrontText.length() < i*splitLength+(splitLength+1)){
|
||||
translateFrontTextSplit = translateFrontText.substring(i*(splitLength + 1),translateFrontText.length());
|
||||
}else {
|
||||
translateFrontTextSplit = translateFrontText.substring(i*(splitLength + 1),i*splitLength+(splitLength+1));
|
||||
}
|
||||
}
|
||||
|
||||
feishuTranslateParamsMap.put("translateFrontText",translateFrontTextSplit);
|
||||
translateAfter = feishuService.translateText(feishuTranslateParamsMap);
|
||||
translateAfterSb.append(translateAfter);
|
||||
}
|
||||
}else {
|
||||
feishuTranslateParamsMap.put("translateFrontText",translateFrontText);
|
||||
translateAfter = feishuService.translateText(feishuTranslateParamsMap);
|
||||
translateAfterSb.append(translateAfter);
|
||||
}
|
||||
|
||||
logger.debug("源文本:\n" + translateFrontText);
|
||||
logger.debug("翻译后文本:\n" + translateAfter);
|
||||
|
||||
//翻译后的文件路径
|
||||
String translateAfterFilePath = uploadpath + "/tempZip/translationTempFile";
|
||||
try {
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),sourceOssFile.getFileName());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.error("翻译文档-写入文档失败:" + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return translateAfterFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建翻译后的文件,把翻译后的语言放进去。
|
||||
* @param translateAfterFilePath
|
||||
* @throws Exception
|
||||
*/
|
||||
public static OSSFile createTranslateAfterFile(String translateAfterFilePath,String translateAfter,String fileName) throws Exception{
|
||||
OSSFile ossFile = null;
|
||||
File newFilePath = new File(translateAfterFilePath);
|
||||
if (!newFilePath.exists()) {
|
||||
newFilePath.mkdirs();
|
||||
}
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName;
|
||||
File newFile = new File(translateAfterFilePath);
|
||||
if (!newFile.exists()) {
|
||||
newFile.createNewFile();
|
||||
}
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(newFile);
|
||||
|
||||
MultipartFile multipartFile = createMfileByPath(translateAfterFilePath);
|
||||
ossFile = iossFileService.uploadLocalOfCos(multipartFile, "", null, null);
|
||||
out.write(translateAfter.getBytes("UTF-8"));
|
||||
out.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
//将翻译后的本地文件删除
|
||||
File file = new File(translateAfterFilePath);
|
||||
FileUtil.deleteContents(file);
|
||||
}
|
||||
return ossFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据路径创建文件
|
||||
* @param translateAfterFilePath
|
||||
* @return
|
||||
*/
|
||||
private static MultipartFile createMfileByPath(String translateAfterFilePath) {
|
||||
MultipartFile mFile = null;
|
||||
try {
|
||||
File file = new File(translateAfterFilePath);
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
|
||||
String fileName = file.getName();
|
||||
fileName = fileName.substring((fileName.lastIndexOf(File.separator) + 1));
|
||||
mFile = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.error("封装文件出现错误:{}", ex.getMessage());
|
||||
}
|
||||
return mFile;
|
||||
}
|
||||
}
|
||||
-2
@@ -12,8 +12,6 @@ public enum SearchEnum {
|
||||
FULL_TEXT_SEARCH_CN("全部中文","fulltextsearchcn"),
|
||||
FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen");
|
||||
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
|
||||
+8
@@ -3,6 +3,7 @@ package com.jero.modules.feishu.service;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
@@ -35,4 +36,11 @@ public interface IFeishuService {
|
||||
* @return
|
||||
*/
|
||||
String sendCardMsg(String[] userIds, FeishuMsgVo feishuMsgVo) throws IOException;
|
||||
|
||||
/**
|
||||
* 翻译文本
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
String translateText(Map<String,Object> params);
|
||||
}
|
||||
|
||||
+68
@@ -37,6 +37,9 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
@Value("${Feishu.batchSendMessageUrl}")
|
||||
private String batchSendMessageUrl;
|
||||
|
||||
@Value("${Feishu.translateTextUrl}")
|
||||
private String translateTextUrl;
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
* @return
|
||||
@@ -238,4 +241,69 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
return tokenJson.get("msg").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 翻译文本
|
||||
* 参数:
|
||||
* params:{
|
||||
* "translateFrontText":"翻译前文本",
|
||||
* "sourceLanguage":"源语言",
|
||||
* "targetLanguage":"目标语言",
|
||||
* "tenantAccessToken":"登录令牌(飞书token)",
|
||||
* }
|
||||
*/
|
||||
@Override
|
||||
public String translateText(Map<String, Object> params) {
|
||||
String result = null;
|
||||
|
||||
String translateFrontText = (String) params.get("translateFrontText");
|
||||
String sourceLanguage = (String) params.get("sourceLanguage");
|
||||
String targetLanguage = (String) params.get("targetLanguage");
|
||||
String tenantAccessToken = (String) params.get("tenantAccessToken");
|
||||
|
||||
Map<String, String> headerMap = new HashMap<>();
|
||||
headerMap.put("Content-Type", "application/json; charset=utf-8");
|
||||
headerMap.put("Authorization", "Bearer "+tenantAccessToken);
|
||||
|
||||
List<Map<String,Object>> glossaryList = new ArrayList<>();
|
||||
Map<String,Object> glossaryMap = new HashMap<>();
|
||||
glossaryMap.put("from","飞书");
|
||||
glossaryMap.put("to","Lark");
|
||||
glossaryList.add(glossaryMap);
|
||||
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
//请求级术语表,携带术语,仅在本次翻译中生效(最多能携带 128个术语词)
|
||||
paramsMap.put("glossary", glossaryList);
|
||||
//源语言
|
||||
paramsMap.put("source_language", sourceLanguage);
|
||||
//源文本
|
||||
paramsMap.put("text", translateFrontText);
|
||||
//目标语言
|
||||
paramsMap.put("target_language", targetLanguage);
|
||||
|
||||
try {
|
||||
String response = null;
|
||||
response = HttpRequestUtil.getResponseOfPOST(translateTextUrl, headerMap, JSON.toJSONString(paramsMap));
|
||||
//返回结果样例: {"code":0,"data":{"text":"Try using Lark."},"msg":"Success"}
|
||||
JSONObject translateAfterJson = JSONObject.parseObject(response);
|
||||
|
||||
if(response != null && translateAfterJson != null){
|
||||
if(!translateAfterJson.get("code").toString().equals("0")) {
|
||||
result = null;
|
||||
}
|
||||
result = JSONObject.parseObject(translateAfterJson.get("data").toString()).getString("text");
|
||||
}else {
|
||||
//如果出现了异常,把翻译前的文本返回
|
||||
result = translateFrontText;
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
//如果出现了异常,把翻译前的文本返回
|
||||
result = translateFrontText;
|
||||
ex.printStackTrace();
|
||||
log.error("飞书翻译-文本翻译失败:{}",ex.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -36,6 +36,8 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -47,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOpinionAssessmentResultEOMapper, LawsOpinionAssessmentResultEO> implements ILawsOpinionAssessmentResultEOService {
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
|
||||
+3
@@ -23,6 +23,8 @@ import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Description: 法规意见收集表
|
||||
@@ -31,6 +33,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGatherEOMapper, LawsOpinionGatherEO> implements ILawsOpinionGatherEOService {
|
||||
|
||||
@Autowired
|
||||
|
||||
+3
@@ -28,6 +28,8 @@ import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -38,6 +40,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsProcessHistoryEOServiceImpl extends ServiceImpl<LawsProcessHistoryEOMapper, LawsProcessHistoryEO> implements ILawsProcessHistoryEOService {
|
||||
|
||||
@Autowired
|
||||
|
||||
+27
-6
@@ -9,11 +9,10 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags="法规符合性看板")
|
||||
@@ -27,8 +26,8 @@ public class LawsComplianceBoardController {
|
||||
|
||||
@AutoLog(value = "项目库-法规符合性看板列表分页查询")
|
||||
@ApiOperation(value="项目库-法规符合性看板列表分页查询", notes="项目库-法规符合性看板列表分页查询")
|
||||
@GetMapping(value = "/page")
|
||||
public JSONObject queryPageList(@RequestParam Map<String,Object> params){
|
||||
@PostMapping(value = "/page")
|
||||
public JSONObject queryPageList(@RequestBody Map<String,Object> params){
|
||||
IPage infoPage = this.lawsComplianceBoardService.queryPageList(params);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
@@ -42,4 +41,26 @@ public class LawsComplianceBoardController {
|
||||
JSONObject result = this.lawsComplianceBoardService.queryComplianceResultList(params);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出符合性结果
|
||||
* @param response
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
@RequestMapping(value = "/exportComplianceResult")
|
||||
public void exportComplianceResult(HttpServletResponse response, HttpServletRequest request,@RequestParam Map<String,Object> params){
|
||||
this.lawsComplianceBoardService.exportComplianceResult(response,request,params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出符合性结果明细
|
||||
* @param response
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
@RequestMapping(value = "/exportComplianceResultDetail")
|
||||
public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request,@RequestParam Map<String,Object> params){
|
||||
this.lawsComplianceBoardService.exportComplianceResultDetail(response,request,params);
|
||||
}
|
||||
}
|
||||
|
||||
+8
-1
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
|
||||
public interface LawsComplianceBoardMapper {
|
||||
/**
|
||||
* 查询出 启动过 设计、prehomo、验证符合性、法规技术评估、法规意见收集其中一个流程 的数据
|
||||
* 分页查询出 启动过 设计、prehomo、验证符合性、法规技术评估、法规意见收集其中一个流程 的数据
|
||||
* @param page
|
||||
* @param params
|
||||
* @return
|
||||
@@ -21,4 +21,11 @@ public interface LawsComplianceBoardMapper {
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryComplianceResultList(@Param("params") Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查询出 启动过 设计、prehomo、验证符合性、法规技术评估、法规意见收集其中一个流程 的数据列表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryList(@Param("params") Map<String, Object> params);
|
||||
}
|
||||
|
||||
+43
-6
@@ -38,7 +38,7 @@
|
||||
pyni.year_name as "yearName",
|
||||
pti.design_status as "designStatus",
|
||||
pti.design_p_id as "designPId",
|
||||
pti.prehomo_status as "prehomoStatsu",
|
||||
pti.prehomo_status as "prehomoStatus",
|
||||
pti.prehomo_p_id as "prehomoPId",
|
||||
pti.verify_status as "verifyStatus",
|
||||
pti.verify_p_id as "verifyPId",
|
||||
@@ -50,16 +50,53 @@
|
||||
LEFT JOIN project_name_info pni ON ( pni.id = plb.project_name_id )
|
||||
LEFT JOIN project_year_name_info pyni ON ( pyni.id = plb.year_name_id )
|
||||
WHERE
|
||||
pli.stand_id = #{params.id}
|
||||
AND( pti.design_p_id IS NOT NULL OR pti.prehomo_p_id IS NOT NULL OR pti.verify_p_id IS NOT NULL )
|
||||
<if test="params.dutyTerritory != null params.dutyTerritory != '' ">
|
||||
1=1
|
||||
<if test="params.id != null and params.id != null">
|
||||
and pli.stand_id = #{params.id}
|
||||
</if>
|
||||
and ( pti.design_p_id is not null or pti.prehomo_p_id is not null or pti.verify_p_id is not null )
|
||||
<if test="params.dutyTerritory != '' and params.dutyTerritory != null ">
|
||||
and pli.duty_territory like CONCAT(CONCAT('%',#{params.dutyTerritory}),'%')
|
||||
</if>
|
||||
<if test="params.projectNameId != null params.projectNameId != '' ">
|
||||
<if test="params.projectNameId != '' and params.projectNameId != null ">
|
||||
and pni.id like CONCAT(CONCAT('%',#{params.projectNameId}),'%')
|
||||
</if>
|
||||
<if test="params.projectName != null params.projectName != '' ">
|
||||
<if test="params.projectName != '' and params.projectName != null ">
|
||||
and pni.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
||||
</if>
|
||||
<if test="params.idList != null">
|
||||
and pli.stand_id in
|
||||
<foreach collection="params.idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by pli.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="queryList" resultType="hashMap">
|
||||
SELECT
|
||||
bdl.id as "id",
|
||||
bdl.serial_number as "serialNumber",
|
||||
bdl.title as "title",
|
||||
bdl.technology_territory as "technologyTerritory",
|
||||
bdl.state as "state",
|
||||
bdl.create_time as "createTime"
|
||||
FROM
|
||||
buss_document_library bdl
|
||||
LEFT JOIN project_laws_inventory pli ON ( pli.stand_id = bdl.id )
|
||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||
WHERE
|
||||
(
|
||||
bdl.id IN ( SELECT DISTINCT stand_id FROM laws_opinion_gather)
|
||||
OR bdl.id IN ( SELECT DISTINCT stand_id FROM laws_technology_evaluation)
|
||||
or pti.design_p_id IS NOT NULL
|
||||
OR pti.prehomo_p_id IS NOT NULL
|
||||
OR pti.verify_p_id IS NOT NULL
|
||||
)
|
||||
<if test="params.condition != '' ">
|
||||
${params.condition}
|
||||
</if>
|
||||
GROUP BY bdl.id
|
||||
order by bdl.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+26
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ILawsComplianceBoardService {
|
||||
@@ -15,4 +18,27 @@ public interface ILawsComplianceBoardService {
|
||||
* @return
|
||||
*/
|
||||
JSONObject queryComplianceResultList(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 导出符合性结果
|
||||
* @param response
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
void exportComplianceResult(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 导出符合性结果明细
|
||||
* @param response
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 法规符合性列表数据处理
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List datas,String cut);
|
||||
}
|
||||
|
||||
+456
-13
@@ -3,6 +3,9 @@ package com.jero.modules.project.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryRuleEnum;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.document.vo.QueryConditionVO;
|
||||
@@ -10,20 +13,32 @@ import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.mapper.LawsComplianceBoardMapper;
|
||||
import com.jero.modules.project.service.ILawsComplianceBoardService;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
@@ -37,11 +52,18 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
|
||||
@Override
|
||||
public IPage queryPageList(Map<String, Object> params) {
|
||||
int pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
int pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
String cut = (String) params.get("cut");
|
||||
|
||||
//封装查询条件(包含高级搜索)
|
||||
String condition = this.getConditionStr(params);
|
||||
@@ -49,14 +71,58 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage infoPage = this.lawsComplianceBoardMapper.queryPageList(page, params);
|
||||
List records = infoPage.getRecords();
|
||||
this.disposeData(records);
|
||||
this.disposeData(records,cut);
|
||||
return infoPage;
|
||||
}
|
||||
|
||||
public void disposeData(List datas){
|
||||
@Override
|
||||
public void disposeData(List datas, String cut){
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
//获取数据字典
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
//树形数据字典
|
||||
List<SysCategory> technologyTerritoryList = sysCategoryService.list();
|
||||
|
||||
List<SysDictItem> stateSysDictItems = sysDictItems.stream().filter(sysDictItem -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(sysDictItem.getDictCode(), "state")) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
for (Object data : datas) {
|
||||
Map<String,Object> dataMap = (Map<String, Object>) data;
|
||||
dataMap.entrySet().forEach(map -> {
|
||||
if(map.getValue() == null){
|
||||
map.setValue("");
|
||||
}
|
||||
});
|
||||
if(dataMap.get("state") != null){
|
||||
String state_dicText = "";
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
state_dicText = stateSysDictItems.stream().filter(sysDictItem -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(dataMap.get("state").toString(),sysDictItem.getItemValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getItemText).distinct().collect(Collectors.joining(","));
|
||||
}else {
|
||||
state_dicText = stateSysDictItems.stream().filter(sysDictItem -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(dataMap.get("state").toString(),sysDictItem.getItemValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getEnName).distinct().collect(Collectors.joining(","));
|
||||
}
|
||||
dataMap.put("state_dicText",state_dicText);
|
||||
}
|
||||
if(dataMap.get("technologyTerritory") != null){
|
||||
String technologyTerritory_dictText = disposeTechnologyTerritory(technologyTerritoryList, dataMap.get("technologyTerritory").toString(), cut);
|
||||
dataMap.put("technologyTerritory_dicText",technologyTerritory_dictText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,8 +132,9 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
JSONObject result = new JSONObject();
|
||||
String id = (String) params.get("id");
|
||||
String cut = (String) params.get("cut");
|
||||
List<Map<String,Object>> cmplianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
result.put("cmplianceResultList",cmplianceResultList);
|
||||
List<Map<String,Object>> complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(complianceResultList,cut);
|
||||
result.put("complianceResultList",complianceResultList);
|
||||
|
||||
//查询当前数据是否有法规意见收集流程数据
|
||||
QueryWrapper<LawsOpinionGatherEO> opinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
@@ -83,6 +150,258 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
return result;
|
||||
}
|
||||
|
||||
public void disposeComplianceResult(List<Map<String,Object>> complianceResultList,String cut){
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||
List<SysDictItem> dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
|
||||
for (Map<String, Object> complianceResult : complianceResultList) {
|
||||
if (complianceResult.get("designStatus") != null) {
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut);
|
||||
complianceResult.put("designStatus_dicText",textByValue);
|
||||
}
|
||||
if (complianceResult.get("prehomoStatus") != null && complianceResult.get("prehomoStatus") != "") {
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("prehomoStatus").toString(), cut);
|
||||
complianceResult.put("prehomoStatus_dicText",textByValue);
|
||||
}
|
||||
if (complianceResult.get("verifyStatus") != null) {
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("verifyStatus").toString(), cut);
|
||||
complianceResult.put("verifyStatus_dicText",textByValue);
|
||||
}
|
||||
if (complianceResult.get("dutyTerritory") != null) {
|
||||
String dutyTerritory_dicText = "";
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
dutyTerritory_dicText = dutyTerritoryDictItemList.stream().filter(dictItem -> {
|
||||
boolean flag = false;
|
||||
String[] dutyTerritoryArr = complianceResult.get("dutyTerritory").toString().split(",");
|
||||
for (String duty : dutyTerritoryArr) {
|
||||
if(StringUtils.equals(dictItem.getItemValue(),duty)){
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getEnName).collect(Collectors.joining(","));
|
||||
} else {
|
||||
dutyTerritory_dicText = dutyTerritoryDictItemList.stream().filter(dictItem -> {
|
||||
boolean flag = false;
|
||||
String[] dutyTerritoryArr = complianceResult.get("dutyTerritory").toString().split(",");
|
||||
for (String duty : dutyTerritoryArr) {
|
||||
if(StringUtils.equals(dictItem.getItemValue(),duty)){
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
|
||||
}
|
||||
complianceResult.put("dutyTerritory_dicText",dutyTerritory_dicText);
|
||||
}
|
||||
|
||||
Map<String,Object> dataMap = (Map<String, Object>) complianceResult;
|
||||
dataMap.entrySet().forEach(map -> {
|
||||
if(map.getValue() == null){
|
||||
map.setValue("");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportComplianceResult(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
||||
String cut = (String) params.get("cut");
|
||||
String exportAll = (String) params.get("exportAll");
|
||||
String condition = this.getConditionStr(params);
|
||||
params.put("condition",StringUtils.isNotEmpty(condition) ? condition : "");
|
||||
List<Map<String,Object>> exportData = new ArrayList<>();
|
||||
if(StringUtils.equals(exportAll,"no")){
|
||||
IPage page = this.queryPageList(params);
|
||||
exportData = page.getRecords();
|
||||
}else {
|
||||
exportData = this.lawsComplianceBoardMapper.queryList(params);
|
||||
}
|
||||
this.disposeData(exportData,cut);
|
||||
if(CollectionUtils.isNotEmpty(exportData)){
|
||||
List<String> idList = new ArrayList<>();
|
||||
exportData.forEach(data -> {
|
||||
idList.add(data.get("id").toString());
|
||||
});
|
||||
params.put("idList",idList);
|
||||
List<Map<String,Object>> complianceResultList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(idList)){
|
||||
complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(complianceResultList,cut);
|
||||
}
|
||||
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "编号,标题,状态,技术领域,责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性";
|
||||
fileName = "符合性结果" + ".xlsx";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Serial number,Title,State,Technology territory,Responsible Field,Relevant project,Design conformance,Pre-Homo Confirm,Verify conformance";
|
||||
fileName = "Compliance results" + ".xlsx";
|
||||
}
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
//创建表头
|
||||
String[] firstLineTitleArr = title.split(",");
|
||||
Row firstRow = sheet.createRow(0);
|
||||
|
||||
//设置居中、表头值。
|
||||
for (int i = 0; i < firstLineTitleArr.length; i++){
|
||||
sheet.setColumnWidth(i,5000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(firstLineTitleArr[i]);
|
||||
}
|
||||
|
||||
//设置导出数据
|
||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||
int rowIndex = 1;
|
||||
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
||||
|
||||
List<Map<String, Object>> byStandIdcomplianceResultList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||
for (Map<String, Object> comlianceResult : complianceResultList) {
|
||||
if (StringUtils.equals(comlianceResult.get("standId").toString(), exportData.get(dataIndex).get("id").toString())) {
|
||||
byStandIdcomplianceResultList.add(comlianceResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(byStandIdcomplianceResultList)){
|
||||
int byStandIdComlianceResultSize = byStandIdcomplianceResultList.size();
|
||||
for (int i=0; i<byStandIdComlianceResultSize; i++){
|
||||
Row dataRow = sheet.createRow(rowIndex);
|
||||
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("serialNumber")));
|
||||
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("title")));
|
||||
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("state_dicText")));
|
||||
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("technologyTerritory_dicText")));
|
||||
|
||||
dataRow.createCell(4).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("dutyTerritory_dicText")));
|
||||
String projectName = checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("projectName")) + "-" + checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("yearName"));
|
||||
dataRow.createCell(5).setCellValue(projectName);
|
||||
dataRow.createCell(6).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("designStatus_dicText")));
|
||||
dataRow.createCell(7).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("prehomoStatus_dicText")));
|
||||
dataRow.createCell(8).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("verifyStatus_dicText")));
|
||||
if(byStandIdComlianceResultSize > 1 && i != (byStandIdComlianceResultSize - 1)){
|
||||
rowIndex ++;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
Row dataRow = sheet.createRow(rowIndex);
|
||||
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("serialNumber")));
|
||||
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("title")));
|
||||
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("state_dicText")));
|
||||
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("technologyTerritory_dicText")));
|
||||
}
|
||||
rowIndex ++;
|
||||
}
|
||||
}
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
}catch (IOException ex){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("下载文件失败");
|
||||
}else{
|
||||
throw new JeroBootException("Failed to download file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证值是否是null
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public String checkValueIsNotNull(Object str){
|
||||
String result = "";
|
||||
if(str != null){
|
||||
result = str.toString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
||||
String cut = (String) params.get("cut");
|
||||
List<Map<String,Object>> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(exportData,cut);
|
||||
if(CollectionUtils.isNotEmpty(exportData)){
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性";
|
||||
fileName = "符合性结果" + ".xlsx";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Responsible Field,Relevant project,Design conformance,Pre-Homo Confirm,Verify conformance";
|
||||
fileName = "Compliance results" + ".xlsx";
|
||||
}
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
//创建表头
|
||||
String[] firstLineTitleArr = title.split(",");
|
||||
Row firstRow = sheet.createRow(0);
|
||||
|
||||
//设置居中、表头值。
|
||||
for (int i = 0; i < firstLineTitleArr.length; i++){
|
||||
sheet.setColumnWidth(i,5000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(firstLineTitleArr[i]);
|
||||
}
|
||||
|
||||
//设置导出数据
|
||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||
int rowIndex = 1;
|
||||
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(rowIndex);
|
||||
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("dutyTerritory_dicText")));
|
||||
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("projectName")));
|
||||
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("designStatus_dicText")));
|
||||
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("prehomoStatus_dicText")));
|
||||
dataRow.createCell(4).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("verifyStatus_dicText")));
|
||||
rowIndex ++;
|
||||
}
|
||||
}
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
}catch (IOException ex){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("下载文件失败");
|
||||
}else{
|
||||
throw new JeroBootException("Failed to download file");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public String getConditionStr(Map<String, Object> parameter) {
|
||||
@@ -113,7 +432,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
if (value.contains("%")) {
|
||||
value = value.replace("%", "/%");
|
||||
}
|
||||
conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'");
|
||||
conditionSb.append(" and bdl." + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'");
|
||||
} else if (FieldTypeEnum.PULL_SINGLE.getValue().equals(fieldType)
|
||||
|| FieldTypeEnum.PULL_MORE.getValue().equals(fieldType)
|
||||
|| FieldTypeEnum.TREE.getValue().equals(fieldType)) {
|
||||
@@ -121,27 +440,27 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
StringBuilder condition = new StringBuilder();
|
||||
for (String valueTemp : value.split(",")) {
|
||||
valueSb.append("'" + valueTemp + "',");
|
||||
condition.append(" or " + key + " like concat(concat('%','" + valueTemp + "'),'%')");
|
||||
condition.append(" or bdl." + key + " like concat(concat('%','" + valueTemp + "'),'%')");
|
||||
}
|
||||
condition.append(")");
|
||||
String substring = valueSb.substring(0, valueSb.length() - 1);
|
||||
//下拉单选或下拉多选
|
||||
conditionSb.append(" and (" + key + " in(" + substring + ")" + condition.toString());
|
||||
conditionSb.append(" and (bdl." + key + " in(" + substring + ")" + condition.toString());
|
||||
|
||||
} else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldType)) {
|
||||
//日期(区分单日期还时间范围)
|
||||
if (value.contains(",")) {
|
||||
conditionSb.append(" and " + "date_format(" + key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'"
|
||||
conditionSb.append(" and " + "date_format(bdl." + key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'"
|
||||
+ " and " + "date_format(" + key + ",'%Y-%m-%d') <= '" + value.split(",")[1] + "'");
|
||||
} else {
|
||||
conditionSb.append(" and " + "date_format(" + key + ",'%Y-%m-%d') = '" + value + "'");
|
||||
conditionSb.append(" and " + "date_format(bdl." + key + ",'%Y-%m-%d') = '" + value + "'");
|
||||
}
|
||||
} else if (FieldTypeEnum.PERSON.getValue().equals(fieldType)) {
|
||||
//输入框 LIKE CONCAT("%", '/%', "%") ESCAPE '/'
|
||||
if (value.contains("%")) {
|
||||
value = value.replace("%", "/%");
|
||||
}
|
||||
conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'");
|
||||
conditionSb.append(" and bdl." + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,13 +496,26 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
String queryConditionVOListStr = (String) parameter.get("queryConditionVOList");
|
||||
List<QueryConditionVO> queryConditionVOList = com.alibaba.fastjson.JSONObject.parseArray(queryConditionVOListStr, QueryConditionVO.class);
|
||||
if(ObjectUtils.isNotEmpty(queryConditionVOList)){
|
||||
String queryCondition = this.bussDocumentLibraryEOService.sqlJoint(queryConditionVOList);
|
||||
String queryCondition = this.sqlJoint(queryConditionVOList);
|
||||
if(StringUtils.isNotBlank(queryCondition)){
|
||||
conditionSb.append(" and " + queryCondition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String ids = (String) parameter.get("ids");
|
||||
if(StringUtils.isNotEmpty(ids)){
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
String idStr = "";
|
||||
for (String id : idList) {
|
||||
idStr += "'"+id+"',";
|
||||
}
|
||||
if(StringUtils.isNotEmpty(idStr)){
|
||||
idStr = idStr.substring(0,idStr.length()-1);
|
||||
conditionSb.append(" and id in("+idStr+")");
|
||||
}
|
||||
}
|
||||
|
||||
//处理列表表头排序
|
||||
/*if (StringUtils.isNotBlank((String) parameter.get("orderByField"))) {
|
||||
conditionSb.append(" order by " + (String) parameter.get("orderByField"));
|
||||
@@ -198,4 +530,115 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
String condition = conditionSb.toString();
|
||||
return condition;
|
||||
}
|
||||
|
||||
public String sqlJoint(List<QueryConditionVO> queryConditionVOList){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if(queryConditionVOList.size() != 0){
|
||||
int count =0;
|
||||
for (QueryConditionVO queryConditionVO : queryConditionVOList) {
|
||||
String type = queryConditionVO.getType();//and或or
|
||||
String rule = queryConditionVO.getRule();
|
||||
String ruleLike = "";
|
||||
if(QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule) || QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)){
|
||||
ruleLike = QueryRuleEnum.LIKE.getCondition();
|
||||
}
|
||||
String field = queryConditionVO.getField();
|
||||
String val = queryConditionVO.getVal();
|
||||
//如果查询字段对应的搜索条件值为空,则不作处理
|
||||
if(StringUtils.isNotBlank(val)) {
|
||||
field = "bdl." + field;
|
||||
count++;//从第二个查询条件开始拼接type(and或or)
|
||||
if (count > 1) {
|
||||
sb.append(" " + type + " ");
|
||||
}
|
||||
sb.append(" " + field + " ");
|
||||
//查询类型
|
||||
String ruleTemp = queryType(rule);
|
||||
if (StringUtils.isNotBlank(ruleLike)) {
|
||||
sb.append(ruleLike + " ");
|
||||
} else {
|
||||
sb.append(ruleTemp + " ");
|
||||
}
|
||||
//like和in需要特殊处理
|
||||
if (QueryRuleEnum.IN.getCondition().equals(rule)) {
|
||||
if (val.contains(",")) {
|
||||
StringBuilder sbTemp = new StringBuilder();
|
||||
for (String valTemp : val.split(",")) {
|
||||
sbTemp.append("'" + valTemp + "' ,");
|
||||
}
|
||||
if (StringUtils.isNotBlank(sbTemp)) {
|
||||
String substring = sbTemp.substring(0, sbTemp.length() - 1);
|
||||
sb.append("(" + substring + ")");
|
||||
}
|
||||
}
|
||||
sb.append("('" + val + "')");
|
||||
} else if (QueryRuleEnum.LIKE.getCondition().equals(rule)) {
|
||||
sb.append("'%" + val + "%'");
|
||||
} else if (QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule)) {
|
||||
sb.append("'%" + val + "'");
|
||||
} else if (QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)) {
|
||||
sb.append("'" + val + "%'");
|
||||
} else {
|
||||
sb.append("'" + val + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String queryType(String rule){
|
||||
String value ="";
|
||||
if(QueryRuleEnum.GT.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.GT.getValue();
|
||||
}else if(QueryRuleEnum.GE.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.GE.getValue();
|
||||
}else if(QueryRuleEnum.LT.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.LT.getValue();
|
||||
}else if(QueryRuleEnum.LE.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.LE.getValue();
|
||||
}else if(QueryRuleEnum.EQ.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.EQ.getValue();
|
||||
}else if(QueryRuleEnum.NE.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.NE.getValue();
|
||||
}else if(QueryRuleEnum.LIKE.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.LIKE.getValue();
|
||||
}else if(QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.LEFT_LIKE.getValue();
|
||||
}else if(QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.RIGHT_LIKE.getValue();
|
||||
}else if(QueryRuleEnum.IN.getCondition().equals(rule)){
|
||||
value = QueryRuleEnum.IN.getValue();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理技术领域展示字段
|
||||
* @param technologyTerritoryList
|
||||
* @param technologyTerritory
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public String disposeTechnologyTerritory(List<SysCategory> technologyTerritoryList, String technologyTerritory, String cut){
|
||||
String result = "";
|
||||
// technology_territory
|
||||
if(org.apache.commons.lang3.StringUtils.isNotEmpty(technologyTerritory)){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritoryId : technologyTerritory.split(",")) {
|
||||
List<SysCategory> collect = technologyTerritoryList.stream().filter(e -> e.getId().equals(technologyTerritoryId)).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
sb.append(collect.get(0).getName()+",");
|
||||
}else{
|
||||
sb.append(collect.get(0).getEnName()+",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotEmpty(sb)){
|
||||
result = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-11
@@ -55,14 +55,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -1047,7 +1040,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
StringBuilder midId = new StringBuilder();
|
||||
for (String data : lawEngineerNameList) {
|
||||
if (StringUtils.isNotEmpty(lawEngineerName)) {
|
||||
lawEngineerId = lawEngineerUsers.stream().filter(e -> data.equals(e.getUsername()))
|
||||
lawEngineerId = lawEngineerUsers.stream().filter(e -> data.toLowerCase().equals(e.getUsername().toLowerCase()))
|
||||
.map(sysUser -> sysUser.getId()).collect(Collectors.joining(","));
|
||||
}
|
||||
midId.append(lawEngineerId).append(",");
|
||||
@@ -1081,7 +1074,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
StringBuilder midId = new StringBuilder();
|
||||
for (String data : engineeringInterfacePersonNameList) {
|
||||
if (StringUtils.isNotEmpty(engineeringInterfacePersonName)) {
|
||||
engineeringInterfacePersonId = engineeringInterfacePersonUsers.stream().filter(e -> data.equals(e.getUsername()))
|
||||
engineeringInterfacePersonId = engineeringInterfacePersonUsers.stream().filter(e -> data.toLowerCase().equals(e.getUsername().toLowerCase()))
|
||||
.map(sysUser -> sysUser.getId()).collect(Collectors.joining(","));
|
||||
}
|
||||
midId.append(engineeringInterfacePersonId).append(",");
|
||||
@@ -1130,7 +1123,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
StringBuilder midId = new StringBuilder();
|
||||
for (String data : certificationEngineerNameList) {
|
||||
if (StringUtils.isNotEmpty(certificationEngineerName)) {
|
||||
certificationEngineerId = certificationEngineerUsers.stream().filter(e -> data.equals(e.getUsername()))
|
||||
certificationEngineerId = certificationEngineerUsers.stream().filter(e -> data.toLowerCase().equals(e.getUsername().toLowerCase()))
|
||||
.map(sysUser -> sysUser.getId()).collect(Collectors.joining(","));
|
||||
}
|
||||
midId.append(certificationEngineerId).append(",");
|
||||
|
||||
+268
@@ -0,0 +1,268 @@
|
||||
package com.jero.modules.project.util;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.docx4j.XmlUtils;
|
||||
import org.docx4j.dml.*;
|
||||
import org.docx4j.dml.spreadsheetdrawing.*;
|
||||
import org.docx4j.openpackaging.io.SaveToZipFile;
|
||||
import org.docx4j.openpackaging.packages.SpreadsheetMLPackage;
|
||||
import org.docx4j.openpackaging.parts.DrawingML.Drawing;
|
||||
import org.docx4j.openpackaging.parts.PartName;
|
||||
import org.docx4j.openpackaging.parts.SpreadsheetML.JaxbSmlPart;
|
||||
import org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage;
|
||||
import org.docx4j.relationships.Relationship;
|
||||
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.util.JAXBResult;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Templates;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ExcelUtil {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String inputfilepath = "D:\\text\\072001自定义模板.xlsx";
|
||||
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.load(new File(inputfilepath));
|
||||
WorksheetPart worksheet = pkg.getWorkbookPart().getWorksheet(0);
|
||||
JAXBResult result = XmlUtils.prepareJAXBResult(worksheet.getJAXBContext());
|
||||
Map<String, Object> transformParameters = new HashMap<>();
|
||||
transformParameters.put("NIO 07200103", "dfasdfas");
|
||||
|
||||
// InputStream smlPart = pkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet
|
||||
|
||||
Source xsltSource = new StreamSource(new File("D:\\text\\sharedStrings.xml"));
|
||||
TransformerFactory transFact = TransformerFactory.newInstance();
|
||||
Templates cachedXSLT = transFact.newTemplates(xsltSource);
|
||||
|
||||
pkg.getWorkbookPart().transform(cachedXSLT,transformParameters,result);
|
||||
|
||||
// variableReplace();
|
||||
// xlsx4JAddImage();
|
||||
}
|
||||
|
||||
public static void xlsx4JAddImage() throws Exception {
|
||||
|
||||
String inputfilepath = "D:\\text\\072001自定义模板.xlsx";
|
||||
String outputfilepath = "D:\\text\\mytest.xlsx";
|
||||
String imagefilePath = "D:\\text\\jpg2.jpg" ;
|
||||
|
||||
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.createPackage();
|
||||
WorksheetPart worksheet = pkg.createWorksheetPart(new PartName("/xl/worksheets/sheet1.xml"), "Sheet1", 1);
|
||||
|
||||
|
||||
// Create Drawing part and add to sheet
|
||||
Drawing drawingPart = new Drawing();
|
||||
Relationship drawingRel = worksheet.addTargetPart(drawingPart);
|
||||
|
||||
// Add anchor XML to worksheet
|
||||
org.xlsx4j.sml.CTDrawing drawing = org.xlsx4j.jaxb.Context.getsmlObjectFactory().createCTDrawing();
|
||||
worksheet.getJaxbElement().setDrawing(drawing);
|
||||
drawing.setId( drawingRel.getId() );
|
||||
|
||||
// Create image part and add to Drawing part
|
||||
BinaryPartAbstractImage imagePart
|
||||
= BinaryPartAbstractImage.createImagePart(pkg, drawingPart,
|
||||
FileUtils.readFileToByteArray(new File(imagefilePath) ));
|
||||
String imageRelID = imagePart.getSourceRelationship().getId();
|
||||
|
||||
// Create and set drawing part content
|
||||
// Take your pick ..
|
||||
// .. build it using code
|
||||
drawingPart.setJaxbElement(
|
||||
buildDrawingPartContentUsingCode(imageRelID));
|
||||
// .. or build it from an XML string
|
||||
// drawingPart.setJaxbElement(
|
||||
// buildDrawingPartContentFromXmlString(imageRelID));
|
||||
|
||||
|
||||
// Save the xlsx
|
||||
SaveToZipFile saver = new SaveToZipFile(pkg);
|
||||
saver.save(outputfilepath);
|
||||
System.out.println("\n\n done .. " + outputfilepath);
|
||||
}
|
||||
|
||||
public static void variableReplace(InputStream is, OutputStream os, HashMap<String, String> mappings) throws Exception {
|
||||
|
||||
SpreadsheetMLPackage opcPackagepkg = SpreadsheetMLPackage.load(is);
|
||||
|
||||
// Be sure to get the part which actually contains your variables!
|
||||
JaxbSmlPart smlPart = (JaxbSmlPart)opcPackagepkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet
|
||||
//JaxbSmlPart smlPart = (JaxbSmlPart)opcPackagepkg.getParts().get(new PartName("/xl/worksheets/sheet1.xml"));
|
||||
smlPart.variableReplace(mappings);
|
||||
|
||||
// Save it
|
||||
opcPackagepkg.save(os);
|
||||
}
|
||||
|
||||
/**
|
||||
* This code generated using http://webapp.docx4java.org/OnlineDemo/PartsList.html
|
||||
* "Method 1"
|
||||
*/
|
||||
public static CTDrawing buildDrawingPartContentUsingCode(String imageRelID) {
|
||||
|
||||
org.docx4j.dml.spreadsheetdrawing.ObjectFactory dmlspreadsheetdrawingObjectFactory = new org.docx4j.dml.spreadsheetdrawing.ObjectFactory();
|
||||
|
||||
CTDrawing drawing = dmlspreadsheetdrawingObjectFactory.createCTDrawing();
|
||||
// JAXBElement<org.docx4j.dml.spreadsheetdrawing.CTDrawing> drawingWrapped = dmlspreadsheetdrawingObjectFactory.createWsDr(drawing);
|
||||
// Create object for twoCellAnchor
|
||||
CTTwoCellAnchor twocellanchor = dmlspreadsheetdrawingObjectFactory.createCTTwoCellAnchor();
|
||||
drawing.getEGAnchor().add( twocellanchor);
|
||||
// Create object for clientData
|
||||
CTAnchorClientData anchorclientdata = dmlspreadsheetdrawingObjectFactory.createCTAnchorClientData();
|
||||
twocellanchor.setClientData(anchorclientdata);
|
||||
// Create object for pic
|
||||
CTPicture picture = dmlspreadsheetdrawingObjectFactory.createCTPicture();
|
||||
twocellanchor.setPic(picture);
|
||||
org.docx4j.dml.ObjectFactory dmlObjectFactory = new org.docx4j.dml.ObjectFactory();
|
||||
// Create object for blipFill
|
||||
CTBlipFillProperties blipfillproperties = dmlObjectFactory.createCTBlipFillProperties();
|
||||
picture.setBlipFill(blipfillproperties);
|
||||
// Create object for blip
|
||||
CTBlip blip = dmlObjectFactory.createCTBlip();
|
||||
blipfillproperties.setBlip(blip);
|
||||
blip.setCstate(org.docx4j.dml.STBlipCompression.NONE);
|
||||
blip.setEmbed( imageRelID );
|
||||
// Create object for extLst
|
||||
CTOfficeArtExtensionList officeartextensionlist = dmlObjectFactory.createCTOfficeArtExtensionList();
|
||||
blip.setExtLst(officeartextensionlist);
|
||||
// Create object for ext
|
||||
CTOfficeArtExtension officeartextension = dmlObjectFactory.createCTOfficeArtExtension();
|
||||
officeartextensionlist.getExt().add( officeartextension);
|
||||
officeartextension.setUri( "{28A0092B-C50C-407E-A947-70E740481C1C}");
|
||||
blip.setLink( "");
|
||||
// Create object for stretch
|
||||
CTStretchInfoProperties stretchinfoproperties = dmlObjectFactory.createCTStretchInfoProperties();
|
||||
blipfillproperties.setStretch(stretchinfoproperties);
|
||||
// Create object for fillRect
|
||||
CTRelativeRect relativerect = dmlObjectFactory.createCTRelativeRect();
|
||||
stretchinfoproperties.setFillRect(relativerect);
|
||||
relativerect.setR( new Integer(0) );
|
||||
relativerect.setT( new Integer(0) );
|
||||
relativerect.setL( new Integer(0) );
|
||||
relativerect.setB( new Integer(0) );
|
||||
// Create object for spPr
|
||||
CTShapeProperties shapeproperties = dmlObjectFactory.createCTShapeProperties();
|
||||
picture.setSpPr(shapeproperties);
|
||||
// Create object for xfrm
|
||||
CTTransform2D transform2d = dmlObjectFactory.createCTTransform2D();
|
||||
shapeproperties.setXfrm(transform2d);
|
||||
transform2d.setRot( new Integer(0) );
|
||||
// Create object for off
|
||||
CTPoint2D point2d = dmlObjectFactory.createCTPoint2D();
|
||||
transform2d.setOff(point2d);
|
||||
point2d.setY( 0 );
|
||||
point2d.setX( 0 );
|
||||
// Create object for ext
|
||||
CTPositiveSize2D positivesize2d = dmlObjectFactory.createCTPositiveSize2D();
|
||||
transform2d.setExt(positivesize2d);
|
||||
positivesize2d.setCx( 714375 );
|
||||
positivesize2d.setCy( 714375 );
|
||||
// Create object for prstGeom
|
||||
CTPresetGeometry2D presetgeometry2d = dmlObjectFactory.createCTPresetGeometry2D();
|
||||
shapeproperties.setPrstGeom(presetgeometry2d);
|
||||
// Create object for avLst
|
||||
CTGeomGuideList geomguidelist = dmlObjectFactory.createCTGeomGuideList();
|
||||
presetgeometry2d.setAvLst(geomguidelist);
|
||||
presetgeometry2d.setPrst(org.docx4j.dml.STShapeType.RECT);
|
||||
// Create object for nvPicPr
|
||||
CTPictureNonVisual picturenonvisual = dmlspreadsheetdrawingObjectFactory.createCTPictureNonVisual();
|
||||
picture.setNvPicPr(picturenonvisual);
|
||||
// Create object for cNvPr
|
||||
CTNonVisualDrawingProps nonvisualdrawingprops = dmlObjectFactory.createCTNonVisualDrawingProps();
|
||||
picturenonvisual.setCNvPr(nonvisualdrawingprops);
|
||||
nonvisualdrawingprops.setDescr( "");
|
||||
nonvisualdrawingprops.setName( "Picture 1");
|
||||
nonvisualdrawingprops.setId( 2 );
|
||||
// Create object for cNvPicPr
|
||||
CTNonVisualPictureProperties nonvisualpictureproperties = dmlObjectFactory.createCTNonVisualPictureProperties();
|
||||
picturenonvisual.setCNvPicPr(nonvisualpictureproperties);
|
||||
// Create object for picLocks
|
||||
CTPictureLocking picturelocking = dmlObjectFactory.createCTPictureLocking();
|
||||
nonvisualpictureproperties.setPicLocks(picturelocking);
|
||||
picture.setMacro( "");
|
||||
// Create object for to
|
||||
CTMarker marker = dmlspreadsheetdrawingObjectFactory.createCTMarker();
|
||||
twocellanchor.setTo(marker);
|
||||
marker.setCol(1);
|
||||
marker.setColOff( 104775 );
|
||||
marker.setRow(3);
|
||||
marker.setRowOff( 142875 );
|
||||
// Create object for from
|
||||
CTMarker marker2 = dmlspreadsheetdrawingObjectFactory.createCTMarker();
|
||||
twocellanchor.setFrom(marker2);
|
||||
marker2.setCol(0);
|
||||
marker2.setColOff( 0 );
|
||||
marker2.setRow(0);
|
||||
marker2.setRowOff( 0 );
|
||||
twocellanchor.setEditAs(STEditAs.fromValue("name"));
|
||||
|
||||
// return drawingWrapped;
|
||||
return drawing;
|
||||
}
|
||||
|
||||
/**
|
||||
* This code generated using http://webapp.docx4java.org/OnlineDemo/PartsList.html
|
||||
* "Method 2"
|
||||
*/
|
||||
public static CTDrawing buildDrawingPartContentFromXmlString(String imageRelID) throws JAXBException {
|
||||
|
||||
String openXML = "<xdr:wsDr xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">"
|
||||
+ "<xdr:twoCellAnchor editAs=\"oneCell\">"
|
||||
+ "<xdr:from>"
|
||||
+ "<xdr:col>0</xdr:col>"
|
||||
+ "<xdr:colOff>0</xdr:colOff>"
|
||||
+ "<xdr:row>0</xdr:row>"
|
||||
+ "<xdr:rowOff>0</xdr:rowOff>"
|
||||
+"</xdr:from>"
|
||||
+ "<xdr:to>"
|
||||
+ "<xdr:col>1</xdr:col>"
|
||||
+ "<xdr:colOff>104775</xdr:colOff>"
|
||||
+ "<xdr:row>3</xdr:row>"
|
||||
+ "<xdr:rowOff>142875</xdr:rowOff>"
|
||||
+"</xdr:to>"
|
||||
+ "<xdr:pic>"
|
||||
+ "<xdr:nvPicPr>"
|
||||
+ "<xdr:cNvPr id=\"2\" name=\"Picture 1\"/>"
|
||||
+ "<xdr:cNvPicPr>"
|
||||
+ "<a:picLocks noChangeAspect=\"1\"/>"
|
||||
+"</xdr:cNvPicPr>"
|
||||
+"</xdr:nvPicPr>"
|
||||
+ "<xdr:blipFill>"
|
||||
+ "<a:blip r:embed=\"" + imageRelID + "\">"
|
||||
+ "<a:extLst>"
|
||||
+ "<a:ext uri=\"{28A0092B-C50C-407E-A947-70E740481C1C}\">"
|
||||
+ "<a14:useLocalDpi val=\"0\"/>"
|
||||
+"</a:ext>"
|
||||
+"</a:extLst>"
|
||||
+"</a:blip>"
|
||||
+ "<a:stretch>"
|
||||
+ "<a:fillRect/>"
|
||||
+"</a:stretch>"
|
||||
+"</xdr:blipFill>"
|
||||
+ "<xdr:spPr>"
|
||||
+ "<a:xfrm>"
|
||||
+ "<a:off x=\"0\" y=\"0\"/>"
|
||||
+ "<a:ext cx=\"714375\" cy=\"714375\"/>"
|
||||
+"</a:xfrm>"
|
||||
+ "<a:prstGeom prst=\"rect\">"
|
||||
+ "<a:avLst/>"
|
||||
+"</a:prstGeom>"
|
||||
+"</xdr:spPr>"
|
||||
+"</xdr:pic>"
|
||||
+ "<xdr:clientData/>"
|
||||
+"</xdr:twoCellAnchor>"
|
||||
+"</xdr:wsDr>";
|
||||
|
||||
return (CTDrawing) XmlUtils.unwrap(
|
||||
XmlUtils.unmarshalString(openXML));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+278
-23
@@ -1,14 +1,5 @@
|
||||
package com.jero.modules.project.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.docx4j.Docx4J;
|
||||
import org.docx4j.TraversalUtil;
|
||||
import org.docx4j.XmlUtils;
|
||||
@@ -20,23 +11,24 @@ import org.docx4j.finders.RangeFinder;
|
||||
import org.docx4j.fonts.IdentityPlusMapper;
|
||||
import org.docx4j.fonts.Mapper;
|
||||
import org.docx4j.fonts.PhysicalFonts;
|
||||
import org.docx4j.jaxb.Context;
|
||||
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
|
||||
import org.docx4j.wml.Body;
|
||||
import org.docx4j.wml.CTBookmark;
|
||||
import org.docx4j.wml.Document;
|
||||
import org.docx4j.wml.Drawing;
|
||||
import org.docx4j.wml.ObjectFactory;
|
||||
import org.docx4j.wml.P;
|
||||
import org.docx4j.wml.R;
|
||||
import org.docx4j.wml.Tbl;
|
||||
import org.docx4j.wml.Text;
|
||||
import org.docx4j.wml.Tr;
|
||||
import org.docx4j.wml.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class WordUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(WordUtil.class);
|
||||
|
||||
@@ -126,7 +118,16 @@ public class WordUtil {
|
||||
table.getContent().remove(rowNum - 1);
|
||||
}
|
||||
|
||||
public static void replacePicture(WordprocessingMLPackage wordMLPackage, String bookmarkName, InputStream inputStream) throws Exception {
|
||||
/**
|
||||
* 通过书签识别需要插入的图片位置,并替换书签对应的文本为图片
|
||||
* @param wordMLPackage
|
||||
* @param bookmarkName 书签名称
|
||||
* @param text 图片前需要加的文本
|
||||
* @param bytes 图片
|
||||
* @throws Exception
|
||||
* @author liyawei
|
||||
*/
|
||||
public static void replacePictureBM(WordprocessingMLPackage wordMLPackage, String bookmarkName, Object text, byte[] bytes) throws Exception {
|
||||
try {
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Document wmlDoc = (Document)mainDocumentPart.getJaxbElement();
|
||||
@@ -139,23 +140,277 @@ public class WordUtil {
|
||||
while(var8.hasNext()) {
|
||||
CTBookmark bm = (CTBookmark)var8.next();
|
||||
if (bm.getName().equals(bookmarkName)) {
|
||||
byte[] bytes = IOUtils.toByteArray(inputStream);
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
|
||||
Inline inline = imagePart.createImageInline("", "", 0, 1, true);
|
||||
P p = (P)((P)bm.getParent());
|
||||
ObjectFactory factory = new ObjectFactory();
|
||||
R run = factory.createR();
|
||||
Drawing drawing = factory.createDrawing();
|
||||
drawing.getAnchorOrInline().add(inline);
|
||||
run.getContent().add(drawing);
|
||||
p.getContent().add(run);
|
||||
replaceTextToImage(bm, text, wordMLPackage, bytes);
|
||||
}
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
log.error(var17.getMessage(), var17);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 占位符的key 识别需要插入的图片位置,并替换占位符为图片
|
||||
* @param wordMLPackage
|
||||
* @param key 占位符的key ${key}
|
||||
* @param text 图片前需要加的文本
|
||||
* @param bytes 图片
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void replacePicture(WordprocessingMLPackage wordMLPackage, String key, Object text, byte[] bytes) throws Exception {
|
||||
try {
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Docx4jUtils.cleanDocumentPart(mainDocumentPart);
|
||||
Document wmlDoc = (Document)mainDocumentPart.getJaxbElement();
|
||||
Body body = wmlDoc.getBody();
|
||||
Iterator var8 = getAllPlaceholderElementFromObject(body).iterator();
|
||||
|
||||
while(var8.hasNext()) {
|
||||
Text bm = (Text) var8.next();
|
||||
if (bm.getValue().equals("${" + key + "}")) {
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
|
||||
Inline inline = imagePart.createImageInline("", "", 0, 1, true);
|
||||
ObjectFactory factory = new ObjectFactory();
|
||||
R run = factory.createR();
|
||||
Drawing drawing = factory.createDrawing();
|
||||
drawing.getAnchorOrInline().add(inline);
|
||||
run.getContent().add(drawing);
|
||||
replaceTextToImage(bm, text, wordMLPackage, bytes);
|
||||
}
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
log.error(var17.getMessage(), var17);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 占位符的key 识别需要插入的图片位置,并替换占位符为图片
|
||||
* 批量替换
|
||||
* @param wordMLPackage
|
||||
* @param picList
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void replacePictureBatch(WordprocessingMLPackage wordMLPackage, List<Map<String, Object>> picList) throws Exception {
|
||||
try {
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Docx4jUtils.cleanDocumentPart(mainDocumentPart);
|
||||
Document wmlDoc = (Document)mainDocumentPart.getJaxbElement();
|
||||
Body body = wmlDoc.getBody();
|
||||
List<Text> textList = getAllPlaceholderElementFromObject(body); // 获取文档中所有占位符
|
||||
|
||||
for (Map<String, Object> picMap :picList) {
|
||||
String key = (String) picMap.get("key");
|
||||
Object text = picMap.get("text");
|
||||
byte[] bytes = (byte[]) picMap.get("bytes");
|
||||
|
||||
for(Text bm : textList) {
|
||||
if (bm.getValue().equals("${" + key + "}")) {
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
|
||||
Inline inline = imagePart.createImageInline("", "", 0, 1, true);
|
||||
ObjectFactory factory = new ObjectFactory();
|
||||
R run = factory.createR();
|
||||
Drawing drawing = factory.createDrawing();
|
||||
drawing.getAnchorOrInline().add(inline);
|
||||
run.getContent().add(drawing);
|
||||
replaceTextToImage(bm, text, wordMLPackage, bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
log.error(var17.getMessage(), var17);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 发现docx文档包含占位符的文本节点
|
||||
* 未解决问题:两个连着的相同占位符会识别成一个。如 原文:${key1}${key1}
|
||||
* @param obj
|
||||
* @return
|
||||
* @author liyawei
|
||||
*/
|
||||
private static List<Text> getAllPlaceholderElementFromObject(Object obj) {
|
||||
List<Text> result = new ArrayList<>();
|
||||
Class<Text> toSearch = Text.class;
|
||||
Text textPlaceholder;
|
||||
if (obj instanceof JAXBElement) {
|
||||
obj = ((JAXBElement<?>) obj).getValue();
|
||||
}
|
||||
if (obj.getClass().equals(toSearch)) {
|
||||
textPlaceholder = (Text) obj;
|
||||
if (isPlaceholder(textPlaceholder.getValue())) {
|
||||
result.add((Text) obj);
|
||||
}
|
||||
} else if (obj instanceof ContentAccessor) {
|
||||
List<?> children = ((ContentAccessor) obj).getContent();
|
||||
for (Object child : children) {
|
||||
result.addAll(getAllPlaceholderElementFromObject(child));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断字符串是否有${}占位符
|
||||
*
|
||||
* @param str 需要判断的字符串
|
||||
* @return 是否字符串是否有${}占位符
|
||||
* @author liyawei
|
||||
*/
|
||||
private static boolean isPlaceholder(String str) {
|
||||
if (str != null && !str.isEmpty()) {
|
||||
Pattern pattern = Pattern.compile("([$]\\{[A-Za-z0-9./ -]+\\})"); // 识别范围 认证模块专用
|
||||
Matcher m = pattern.matcher(str);
|
||||
return m.find();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在标签处插入替换内容
|
||||
*
|
||||
* @param bm
|
||||
* @param object
|
||||
* @throws Exception
|
||||
* @author liyawei
|
||||
*/
|
||||
public static void replaceTextToImage(CTBookmark bm, Object object, WordprocessingMLPackage wordMLPackage , byte[] bytes) throws Exception {
|
||||
if (wordMLPackage == null) {
|
||||
return;
|
||||
}
|
||||
if (bm.getName() == null){
|
||||
return;
|
||||
}
|
||||
String text = object.toString();
|
||||
try {
|
||||
List<Object> theList = null;
|
||||
ParaRPr rpr = null;
|
||||
if (bm.getParent() instanceof P) {
|
||||
PPr pprTemp = ((P) (bm.getParent())).getPPr();
|
||||
if (pprTemp == null) {
|
||||
rpr = null;
|
||||
} else {
|
||||
rpr = ((P) (bm.getParent())).getPPr().getRPr();
|
||||
}
|
||||
theList = ((ContentAccessor) (bm.getParent())).getContent();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
int rangeStart = -1;
|
||||
int rangeEnd = -1;
|
||||
int i = 0;
|
||||
for (Object ox : theList) {
|
||||
Object listEntry = XmlUtils.unwrap(ox);
|
||||
if (listEntry.equals(bm)) {
|
||||
if (((CTBookmark) listEntry).getName() != null) {
|
||||
rangeStart = i + 1;
|
||||
}
|
||||
} else if (listEntry instanceof CTMarkupRange) {
|
||||
if (((CTMarkupRange) listEntry).getId().equals(bm.getId())) {
|
||||
rangeEnd = i - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
int x = i - 1;
|
||||
for (int j = x; j >= rangeStart; j--) {
|
||||
theList.remove(j);
|
||||
}
|
||||
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
|
||||
Inline inline = imagePart.createImageInline("", "", 0, 1, true);
|
||||
ObjectFactory factory = Context.getWmlObjectFactory();
|
||||
R run = factory.createR();
|
||||
Drawing drawing = factory.createDrawing();
|
||||
if(text != null){
|
||||
Text txt = factory.createText();
|
||||
txt.setValue(text);
|
||||
run.getContent().add(txt);
|
||||
}
|
||||
run.getContent().add(drawing);
|
||||
drawing.getAnchorOrInline().add(inline);
|
||||
theList.add(rangeStart, run);
|
||||
} catch (ClassCastException cce) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 在占位符处插入替换内容
|
||||
*
|
||||
* @param bm
|
||||
* @param object
|
||||
* @throws Exception
|
||||
* @author liyawei
|
||||
*/
|
||||
public static void replaceTextToImage(Text bm, Object object, WordprocessingMLPackage wordMLPackage , byte[] bytes) throws Exception {
|
||||
if (wordMLPackage == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String text = object.toString();
|
||||
try {
|
||||
List<Object> theList = null;
|
||||
ParaRPr rpr = null;
|
||||
if (bm.getParent() instanceof P) {
|
||||
PPr pprTemp = ((P) (bm.getParent())).getPPr();
|
||||
if (pprTemp == null) {
|
||||
rpr = null;
|
||||
} else {
|
||||
rpr = ((P) (bm.getParent())).getPPr().getRPr();
|
||||
}
|
||||
theList = ((ContentAccessor) (bm.getParent())).getContent();
|
||||
} else {
|
||||
R r = (R) bm.getParent();
|
||||
if (r.getParent() instanceof P) {
|
||||
theList = ((ContentAccessor) (r.getParent())).getContent();
|
||||
|
||||
int rangeStart = -1; // 记录占位符run位置
|
||||
int i = 0;
|
||||
for (Object ox : theList) {
|
||||
Object listEntry = XmlUtils.unwrap(ox);
|
||||
if (listEntry.equals(r)) {
|
||||
rangeStart = i;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
theList.remove(rangeStart); // 移除原占位符
|
||||
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes);
|
||||
Inline inline = imagePart.createImageInline("", "", 0, 1, true);
|
||||
ObjectFactory factory = Context.getWmlObjectFactory();
|
||||
R run = factory.createR();
|
||||
Drawing drawing = factory.createDrawing();
|
||||
if(text != null){
|
||||
Text txt = factory.createText();
|
||||
txt.setValue(text);
|
||||
run.getContent().add(txt);
|
||||
}
|
||||
run.getContent().add(drawing);
|
||||
drawing.getAnchorOrInline().add(inline);
|
||||
theList.add(rangeStart, run); // 添加图片到原占位符位置
|
||||
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ClassCastException cce) {
|
||||
log.error(cce.getMessage(), cce);
|
||||
}
|
||||
}
|
||||
|
||||
public static void replaceForTemplate(String templatePath, Map<String, String> map, int tableNum, List<Map<String, Object>> dataList, String outPath) throws Exception {
|
||||
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new File(templatePath));
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
|
||||
@@ -410,14 +410,18 @@ people:
|
||||
## Feishu
|
||||
Feishu:
|
||||
# 测试
|
||||
appId: cli_a16d47ca9f381013
|
||||
appSecret: DSfCrj70xku2VUjqwHBIuuY6HZnz7ppe
|
||||
# appId: cli_a16d47ca9f381013
|
||||
# appSecret: DSfCrj70xku2VUjqwHBIuuY6HZnz7ppe
|
||||
|
||||
appId: cli_a25c9fdae5bc100c
|
||||
appSecret: zIS7BLzcWaFvlpdz7CqRJbwVml4g4ESy
|
||||
|
||||
# 正式
|
||||
# appId: cli_a2a1a6014679500d
|
||||
# appSecret: AeHwisC82S0fhiREJg6bkdxhIZMevnZZ
|
||||
getTenantAccessTokenUrl: https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
|
||||
batchSendMessageUrl: https://open.feishu.cn/open-apis/message/v4/batch_send/
|
||||
translateTextUrl: https://open.feishu.cn/open-apis/translation/v1/text/translate
|
||||
local-tool:
|
||||
uri: http://139.9.235.66:9022
|
||||
opensso:
|
||||
|
||||
@@ -38,7 +38,7 @@ module.exports = {
|
||||
serialNumber: 'Number',
|
||||
userAccount: 'User Account',
|
||||
userName: 'User Name',
|
||||
Department: 'Department',
|
||||
department: 'Department',
|
||||
status: 'Status',
|
||||
Operation: 'Operation',
|
||||
aRcord: 'A Rcord',
|
||||
@@ -421,6 +421,7 @@ module.exports = {
|
||||
MessageNotification: 'Message Notification',
|
||||
SeeMore: 'See More',
|
||||
OperationSuccessful: 'Operation Successful',
|
||||
Intheexport: 'In The Export...',
|
||||
OperationFailed: 'Operation Failed',
|
||||
PersonnelSelection: 'Select ',
|
||||
EmployeeNumber: 'Employee ID',
|
||||
@@ -770,6 +771,7 @@ module.exports = {
|
||||
SynchronousReportLibrary: 'Synchronous Report Library',
|
||||
FreezeConfiguration: 'Freeze Configuration',
|
||||
distributionAndCollection: 'Distribution And Collection',
|
||||
OneclickCollection: 'One-click Collection',
|
||||
deleteConfiguration: 'Delete Configuration',
|
||||
addConfiguration: 'Add Configuration',
|
||||
electricMachinery: 'ElectricMachinery',
|
||||
@@ -1152,4 +1154,23 @@ module.exports = {
|
||||
TechnicalEvaluationResultsForReference:'Technical Evaluation Results For Reference',
|
||||
ComplianceConfirmationRecord:'Compliance Confirmation Record',
|
||||
complianceConfirmation:'Compliance Confirmation',
|
||||
noComparisonDocumentSelected:'No comparison document selected',
|
||||
RemarkInfo:'Remarks Info',
|
||||
initiateDocumentComparison:'Initiate Document Comparison',
|
||||
comparativeComments:'Comparative Comments',
|
||||
viewTheComparisonResults:'View The Comparison Results',
|
||||
addFullTextComment:'Add Full Text Comment',
|
||||
turnOffAutomaticMatching:'Turn Off Automatic Matching',
|
||||
Deriveconformanceresults:'Derive Conformance Results',
|
||||
Regulatorycompliancekanban:'Regulatory Compliance Kanban',
|
||||
exportComparisonReport:'Export Comparison Report',
|
||||
comparisonDifferenceComment:'Comparison Difference Comment',
|
||||
fullTextComments:'Full text comments',
|
||||
fileDeclaration:'file Declaration',
|
||||
FileForDetails:'File For Details',
|
||||
Converting:'Converting',
|
||||
convertNetwork:'Convert Network',
|
||||
convertFailed:'Convert Failed',
|
||||
standardData:'Standard Data',
|
||||
Theorganization:'The Organization',
|
||||
}
|
||||
@@ -426,6 +426,7 @@ module.exports = {
|
||||
MessageNotification: '消息通知',
|
||||
SeeMore: '查看更多',
|
||||
OperationSuccessful: '操作成功',
|
||||
Intheexport: '导出中...',
|
||||
operationFailed: '操作失败',
|
||||
PersonnelSelection: '人员选择',
|
||||
EmployeeNumber: '员工号',
|
||||
@@ -785,6 +786,7 @@ module.exports = {
|
||||
SynchronousReportLibrary: '同步上报库',
|
||||
FreezeConfiguration: '冻结配置',
|
||||
distributionAndCollection: '下发收集',
|
||||
OneclickCollection: '一键下发收集',
|
||||
deleteConfiguration: '删除配置',
|
||||
addConfiguration: '添加配置',
|
||||
electricMachinery: '电机',
|
||||
@@ -1156,4 +1158,23 @@ module.exports = {
|
||||
TechnicalEvaluationResultsForReference:'技术评估结果参考',
|
||||
ComplianceConfirmationRecord:'符合性确认记录',
|
||||
complianceConfirmation:'符合性确认',
|
||||
Deriveconformanceresults:'导出符合性结果',
|
||||
Regulatorycompliancekanban:'法规符合性看板',
|
||||
noComparisonDocumentSelected:'未选择对比文档',
|
||||
RemarkInfo:'备注信息',
|
||||
initiateDocumentComparison:'发起文档对比',
|
||||
comparativeComments:'对比评论',
|
||||
viewTheComparisonResults:'查看对比结果',
|
||||
addFullTextComment:'添加全文评论',
|
||||
turnOffAutomaticMatching:'关闭自动匹配',
|
||||
exportComparisonReport:'导出对比报告',
|
||||
comparisonDifferenceComment:'对比差异评论',
|
||||
fullTextComments:'全文评论',
|
||||
fileDeclaration:'文件说明',
|
||||
FileForDetails:'文件详情',
|
||||
Converting:'转换中',
|
||||
convertNetwork:'转换完成',
|
||||
convertFailed:'转换失败',
|
||||
standardData:'标准数据',
|
||||
Theorganization:'组织机构',
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class='diolag-area'>
|
||||
<a-spin :spinning='spinLoading'>
|
||||
<a-form-model
|
||||
class='tag-module'
|
||||
class='formAdd'
|
||||
ref='ruleForm'
|
||||
:model='form'
|
||||
:rules='rules'
|
||||
@@ -10,10 +10,29 @@
|
||||
:wrapper-col='wrapperCol'
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='24'>
|
||||
<span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>
|
||||
<a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />
|
||||
</span>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('cutoffTime')">
|
||||
{{$t('cutoffTime')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="legalTaskConfirmation">
|
||||
<a-date-picker class="box-input"
|
||||
style='width: 160px'
|
||||
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
||||
@change="onChange" @ok="onOk"
|
||||
format="YYYY-MM-DD"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
v-model="form.legalTaskConfirmation"
|
||||
:disabled="false"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- <a-col :span='24'>-->
|
||||
<!-- <span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>-->
|
||||
<!-- <a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
@@ -22,6 +41,33 @@
|
||||
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
|
||||
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
<!-- 错误数据提示-->
|
||||
<a-modal
|
||||
:title="$t('operationFailed')"
|
||||
:width="860"
|
||||
v-model="visibleoperationFailed"
|
||||
:maskClosable="false"
|
||||
:footer="null"
|
||||
@cancel='cancleoperationFailed'
|
||||
:body-style="bodystyle"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
|
||||
class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue'>
|
||||
<span v-html='item'></span>
|
||||
<!-- <div>{{$t('NiOnumberis')}}{{ item.nioNumber }},{{$t('Statusis')}}-->
|
||||
<!-- <span style='color: red'>{{ item.state }}</span>,{{$t('NoOperationPermissionForthisbutton')}}。-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="imports-footer">
|
||||
<div class="imports-footer-wrap">
|
||||
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -43,7 +89,9 @@ export default {
|
||||
selectedRowKeysDate: {},
|
||||
loading: false,
|
||||
editId: '',
|
||||
visibleoperationFailed:false,
|
||||
newVisible: false,
|
||||
NotSelectedRowKeysValue:[],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
@@ -53,7 +101,11 @@ export default {
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
rules: {},
|
||||
rules: {
|
||||
legalTaskConfirmation:[
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('cutoffTime'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
@@ -62,6 +114,7 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pickerDate: '',
|
||||
bodystyle:{}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -73,6 +126,11 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.bodystyle = {
|
||||
height: '480px',
|
||||
overflow: 'hidden',
|
||||
overflowY: 'scroll',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
@@ -105,19 +163,90 @@ export default {
|
||||
},
|
||||
//保存
|
||||
handleSubmit() {
|
||||
let _this = this
|
||||
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
||||
this.confirmLoading = true
|
||||
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
||||
if (res.success) {
|
||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
this.$message.success(_this.$t('OperationSuccessful'))
|
||||
this.confirmLoading = false
|
||||
} else {
|
||||
this.$message.warning(_this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
// let _this = this
|
||||
// let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
||||
// this.confirmLoading = true
|
||||
// postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
// this.$message.success(_this.$t('OperationSuccessful'))
|
||||
// this.confirmLoading = false
|
||||
// } else {
|
||||
// this.$message.warning(_this.$t('operationFailed'))
|
||||
// this.confirmLoading = false
|
||||
// }
|
||||
// })
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if(valid){
|
||||
let long = localStorage.getItem('language')
|
||||
let cut = ''
|
||||
if (long && long == 'zh-cn') {
|
||||
this.cut = 'cn'
|
||||
} else if (long && long == 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
})
|
||||
// let _array = []
|
||||
// this.selectedRowKeysValue.forEach((item, index) => {
|
||||
// _array.push(item.id)
|
||||
// })
|
||||
let _this = this
|
||||
let param = {
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectId: this.$route.query.projectId,
|
||||
ids: this.selectedRowKeysArray,
|
||||
cut: this.cut,
|
||||
deadline: `${this.pickerDate}`
|
||||
|
||||
}
|
||||
this.textLoading = true
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/issueCollection',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
// _this.$message.success(this.$t('OperationSuccessful'))
|
||||
if(res.data.result.length == 0){
|
||||
this.visibleoperationFailed = false
|
||||
_this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
this.$emit('GetgetTableList')
|
||||
|
||||
}else{
|
||||
this.NotSelectedRowKeysValue = res.data.result
|
||||
this.visibleoperationFailed = true
|
||||
}
|
||||
|
||||
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
// this.$emit('GetgetTableList')
|
||||
} else {
|
||||
_this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.textLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 错误数据的弹框
|
||||
cancleoperationFailed() {
|
||||
this.visibleoperationFailed = false
|
||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||
this.$emit('GetgetTableList')
|
||||
// this.GetgetTableList()
|
||||
},
|
||||
onChange(val) {
|
||||
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
@@ -131,7 +260,10 @@ export default {
|
||||
|
||||
<style lang='less' scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.box-title-text-index {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
@@ -150,6 +282,70 @@ export default {
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index:100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
/deep/.add-input{
|
||||
min-height: 135px!important;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
|
||||
@@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<div class='diolag-area'>
|
||||
<a-spin :spinning='spinLoading'>
|
||||
<a-form-model
|
||||
class='formAdd'
|
||||
ref='ruleForm'
|
||||
:model='form'
|
||||
:rules='rules'
|
||||
:label-col='labelCol'
|
||||
:wrapper-col='wrapperCol'
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('cutoffTime')">
|
||||
{{$t('cutoffTime')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="legalTaskConfirmation">
|
||||
<a-date-picker class="box-input"
|
||||
style='width: 160px'
|
||||
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
||||
@change="onChange" @ok="onOk"
|
||||
format="YYYY-MM-DD"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
v-model="form.legalTaskConfirmation"
|
||||
:disabled="false"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- <a-col :span='24'>-->
|
||||
<!-- <span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>-->
|
||||
<!-- <a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class='drawer-bootom-button'>
|
||||
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
|
||||
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
<!-- 错误数据提示-->
|
||||
<a-modal
|
||||
:title="$t('operationFailed')"
|
||||
:width="860"
|
||||
v-model="visibleoperationFailed"
|
||||
:maskClosable="false"
|
||||
:footer="null"
|
||||
class='modelbox'
|
||||
@cancel='cancleoperationFailed'
|
||||
:body-style="bodystyle"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
|
||||
class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue'>
|
||||
<span v-html='item'></span>
|
||||
<!-- <div>{{$t('NiOnumberis')}}{{ item.nioNumber }},{{$t('Statusis')}}-->
|
||||
<!-- <span style='color: red'>{{ item.state }}</span>,{{$t('NoOperationPermissionForthisbutton')}}。-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="imports-footer">
|
||||
<div class="imports-footer-wrap">
|
||||
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import moment from 'moment'
|
||||
import eventBUs from '../../common/event'
|
||||
export default {
|
||||
name: 'diolagArea',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
loading: false,
|
||||
editId: '',
|
||||
visibleoperationFailed:false,
|
||||
newVisible: false,
|
||||
NotSelectedRowKeysValue:[],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
legalTaskConfirmation:[
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('cutoffTime'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pickerDate: '',
|
||||
bodystyle:{}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
selectedRowKeysArray: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
this.bodystyle = {
|
||||
height: '480px',
|
||||
overflow: 'hidden',
|
||||
overflowY: 'scroll',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.form
|
||||
}
|
||||
getAction(`sys/user/page`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.areaTable = [...res.result.records]
|
||||
this.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
},
|
||||
searchReset() {
|
||||
this.form = {}
|
||||
this.loadData()
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('areaVisibleTaskCutOffTimeAll', false)
|
||||
},
|
||||
handleTableChange(val) {
|
||||
},
|
||||
//保存
|
||||
handleSubmit() {
|
||||
// let _this = this
|
||||
// let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
||||
// this.confirmLoading = true
|
||||
// postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.$emit('areaVisibleTaskCutOffTime', false)
|
||||
// this.$message.success(_this.$t('OperationSuccessful'))
|
||||
// this.confirmLoading = false
|
||||
// } else {
|
||||
// this.$message.warning(_this.$t('operationFailed'))
|
||||
// this.confirmLoading = false
|
||||
// }
|
||||
// })
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if(valid){
|
||||
let long = localStorage.getItem('language')
|
||||
let cut = ''
|
||||
if (long && long == 'zh-cn') {
|
||||
this.cut = 'cn'
|
||||
} else if (long && long == 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
// let _array = []
|
||||
// this.selectedRowKeysValue.forEach((item, index) => {
|
||||
// _array.push(item.id)
|
||||
// })
|
||||
let _this = this
|
||||
let param = {
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectId: this.$route.query.projectId,
|
||||
cut: this.cut,
|
||||
deadline: `${this.pickerDate}`
|
||||
|
||||
}
|
||||
this.textLoading = true
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/issueCollectionAll',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
// _this.$message.success(this.$t('OperationSuccessful'))
|
||||
if(res.data.result.length == 0){
|
||||
this.visibleoperationFailed = false
|
||||
_this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('areaVisibleTaskCutOffTimeAll', false)
|
||||
this.$emit('GetgetTableList')
|
||||
|
||||
}else{
|
||||
this.NotSelectedRowKeysValue = res.data.result
|
||||
this.visibleoperationFailed = true
|
||||
}
|
||||
|
||||
// this.$emit('areaVisibleTaskCutOffTime', false)
|
||||
// this.$emit('GetgetTableList')
|
||||
} else {
|
||||
_this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.textLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 错误数据的弹框
|
||||
cancleoperationFailed() {
|
||||
this.visibleoperationFailed = false
|
||||
this.$emit('areaVisibleTaskCutOffTimeAll', false)
|
||||
this.$emit('GetgetTableList')
|
||||
// this.GetgetTableList()
|
||||
},
|
||||
onChange(val) {
|
||||
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
},
|
||||
onOk(val) {
|
||||
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.box-title-text-index {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
.diolag-area {
|
||||
.table-area {
|
||||
margin: 20px 0;
|
||||
|
||||
.action-edit {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-del {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.drawer-bootom-button{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index:100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
/deep/.add-input{
|
||||
min-height: 135px!important;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
.ant-modal-wrap {
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
.ant-modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -97,6 +97,9 @@
|
||||
this.$route.path == '/handshakeProcess' ||
|
||||
this.$route.path == '/projectStatusAndProgress' ||
|
||||
this.$route.path == '/TaskPlanList' ||
|
||||
this.$route.path == '/documentDataComparison' ||
|
||||
this.$route.path == '/comparisonResults' ||
|
||||
this.$route.path == '/initiateDocumentComparison' ||
|
||||
this.$route.path == '/evaluationProcess' ||
|
||||
this.$route.path == '/evaluationResultsClause' ||
|
||||
this.$route.path == '/evaluationResultsWhole' ||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
name="file"
|
||||
:file-list="myfileList"
|
||||
:multiple="true"
|
||||
:action="uploadAction+'?state='+state+'&cut='+cut"
|
||||
:action="uploadAction+'?state='+2+'&cut='+cut"
|
||||
:headers="headers"
|
||||
@preview="preview"
|
||||
:before-upload="beforeUpload"
|
||||
|
||||
@@ -382,6 +382,21 @@ export const constantRouterMap = [
|
||||
name: 'evaluationProcess',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/processCenter/processForm/evaluationProcess/index')
|
||||
},
|
||||
{
|
||||
path: '/initiateDocumentComparison',
|
||||
name: 'initiateDocumentComparison',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/initiateComparison')
|
||||
},
|
||||
{
|
||||
path: '/documentDataComparison',
|
||||
name: 'documentDataComparison',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/documentDataComparison')
|
||||
},
|
||||
{
|
||||
path: '/comparisonResults',
|
||||
name: 'comparisonResults',
|
||||
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/comparisonResults')
|
||||
},
|
||||
{
|
||||
path: '/handshakeProcess',
|
||||
name: 'handshakeProcess',
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
CategoryTreeList:[],
|
||||
serialNumber:'',
|
||||
queryParam: {},
|
||||
gatherResultList:[
|
||||
{
|
||||
@@ -224,6 +225,7 @@
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.$route.query.serialNumber = ''
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
@@ -246,6 +248,7 @@
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
serialNumber: this.$route.query.serialNumber?this.$route.query.serialNumber:'',
|
||||
...queryParam
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
toggleSearchStatus: false,
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
serialNumber:'',
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
@@ -297,6 +298,7 @@
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.$route.query.serialNumber = ''
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
@@ -319,6 +321,7 @@
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
serialNumber: this.$route.query.serialNumber?this.$route.query.serialNumber:'',
|
||||
...queryParam
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
@@ -0,0 +1,464 @@
|
||||
<template>
|
||||
<div class="doc-detail">
|
||||
<div class="doc-detail-wrap">
|
||||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||||
<div class="doc-detail-title">
|
||||
<span style="line-height: 66px;display: inline-block;float: left" @click="Fallback">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||
</span>
|
||||
<span> {{$t('comparisonResults')}}</span>
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="exportComparisonReportClick" class="operator-text-text"
|
||||
:title="$t('exportComparisonReport')">
|
||||
<a-icon type="export" />
|
||||
{{$t('exportComparisonReport')}}
|
||||
</div>
|
||||
<div @click="commentClick" class="operator-text-text"
|
||||
:title="$t('comment')">
|
||||
<a-icon type="message"/>
|
||||
{{$t('comment')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content">
|
||||
<div class="detail-content-header" style="margin-bottom: 20px">
|
||||
<a-checkbox @change="onChange" style="margin-left: 20px;float: left"></a-checkbox>
|
||||
<div class="detail-content-header-content">
|
||||
<div class="detail-content-header-content-left">
|
||||
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
|
||||
</div>
|
||||
<div class="detail-content-header-content-content">
|
||||
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
|
||||
</div>
|
||||
<div class="detail-content-header-content-right">
|
||||
操作
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-checkbox-group @change="onChange" style="width: 100%;overflow: overlay;height: calc(100vh - 300px)">
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox value="A" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text-left">
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板
|
||||
sdf kdsf kljsfkldsfdsfdsf
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-bottom">
|
||||
<div class="detail-content-bottom-left" :title="$t('comparisonDifferenceComment')">
|
||||
<a-icon type="message"/>
|
||||
{{$t('comparisonDifferenceComment')}}:
|
||||
</div>
|
||||
<div class="detail-content-bottom-right">
|
||||
差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button">{{$t('edit')}}</a>
|
||||
<a class="text-button">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox value="A" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text-left">
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板
|
||||
sdf kdsf kljsfkldsfdsfdsf
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-bottom">
|
||||
<div class="detail-content-bottom-left" :title="$t('comparisonDifferenceComment')">
|
||||
<a-icon type="message"/>
|
||||
{{$t('comparisonDifferenceComment')}}:
|
||||
</div>
|
||||
<div class="detail-content-bottom-right">
|
||||
差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button">{{$t('edit')}}</a>
|
||||
<a class="text-button">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox value="A" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text-left">
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板
|
||||
sdf kdsf kljsfkldsfdsfdsf
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-top">
|
||||
<span>第10条</span>
|
||||
<span style="margin-left: 10px">光反射器</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button">
|
||||
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-bottom">
|
||||
<div class="detail-content-bottom-left" :title="$t('comparisonDifferenceComment')">
|
||||
<a-icon type="message"/>
|
||||
{{$t('comparisonDifferenceComment')}}:
|
||||
</div>
|
||||
<div class="detail-content-bottom-right">
|
||||
差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button">{{$t('edit')}}</a>
|
||||
<a class="text-button">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox value="A" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text-left">
|
||||
<div class="detail-content-content-text-left-text">
|
||||
{{$t('fullTextComments')}}: 文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
文字占位符评论文字内容文字占位符评论文
|
||||
字内容文字占位符评论文字内容文字
|
||||
占位符评论文字内容文字占位符评论文字内容文字占
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button">{{$t('edit')}}</a>
|
||||
<a class="text-button">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'comparisonResults',
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
Fallback() {
|
||||
this.$router.push({
|
||||
path: '/documentComparison'
|
||||
})
|
||||
},
|
||||
commentClick() {
|
||||
|
||||
},
|
||||
exportComparisonReportClick() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.doc-detail {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
|
||||
.doc-detail-wrap {
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
height: 68px;
|
||||
line-height: 68px;
|
||||
padding: 0 0 0 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px #eff1f3 solid;
|
||||
background: #fff;
|
||||
|
||||
.doc-detail-title {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
line-height: 68px;
|
||||
}
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 300px;
|
||||
line-height: 68px;
|
||||
/*display: flex;*/
|
||||
text-align: right;
|
||||
|
||||
.doc-detail-btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.operator-text-text {
|
||||
cursor: pointer;
|
||||
margin-right: 53px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
padding: 24px 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.detail-content-header {
|
||||
width: 100%;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
}
|
||||
|
||||
.detail-content-header-content {
|
||||
width: calc(100% - 56px);
|
||||
margin-left: 20px;
|
||||
display: inline-block;
|
||||
height: 56px;
|
||||
font-size: 14px;
|
||||
font-family: Blue Sky Noto;
|
||||
font-weight: bold;
|
||||
color: #040B29;
|
||||
|
||||
.detail-content-header-content-left {
|
||||
width: calc(50% - 64px);
|
||||
height: 56px;
|
||||
display: inline-block;
|
||||
background: rgba(4, 11, 41, 0.0300);
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
border-right: 1px #EFF1F3 solid;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.detail-content-header-content-content {
|
||||
width: calc(50% - 64px);
|
||||
display: inline-block;
|
||||
height: 56px;
|
||||
background: rgba(4, 11, 41, 0.0300);
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
border-right: 1px #EFF1F3 solid;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.detail-content-header-content-right {
|
||||
width: 128px;
|
||||
display: inline-block;
|
||||
height: 56px;
|
||||
background: rgba(4, 11, 41, 0.0300);
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content-content {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.detail-checkbox {
|
||||
margin-left: 28px;
|
||||
float: left;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.detail-content-content-text {
|
||||
width: calc(100% - 56px);
|
||||
margin-left: 56px;
|
||||
border: 1px solid #EFF1F3;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
|
||||
.detail-content-content-text-left {
|
||||
width: calc(100% - 128px);
|
||||
float: left;
|
||||
border-right: 1px solid #EFF1F3;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.detail-content-content-text-right {
|
||||
width: 128px;
|
||||
float: left;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
|
||||
.text-button-one {
|
||||
display: inline-block;
|
||||
width: 128px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.text-button {
|
||||
margin-right: 8px;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content-left {
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
padding-right: 24px;
|
||||
border-right: 1px #EFF1F3 solid;
|
||||
}
|
||||
|
||||
.detail-content-right {
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.detail-content-left-top {
|
||||
font-size: 16px;
|
||||
font-family: Blue Sky Noto;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
}
|
||||
|
||||
.detail-content-left-button {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.detail-content-bottom {
|
||||
width: 100%;
|
||||
margin-top: 14px;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
background: rgba(4, 11, 41, 0.0300);
|
||||
border-radius: 4px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.detail-content-bottom-left {
|
||||
width: 115px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
float: left;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.detail-content-bottom-right {
|
||||
width: calc(50% - 115px);
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
}
|
||||
|
||||
.detail-content-content-text-left-text {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
</style>
|
||||
+385
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<div class="doc-detail">
|
||||
<div class="doc-detail-wrap">
|
||||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||||
<div class="doc-detail-title">
|
||||
<span style="line-height: 66px;display: inline-block;float: left" @click="Fallback">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||
</span>
|
||||
<span> {{$t('DocumentComparison')}}</span>
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="viewTheComparisonResultsClick" class="operator-text-text"
|
||||
:title="$t('viewTheComparisonResults')">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('viewTheComparisonResults')}}
|
||||
</div>
|
||||
<div @click="addFullTextCommentClick" class="operator-text-text"
|
||||
:title="$t('addFullTextComment')">
|
||||
<a-icon type="message"/>
|
||||
{{$t('addFullTextComment')}}
|
||||
</div>
|
||||
<div @click="turnOffAutomaticMatchingClick" class="operator-text-text"
|
||||
:title="$t('turnOffAutomaticMatching')">
|
||||
<a-icon type="close-circle"/>
|
||||
{{$t('turnOffAutomaticMatching')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content">
|
||||
<div style="width: 100%;height: auto;overflow: hidden">
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-header">
|
||||
GB 23145-2020 机动车标准 FMVSS 114 中文.word
|
||||
</div>
|
||||
<div class="detail-content-content-left">
|
||||
<a-tree
|
||||
class="draggable-tree"
|
||||
:tree-data="gData"
|
||||
/>
|
||||
</div>
|
||||
<div class="detail-content-content-right">
|
||||
<div class="detail-content-content-right-data">
|
||||
<div class="detail-content-content-right-data-text">
|
||||
1、范围
|
||||
</div>
|
||||
<div class="detail-content-content-right-data-text">
|
||||
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
|
||||
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-right-data">
|
||||
<div class="detail-content-content-right-data-text">
|
||||
1、范围
|
||||
</div>
|
||||
<div class="detail-content-content-right-data-text">
|
||||
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
|
||||
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-header">
|
||||
<span class="detail-content-left-header-text">
|
||||
GB 23145-2020 机动车标准 FMVSS 114 中文.word
|
||||
</span>
|
||||
<span class="detail-content-left-header-text-right">
|
||||
<span style="color: #9B9DA9">相似度:</span>
|
||||
<span style="color: #E83030">98%</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="detail-content-content-left">
|
||||
<a-tree
|
||||
class="draggable-tree"
|
||||
:tree-data="gData"
|
||||
/>
|
||||
</div>
|
||||
<div class="detail-content-content-right">
|
||||
<div class="detail-content-content-right-data">
|
||||
<div class="detail-content-content-right-data-text">
|
||||
1、范围
|
||||
</div>
|
||||
<div class="detail-content-content-right-data-text">
|
||||
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
|
||||
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-right-data">
|
||||
<div class="detail-content-content-right-data-text">
|
||||
1、范围
|
||||
</div>
|
||||
<div class="detail-content-content-right-data-text">
|
||||
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
|
||||
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-right-data">
|
||||
<div class="detail-content-content-right-data-text">
|
||||
1、范围
|
||||
</div>
|
||||
<div class="detail-content-content-right-data-text">
|
||||
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
|
||||
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-right-data">
|
||||
<div class="detail-content-content-right-data-text">
|
||||
1、范围
|
||||
</div>
|
||||
<div class="detail-content-content-right-data-text">
|
||||
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
|
||||
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Remarks">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<div class="box-title-text-Remarks">
|
||||
<div class="title-text-Remarks" :title="$t('comparativeComments')">
|
||||
<span>{{$t('comparativeComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dreUserIdName">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('comparativeComments')"
|
||||
v-model="formInline.RemarkInfo"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</div>
|
||||
<div class="submit-button">
|
||||
<a-button class="box-button" type="primary" @click="submit">{{$t('preservation')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'documentDataComparison',
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {},
|
||||
gData: [
|
||||
{
|
||||
title: '0-0sdf dsfdsfdsfdsfds',
|
||||
key: '0-0',
|
||||
children: [
|
||||
{
|
||||
title: '0-0-0sdfdsfdsfdsfdsfdsfdsf',
|
||||
key: '0-0-0'
|
||||
},
|
||||
{
|
||||
title: '0-0-1',
|
||||
key: '0-0-1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
Fallback() {
|
||||
this.$router.push({
|
||||
path: '/documentComparison'
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
|
||||
},
|
||||
viewTheComparisonResultsClick() {
|
||||
|
||||
},
|
||||
addFullTextCommentClick() {
|
||||
|
||||
},
|
||||
turnOffAutomaticMatchingClick() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.detail-content-content-left .ant-tree-node-content-wrapper {
|
||||
display: inline-block !important;
|
||||
color: #040B29 !important;
|
||||
width: 100px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.doc-detail {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
|
||||
.doc-detail-wrap {
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
height: 68px;
|
||||
line-height: 68px;
|
||||
padding: 0 0 0 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px #eff1f3 solid;
|
||||
background: #fff;
|
||||
|
||||
.doc-detail-title {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
line-height: 68px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
height: 620px;
|
||||
overflow-y: auto;
|
||||
border-right: 2px #EFF1F3 solid;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px #EFF1F3 solid;
|
||||
}
|
||||
|
||||
.detail-content-right {
|
||||
width: 50%;
|
||||
height: 620px;
|
||||
overflow-y: auto;
|
||||
float: left;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px #EFF1F3 solid;
|
||||
}
|
||||
|
||||
.detail-content-left-header {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
font-family: Blue Sky Noto;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-title-text-Remarks {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text-Remarks {
|
||||
width: 68px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 6px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.Remarks {
|
||||
margin-top: 20px;
|
||||
width: 50%;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 232px);
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.detail-content-content-left {
|
||||
width: 140px;
|
||||
height: auto;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.detail-content-content-right {
|
||||
width: calc(100% - 150px);
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.detail-content-content-right-data {
|
||||
padding: 22px 24px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #EFF1F3;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.detail-content-content-right-data:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.detail-content-content-right-data-text {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.detail-content-left-header-text {
|
||||
width: calc(100% - 200px);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-family: Blue Sky Noto;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
}
|
||||
|
||||
.detail-content-left-header-text-right {
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 600px;
|
||||
line-height: 68px;
|
||||
display: flex;
|
||||
|
||||
.doc-detail-btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.operator-text-text {
|
||||
cursor: pointer;
|
||||
margin-right: 53px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
width: 33.3%;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
+445
@@ -0,0 +1,445 @@
|
||||
<template>
|
||||
<div class="doc-detail">
|
||||
<div class="doc-detail-wrap">
|
||||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||||
<div class="doc-detail-title">
|
||||
<span style="line-height: 66px;display: inline-block;float: left" @click="Fallback">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||
</span>
|
||||
<span> {{$t('initiateComparison')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content">
|
||||
<div style="width: 100%;height: auto;overflow: hidden">
|
||||
<div class="detail-content-left">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQueryLeft">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="8" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParamLeft.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParamLeft.title"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="text-align:right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="8" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQueryLeft">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px"
|
||||
@click="searchResetLeft">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loadingLeft"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:400}"
|
||||
rowKey="id"
|
||||
:data-source="dataSourceLeft"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysLeft, onChange: onSelectChangeLeft }"
|
||||
:columns="columns"
|
||||
>
|
||||
</a-table>
|
||||
<div class="page">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSizeLeft"
|
||||
:total="totalLeft"
|
||||
:current="pageNoLeft"
|
||||
@change="pageOnChangeLeft"
|
||||
@showSizeChange="SizeChangeLeft"
|
||||
/>
|
||||
</div>
|
||||
<div class="box-button-standard">
|
||||
<span class="box-button-standard-left">
|
||||
{{$t('selectedStandard')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right">
|
||||
{{$t('noComparisonDocumentSelected')}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQueryRight">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="8" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParamRight.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParamRight.title"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="text-align:right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="8" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQueryRight">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px"
|
||||
@click="searchResetRight">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loadingRight"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:400}"
|
||||
rowKey="id"
|
||||
:data-source="dataSourceRight"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysRight, onChange: onSelectChangeRight }"
|
||||
:columns="columns"
|
||||
>
|
||||
</a-table>
|
||||
<div class="page">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSizeRight"
|
||||
:total="totalRight"
|
||||
:current="pageNoRight"
|
||||
@change="pageOnChangeRight"
|
||||
@showSizeChange="SizeChangeRight"
|
||||
/>
|
||||
</div>
|
||||
<div class="box-button-standard">
|
||||
<span class="box-button-standard-left">
|
||||
{{$t('selectedStandard')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right">
|
||||
{{$t('noComparisonDocumentSelected')}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Remarks">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<div class="box-title-text-Remarks">
|
||||
<div class="title-text-Remarks" :title="$t('standard')">
|
||||
<span>{{$t('RemarkInfo')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dreUserIdName">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('RemarkInfo')"
|
||||
v-model="formInline.RemarkInfo"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</div>
|
||||
<div class="submit-button">
|
||||
<a-button class="box-button" type="primary" @click="submit">{{$t('initiateDocumentComparison')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'initiateDocumentComparison',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
loadingLeft: false,
|
||||
loadingRight: false,
|
||||
queryParamLeft: {},
|
||||
queryParamRight: {},
|
||||
pageSizeLeft: 10,
|
||||
totalLeft: 0,
|
||||
pageNoLeft: 1,
|
||||
pageSizeRight: 10,
|
||||
selectedRowKeysRight: [],
|
||||
dataSourceRight: [],
|
||||
totalRight: 0,
|
||||
pageNoRight: 1,
|
||||
formInline: {},
|
||||
rules: {},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('number'),
|
||||
align: 'center',
|
||||
width: 70,
|
||||
customRender: function(t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'standard'
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'title'
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'TextStatus'
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileName'
|
||||
},
|
||||
{
|
||||
title: this.$t('textInformation'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'textInformation'
|
||||
}
|
||||
],
|
||||
dataSourceLeft: [],
|
||||
selectedRowKeysLeft: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
Fallback() {
|
||||
this.$router.push({
|
||||
path: '/documentComparison'
|
||||
})
|
||||
},
|
||||
searchQueryLeft() {
|
||||
|
||||
},
|
||||
searchResetLeft() {
|
||||
|
||||
},
|
||||
onSelectChangeLeft(value) {
|
||||
this.selectedRowKeysLeft = value
|
||||
},
|
||||
pageOnChangeLeft(page) {
|
||||
this.pageNoLeft = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChangeLeft(pageSize) {
|
||||
this.pageNoLeft = 1
|
||||
this.pageSizeLeft = pageSize
|
||||
this.getList()
|
||||
},
|
||||
searchQueryRight() {
|
||||
|
||||
},
|
||||
searchResetRight() {
|
||||
|
||||
},
|
||||
onSelectChangeRight(value) {
|
||||
this.selectedRowKeysRight = value
|
||||
},
|
||||
pageOnChangeRight(page) {
|
||||
this.pageNoRight = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChangeRight(pageSize) {
|
||||
this.pageNoRight = 1
|
||||
this.pageSizeRight = pageSize
|
||||
this.getList()
|
||||
},
|
||||
submit() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.doc-detail {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
|
||||
.doc-detail-wrap {
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
height: 68px;
|
||||
line-height: 68px;
|
||||
padding: 0 0 0 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px #eff1f3 solid;
|
||||
background: #fff;
|
||||
|
||||
.doc-detail-title {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
line-height: 68px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
border-right: 2px #EFF1F3 solid;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px #EFF1F3 solid;
|
||||
}
|
||||
|
||||
.detail-content-right {
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px #EFF1F3 solid;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.box-title-text-Remarks {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text-Remarks {
|
||||
width: 68px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 6px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 60px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: calc(100% - 60px);
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.box-button-standard {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.box-button-standard-left {
|
||||
width: 111px;
|
||||
height: 46px;
|
||||
display: inline-block;
|
||||
border: 1px solid #CED0D8;
|
||||
border-right: none;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
line-height: 46px;
|
||||
color: #040B29;
|
||||
}
|
||||
|
||||
.box-button-standard-right {
|
||||
width: calc(100% - 111px);
|
||||
height: 46px;
|
||||
display: inline-block;
|
||||
border: 1px solid #CED0D8;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
line-height: 46px;
|
||||
color: #9B9DA9;
|
||||
}
|
||||
|
||||
.Remarks {
|
||||
margin-top: 20px;
|
||||
width: 50%;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 232px);
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@@ -106,10 +106,10 @@
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
list: '',
|
||||
deleteBatch:'',
|
||||
deleteBatch: ''
|
||||
},
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
dataSource: [{}],
|
||||
selectedRowKeys: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
@@ -203,7 +203,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
// this.getList()
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
@@ -251,18 +251,24 @@
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
comparisonResultsClick() {
|
||||
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/comparisonResults'
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
subscribe() {
|
||||
|
||||
},
|
||||
edit(){
|
||||
edit() {
|
||||
|
||||
},
|
||||
initiatingProcessClick(){
|
||||
|
||||
initiatingProcessClick() {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/initiateDocumentComparison'
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
deleteData(val){
|
||||
deleteData(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
@@ -277,7 +283,7 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+365
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('RetrieveFiles')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serial_number"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: '100%'}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<a-form-model :model="formInline" class="formAdd-One" :rules="rules" ref="ruleForm">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-One">
|
||||
<div class="title-text-One" style="margin-left: 13px">
|
||||
<span class="Required-One">*</span>
|
||||
<span class="title-text-text-One" :title="$t('translationLanguage')">{{$t('translationLanguage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-One" style="width: calc(50% - 20px)" prop="translationLanguage">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
class="box-input-One"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.translationLanguage">
|
||||
<a-select-option v-for="(item, key) in LanguageList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<span class="text-icon-One">
|
||||
<a-icon type="arrow-right" style="font-size: 20px"/>
|
||||
</span>
|
||||
<a-form-model-item class="itemModel-One" style="width: calc(50% - 20px)" prop="translationLanguageOne">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
class="box-input-One"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.translationLanguageOne">
|
||||
<a-select-option v-for="(item, key) in LanguageList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-form-model>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'RetrieveFilesList',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
formInline: {},
|
||||
rules: {
|
||||
translationLanguage: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('translationLanguage') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
translationLanguageOne: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('translationLanguage') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
LanguageList: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('number'),
|
||||
align: 'center',
|
||||
width: 70,
|
||||
customRender: function(t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
dataIndex: 'serial_number',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
dataIndex: 'title',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
dataIndex: 'TextStatus',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
dataIndex: 'fileName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('textInformation'),
|
||||
dataIndex: 'textInformation',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
dataList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
fieldList: [],
|
||||
queryConditionVOList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
// this.replacePage()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
postAction('', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
this.visible = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 33px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-title-text-One {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text-One {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input-One {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel-One {
|
||||
width: calc(100% - 84px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text-One {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd-One {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.text-icon-One {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
margin-top: 11px;
|
||||
}
|
||||
|
||||
.Required-One {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-modal
|
||||
:title="$t('UploadFile')"
|
||||
:width="600"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('file')">{{$t('file')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="file">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('file')">
|
||||
{{ (formInline.file === 'null' || formInline.file === '' ||
|
||||
formInline.file == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('standard')">{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="standard">
|
||||
<a-input class="box-input"
|
||||
readonly
|
||||
v-model="formInline.standard"
|
||||
@click.native="standardClick"
|
||||
:placeholder="$t('PleaseSelect')+$t('standard')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('TextStatus')">{{$t('TextStatus')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="translationResults">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('TextStatus')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.translationResults">
|
||||
<a-select-option v-for="(item, key) in translationResultsList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" style="margin-left: 13px">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('translationLanguage')">{{$t('translationLanguage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: calc(50% - 20px)" prop="translationLanguage">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.translationLanguage">
|
||||
<a-select-option v-for="(item, key) in LanguageList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<span class="text-icon">
|
||||
<a-icon type="arrow-right" style="font-size: 20px"/>
|
||||
</span>
|
||||
<a-form-model-item class="itemModel" style="width: calc(50% - 20px)" prop="translationLanguageOne">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="formInline.translationLanguageOne">
|
||||
<a-select-option v-for="(item, key) in LanguageList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<standardData ref="standardDataRef" @standardDataForm="standardDataForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import standardData from './standardData'
|
||||
|
||||
export default {
|
||||
name: 'addModel',
|
||||
components: {
|
||||
uploadFile,
|
||||
standardData
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
uploadName: '',
|
||||
confirmLoading: false,
|
||||
formInline: {},
|
||||
rules: {
|
||||
file: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('file') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
standard: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('standard') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
translationResults: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('TextStatus') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
translationLanguage: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('translationLanguage') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
translationLanguageOne: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('translationLanguage') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
ids: [],
|
||||
translationResultsList: [],
|
||||
LanguageList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...this.formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.setBatch, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.formInline = {}
|
||||
this.visible = false
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
standardClick() {
|
||||
this.$refs.standardDataRef.addModel()
|
||||
},
|
||||
standardDataForm() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
padding: 4px 30px 4px 11px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 84px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
|
||||
.text-icon {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
margin-top: 11px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="$t('standardData')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serial_number"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{$t('status')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.state"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="12" :sm="24">
|
||||
<globalAdvancedQuery ref="globalAdvancedQueryRef"
|
||||
@handleSuperQuery="handleSuperQuery"
|
||||
:fieldList="fieldList"/>
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 1200}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
:current="pageNo"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
|
||||
export default {
|
||||
name: 'standardData',
|
||||
components: {
|
||||
globalAdvancedQuery
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
dataIndex: 'serial_number',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
dataIndex: 'title',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('zoneOfApplication'),
|
||||
dataIndex: 'region',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
// {
|
||||
// title: this.$t('status'),
|
||||
// dataIndex: 'state',
|
||||
// align: 'center',
|
||||
// ellipsis: true
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('technicalField'),
|
||||
// dataIndex: 'technology_territory',
|
||||
// align: 'center',
|
||||
// ellipsis: true
|
||||
// },
|
||||
{
|
||||
title: this.$t('ImplementationDate'),
|
||||
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('vehicleInProductionDate'),
|
||||
dataIndex: 'implement_time',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
}
|
||||
// {
|
||||
// title: this.$t('correspondingStandard'),
|
||||
// dataIndex: 'corresponding_standard',
|
||||
// align: 'center',
|
||||
// ellipsis: true
|
||||
// }
|
||||
],
|
||||
dataList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
fieldList: [],
|
||||
queryConditionVOList: [],
|
||||
selectedRowKeysRecord:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
this.queryConditionVOList = []
|
||||
this.replacePage()
|
||||
this.queryConditionInventory()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.queryConditionVOList = []
|
||||
this.$refs.globalAdvancedQueryRef.resetLine()
|
||||
this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam,
|
||||
queryConditionVOList: JSON.stringify(queryConditionVOList)
|
||||
}
|
||||
this.loading = true
|
||||
postAction('/project/projectLawsInventoryEO/queryPageDummy', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
if (this.selectedRowKeys.length > 1) {
|
||||
this.selectedRowKeys.shift()
|
||||
}
|
||||
this.selectedRowKeysRecord = record.filter(res=>{
|
||||
return res.id == this.selectedRowKeys[0]
|
||||
})
|
||||
this.selectedRowKeysRecord = [...this.selectedRowKeysRecord]
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.confirmLoading = true
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
queryConditionInventory() {
|
||||
let query = {
|
||||
flag: 1
|
||||
}
|
||||
getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.fieldList = res.result || []
|
||||
} else {
|
||||
this.fieldList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSuperQuery(params, matchType) {
|
||||
let sqp = {}
|
||||
if (!params || (params && params.length == 0)) {
|
||||
this.queryConditionVOList = []
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
||||
} else {
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
||||
this.queryConditionVOList = params
|
||||
this.queryConditionVOList.forEach(res => {
|
||||
res.type = matchType
|
||||
})
|
||||
}
|
||||
this.replacePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 33px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
@@ -23,15 +23,15 @@
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text tree-select">
|
||||
<div class="title-text" :title="$t('releaseSituation')">
|
||||
<span>{{$t('releaseSituation')}}</span>
|
||||
<div class="title-text" :title="$t('translationResults')">
|
||||
<span>{{$t('translationResults')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('translationResults')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="queryParam.flowStatus">
|
||||
<a-select-option v-for="(item, key) in gatherResultList"
|
||||
v-model="queryParam.translationResults">
|
||||
<a-select-option v-for="(item, key) in translationResultsList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
@@ -41,19 +41,53 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text tree-select">
|
||||
<div class="title-text" :title="$t('releaseSituation')">
|
||||
<span>{{$t('releaseSituation')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="queryParam.flowStatus">
|
||||
<a-select-option v-for="(item, key) in gatherResultList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="initiatingProcessClick" class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('initiateComparison')}}
|
||||
<div @click="uploadClick" class="operator-text">
|
||||
<a-icon type="cloud-upload"/>
|
||||
{{$t('upload1')}}
|
||||
</div>
|
||||
<div @click="RetrieveFilesClick" class="operator-text">
|
||||
<a-icon type="database"/>
|
||||
{{$t('RetrieveFiles')}}
|
||||
</div>
|
||||
<div @click="BatchDelete" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -93,24 +127,32 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<addModel ref="addModelRef" @addModelForm="addModelForm"/>
|
||||
<RetrieveFilesList ref="RetrieveFilesListRef" @RetrieveFilesListForm="RetrieveFilesListForm"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import addModel from './components/addModel'
|
||||
import RetrieveFilesList from './components/RetrieveFilesList'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {},
|
||||
components: {
|
||||
addModel,
|
||||
RetrieveFilesList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
list: '',
|
||||
deleteBatch:'',
|
||||
deleteBatch: ''
|
||||
},
|
||||
toggleSearchStatus: false,
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
dataSource: [{}],
|
||||
selectedRowKeys: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
@@ -126,6 +168,20 @@
|
||||
name: this.$t('Published')
|
||||
}
|
||||
],
|
||||
translationResultsList: [
|
||||
{
|
||||
value: '1',
|
||||
name: this.$t('Converting')
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
name: this.$t('convertNetwork')
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
name: this.$t('convertFailed')
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
@@ -193,6 +249,15 @@
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
addModelForm() {
|
||||
this.getList()
|
||||
},
|
||||
RetrieveFilesListForm() {
|
||||
this.getList()
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
@@ -240,19 +305,25 @@
|
||||
viewClick(row) {
|
||||
|
||||
},
|
||||
checkClick(row){
|
||||
checkClick(row) {
|
||||
|
||||
},
|
||||
downloadData(){
|
||||
downloadData() {
|
||||
|
||||
},
|
||||
subscribe() {
|
||||
|
||||
},
|
||||
initiatingProcessClick(){
|
||||
uploadClick() {
|
||||
this.$refs.addModelRef.add()
|
||||
},
|
||||
RetrieveFilesClick() {
|
||||
this.$refs.RetrieveFilesListRef.addModel()
|
||||
},
|
||||
BatchDelete(){
|
||||
|
||||
},
|
||||
deleteData(val){
|
||||
deleteData(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
@@ -267,7 +338,7 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:maskClosable="false"
|
||||
:width="800"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@cancel="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.paramsTemplateName"
|
||||
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="region">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.region"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="description">
|
||||
<a-input class="box-input add-input"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.description"
|
||||
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'addModel',
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
rules: {
|
||||
paramsTemplateName:[
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'blur' },
|
||||
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
description:[
|
||||
{ min:1, max: 300, message: this.$t('cantExeed')+'300'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
state: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' },
|
||||
],
|
||||
region: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('zoneOfApplication'), trigger: 'change' },
|
||||
]
|
||||
},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getNameList()
|
||||
},
|
||||
methods: {
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.title = this.$t('UploadFile')
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
})
|
||||
},
|
||||
editModel(value) {
|
||||
this.visible = true
|
||||
this.title = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.formInline = value
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
if(this.formInline.paramsTemplateName !== undefined) {
|
||||
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let url = ''
|
||||
let Action
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(query).forEach(res => {
|
||||
if (query[res] && query[res] instanceof Array) {
|
||||
query[res] = query[res].join(',')
|
||||
}
|
||||
})
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('addModelList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
projectNameChange(value){
|
||||
console.log(value)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index:100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
/deep/.add-input{
|
||||
min-height: 135px!important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:maskClosable="false"
|
||||
:width="800"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@cancel="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 80%;overflow: auto;padding-bottom: 53px;">
|
||||
<!-- <a-spin :spinning="confirmLoading">-->
|
||||
<a-form>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div style='margin-left: 55px;width: 700px'>
|
||||
<span :title="$t('parameterTemplate')">{{$t('parameterTemplate')}}:</span>
|
||||
<span style='margin-left: 5px' :title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
||||
<a style='margin-left: 533px' @click="download(record)">{{$t('download')}}</a>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text" style='margin-top: 5px'>
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('fileDeclaration')">{{$t('fileDeclaration')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="description">
|
||||
<a-input class="box-input add-input"
|
||||
:readOnly="true"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.description"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
<!-- </a-spin>-->
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('close')}}</a-button>
|
||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('close')}}</a-button>-->
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'addModel',
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
rules: {
|
||||
paramsTemplateName:[
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'blur' },
|
||||
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
description:[
|
||||
{ min:1, max: 300, message: this.$t('cantExeed')+'300'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
state: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' },
|
||||
],
|
||||
region: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('zoneOfApplication'), trigger: 'change' },
|
||||
]
|
||||
},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getNameList()
|
||||
},
|
||||
methods: {
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.title = this.$t('FileForDetails')
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
})
|
||||
},
|
||||
editModel(value) {
|
||||
this.visible = true
|
||||
this.title = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.formInline = value
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
if(this.formInline.paramsTemplateName !== undefined) {
|
||||
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let url = ''
|
||||
let Action
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(query).forEach(res => {
|
||||
if (query[res] && query[res] instanceof Array) {
|
||||
query[res] = query[res].join(',')
|
||||
}
|
||||
})
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('addModelList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
projectNameChange(value){
|
||||
console.log(value)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index:100;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
/deep/.add-input{
|
||||
min-height: 135px!important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -158,7 +158,7 @@ export default {
|
||||
title: this.$t('status'),
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
dataIndex: 'state'
|
||||
dataIndex: 'state_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('creater'),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="Virtual-detail-header" style="position: fixed;top: 0">
|
||||
<div class="Virtual-detail-title">
|
||||
<span>
|
||||
{{$t('ParameteItemCollectionList')}}
|
||||
{{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.paramsManifest.title)}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,47 +108,64 @@
|
||||
<!-- // R&H Manager manager-->
|
||||
<!-- // 系统管理员 admin-->
|
||||
<!-- // 游客 guest-->
|
||||
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight" v-if='currentPersonRole == "homo"'>
|
||||
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight" v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
|
||||
<template slot="title" id="popconfirm">
|
||||
<!-- 添加-->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<div @click="handleAdd" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="plus"/>
|
||||
{{$t('addTo')}}
|
||||
</div>
|
||||
<!-- 下发收集 -->
|
||||
<div @click="distributionAndCollectionJurisdiction" class="operator-text-title">
|
||||
<!-- <!– 下发收集 –>-->
|
||||
<!-- <div @click="distributionAndCollectionJurisdiction" class="operator-text-title">-->
|
||||
<!-- <a-icon type="solution"/>-->
|
||||
<!-- {{$t('distributionAndCollection')}}-->
|
||||
<!-- </div>-->
|
||||
<!-- 导出-->
|
||||
<div @click="handleExport" class="operator-text-title"
|
||||
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
|
||||
<a-icon type="export"/>
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
<!-- 一键下发收集 -->
|
||||
<div @click="defOneclickCollection" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="solution"/>
|
||||
{{$t('distributionAndCollection')}}
|
||||
{{$t('OneclickCollection')}}
|
||||
</div>
|
||||
<!-- 冻结配置-->
|
||||
<div @click="freezeConfiguration" class="operator-text-title">
|
||||
<div @click="freezeConfiguration" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="solution"/>
|
||||
{{$t('FreezeConfiguration')}}
|
||||
</div>
|
||||
<!-- 同步上报库 -->
|
||||
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title">
|
||||
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="setting"/>
|
||||
{{$t('SynchronousReportLibrary')}}
|
||||
</div>
|
||||
<!-- 截止时间-->
|
||||
<div @click="TaskCutOffTimeLibrary" class="operator-text-title">
|
||||
<a-icon type="bulb"/>
|
||||
{{$t('TaskCutOffTime')}}
|
||||
</div>
|
||||
<!-- <div @click="TaskCutOffTimeLibrary" class="operator-text-title">-->
|
||||
<!-- <a-icon type="bulb"/>-->
|
||||
<!-- {{$t('TaskCutOffTime')}}-->
|
||||
<!-- </div>-->
|
||||
<!-- 批量删除-->
|
||||
<div @click="handleDelJurisdiction" class="operator-text-title">
|
||||
<div @click="handleDelJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title">
|
||||
<div @click="bringInTheProjectInterfaceClick" class="operator-text-title" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="profile"/>
|
||||
{{$t('bringInTheProjectInterface')}}
|
||||
</div>
|
||||
</template>
|
||||
<div class="operator-text" style="position: relative">
|
||||
<div class="operator-text" style="position: relative " @click='morepop' v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
|
||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||
</div>
|
||||
</a-popconfirm>
|
||||
<!-- 下发收集 -->
|
||||
<div @click="distributionAndCollectionJurisdiction" class="operator-text" v-if='currentPersonRole == "homo"'>
|
||||
<a-icon type="solution"/>
|
||||
{{$t('distributionAndCollection')}}
|
||||
</div>
|
||||
|
||||
<!-- 分配填写人-->
|
||||
<div @click="assignedBy" class="operator-text" v-if='currentPersonRole == "sdt" '>
|
||||
<a-icon type="copy"/>
|
||||
@@ -181,6 +198,7 @@
|
||||
<a-icon type="delete"/>
|
||||
{{$t('CompulsoryWithdrawal')}}
|
||||
</div>
|
||||
|
||||
<!-- 角色切换 -->
|
||||
<div class="operator-text"
|
||||
v-if="!this.$route.query.it"
|
||||
@@ -252,12 +270,19 @@
|
||||
@GetgetLoginUserType='GetgetLoginUserType'
|
||||
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/>
|
||||
</a-modal>
|
||||
<!-- 截至时间--->
|
||||
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('TaskCutOffTime')" width='600px' :footer="null">
|
||||
<!-- 下发收集--->
|
||||
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">
|
||||
<task-cut-off-time v-if='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
|
||||
@GetgetTableList='GetgetTableList'
|
||||
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
|
||||
</a-modal>
|
||||
<!-- 一键下发收集--->
|
||||
<a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">
|
||||
<task-time v-if='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
|
||||
@GetgetTableList='GetgetTableList'
|
||||
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
|
||||
</a-modal>
|
||||
|
||||
<!-- 引用参数--->
|
||||
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">
|
||||
<reference-parameter v-if='areaVisiblereferenceparameter' :paramsManifest='paramsManifest'
|
||||
@@ -399,6 +424,7 @@
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
import SynchronousSubmissionLibrary from '@/components/SynchronousSubmissionLibrary/index'
|
||||
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
|
||||
import TaskTime from '@/components/TaskCutOffTime/indexonekey'
|
||||
import ReferenceParameter from '@/components/ReferenceParameter/index'
|
||||
import AssignedBy from '@/components/AssignedBy/index'
|
||||
import axios from 'axios'
|
||||
@@ -415,6 +441,7 @@
|
||||
TaskCutOffTime,
|
||||
ReferenceParameter,
|
||||
SynchronousSubmissionLibrary,
|
||||
TaskTime,
|
||||
globalAdvancedQuery
|
||||
},
|
||||
data() {
|
||||
@@ -531,6 +558,12 @@
|
||||
text: this.$t('status'),
|
||||
options: this.statusList//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
value: 'paramsBatch',
|
||||
text: this.$t('parameterBatch'),
|
||||
dictCode: 'params_batch'
|
||||
},
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
textLoading: false,
|
||||
@@ -565,6 +598,7 @@
|
||||
areaVisibleFreeze: false, // 冻结配置
|
||||
areaVisibleAssignedby: false, // 分配填写人弹框
|
||||
areaVisibleTaskCutOffTime: false, // 截至时间弹框
|
||||
OneclickCollection:false,
|
||||
areaVisiblereferenceparameter: false, // 引用参数弹框
|
||||
areaVisibsynchronous: false, // 同步上报库弹框
|
||||
visibleoperationFailed: false, // 数据失败的弹框
|
||||
@@ -773,6 +807,31 @@
|
||||
return flag
|
||||
}
|
||||
},
|
||||
//导出
|
||||
handleExport(){
|
||||
this.$message.success(this.$t('Intheexport'))
|
||||
let long = localStorage.getItem('language')
|
||||
this.cut = ''
|
||||
if (long && long === 'zh-cn') {
|
||||
this.cut = 'cn'
|
||||
} else if (long && long === 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
let query = {
|
||||
paramsManifestId: this.paramsManifest.id,
|
||||
paramsTemplateId: this.$route.query.paramsTemplateId,
|
||||
paramsTemplatePublishVersion:1,
|
||||
cut: this.cut,
|
||||
userTypes: this.currentPersonRole,
|
||||
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
|
||||
}
|
||||
getAction('/params/collectManifest/exportAll', query).then((res) => {
|
||||
if (res && !res.success) {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
this.textLoading = false
|
||||
})
|
||||
},
|
||||
// 高级搜索
|
||||
handleSuperQuery(params, matchType) {
|
||||
let sqp = {}
|
||||
@@ -1077,62 +1136,72 @@
|
||||
},
|
||||
// 下发收集的权限
|
||||
distributionAndCollectionJurisdiction() {
|
||||
let homodistributionAndCollection = this.homodistributionAndCollection()
|
||||
if (homodistributionAndCollection == 1) {
|
||||
this.distributionAndCollection()
|
||||
} else if (homodistributionAndCollection == 0) {
|
||||
this.visibleoperationFailed = true
|
||||
this.jurisdiction = 'HOMOZFSJ'
|
||||
} else if (homodistributionAndCollection == 3) {
|
||||
this.visibleoperationFailed = true
|
||||
this.NoEngineer = 0
|
||||
if(this.selectedRowKeysValue.length == 0){
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else{
|
||||
this.areaVisibleTaskCutOffTime = true
|
||||
}
|
||||
// let homodistributionAndCollection = this.homodistributionAndCollection()
|
||||
// if (homodistributionAndCollection == 1) {
|
||||
// this.areaVisibleTaskCutOffTime = true
|
||||
// // this.distributionAndCollection()
|
||||
// } else if (homodistributionAndCollection == 0) {
|
||||
// this.visibleoperationFailed = true
|
||||
// this.jurisdiction = 'HOMOZFSJ'
|
||||
// } else if (homodistributionAndCollection == 3) {
|
||||
// this.visibleoperationFailed = true
|
||||
// this.NoEngineer = 0
|
||||
// }
|
||||
},
|
||||
// 下发收集---请求接口
|
||||
distributionAndCollection() {
|
||||
|
||||
let _array = []
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
_array.push(item.id)
|
||||
})
|
||||
let _this = this
|
||||
let param = {
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectId: this.$route.query.projectId,
|
||||
ids: _array.join(',')
|
||||
}
|
||||
this.textLoading = true
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/issueCollection',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
_this.$message.success(this.$t('OperationSuccessful'))
|
||||
_this.areaVisible = false
|
||||
this.textLoading = false
|
||||
_this.GetgetTableList()
|
||||
} else {
|
||||
this.textLoading = false
|
||||
_this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.textLoading = false
|
||||
})
|
||||
// 一键下发收集
|
||||
defOneclickCollection() {
|
||||
this.OneclickCollection = true
|
||||
},
|
||||
// // 下发收集---请求接口
|
||||
// distributionAndCollection() {
|
||||
//
|
||||
// let _array = []
|
||||
// this.selectedRowKeysValue.forEach((item, index) => {
|
||||
// _array.push(item.id)
|
||||
// })
|
||||
// let _this = this
|
||||
// let param = {
|
||||
// paramsManifestId: this.$route.query.id,
|
||||
// projectId: this.$route.query.projectId,
|
||||
// ids: _array.join(',')
|
||||
// }
|
||||
// this.textLoading = true
|
||||
// axios({
|
||||
// url: '/jero-boot/params/collectManifest/issueCollection',
|
||||
// method: 'post',
|
||||
// data: param,
|
||||
// transformRequest: [function(data) {
|
||||
// let ret = ''
|
||||
// for (let it in data) {
|
||||
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
// }
|
||||
// return ret
|
||||
// }],
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'X-Access-Token': _this.token
|
||||
// }
|
||||
// })
|
||||
// .then((res) => {
|
||||
// if (res.data.success) {
|
||||
// _this.$message.success(this.$t('OperationSuccessful'))
|
||||
// _this.areaVisible = false
|
||||
// this.textLoading = false
|
||||
// _this.GetgetTableList()
|
||||
// } else {
|
||||
// this.textLoading = false
|
||||
// _this.$message.warning(this.$t('operationFailed'))
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// this.textLoading = false
|
||||
// })
|
||||
// },
|
||||
// 同步上报库 权限
|
||||
handleSynchronousReportLibraryJurisdiction() {
|
||||
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
|
||||
@@ -1402,20 +1471,26 @@
|
||||
this.areaVisibleAssignedby = val
|
||||
},
|
||||
// 截止时间
|
||||
TaskCutOffTimeLibrary() {
|
||||
let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary()
|
||||
if (dreTaskCutOffTimeLibrary == 1) {
|
||||
this.areaVisibleTaskCutOffTime = true
|
||||
} else if (dreTaskCutOffTimeLibrary == 0) {
|
||||
this.visibleoperationFailed = true
|
||||
this.jurisdiction = 'HOMOJZSJ'
|
||||
}
|
||||
},
|
||||
// TaskCutOffTimeLibrary() {
|
||||
// let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary()
|
||||
// if (dreTaskCutOffTimeLibrary == 1) {
|
||||
// this.areaVisibleTaskCutOffTime = true
|
||||
// } else if (dreTaskCutOffTimeLibrary == 0) {
|
||||
// this.visibleoperationFailed = true
|
||||
// this.jurisdiction = 'HOMOJZSJ'
|
||||
// }
|
||||
// },
|
||||
// 截至时间确定弹框关闭
|
||||
areaVisibleTaskCutOffTimeflag(val) {
|
||||
console.log(val)
|
||||
this.areaVisibleTaskCutOffTime = val
|
||||
this.$refs.CollectionTabel.getTableList()
|
||||
},
|
||||
areaVisibleTaskCutOffTimeAll(val){
|
||||
console.log(val)
|
||||
this.OneclickCollection = val
|
||||
this.$refs.CollectionTabel.getTableList()
|
||||
},
|
||||
//引用参数
|
||||
referenceparameter() {
|
||||
let dreJurisdictionreferenceParameter = this.dreJurisdictionreferenceParameter()
|
||||
|
||||
@@ -255,7 +255,9 @@
|
||||
localStorage.setItem('paramsManifest', JSON.stringify(item))
|
||||
let newUrl = _this.$router.resolve({
|
||||
path: '/ParameterItemCollection',
|
||||
query: item
|
||||
query: item
|
||||
// projectName:this.$route.query.projectName
|
||||
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
} else {
|
||||
|
||||
@@ -985,77 +985,77 @@
|
||||
},
|
||||
getProject(row, res, callback) {
|
||||
//设计符合性确认-发起人
|
||||
if (row.designInitiator == 1) {
|
||||
this.designInitiatorList = res.result.lawEngineerList || []
|
||||
} else if (row.designInitiator == 2) {
|
||||
this.designInitiatorList = res.result.certificationEngineerList || []
|
||||
} else if (row.designInitiator == 3) {
|
||||
this.designInitiatorList = res.result.engineeringInterfacePersonList || []
|
||||
} else if (row.designInitiator == 0) {
|
||||
this.designInitiatorList = res.result.studioPersonList || []
|
||||
} else if (!row.designInitiator || row.designInitiator == '') {
|
||||
// if (row.designInitiator == 1) {
|
||||
// this.designInitiatorList = res.result.lawEngineerList || []
|
||||
// } else if (row.designInitiator == 2) {
|
||||
// this.designInitiatorList = res.result.certificationEngineerList || []
|
||||
// } else if (row.designInitiator == 3) {
|
||||
// this.designInitiatorList = res.result.engineeringInterfacePersonList || []
|
||||
// } else if (row.designInitiator == 0) {
|
||||
// this.designInitiatorList = res.result.studioPersonList || []
|
||||
// } else if (!row.designInitiator || row.designInitiator == '') {
|
||||
this.designInitiatorList = res.result.allPersonList || []
|
||||
}
|
||||
// }
|
||||
//设计符合性确认-责任人
|
||||
if (row.designDuty == 1) {
|
||||
this.designDutyList = res.result.lawEngineerList || []
|
||||
} else if (row.designDuty == 2) {
|
||||
this.designDutyList = res.result.certificationEngineerList || []
|
||||
} else if (row.designDuty == 3) {
|
||||
this.designDutyList = res.result.engineeringInterfacePersonList || []
|
||||
} else if (row.designInitiator == 0) {
|
||||
this.designDutyList = res.result.studioPersonList || []
|
||||
} else if (!row.designDuty || row.designDuty == '') {
|
||||
// if (row.designDuty == 1) {
|
||||
// this.designDutyList = res.result.lawEngineerList || []
|
||||
// } else if (row.designDuty == 2) {
|
||||
// this.designDutyList = res.result.certificationEngineerList || []
|
||||
// } else if (row.designDuty == 3) {
|
||||
// this.designDutyList = res.result.engineeringInterfacePersonList || []
|
||||
// } else if (row.designInitiator == 0) {
|
||||
// this.designDutyList = res.result.studioPersonList || []
|
||||
// } else if (!row.designDuty || row.designDuty == '') {
|
||||
this.designDutyList = res.result.allPersonList || []
|
||||
}
|
||||
// }
|
||||
//prehomo确认-发起人
|
||||
if (row.prehomoInitiator == 1) {
|
||||
this.prehomoInitiatorList = res.result.lawEngineerList || []
|
||||
} else if (row.prehomoInitiator == 2) {
|
||||
this.prehomoInitiatorList = res.result.certificationEngineerList || []
|
||||
} else if (row.prehomoInitiator == 3) {
|
||||
this.prehomoInitiatorList = res.result.engineeringInterfacePersonList || []
|
||||
} else if (row.designInitiator == 0) {
|
||||
this.prehomoInitiatorList = res.result.studioPersonList || []
|
||||
} else if (!row.prehomoInitiator || row.prehomoInitiator == '') {
|
||||
// if (row.prehomoInitiator == 1) {
|
||||
// this.prehomoInitiatorList = res.result.lawEngineerList || []
|
||||
// } else if (row.prehomoInitiator == 2) {
|
||||
// this.prehomoInitiatorList = res.result.certificationEngineerList || []
|
||||
// } else if (row.prehomoInitiator == 3) {
|
||||
// this.prehomoInitiatorList = res.result.engineeringInterfacePersonList || []
|
||||
// } else if (row.designInitiator == 0) {
|
||||
// this.prehomoInitiatorList = res.result.studioPersonList || []
|
||||
// } else if (!row.prehomoInitiator || row.prehomoInitiator == '') {
|
||||
this.prehomoInitiatorList = res.result.allPersonList || []
|
||||
}
|
||||
// }
|
||||
//prehomo确认-责任人
|
||||
if (row.prehomoDuty == 1) {
|
||||
this.prehomoDutyList = res.result.lawEngineerList || []
|
||||
} else if (row.prehomoDuty == 2) {
|
||||
this.prehomoDutyList = res.result.certificationEngineerList || []
|
||||
} else if (row.prehomoDuty == 3) {
|
||||
this.prehomoDutyList = res.result.engineeringInterfacePersonList || []
|
||||
} else if (row.designInitiator == 0) {
|
||||
this.prehomoDutyList = res.result.studioPersonList || []
|
||||
} else if (!row.prehomoDuty || row.prehomoDuty == '') {
|
||||
// if (row.prehomoDuty == 1) {
|
||||
// this.prehomoDutyList = res.result.lawEngineerList || []
|
||||
// } else if (row.prehomoDuty == 2) {
|
||||
// this.prehomoDutyList = res.result.certificationEngineerList || []
|
||||
// } else if (row.prehomoDuty == 3) {
|
||||
// this.prehomoDutyList = res.result.engineeringInterfacePersonList || []
|
||||
// } else if (row.designInitiator == 0) {
|
||||
// this.prehomoDutyList = res.result.studioPersonList || []
|
||||
// } else if (!row.prehomoDuty || row.prehomoDuty == '') {
|
||||
this.prehomoDutyList = res.result.allPersonList || []
|
||||
}
|
||||
// }
|
||||
//验证符合性确认-发起人
|
||||
if (row.verifyInitiator == 1) {
|
||||
this.verifyInitiatorList = res.result.lawEngineerList || []
|
||||
} else if (row.verifyInitiator == 2) {
|
||||
this.verifyInitiatorList = res.result.certificationEngineerList || []
|
||||
} else if (row.verifyInitiator == 3) {
|
||||
this.verifyInitiatorList = res.result.engineeringInterfacePersonList || []
|
||||
} else if (row.designInitiator == 0) {
|
||||
this.verifyInitiatorList = res.result.studioPersonList || []
|
||||
} else if (!row.verifyInitiator || row.verifyInitiator == '') {
|
||||
// if (row.verifyInitiator == 1) {
|
||||
// this.verifyInitiatorList = res.result.lawEngineerList || []
|
||||
// } else if (row.verifyInitiator == 2) {
|
||||
// this.verifyInitiatorList = res.result.certificationEngineerList || []
|
||||
// } else if (row.verifyInitiator == 3) {
|
||||
// this.verifyInitiatorList = res.result.engineeringInterfacePersonList || []
|
||||
// } else if (row.designInitiator == 0) {
|
||||
// this.verifyInitiatorList = res.result.studioPersonList || []
|
||||
// } else if (!row.verifyInitiator || row.verifyInitiator == '') {
|
||||
this.verifyInitiatorList = res.result.allPersonList || []
|
||||
}
|
||||
// }
|
||||
//验证符合性确认-责任人
|
||||
if (row.verifyDuty == 1) {
|
||||
this.verifyDutyList = res.result.lawEngineerList || []
|
||||
} else if (row.verifyDuty == 2) {
|
||||
this.verifyDutyList = res.result.certificationEngineerList || []
|
||||
} else if (row.verifyDuty == 3) {
|
||||
this.verifyDutyList = res.result.engineeringInterfacePersonList || []
|
||||
} else if (row.designInitiator == 0) {
|
||||
this.verifyDutyList = res.result.studioPersonList || []
|
||||
} else if (!row.verifyDuty || row.verifyDuty == '') {
|
||||
// if (row.verifyDuty == 1) {
|
||||
// this.verifyDutyList = res.result.lawEngineerList || []
|
||||
// } else if (row.verifyDuty == 2) {
|
||||
// this.verifyDutyList = res.result.certificationEngineerList || []
|
||||
// } else if (row.verifyDuty == 3) {
|
||||
// this.verifyDutyList = res.result.engineeringInterfacePersonList || []
|
||||
// } else if (row.designInitiator == 0) {
|
||||
// this.verifyDutyList = res.result.studioPersonList || []
|
||||
// } else if (!row.verifyDuty || row.verifyDuty == '') {
|
||||
this.verifyDutyList = res.result.allPersonList || []
|
||||
}
|
||||
// }
|
||||
callback()
|
||||
},
|
||||
getData(row, res) {
|
||||
|
||||
@@ -226,7 +226,8 @@
|
||||
if (res.success) {
|
||||
this.conFlag = res.result
|
||||
if (this.conFlag == true) {
|
||||
this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
|
||||
console.log(this.paramsConfigEOList)
|
||||
this.paramsConfigEOList.splice(this.paramsConfigEOList.length + 1, 0, {
|
||||
id: '',
|
||||
configName: '', // 配置名称
|
||||
version: '', // 版本
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='9'>
|
||||
<a-form-model-item :label="$t('areaOfResponsibility')">
|
||||
<j-dict-select-tag class="box-input" v-model="formData.areaOfResponsibility"
|
||||
<j-dict-select-tag class="box-input" v-model="formData.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
@@ -20,10 +20,10 @@
|
||||
</a-col>
|
||||
<a-col :span='9'>
|
||||
<a-form-model-item :label="$t('RelatedItems')" prop='ListTitle'>
|
||||
<a-select class="box-input" v-model="formData.RelatedItems"
|
||||
<a-select class="box-input" v-model="formData.projectNameId"
|
||||
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||
<a-select-option v-for="(element,index) in item.RelatedItemList" :key="element.value" :value="element.value">
|
||||
{{element.label}}
|
||||
<a-select-option v-for="(element,index) in RelatedItemList" :key="element.id" :value="element.id">
|
||||
{{element.projectName}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
@@ -69,8 +69,8 @@
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<div class="table-operator" >
|
||||
<a-button type="primary" @click="handleExportXls()">{{ $t('CommentsCollectionResultsForReference') }}</a-button>
|
||||
<a-button type="primary" @click="handleExportXls()">{{ $t('TechnicalEvaluationResultsForReference') }}</a-button>
|
||||
<a-button type="primary" v-if='this.opinionGather > 0' @click="handlecomments()">{{ $t('CommentsCollectionResultsForReference') }}</a-button>
|
||||
<a-button type="primary" v-if='this.technologyEvaluation > 0' @click="handletechnical()">{{ $t('TechnicalEvaluationResultsForReference') }}</a-button>
|
||||
</div>
|
||||
<!-- <div class='drawer-bootom-button'>-->
|
||||
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
|
||||
@@ -94,13 +94,15 @@ export default {
|
||||
title: this.$t('add'),
|
||||
total: 0,
|
||||
selectedRowKeysDate: {},
|
||||
opinionGather:'',
|
||||
technologyEvaluation:'',
|
||||
loading: false,
|
||||
editId: '',
|
||||
RelatedItemList:[],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
dataIndex: 'areaOfResponsibility',
|
||||
dataIndex: 'dutyTerritory_dicText',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
@@ -109,28 +111,28 @@ export default {
|
||||
title: this.$t('RelatedItems'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'RelatedItems',
|
||||
dataIndex: 'projectName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('designComplianceReview'),
|
||||
align: 'center',
|
||||
width: 250,
|
||||
dataIndex: 'designComplianceReview',
|
||||
dataIndex: 'designStatus_dicText',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('preHomeConfirmation'),
|
||||
align: 'center',
|
||||
width: 270,
|
||||
dataIndex: 'preHomeConfirmation',
|
||||
dataIndex: 'prehomoStatus_dicText',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('verificationComplianceReview'),
|
||||
align: 'center',
|
||||
width: 270,
|
||||
dataIndex: 'verificationComplianceReview',
|
||||
dataIndex: 'verifyStatus_dicText',
|
||||
scopedSlots: { customRender: 'file' },
|
||||
ellipsis: true
|
||||
}
|
||||
@@ -161,61 +163,31 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
listVisible: false,
|
||||
listVisibleRowDate: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
version: {
|
||||
type: Number,
|
||||
default: '',
|
||||
required: false
|
||||
},
|
||||
projectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
item: {
|
||||
type: String,
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
paramsManifestId: {
|
||||
type: Object,
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
console.log(this.item)
|
||||
this.getRelatedItemList()
|
||||
},
|
||||
methods: {
|
||||
// 清单列表传出数据
|
||||
listVisibleRow(val) {
|
||||
this.selectedRowKeys = []
|
||||
let newAreaTable=JSON.parse(JSON.stringify(this.areaTable))
|
||||
newAreaTable.forEach((item, index) => {
|
||||
if( item.id == this.listVisibleRowDate.id ) {
|
||||
let _obj = {...item}
|
||||
_obj.paramsTemplateId = val[0].id
|
||||
_obj.paramsTemplateName = val[0].paramsTemplateName
|
||||
this.areaTable.splice(index, 1,_obj)
|
||||
getRelatedItemList(){
|
||||
getAction('/project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.RelatedItemList = res.result
|
||||
}
|
||||
})
|
||||
console.log(this.areaTable,'this.areaTable')
|
||||
this.listVisible = false
|
||||
},
|
||||
// 下载文件
|
||||
editArea(val) {
|
||||
// this.listVisibleRowDate = val
|
||||
console.log(val)
|
||||
// this.listVisible = true
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
@@ -226,30 +198,51 @@ export default {
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
dowloadfile(item){
|
||||
let query = {
|
||||
id: item.exportFileId
|
||||
}
|
||||
downloadFile('/sys/common/downLoadFile', item.exportFileName, query, this.Deselect)
|
||||
// 法规意见收集列表
|
||||
handlecomments(){
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions',
|
||||
query:{
|
||||
serialNumber:this.item.serialNumber
|
||||
}
|
||||
})
|
||||
},
|
||||
// 法规技术评估列表
|
||||
handletechnical(){
|
||||
|
||||
this.$router.push({
|
||||
path: '/technologyAssessment',
|
||||
query:{
|
||||
serialNumber:this.item.serialNumber
|
||||
}
|
||||
})
|
||||
},
|
||||
loadData() {
|
||||
let _this = this
|
||||
let params = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
paramsManifestId:this.paramsManifestId,
|
||||
...this.formData
|
||||
id:this.paramsManifestId,
|
||||
dutyTerritory:this.formData.dutyTerritory?this.formData.dutyTerritory:'',
|
||||
projectName:this.formData.projectName?this.formData.projectName:'',
|
||||
projectNameId:this.formData.projectNameId?this.formData.projectNameId:'',
|
||||
}
|
||||
getAction('params/report/exportHistoryPage', params).then((res) => {
|
||||
this.loading = true
|
||||
getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.areaTable = res.result.records
|
||||
this.total = res.result.total
|
||||
this.areaTable = res.result.complianceResultList
|
||||
this.opinionGather = res.result.opinionGather
|
||||
this.technologyEvaluation = res.result.technologyEvaluation
|
||||
this.loading = false
|
||||
}else{
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
//导出
|
||||
handleExportXls(){
|
||||
|
||||
let query = {
|
||||
id:this.paramsManifestId,
|
||||
...this.formData
|
||||
}
|
||||
downloadFile('/project/lawsComplianceBoard/exportComplianceResultDetail', this.$t('complianceResults')+'.xls', query, this.Deselect)
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
@@ -273,65 +266,6 @@ export default {
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
//新增
|
||||
handleSubmit() {
|
||||
let _this = this
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.flag = true
|
||||
this.spinLoading = true
|
||||
this.confirmLoading = true
|
||||
let _tt = {
|
||||
paramsTemplateId: this.selectedRowKeysDate[0].paramsTemplateId,
|
||||
projectId: this.selectedRowKeysDate[0].projectId,
|
||||
title: this.selectedRowKeysDate[0].title,
|
||||
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].paramsTemplatePublishVersion,
|
||||
sourceManifestId: this.selectedRowKeysDate[0].id,
|
||||
}
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/copy`,
|
||||
method: 'post',
|
||||
data: _tt,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$emit('copysubmit')
|
||||
_this.$message.success(res.data.message)
|
||||
_this.flag = false
|
||||
_this.spinLoading = false
|
||||
_this.confirmLoading = false
|
||||
}else{
|
||||
_this.$message.warning(res.data.message)
|
||||
_this.flag = false
|
||||
_this.spinLoading = false
|
||||
_this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
selectedRowKeyS(val) {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{ $t('standard') }}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -17,8 +17,8 @@
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.projectName"></j-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -26,10 +26,10 @@
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{ $t('status') }}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.state"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -37,10 +37,21 @@
|
||||
<div class="title-text" :title="$t('technicalField')">
|
||||
<span>{{ $t('technicalField') }}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('technicalField')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.technologyTerritory"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="CategoryTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('technicalField')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="queryParam.technologyTerritory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('technicalField')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
@@ -56,6 +67,14 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator" style="overflow:hidden;margin-bottom: 20px">
|
||||
<div style="float: right;margin-bottom: 0px;margin-left: 20px">
|
||||
<div class="operator-text" @click="deriveconformanceresults()">
|
||||
<a-icon type="solution"/>
|
||||
{{ $t('Deriveconformanceresults') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
@@ -105,6 +124,7 @@ import axios from 'axios'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
// import eventBUs from '../../../common/event'
|
||||
import Vue from 'vue'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
@@ -118,6 +138,7 @@ export default {
|
||||
loading: false,
|
||||
toggleSearchStatus: false,
|
||||
selectedRowKeys: [],
|
||||
CategoryTreeList:[],
|
||||
paramsManifestId:'',
|
||||
item:{},
|
||||
selectedRowKeysArray: '',
|
||||
@@ -127,40 +148,13 @@ export default {
|
||||
{ required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
fieldList: [
|
||||
{
|
||||
type: 'string',
|
||||
value: 'standard',
|
||||
text: this.$t('standard')
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
value: 'title',
|
||||
text: this.$t('title')
|
||||
},
|
||||
{
|
||||
type: '',
|
||||
value: 'status',
|
||||
text: this.$t('status'),
|
||||
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
value: 'category',
|
||||
text: this.$t('category')
|
||||
},
|
||||
{
|
||||
type: '',
|
||||
value: 'technicalField',
|
||||
text: this.$t('technicalField'),
|
||||
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
],
|
||||
fieldList: [],
|
||||
visible: false,
|
||||
dataSource: [],
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: 'params/report/page'
|
||||
list: 'project/lawsComplianceBoard/page',
|
||||
getSysCategoryTree: '/sys/category/getSysCategoryTree',
|
||||
},
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
@@ -170,17 +164,20 @@ export default {
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
dataIndex: 'standard'
|
||||
dataIndex: 'serialNumber',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title'
|
||||
dataIndex: 'title',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: 'center',
|
||||
dataIndex: 'status'
|
||||
dataIndex: 'state_dicText',
|
||||
width: 180
|
||||
},
|
||||
// {
|
||||
// title: this.$t('category'),
|
||||
@@ -190,7 +187,7 @@ export default {
|
||||
{
|
||||
title: this.$t('technicalField'),
|
||||
align: 'center',
|
||||
dataIndex: 'technicalField'
|
||||
dataIndex: 'technologyTerritory_dicText'
|
||||
},
|
||||
{
|
||||
title: this.$t('RegulatoryProcessEvaluationResults'),
|
||||
@@ -203,14 +200,29 @@ export default {
|
||||
queryParam: {},
|
||||
areaVisible: false,
|
||||
paramsTemplateName: '',
|
||||
queryConditionVOList: [],
|
||||
drawerVisible: false,
|
||||
titleTag: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getSysCategoryTree()
|
||||
this.queryConditionInventory()
|
||||
},
|
||||
methods: {
|
||||
queryConditionInventory() {
|
||||
let query = {
|
||||
flag: 1
|
||||
}
|
||||
getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.fieldList = res.result || []
|
||||
} else {
|
||||
this.fieldList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.areaVisible = false
|
||||
},
|
||||
@@ -233,35 +245,39 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getSysCategoryTree() {
|
||||
getAction(this.url.getSysCategoryTree, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.CategoryTreeList = res.result
|
||||
} else {
|
||||
this.CategoryTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowKeysArray = this.selectedRowKeys.join(',')
|
||||
},
|
||||
deriveconformanceresults(){
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
exportAll:'yes',
|
||||
ids: this.selectedRowKeys.join(',')
|
||||
}
|
||||
downloadFile('/project/lawsComplianceBoard/exportComplianceResult', this.$t('complianceResults')+'.xls', query, this.Deselect)
|
||||
},
|
||||
// 导出历史
|
||||
handlecody(e) {
|
||||
this.drawerVisible = true
|
||||
this.titleTag = e.standard + this.$t('ComplianceConfirmationRecord')
|
||||
this.titleTag = e.serialNumber + this.$t('ComplianceConfirmationRecord')
|
||||
this.paramsManifestId = e.id
|
||||
this.item = {...e}
|
||||
},
|
||||
hideModal() {
|
||||
this.visible = false
|
||||
},
|
||||
//编辑
|
||||
edit(item) {
|
||||
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
},
|
||||
//删除
|
||||
deleteLib(val) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/managementdetails',
|
||||
query: val
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
//虚拟清单名称事件
|
||||
entryNameClick(item) {
|
||||
this.$router.push({
|
||||
@@ -275,6 +291,8 @@ export default {
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.territory = ''
|
||||
this.queryConditionVOList = []
|
||||
this.$refs.globalAdvancedQueryRef.resetLine()
|
||||
this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||
},
|
||||
@@ -298,31 +316,43 @@ export default {
|
||||
handleSuperQuery(params, matchType) {
|
||||
let sqp = {}
|
||||
if (!params || (params && params.length == 0)) {
|
||||
sqp['superQueryParams'] = ''
|
||||
this.queryConditionVOList = []
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
||||
} else {
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
||||
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
||||
sqp['superQueryMatchType'] = matchType
|
||||
this.queryConditionVOList = params
|
||||
this.queryConditionVOList.forEach(res => {
|
||||
res.type = matchType
|
||||
})
|
||||
}
|
||||
this.queryParamQuery = sqp
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let territory = ''
|
||||
if (this.queryParam.technologyTerritory) {
|
||||
this.territory = this.queryParam.technologyTerritory.join(',')
|
||||
}
|
||||
// let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParamQuery,
|
||||
...this.queryParam
|
||||
queryConditionVOList: JSON.stringify(queryConditionVOList),
|
||||
technology_territory: this.territory,
|
||||
serial_number:this.queryParam.serialNumber,
|
||||
title:this.queryParam.title,
|
||||
state:this.queryParam.state
|
||||
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
postAction(this.url.list, query).then((res) => {
|
||||
if (res) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = res.result.current - 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
console.log(res.result)
|
||||
this.dataSource = res.result.records || []
|
||||
|
||||
this.total = res.result.total
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'MessageDetails',
|
||||
methods: {
|
||||
@@ -30,6 +33,13 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.msgContentInfo && this.$route.query.msgContentInfo.includes('downLoadFile')) {
|
||||
let index = this.$route.query.msgContentInfo.indexOf('target')
|
||||
this.$route.query.msgContentInfo = this.$route.query.msgContentInfo.slice(0, index - 2) + '&token=' + Vue.ls.get(ACCESS_TOKEN) + '\' '
|
||||
+ this.$route.query.msgContentInfo.slice(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -57,13 +57,34 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('department')">
|
||||
<span>{{ $t('department') }}</span>
|
||||
</div>
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.orgCode"
|
||||
:maxTagCount="1"
|
||||
show-search
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
:tree-data="CategoryTreeList"
|
||||
:placeholder="$t('PleaseSelect')+$t('department')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="queryParam.technologyTerritory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('technicalField')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
{{ toggleSearchStatus ? $t('away') : $t('open') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</a-col>
|
||||
@@ -141,7 +162,7 @@
|
||||
import DepartmentAllocation from './modules/departmentAllocation'
|
||||
import UserModal from './modules/UserModal'
|
||||
import PasswordModal from './modules/PasswordModal'
|
||||
import { putAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import {getAction, putAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { frozenBatch } from '@/api/api'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import JInput from '@/components/jero/JInput'
|
||||
@@ -174,6 +195,18 @@
|
||||
departmentvisible: false, // 部门配置得弹框
|
||||
selectedRowKeys: [],
|
||||
selectedRowKeysvalue: [],
|
||||
CategoryTreeList:[],
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '30', '50', '100'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
@@ -259,6 +292,7 @@
|
||||
list: '/sys/user/page',
|
||||
delete: '/sys/user/delete',
|
||||
deleteBatch: '/sys/user/deleteBatch',
|
||||
getSysCategoryTree: '/sys/sysDepart/queryTreeList',
|
||||
exportXlsUrl: '/sys/user/exportXls',
|
||||
importExcelUrl: 'sys/user/importExcel'
|
||||
}
|
||||
@@ -269,6 +303,9 @@
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getSysCategoryTree()
|
||||
},
|
||||
methods: {
|
||||
// 重置密码
|
||||
resetPassword(val) {
|
||||
@@ -368,6 +405,15 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
getSysCategoryTree() {
|
||||
getAction(this.url.getSysCategoryTree, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.CategoryTreeList = res.result
|
||||
} else {
|
||||
this.CategoryTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleMenuClick(e) {
|
||||
if (e.key == 1) {
|
||||
this.batchDel()
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<!-- :disabled="isDisabledAuth('user:form:phone')"-->
|
||||
<a-form-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('enterMobileNumber')" :disabled='isdisabled'
|
||||
v-decorator="[ 'phone', validatorRules.phone]"/>
|
||||
v-decorator="[ 'telephone', validatorRules.telephone]"/>
|
||||
</a-form-item>
|
||||
|
||||
<!--<a-form-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
|
||||
Reference in New Issue
Block a user