diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql index 7b38ef329..6722f97f8 100644 --- a/jero-boot/db/蔚来标准sql/dev_third_record.sql +++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql @@ -440,7 +440,7 @@ CREATE TABLE `laws_weilai`.`doc_translation` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文档翻译表' ROW_FORMAT = Dynamic; --- 文档翻译-源语言数据字典 +-- 文档翻译-源语言数据字典 2022-7-25 已同步生产环境 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'); @@ -459,7 +459,7 @@ INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_v 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'); --- 文档翻译-目标语言数据字典 +-- 文档翻译-目标语言数据字典 2022-7-25 已同步生产环境 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'); @@ -478,19 +478,19 @@ INSERT INTO `laws_weilai`.`sys_dict_item` (`id`, `dict_id`, `item_text`, `item_v 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'); --- 文档翻译-发布情况数据字典 +-- 文档翻译-发布情况数据字典 2022-7-25 已同步生产环境 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'); --- 文档翻译-翻译结果数据字典 +-- 文档翻译-翻译结果数据字典 2022-7-25 已同步生产环境 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'); --- 文档翻译表-增加字段 编号、标题 +-- 文档翻译表-增加字段 编号、标题 2022-7-25 已同步生产环境 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`; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index 78ca3a4a4..4456a79fb 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -1544,7 +1544,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl msgMap = new HashMap<>(); msgMap.put("nioNumber", paramsCollectManifestEO.getNioNumber()); msgMap.put("state", paramsCollectManifestEO.getState()); - msgMap.put("state", "1"); + msgMap.put("type", "1"); msgMapList.add(msgMap); } @@ -1581,6 +1581,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = docTranslationEOService.page(page, queryWrapper); + IPage pageList = docTranslationEOService.queryPageList(docTranslationEO,pageNo,pageSize,cut,req); return Result.OK(cut,pageList); } @@ -168,4 +164,27 @@ public class DocTranslationEOController extends JeroController updateRleaseConditionBatch(@RequestBody JSONObject json) { + return this.docTranslationEOService.updateRleaseConditionBatch(json); + } + + /** + * 批量更新文档翻译表状态 + * @return + */ + @AutoLog(value = "文档翻译表-查询文本状态下拉选项") + @ApiOperation(value="文档翻译表-查询文本状态下拉选项", notes="文档翻译表-查询文本状态下拉选项") + @GetMapping(value = "/queryTextStatusVal") + public Result queryTextStatusVal() { + return this.docTranslationEOService.queryTextStatusVal(); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java index 442d9d205..dd63d984e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/entity/DocTranslationEO.java @@ -2,6 +2,7 @@ package com.jero.modules.docTranslation.entity; import java.io.Serializable; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -73,10 +74,12 @@ public class DocTranslationEO implements Serializable { private String title; /**文本状态*/ - @Dict(dicCode = "state") + //@Dict(dicCode = "state") @Excel(name = "文本状态", width = 15) @ApiModelProperty(value = "文本状态") private java.lang.String textStatus; + @TableField(exist = false) + private String textStatus_dictText; /**文件名称*/ @Excel(name = "文件名称", width = 15) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/IDocTranslationEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/IDocTranslationEOService.java index 432741eb5..1e24dd388 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/IDocTranslationEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/IDocTranslationEOService.java @@ -1,7 +1,12 @@ package com.jero.modules.docTranslation.service; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.common.api.vo.Result; import com.jero.modules.docTranslation.entity.DocTranslationEO; import com.baomidou.mybatisplus.extension.service.IService; + +import javax.servlet.http.HttpServletRequest; import java.util.List; /** @@ -58,4 +63,28 @@ public interface IDocTranslationEOService extends IService { * @return */ List queryList(); + + /** + * 分页查询 + * @param docTranslationEO + * @param pageNo + * @param pageSize + * @param cut + * @param req + * @return + */ + IPage queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req); + + /** + * 批量更新发布情况 + * @param json + * @return + */ + Result updateRleaseConditionBatch(JSONObject json); + + /** + * 查询文本状态下拉选项(文档库中,文件类型字段) + * @return + */ + Result queryTextStatusVal(); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java index 20b0115d2..704dd7c20 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/docTranslation/service/impl/DocTranslationEOServiceImpl.java @@ -1,20 +1,40 @@ package com.jero.modules.docTranslation.service.impl; +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.api.vo.Result; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.constant.enums.ModuleEnum; +import com.jero.common.system.query.QueryGenerator; +import com.jero.common.system.vo.LoginUser; +import com.jero.generater.modules.online.cgform.entity.OnlCgformField; +import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; 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.document.enums.FieldTypeEnum; import com.jero.modules.oss.entity.OSSFile; +import me.zhyd.oauth.utils.StringUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; 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; + /** * @Description: 文档翻译表 * @Author: jero-boot @@ -25,6 +45,8 @@ import org.springframework.transaction.annotation.Transactional; @Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class DocTranslationEOServiceImpl extends ServiceImpl implements IDocTranslationEOService { + @Autowired + private OnlCgformFieldServiceImpl onlCgformFieldService; /** * 保存 * @@ -103,4 +125,80 @@ public class DocTranslationEOServiceImpl extends ServiceImpl queryList() { return list(); } + + @Override + public IPage queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap()); + // 获取当前登录人 + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + /** + * 数据权限:自己创建的、或发布情况为“已发布”的数据 + */ + queryWrapper.lambda().and(query -> { + query.eq(DocTranslationEO::getCreateBy,currentUser.getUsername()); + query.or(o -> { + o.eq(DocTranslationEO::getReleaseCondition,ReleaseConditionEnum.PUBLISHED.getValue()); + }); + }); + IPage result = this.page(page, queryWrapper); + disposeData(result.getRecords(),cut); + return result; + } + + /** + * 处理数据 + * @param datas + * @param cut + */ + public void disposeData(List datas,String cut){ + if(CollectionUtils.isNotEmpty(datas)){ + for (DocTranslationEO data : datas) { + String textStatus_dictText = ""; + OnlCgformField fileTypeField = this.onlCgformFieldService.queryById(data.getTextStatus()); + if (ObjectUtil.isNotEmpty(fileTypeField)) { + if (CutEnum.CN.getValue().equals(cut)) { + textStatus_dictText = fileTypeField.getDbFieldTxt(); + } else { + textStatus_dictText = fileTypeField.getDbFieldEnName(); + } + } + data.setTextStatus_dictText(textStatus_dictText); + } + } + } + + @Override + public Result updateRleaseConditionBatch(JSONObject json) { + String ids = json.getString("ids"); + // 值对应枚举类 ReleaseConditionEnum 发布published 或撤回draft + String releaseCondition = json.getString("releaseCondition"); + if (StringUtils.isNotEmpty(ids)) { + List docTranslationEOList = new ArrayList<>(); + + List idList = Arrays.asList(ids.split(",")); + idList.forEach(id -> { + DocTranslationEO docTranslationEO = new DocTranslationEO(); + docTranslationEO.setId(id); + docTranslationEO.setReleaseCondition(releaseCondition); + docTranslationEOList.add(docTranslationEO); + }); + this.updateBatchById(docTranslationEOList); + } + return new Result<>().success("操作成功!"); + } + + @Override + public Result queryTextStatusVal() { + List fieldList = this.onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); + List result = fieldList.stream().filter(field -> { + boolean flag = false; + if(org.apache.commons.lang3.StringUtils.equals(field.getFieldShowType(), FieldTypeEnum.FILE.getValue())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + return Result.OK(result); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index a56b95bbc..55d9aa986 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -3189,7 +3189,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl 1) { - this.$message.warning('只能上传一个文件') + this.$message.warning(this.$t('onlyOnefileUploaded')) + return false + } + } + if (this.restrictUploads) { + let fileName = file.name + let index1 = fileName.lastIndexOf('.') + let index2 = fileName.length + let fileSuffix = fileName.substring(index1, index2) + if (fileSuffix == '.docx' || fileSuffix == '.doc') { + + } else { + this.$message.warning(this.$t('onlyFilesUploaded')) return false } } diff --git a/jero-web/src/config/router.config.js b/jero-web/src/config/router.config.js index be6370596..b4a8ba6b4 100644 --- a/jero-web/src/config/router.config.js +++ b/jero-web/src/config/router.config.js @@ -387,6 +387,11 @@ export const constantRouterMap = [ name: 'initiateDocumentComparison', component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/initiateComparison') }, + { + path: '/documentTranslationResults', + name: 'documentTranslationResults', + component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentTranslation/components/documentTranslationResults') + }, { path: '/documentDataComparison', name: 'documentDataComparison', diff --git a/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue b/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue index 7237ce8f6..b4883eed1 100644 --- a/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue +++ b/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue @@ -42,10 +42,10 @@ @@ -68,38 +68,22 @@ * {{$t('translationLanguage')}} - - - - - {{ item.name }} - - - + + - - - - - {{ item.name }} - - - + + @@ -127,14 +111,14 @@ selectedRowKeys: [], formInline: {}, rules: { - translationLanguage: [ + sourceLanguage: [ { required: true, message: this.$t('translationLanguage') + this.$t('cannotEmpty'), trigger: 'change' } ], - translationLanguageOne: [ + targetLanguage: [ { required: true, message: this.$t('translationLanguage') + this.$t('cannotEmpty'), @@ -166,19 +150,19 @@ }, { title: this.$t('TextStatus'), - dataIndex: 'TextStatus', + dataIndex: 'state', align: 'center', ellipsis: true }, { title: this.$t('fileName'), - dataIndex: 'fileName', + dataIndex: 'file_name', align: 'center', ellipsis: true }, { title: this.$t('textInformation'), - dataIndex: 'textInformation', + dataIndex: 'text_info', align: 'center', ellipsis: true } @@ -189,19 +173,27 @@ pageNo: 1, pageSize: 10, total: 0, - fieldList: [], - queryConditionVOList: [] + selectedRowKeysRecord: [] } }, mounted() { }, methods: { + handleInput(value) { + this.$nextTick(() => { + this.formInline = { ...this.formInline } + this.$refs.ruleForm.validateField([value]) + }) + }, addModel() { this.visible = true this.queryParam = {} this.selectedRowKeys = [] - // this.replacePage() + this.replacePage() + this.$nextTick(() => { + this.$refs.ruleForm.clearValidate() + }) }, searchQuery() { this.pageNo = 1 @@ -222,13 +214,16 @@ this.replacePage() }, replacePage() { + let pageNo = JSON.parse(JSON.stringify(this.pageNo)) + let pageSize = JSON.parse(JSON.stringify(this.pageSize)) let query = { - pageNo: this.pageNo, - pageSize: this.pageSize, + pageNo: pageNo + '', + pageSize: pageSize + '', + type: 'doc', ...this.queryParam } this.loading = true - postAction('', query).then((res) => { + postAction('document/bussDocumentLibraryEO/ocrPageInfo', query).then((res) => { if (res.success) { this.dataList = res.result.records || [] this.total = res.result.total @@ -240,8 +235,15 @@ } }) }, - onSelectChange(value) { + onSelectChange(value, record) { 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 @@ -250,9 +252,25 @@ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.$refs.ruleForm.validate(valid => { if (valid) { + let query = { + ...this.formInline, + serialNumber: this.selectedRowKeysRecord[0].serial_number, + title: this.selectedRowKeysRecord[0].title, + fileName: this.selectedRowKeysRecord[0].file_name, + textStatus: this.selectedRowKeysRecord[0].text_info_id + } this.confirmLoading = true - let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - this.visible = false + postAction('/docTranslation/docTranslationEO/add', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.confirmLoading = false + this.$emit('RetrieveFilesListForm') + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false + } + }) } }) } else { diff --git a/jero-web/src/views/documentTools/documentTranslation/components/addModel.vue b/jero-web/src/views/documentTools/documentTranslation/components/addModel.vue index 2838e708c..c13dbc0ca 100644 --- a/jero-web/src/views/documentTools/documentTranslation/components/addModel.vue +++ b/jero-web/src/views/documentTools/documentTranslation/components/addModel.vue @@ -18,11 +18,11 @@ {{$t('file')}} - + - {{ (formInline.file === 'null' || formInline.file === '' || - formInline.file == null) ? $t('clickUpload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('sourceFileId')"> + {{ (formInline.sourceFileId === 'null' || formInline.sourceFileId === '' || + formInline.sourceFileId == null) ? $t('clickUpload') : $t('viewUploadedFiles') }} @@ -34,10 +34,10 @@ * {{$t('standard')}} - + @@ -49,17 +49,17 @@ * {{$t('TextStatus')}} - + + v-model="formInline.textStatus"> - - {{ item.name }} + :value="item.id"> + + {{ item.dbFieldTxt }} @@ -72,45 +72,29 @@ * {{$t('translationLanguage')}} - - - - - {{ item.name }} - - - + + - - - - - {{ item.name }} - - - + + - + @@ -133,35 +117,35 @@ confirmLoading: false, formInline: {}, rules: { - file: [ + sourceFileId: [ { required: true, message: this.$t('file') + this.$t('cannotEmpty'), trigger: 'change' } ], - standard: [ + serialNumber: [ { required: true, message: this.$t('standard') + this.$t('cannotEmpty'), trigger: 'change' } ], - translationResults: [ + textStatus: [ { required: true, message: this.$t('TextStatus') + this.$t('cannotEmpty'), trigger: 'change' } ], - translationLanguage: [ + sourceLanguage: [ { required: true, message: this.$t('translationLanguage') + this.$t('cannotEmpty'), trigger: 'change' } ], - translationLanguageOne: [ + targetLanguage: [ { required: true, message: this.$t('translationLanguage') + this.$t('cannotEmpty'), @@ -175,8 +159,18 @@ } }, mounted() { + this.getTextStatus() }, methods: { + getTextStatus() { + getAction('/docTranslation/docTranslationEO/queryTextStatusVal', {}).then((res) => { + if (res.success) { + this.translationResultsList = res.result || [] + } else { + this.translationResultsList = [] + } + }) + }, add() { this.visible = true this.formInline = {} @@ -193,18 +187,16 @@ 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) => { + postAction('/docTranslation/docTranslationEO/add', query).then((res) => { if (res.success) { this.$message.success(this.$t('OperationSuccessful')) this.visible = false this.confirmLoading = false - this.$emit('batSettingList') + this.$emit('addModelForm') } else { this.$message.warning(this.$t('operationFailed')) this.confirmLoading = false @@ -232,20 +224,36 @@ /** 上传文件的回调 */ uploadSuccess(data) { let attIdList = [] + let fileName = [] if (data && data.length > 0) { data.map(item => { attIdList.push(item.id || data.name) + fileName.push(item.fileName) }) } /** 赋值给当前对应的表单文件 */ this.formInline[this.uploadName] = attIdList.join(',') + this.formInline.fileName = fileName.join(',') this.formInline = { ...this.formInline } + this.$nextTick(() => { + if (this.formInline[this.uploadName]) { + this.$refs.ruleForm.validateField([this.uploadName]) + } + }) }, standardClick() { this.$refs.standardDataRef.addModel() }, - standardDataForm() { - + standardDataForm(row) { + this.formInline.serialNumber = row.serial_number + this.formInline.title = row.title + this.formInline.bussDocumentLibraryId = row.id + this.formInline = { ...this.formInline } + this.$nextTick(() => { + if (this.formInline.serialNumber) { + this.$refs.ruleForm.validateField(['serialNumber']) + } + }) } } } diff --git a/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue b/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue new file mode 100644 index 000000000..0247520ec --- /dev/null +++ b/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue @@ -0,0 +1,234 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/documentTools/documentTranslation/components/standardData.vue b/jero-web/src/views/documentTools/documentTranslation/components/standardData.vue index 9ba6c282c..4ea4ffa48 100644 --- a/jero-web/src/views/documentTools/documentTranslation/components/standardData.vue +++ b/jero-web/src/views/documentTools/documentTranslation/components/standardData.vue @@ -157,7 +157,7 @@ total: 0, fieldList: [], queryConditionVOList: [], - selectedRowKeysRecord:[], + selectedRowKeysRecord: [] } }, mounted() { @@ -214,12 +214,12 @@ } }) }, - onSelectChange(value) { + onSelectChange(value,record) { this.selectedRowKeys = value if (this.selectedRowKeys.length > 1) { this.selectedRowKeys.shift() } - this.selectedRowKeysRecord = record.filter(res=>{ + this.selectedRowKeysRecord = record.filter(res => { return res.id == this.selectedRowKeys[0] }) this.selectedRowKeysRecord = [...this.selectedRowKeysRecord] @@ -229,8 +229,7 @@ }, handleSubmit() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - this.confirmLoading = true - let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + this.$emit('standardDataForm', this.selectedRowKeysRecord[0]) this.visible = false } else { this.$message.warning(this.$t('selectLeastOne')) diff --git a/jero-web/src/views/documentTools/documentTranslation/index.vue b/jero-web/src/views/documentTools/documentTranslation/index.vue index fddde2cf3..367a303da 100644 --- a/jero-web/src/views/documentTools/documentTranslation/index.vue +++ b/jero-web/src/views/documentTools/documentTranslation/index.vue @@ -26,19 +26,10 @@
{{$t('translationResults')}}
- - - - {{ item.name }} - - - + @@ -105,13 +87,18 @@ {{$t('view')}} - {{$t('check')}} - - {{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}} + + + {{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}} - {{$t('download')}} - {{$t('delete')}} + {{$t('download')}} + {{$t('delete')}}
@@ -133,9 +120,11 @@ @@ -306,4 +340,40 @@ export default { .ant-input-disabled { color: rgba(0, 0, 0, 0.65) !important; } + + \ No newline at end of file diff --git a/jero-web/src/views/externalReports/index.vue b/jero-web/src/views/externalReports/index.vue index f261141e4..95b590d0a 100644 --- a/jero-web/src/views/externalReports/index.vue +++ b/jero-web/src/views/externalReports/index.vue @@ -8,7 +8,6 @@ - {{$t('newNode')}} + {{$t('Addingfolder')}} + + {{$t('Addingsubfolders')}} - {{$t('modifyNode')}} + {{$t('Editfolder')}} {{$t('deleteNode')}} - - {{$t('add')}} + v-has="'split:sarFileSplitMenu:delete'">{{$t('Deletefolders')}} + @@ -90,7 +90,7 @@
{{ $t('uploadTime') }}
- - {{$t('view')}} + {{$t('download')}} {{$t('edit')}} {{$t('delete')}} @@ -163,13 +163,14 @@ />
- + - - + + - - + + - - + + + + + @@ -220,13 +233,14 @@ import Vue from 'vue' import moment from 'moment' import eventBUs from '@/common/event' import { mapGetters } from 'vuex' +import PersonnelSelection from '@/components/PersonnelSelection/index' export default { name: 'SplitDetail', components: { addModel, handleModel, - // exportTree, + PersonnelSelection, globalAdvancedQuery // ImportFile }, @@ -242,6 +256,7 @@ export default { }, pageSize: 10, pageNo: 1, + disabled:false, total: 0, tableData: [], selectedRowKeys: [], @@ -267,15 +282,17 @@ export default { form: {}, rules: { name: [ - { required: true, message: this.$t('PleaseEnter') + this.$t('clauseNo'), trigger: 'blur' }, - { min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' } + { required: true, message: this.$t('PleaseEnter') + this.$t('Foldername'), trigger: 'blur' }, + { min: 1, max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' } ], - itemName: [ - { required: true, message: this.$t('PleaseEnter') + this.$t('clauseName'), trigger: 'blur' }, - { min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' } + Administrativeprivileges: [ + { required: true, message: this.$t('PleaseSelect') + this.$t('Administrativeprivileges'), trigger: 'change' }, + ], + Checkthepermissions: [ + { required: true, message: this.$t('PleaseSelect') + this.$t('Checkthepermissions'), trigger: 'change' }, ], displaySeq: [ - { required: true, message: this.$t('PleaseEnter') + this.$t('serialNumber'), trigger: 'blur' } + { required: true, message: this.$t('PleaseEnter') + this.$t('Folderorder'), trigger: 'blur' } // { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' }, ] }, @@ -393,6 +410,10 @@ export default { this.contentVisible = true this.contentValue = val }, + PersonnelSelectionChange(value, id) { + this.form[value] = id + this.form = { ...this.form } + }, //关闭条款内容弹框 handleCancel() { this.contentVisible = false @@ -549,12 +570,18 @@ export default { }, //树形新增 orgAdd() { - this.menuTitle = this.$t('add') + this.menuTitle = this.$t('Addingfolder') this.isEdit = false this.form = {} this.menuRightVisible = true }, + orgAdds(){ + this.menuTitle = this.$t('Addingsubfolders') + this.isEdit = false + this.form = {} + this.menuRightVisible = true + }, //树形修改 orgEdit() { this.menuTitle = this.$t('edit') @@ -603,7 +630,7 @@ export default { handleCancelMenuRight() { this.menuRightVisible = false }, - //增加条款确定 + //增加文件夹确定 hideModalMenuRight() { let expandId = [] @@ -783,8 +810,15 @@ export default { downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query, this.selectClear) }, - onChange(){ - + onChange(value,dateString){ + if (this.queryParams.uploadTime && this.queryParams.uploadTime.length > 0) { + let dateOne = moment(dateString[0]).format('YYYY-MM-DD') + let dateTwo = moment(dateString[1]).format('YYYY-MM-DD') + this.queryParams.uploadTime = [dateOne, dateTwo] + } else { + this.queryParams.uploadTime = [] + // this.queryParamOne[item + '_name'] = [] + } }, selectClear() { this.$refs.splitDetailTabel.selectedRowKeys = [] @@ -930,7 +964,12 @@ export default { }, // 上传文件 handleuploadFile(e) { - this.$refs.addModelRef.addModel() + if (this.menuId) { + this.$refs.addModelRef.addModel() + } else { + this.$message.warning(this.$t('selectDirectorylocation')) + } + }, onSearch() { let self = this diff --git a/jero-web/src/views/parameter/managementdetails/commponts/conventionalmodle.vue b/jero-web/src/views/parameter/managementdetails/commponts/conventionalmodle.vue index ead1ddc77..56a23cacc 100644 --- a/jero-web/src/views/parameter/managementdetails/commponts/conventionalmodle.vue +++ b/jero-web/src/views/parameter/managementdetails/commponts/conventionalmodle.vue @@ -17,6 +17,7 @@
+ * {{$t('certificationCategory')}}
@@ -35,6 +36,7 @@
+ * {{$t('configure')}}
@@ -59,6 +61,7 @@
+ * {{$t('WhetherMergeParameters')}}
diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 682fbe51a..9ed4581f4 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -3,7 +3,7 @@
- {{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.paramsManifest.title)}} + {{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.$route.query.title)}}
@@ -108,7 +108,7 @@ - +