合并分支 'master' 到 'fix_bug_first_stage'

Master

查看合并请求 laws-nio/laws-weilai!104
This commit is contained in:
李雪涛
2022-07-22 18:26:55 +08:00
38 changed files with 4228 additions and 55 deletions
@@ -439,3 +439,58 @@ CREATE TABLE `laws_weilai`.`doc_translation` (
`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`;
@@ -522,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);
}
@@ -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);
@@ -100,4 +100,7 @@ public class ParamsManifestEO implements Serializable {
@TableField(exist = false)
private String cut;
@TableField(exist = false)
private String projectName;
}
@@ -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);
@@ -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
@@ -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;
@@ -148,4 +149,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
// 带入工程接口人
boolean bringSdtInto(ParamsCollectManifestVO paramsCollectManifestVO);
// 全部导出
void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request);
}
@@ -2,6 +2,7 @@ package com.jero.modules.cert.collect.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -12,10 +13,12 @@ import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.WebsocketConst;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.cert.collect.entity.*;
@@ -54,19 +57,31 @@ import com.jero.modules.system.service.ISysAnnouncementService;
import com.jero.modules.system.service.ISysDictItemService;
import com.jero.modules.system.service.ISysUserRoleService;
import com.jero.modules.system.service.ISysUserService;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.usermodel.*;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -126,6 +141,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
@Resource
private WebSocket webSocket; // 消息专用
@Value(value = "${jero.path.upload}")
private String uploadpath;
@@ -1276,6 +1293,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
paramsManifestEO.setProjectName(projectInfo.getProjectName());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
@@ -1307,8 +1326,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
SysUser sysUser = sysUserService.getUserByName(dre);
String[] thirdIds = new String[1];
thirdIds[0] = sysUser.getThirdId();
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId;
String href = "<a href='/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId + "'" + " target='_blank'>the link</a>,";
String urlParamsStr = parseUrlParams(paramsManifestEO);
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it.";
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " please enter " + href + " to handle it.";
String msgTitle = "You have a homo parameter task to complete";
@@ -1367,6 +1387,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
paramsManifestEO.setProjectName(projectInfo.getProjectName());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
@@ -1378,7 +1400,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
paramsCollectManifestEOList = paramsCollectManifestEOList.stream().sorted(Comparator.comparing(ParamsCollectManifestBaseEO::getNioNumber)).collect(Collectors.toList()); // 按NIO编号升序
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
// 判断参数项状态
if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())) {
if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())
|| CollectManifestStateEnum.CHANGE.getValue().equals(paramsCollectManifestEO.getState())) {
if (StringUtils.isNotBlank(paramsCollectManifestEO.getSdt())) {
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
updateEO.setId(paramsCollectManifestEO.getId());
@@ -1430,8 +1454,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
SysUser sysUser = sysUserService.getUserByName(sdt);
String[] thirdIds = new String[1];
thirdIds[0] = sysUser.getThirdId();
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId;
String href = "<a href='/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId + "'" + " target='_blank'>the link</a>,";
String urlParamsStr = parseUrlParams(paramsManifestEO);
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
String msgTitle = "You have a homo parameter task to complete";
@@ -1489,6 +1514,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
paramsManifestEO.setProjectName(projectInfo.getProjectName());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
@@ -1502,7 +1529,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
List<ParamsCollectManifestEO> paramsCollectManifestEOList = list(queryWrapper);
for (ParamsCollectManifestEO paramsCollectManifestEO : paramsCollectManifestEOList) {
// 判断参数项状态
if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())) {
if (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(paramsCollectManifestEO.getState())
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())
|| CollectManifestStateEnum.CHANGE.getValue().equals(paramsCollectManifestEO.getState())) {
if (StringUtils.isNotBlank(paramsCollectManifestEO.getSdt())) {
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
updateEO.setId(paramsCollectManifestEO.getId());
@@ -1554,8 +1583,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
SysUser sysUser = sysUserService.getUserByName(sdt);
String[] thirdIds = new String[1];
thirdIds[0] = sysUser.getThirdId();
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId;
String href = "<a href='/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId + "'" + " target='_blank'>the link</a>,";
String urlParamsStr = parseUrlParams(paramsManifestEO);
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
String msgTitle = "You have a homo parameter task to complete";
@@ -1976,6 +2006,382 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
return updateBatchById(updateCollectManifestEOList);
}
@Override
public void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request) {
// OutputStream os = null;
OutputStream excelOS = null;
XSSFWorkbook workbook = new XSSFWorkbook();
String fileOriName = "参数项清单导出信息";
if (CutEnum.EN.getValue().equals(paramsCollectManifestVO.getCut())) {
fileOriName = "Params info export data";
}
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getExportName())) {
fileOriName = paramsCollectManifestVO.getExportName();
}
//创建临时文件夹
String fileNowPath = uploadpath + "/tempZip/" + UUID.randomUUID().toString().replace("-","") + File.separator + fileOriName;
File nowFile = new File(fileNowPath);
if (nowFile.exists()) {
nowFile.delete();
}
nowFile.mkdirs();
try{
String fileName = fileOriName + ".xlsx";
// 设置表格相关属性
String sheetName = "参数项清单信息";
if (CutEnum.EN.getValue().equals(paramsCollectManifestVO.getCut())) {
sheetName = "Params data";
}
XSSFSheet sheetItems = workbook.createSheet(sheetName);
String[] titles = getWorkbookTitleForExport(paramsCollectManifestVO); // 获取表头
String[] headers = titles[1].split(",");
XSSFCellStyle cellStyle =workbook.createCellStyle();
cellStyle.setWrapText(true);
// cellStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER);
cellStyle.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
XSSFCellStyle cellStyle1 =workbook.createCellStyle();
cellStyle1.setAlignment(XSSFCellStyle.ALIGN_CENTER);
XSSFCellStyle cellStyleLink =workbook.createCellStyle();
XSSFFont font = workbook.createFont();
font.setColor(HSSFColor.LIGHT_BLUE.index);
cellStyleLink.setFont(font);
cellStyleLink.setWrapText(true);
// 查询需要导出的字段
String field = titles[0]; // 字符串形式
List<String> fieldList = Arrays.asList(field.split(",")); // list形式
// 查询导出数据
List<Map<String, Object>> allParamsInfoList = queryForExportAll(paramsCollectManifestVO); // id记得去掉
// 开始处理工作表
List<OSSFile> allRelevFileList = new ArrayList<>();
// 在excel表中添加表头
XSSFRow row = sheetItems.createRow(0);
for (int i = 0; i < headers.length; i++) {
XSSFCell cell = row.createCell(i);
XSSFRichTextString text = new XSSFRichTextString(headers[i]);
cell.setCellValue(text);
cell.setCellStyle(cellStyle1);
sheetItems.setColumnWidth(i, 20 * 256); // 设置单元格宽度
}
Map<String, String> fileNowPathMap = new HashMap<>();
//放文字内容
int allRow = 0;
for(int rowNum = 0;rowNum < allParamsInfoList.size(); rowNum++){
Map<String, Object> exportDto = allParamsInfoList.get(rowNum);
// 处理文件
List<OSSFile> fileList = (List<OSSFile>) exportDto.get("fileList");
if (CollectionUtil.isNotEmpty(fileList)) {
allRelevFileList.addAll(fileList);
fileList.forEach(file -> {
fileNowPathMap.put(file.getId(), fileNowPath + File.separator + exportDto.get("nio_number"));
});
}
allRow++;
XSSFRow row1 = sheetItems.createRow(allRow);
for(int cellNum = 0; cellNum < fieldList.size(); cellNum++){
if (ObjectUtils.isNotEmpty(exportDto.get(fieldList.get(cellNum)))) {
row1.createCell(cellNum).setCellValue(exportDto.get(fieldList.get(cellNum)).toString());
row1.getCell(cellNum).setCellStyle(cellStyle);
}
}
}
//下载关联文件内容
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
downLoadFileList(allRelevFileList,fileNowPathMap);
}
String repFileName = fileName.replaceAll("/","_");
excelOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
// response.setHeader("Content-Disposition",
// "attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
// response.setContentType("application/force-download");
// response.flushBuffer();
// os = response.getOutputStream();
workbook.write(excelOS);
excelOS.flush();
excelOS.close();
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
// FileInputStream fis = new FileInputStream(fileNowPath+".zip");
// int len = 0;
// while ((len = fis.read()) != -1) {
// os.write(len);
// }
// 将导出文件上传到cos上
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, "/manifest", "", CutEnum.CN.getValue()); // 上传导出的压缩包
// 系统向用户发消息
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
String msgTitle = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated.";
String content = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click download.";
String href = "<a href='/jero-boot/sys/common/downLoadFile?id=" + ossFile.getId() + "'" + " target='_blank'>download</a>.";
String contentInfo = "The file " + paramsCollectManifestVO.getExportName() + " that you exported has been generated, please click " + href;
SysAnnouncement sysAnnouncement = new SysAnnouncement();
sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date());
sysAnnouncement.setMsgCategory(MessageTypeEnum.PUSH.getValue()); //消息类型:转发推送
sysAnnouncement.setInitiator(MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); // 发起人:系统
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
sysAnnouncement.setTitile(msgTitle);
sysAnnouncement.setMsgContent(content);
sysAnnouncement.setMsgContentInfo(contentInfo);
sysAnnouncement.setUserIds(currentUser.getId()); // 发送给当前导出人
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
JSONObject obj = new JSONObject();
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
obj.put(WebsocketConst.MSG_ID, currentUser.getId());
obj.put(WebsocketConst.MSG_TXT, contentInfo);
webSocket.sendMessage(obj.toJSONString());
uploadFileio.close();
// os.flush();
// os.close(); // 后开先关
// fis.close(); // 先开后关
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new JeroBootException("下载文件失败,请重试");
} finally {
// IOUtils.closeQuietly(os);
IOUtils.closeQuietly(excelOS);
File tempZipFile = new File(uploadpath + "/tempZip");
FileUtil.deleteContents(tempZipFile);
}
}
private String[] getWorkbookTitleForExport(ParamsCollectManifestVO paramsCollectManifestVO) {
String cut = paramsCollectManifestVO.getCut();
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.PARAMS_COLLECT_MANIFEST.getValue());
List<String> dbFieldNameList = new LinkedList<>();
List<String> dbFieldList = new LinkedList<>();
if (fieldList.size() != 0) {
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
}
// 固定列
int indexOfDescription = 1; // 参数名称的位置
for (int i = 0; i < fieldList.size(); i++) {
OnlCgformField onlCgformField = fieldList.get(i);
String dbFieldName = onlCgformField.getDbFieldName();
if (!"deadline".equals(dbFieldName) && !"cert_category".equals(dbFieldName) && !"description".equals(dbFieldName)) {
dbFieldList.add(dbFieldName);
if(CutEnum.CN.getValue().equals(cut)){
dbFieldNameList.add(onlCgformField.getDbFieldTxt()); // 字段中文名
}else{
dbFieldNameList.add(onlCgformField.getDbFieldEnName()); // 字段英文名
}
if ("params_name".equals(dbFieldName)) {
indexOfDescription = i;
}
}
}
// 认证类别列
List<String> dbFieldNameListCC = new LinkedList<>();
List<String> dbFieldListCC = new LinkedList<>();
// 查询所有认证类别
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("cert_category");
if (CutEnum.EN.getValue().equals(cut)) {
sysDictItemList.forEach(sysDictItem -> {
dbFieldListCC.add(sysDictItem.getItemValue());
dbFieldNameListCC.add(sysDictItem.getEnName() + " Number");
});
} else {
sysDictItemList.forEach(sysDictItem -> {
dbFieldListCC.add(sysDictItem.getItemValue());
dbFieldNameListCC.add(sysDictItem.getItemText() + "编号");
});
}
// 配置列
List<String> dbFieldNameListConfig = new LinkedList<>();
List<String> dbFieldListConfig = new LinkedList<>();
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId);
for (ParamsConfigEO paramsConfigEO : paramsConfigEOList) {
dbFieldListConfig.add(paramsConfigEO.getId());
dbFieldNameListConfig.add(paramsConfigEO.getConfigName());
}
// 插入认证类别列
dbFieldList.addAll(indexOfDescription, dbFieldListCC);
dbFieldNameList.addAll(indexOfDescription, dbFieldNameListCC);
// 插入配置列
dbFieldList.addAll(dbFieldListConfig);
dbFieldNameList.addAll(dbFieldNameListConfig);
String[] title = new String[2];
String dbFieldStr = StringUtils.join(dbFieldList, ",");
String dbFieldNameStr = StringUtils.join(dbFieldNameList, ",");
title[0] = dbFieldStr;
title[1] = dbFieldNameStr;
return title;
}
private List<Map<String, Object>> queryForExportAll(ParamsCollectManifestVO paramsCollectManifestVO) {
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
String paramsTemplateId = paramsCollectManifestVO.getParamsTemplateId();
Integer paramsTemplatePublishVersion = paramsCollectManifestVO.getParamsTemplatePublishVersion();
String cut = paramsCollectManifestVO.getCut();
ParamsCollectManifestEO queryEO = new ParamsCollectManifestEO();
queryEO.setParamsManifestId(paramsManifestId);
List<Map<String, Object>> dataList = paramsCollectManifestEOMapper.listInfoForExport(queryEO); // 查询导出数据
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询所有配置列
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
List<String> nioNumberList = dataList.stream().map(m->(String)m.get("nio_number")).collect(Collectors.toList());
List<CertCategoryParamsInfoPublishEO> certCategoryParamsInfoPublishEOList = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsTemplateId, paramsTemplatePublishVersion, nioNumberList); //查询所有认证类别参数项
// 查询责任领域数据字典
List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
Map<String, String> dutyTerritoryMap = new HashMap<>();
if (CutEnum.EN.getValue().equals(cut)) {
dutyTerritoryMap = sysDictItemList.stream().collect(Collectors.toMap(c -> c.getItemValue(), c -> c.getEnName()));
} else {
dutyTerritoryMap = sysDictItemList.stream().collect(Collectors.toMap(c -> c.getItemValue(), c -> c.getItemText()));
}
// 状态
Map<String,String> stateMap = CollectManifestStateEnum.toMap(cut);
// 插入配置列和认证类别列数据
for (Map<String, Object> record1 : dataList) {
String paramsCollectManifestId = (String) record1.get("id");
String nioNumber = (String) record1.get("nio_number");
String dutyTerritory = (String) record1.get("duty_territory");
String state = (String) record1.get("state");
// 处理负责领域
record1.put("duty_territory", dutyTerritoryMap.get(dutyTerritory));
// 处理负状态
record1.put("state", stateMap.get(state));
// 认证类别列
List<CertCategoryParamsInfoPublishEO> certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOList.stream().filter(e->nioNumber.equals(e.getNioNumber())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(certCategoryParamsInfoPublishEOS)) {
certCategoryParamsInfoPublishEOS.forEach(certCategoryParamsInfoPublishEO -> {
record1.put(certCategoryParamsInfoPublishEO.getCertCategory(), certCategoryParamsInfoPublishEO.getParamsNumber());
});
}
// 配置列
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
List<OSSFile> fileList = new ArrayList<>();
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
String paramsConfigId = paramsConfigEO.getId();
List<ParamsConfigDataEO> paramsConfigDataEOS = paramsConfigDataEOList.stream().filter(e-> paramsConfigId.equals(e.getParamsConfigId()) && paramsCollectManifestId.equals(e.getParamsCollectManifestId())).collect(Collectors.toList()); // 参数配置数据
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
if (CollectionUtil.isNotEmpty(paramsConfigDataEOS)) {
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOS.get(0);
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
}
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
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("#");
fileList.addAll(ossFileList);
}
}
}
String configData = configDataBuilder.toString();
if (configData.contains("#")) {
configData = configData.substring(0, configData.lastIndexOf("#"));
}
record1.put(paramsConfigEO.getId(), configData);
});
record1.put("fileList", fileList);
}
}
return dataList;
}
private void downLoadFileList(List<OSSFile> fileTemplateList,Map<String ,String> fileNowPathMap) {
for(OSSFile fileExportDto : fileTemplateList){
String fileNowPath = fileNowPathMap.get(fileExportDto.getId());
File nowFile = new File(fileNowPath);
if (nowFile.exists()){
nowFile.delete();
}
nowFile.mkdirs();
String oldPath = fileExportDto.getUrl();
String newPath = fileNowPath + File.separator + fileExportDto.getFileName();
if (CosBootUtil.doesObjectExist(oldPath)){
try (InputStream in = CosBootUtil.download(oldPath);) {
copyFile(in, newPath);
} catch (IOException e) {
e.printStackTrace();
log.error(e.getMessage(), e);
}
}
}
}
private void copyFile(InputStream in, String destPath) throws IOException {
BufferedInputStream bis = new BufferedInputStream(in);
BufferedOutputStream bos =
new BufferedOutputStream(Files.newOutputStream(Paths.get(destPath),
StandardOpenOption.CREATE,
StandardOpenOption.TRUNCATE_EXISTING,
StandardOpenOption.WRITE));
// 打开输入流
// FileInputStream fis = new FileInputStream(srcPath);
// 打开输出流
// FileOutputStream fos = new FileOutputStream(destPath);
// 读取和写入信息
byte[] bytes = new byte[1024 * 1024];
int len;
while ((len = bis.read(bytes)) > 0) {
bos.write(bytes, 0, len);
}
// 关闭流 先开后关 后开先关
bos.close(); // 后开先关
bis.close(); // 先开后关
}
/**
* 获取一个类和其父类的所有属性
*
@@ -2047,6 +2453,59 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
}
/**
* 通过实体类获取 URL Params
*
* @param clazz 实体类
* @return URL Params
*/
private String parseUrlParams(Object clazz) {
// 遍历属性类、属性值
List<Field> list = findAllFieldsOfSelfAndSuperClass(clazz.getClass());
StringBuilder requestURL = new StringBuilder();
try {
boolean flag = true;
String property, value, params;
for (Field field : list) {
// 允许访问私有变量
field.setAccessible(true);
// 过滤静态属性
if (Modifier.isStatic(field.getModifiers())) {
continue;
}
// 属性名
property = field.getName();
// 属性值
if (field.get(clazz) != null) {
if (Date.class.equals(field.getType())) {
Date date = (Date) field.get(clazz);
String pattern = "";
pattern = "yyyy-MM-dd HH:mm:ss";
SimpleDateFormat formatter=new SimpleDateFormat(pattern);
String time=formatter.format(date);
value = time;
} else {
value = field.get(clazz).toString();
}
params = property + "=" + value;
} else {
params = property + "=";
}
if (flag) {
requestURL.append("?").append(params);
flag = false;
} else {
requestURL.append("&").append(params);
}
}
} catch (Exception e) {
log.error("通过实体类获取URL出现异常:" + e.getMessage(), e);
}
return requestURL.toString();
}
/**
* 实体对象转成Map
* @param obj 实体对象
@@ -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,7 @@ public class ParamsCollectManifestVO {
private String targetConfigIds; // 引用参数专用
private String cut; // 引用参数专用
private String exportName; // 导出文件名
}
@@ -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);
}
@@ -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>
@@ -562,7 +562,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
}
updateById(sysUser);
this.baseMapper.updateByIdPP(sysUser);
}
@@ -35,7 +35,7 @@ import com.jero.common.aspect.annotation.AutoLog;
public class DocTranslationEOController extends JeroController<DocTranslationEO, IDocTranslationEOService> {
@Autowired
private IDocTranslationEOService docTranslationEOService;
/**
* 分页列表查询
*
@@ -51,11 +51,12 @@ public class DocTranslationEOController extends JeroController<DocTranslationEO,
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(pageList);
return Result.OK(cut,pageList);
}
/**
@@ -1,8 +1,6 @@
package com.jero.modules.docTranslation.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -15,8 +13,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 文档翻译表
@@ -66,7 +62,18 @@ public class DocTranslationEO implements Serializable {
@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;
@@ -77,16 +84,19 @@ public class DocTranslationEO implements Serializable {
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;
@@ -99,6 +109,7 @@ public class DocTranslationEO implements Serializable {
private java.util.Date translationTime;
/**发布情况*/
@Dict(dicCode = "release_condition")
@Excel(name = "发布情况", width = 15)
@ApiModelProperty(value = "发布情况")
private java.lang.String releaseCondition;
@@ -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;
}
}
@@ -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;
}
}
@@ -1,12 +1,19 @@
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.List;
import java.util.Date;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
/**
* @Description: 文档翻译表
@@ -15,6 +22,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 DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMapper, DocTranslationEO> implements IDocTranslationEOService {
/**
@@ -28,7 +36,16 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
Date now = new Date();
docTranslationEO.setCreateTime(now);
docTranslationEO.setUpdateTime(now);
save(docTranslationEO);
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);
}
/**
@@ -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;
}
}
@@ -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);
}
@@ -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;
}
}
@@ -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}")
@@ -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
@@ -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
@@ -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:
+9 -1
View File
@@ -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',
@@ -1165,4 +1166,11 @@ module.exports = {
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',
}
+8
View File
@@ -426,6 +426,7 @@ module.exports = {
MessageNotification: '消息通知',
SeeMore: '查看更多',
OperationSuccessful: '操作成功',
Intheexport: '导出中...',
operationFailed: '操作失败',
PersonnelSelection: '人员选择',
EmployeeNumber: '员工号',
@@ -1169,4 +1170,11 @@ module.exports = {
exportComparisonReport:'导出对比报告',
comparisonDifferenceComment:'对比差异评论',
fullTextComments:'全文评论',
fileDeclaration:'文件说明',
FileForDetails:'文件详情',
Converting:'转换中',
convertNetwork:'转换完成',
convertFailed:'转换失败',
standardData:'标准数据',
Theorganization:'组织机构',
}
@@ -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
@@ -3,7 +3,7 @@
<div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title">
<span>
{{$t('ParameteItemCollectionList')}}(Model - year market){{$t(this.paramsManifest.title)}}
{{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}){{$t(this.paramsManifest.title)}}
</span>
</div>
</div>
@@ -108,10 +108,10 @@
<!-- // 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>
@@ -120,18 +120,24 @@
<!-- <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('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>
@@ -141,16 +147,16 @@
<!-- {{$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>
@@ -192,6 +198,7 @@
<a-icon type="delete"/>
{{$t('CompulsoryWithdrawal')}}
</div>
<!-- 角色切换 -->
<div class="operator-text"
v-if="!this.$route.query.it"
@@ -264,13 +271,13 @@
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/>
</a-modal>
<!-- 下发收集--->
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" 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='600px' :footer="null">
<a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">
<task-time v-if='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
@@ -554,7 +561,8 @@
{
type: 'string',
value: 'paramsBatch',
text: this.$t('parameterBatch')
text: this.$t('parameterBatch'),
dictCode: 'params_batch'
},
],
selectedRowKeys: [],
@@ -799,6 +807,29 @@
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,
exportName:this.$route.query.projectName + '(' + this.$route.query.title + ')'
}
console.log(query)
getAction('/params/collectManifest/exportAll', query).then((res) => {
this.textLoading = false
})
},
// 高级搜索
handleSuperQuery(params, matchType) {
let sqp = {}
@@ -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 {
@@ -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>
+48 -2
View File
@@ -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">-->