合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!112
This commit is contained in:
+25
@@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
@@ -162,4 +164,27 @@ public class DocTranslationEOController extends JeroController<DocTranslationEO,
|
||||
return super.importExcel(request, response, DocTranslationEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新文档翻译表发布情况
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-批量更新发布情况")
|
||||
@ApiOperation(value="文档翻译表-批量更新发布情况", notes="文档翻译表-批量更新发布情况")
|
||||
@PostMapping(value = "/updateRleaseConditionBatch")
|
||||
public Result<?> 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -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)
|
||||
|
||||
+15
@@ -1,6 +1,8 @@
|
||||
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;
|
||||
|
||||
@@ -72,4 +74,17 @@ public interface IDocTranslationEOService extends IService<DocTranslationEO> {
|
||||
* @return
|
||||
*/
|
||||
IPage<DocTranslationEO> queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 批量更新发布情况
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> updateRleaseConditionBatch(JSONObject json);
|
||||
|
||||
/**
|
||||
* 查询文本状态下拉选项(文档库中,文件类型字段)
|
||||
* @return
|
||||
*/
|
||||
Result<?> queryTextStatusVal();
|
||||
}
|
||||
|
||||
+69
@@ -1,22 +1,33 @@
|
||||
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;
|
||||
@@ -34,6 +45,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMapper, DocTranslationEO> implements IDocTranslationEOService {
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -130,6 +143,62 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
});
|
||||
});
|
||||
IPage<DocTranslationEO> result = this.page(page, queryWrapper);
|
||||
disposeData(result.getRecords(),cut);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
public void disposeData(List<DocTranslationEO> 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<DocTranslationEO> docTranslationEOList = new ArrayList<>();
|
||||
|
||||
List<String> 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<OnlCgformField> fieldList = this.onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
List<OnlCgformField> 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1186,4 +1186,8 @@ module.exports = {
|
||||
translatedText:'Translated Text',
|
||||
Administrativeprivileges:'Administrativ Pprivileges',
|
||||
Checkthepermissions:'Check The Permissions',
|
||||
onlyFilesUploaded:'Only.Docx,.Doc files can be uploaded',
|
||||
selectDirectorylocation: 'Please select the directory location to add the folder',
|
||||
Fileuploaded:'File uploaded, please wait',
|
||||
uploadedbyyourself:'You can only delete files and data uploaded by yourself',
|
||||
}
|
||||
@@ -577,6 +577,7 @@ module.exports = {
|
||||
documentSplitTemplate: '文档拆分模板',
|
||||
batSetting: '批量设置',
|
||||
selectDirectoryTerms: '请选择添加条款的目录位置',
|
||||
selectDirectorylocation: '请选择添加文件夹的目录位置',
|
||||
OnlyWordItem: '只有GSO文件类型,才能拆分pdf文件,请重新选择文件',
|
||||
OnlyWord: '只能导入word文件',
|
||||
labelAreaDeleted: '若进行删除,则该展示区域下标签项都将被删除',
|
||||
@@ -1190,4 +1191,6 @@ module.exports = {
|
||||
translatedText:'译文',
|
||||
Administrativeprivileges:'管理权限',
|
||||
Checkthepermissions:'查看权限',
|
||||
onlyFilesUploaded:'只能上传.docx、.doc文件',
|
||||
uploadedbyyourself:'只能删除自己上传的文件数据',
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title">
|
||||
<a-upload-dragger
|
||||
accept='*.*'
|
||||
:accept='accept'
|
||||
:disabled="disabled"
|
||||
class="ant-upload-list"
|
||||
:class="{'uploadFile':isUploadFile}"
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
export default {
|
||||
name: 'file',
|
||||
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple'],
|
||||
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -48,7 +48,8 @@
|
||||
myfileList: [],
|
||||
isLoding: false,
|
||||
cut: '',
|
||||
multiple: true
|
||||
multiple: true,
|
||||
accept: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -67,6 +68,7 @@
|
||||
if (this.isMultiple) {
|
||||
this.multiple = false
|
||||
}
|
||||
this.accept = this.restrictUploads ? '.docx,.doc' : '*.*'
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods: {
|
||||
@@ -84,10 +86,23 @@
|
||||
},
|
||||
beforeUpload(file, fileList) {
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
console.log(file)
|
||||
this.fileTypeSatus = true
|
||||
if (this.isMultiple) {
|
||||
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 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
|
||||
}
|
||||
}
|
||||
|
||||
+37
-38
@@ -42,10 +42,10 @@
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: '100%'}"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 430px)'}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
@@ -69,37 +69,21 @@
|
||||
<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.sourceLanguage">
|
||||
<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>
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.sourceLanguage"
|
||||
@input="handleInput('sourceLanguage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="source_language"/>
|
||||
</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.targetLanguage">
|
||||
<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>
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.targetLanguage"
|
||||
@input="handleInput('targetLanguage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="target_language"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -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,24 @@
|
||||
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()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
@@ -222,13 +211,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: 'pdf',
|
||||
...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 +232,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
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<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-form-model-item class="itemModel" prop="serialNumber">
|
||||
<a-input class="box-input"
|
||||
readonly
|
||||
v-model="formInline.serialNumber"
|
||||
@@ -49,7 +49,7 @@
|
||||
<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-form-model-item class="itemModel" prop="textStatus">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('TextStatus')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
@@ -57,9 +57,9 @@
|
||||
v-model="formInline.textStatus">
|
||||
<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 }}
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.dbFieldTxt">
|
||||
{{ item.dbFieldTxt }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
@@ -72,45 +72,29 @@
|
||||
<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.sourceLanguage">
|
||||
<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 class="itemModel" style="width: calc(50% - 20px)" prop="sourceLanguage">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.sourceLanguage"
|
||||
@input="handleInput('sourceLanguage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="source_language"/>
|
||||
</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.targetLanguage">
|
||||
<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 class="itemModel" style="width: calc(50% - 20px)" prop="targetLanguage">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.targetLanguage"
|
||||
@input="handleInput('targetLanguage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('translationLanguage')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="target_language"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<uploadFile ref="uploadFile" :restrictUploads="true" :isMultiple="true" @uploadSuccess="uploadSuccess"/>
|
||||
<standardData ref="standardDataRef" @standardDataForm="standardDataForm"/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -140,28 +124,28 @@
|
||||
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'])
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -26,19 +26,10 @@
|
||||
<div class="title-text" :title="$t('translationResults')">
|
||||
<span>{{$t('translationResults')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('translationResults')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="queryParam.translationResult">
|
||||
<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>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.translationResult"
|
||||
:placeholder="$t('PleaseSelect')+$t('translationResults')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="translation_result"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
@@ -47,19 +38,10 @@
|
||||
<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.releaseCondition">
|
||||
<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>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.releaseCondition"
|
||||
:placeholder="$t('PleaseSelect')+$t('releaseSituation')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="release_condition"/>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
@@ -106,12 +88,17 @@
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
|
||||
<!-- <a class="text-operation" @click="checkClick(record)">{{$t('check')}}</a>-->
|
||||
<a class="text-operation"
|
||||
@click="subscribe(record)">
|
||||
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}}
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username"
|
||||
@click="subscribe(record)">
|
||||
{{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation" @click="downloadData(record)">{{$t('download')}}</a>
|
||||
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.translationResult == 'Translation done'"
|
||||
@click="downloadData(record)">{{$t('download')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseCondition == 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.length > 0">
|
||||
@@ -133,9 +120,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import addModel from './components/addModel'
|
||||
import RetrieveFilesList from './components/RetrieveFilesList'
|
||||
import eventBUs from '../../../common/event'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
@@ -147,8 +136,8 @@
|
||||
return {
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
list: '',
|
||||
deleteBatch: ''
|
||||
list: '/docTranslation/docTranslationEO/page',
|
||||
deleteBatch: '/docTranslation/docTranslationEO/deleteBatch'
|
||||
},
|
||||
toggleSearchStatus: false,
|
||||
loading: false,
|
||||
@@ -158,30 +147,7 @@
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
queryParam: {},
|
||||
gatherResultList: [
|
||||
{
|
||||
value: '1',
|
||||
name: this.$t('draft')
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
name: this.$t('Published')
|
||||
}
|
||||
],
|
||||
translationResultsList: [
|
||||
{
|
||||
value: '1',
|
||||
name: this.$t('Converting')
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
name: this.$t('convertNetwork')
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
name: this.$t('convertFailed')
|
||||
}
|
||||
],
|
||||
userInfoQuery: {},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
@@ -200,7 +166,7 @@
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'textStatus'
|
||||
dataIndex: 'textStatus_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
@@ -212,13 +178,13 @@
|
||||
{
|
||||
title: this.$t('translationLanguage'),
|
||||
align: 'center',
|
||||
dataIndex: 'targetLanguage',
|
||||
dataIndex: 'targetLanguage_dictText',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('translationResults'),
|
||||
align: 'center',
|
||||
dataIndex: 'translationResult',
|
||||
dataIndex: 'translationResult_dictText',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
@@ -233,7 +199,7 @@
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'releaseCondition'
|
||||
dataIndex: 'releaseCondition_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
@@ -247,9 +213,12 @@
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.userInfoQuery = this.userInfo()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
addModelForm() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
RetrieveFilesListForm() {
|
||||
@@ -311,11 +280,34 @@
|
||||
// checkClick(row) {
|
||||
//
|
||||
// },
|
||||
downloadData() {
|
||||
|
||||
downloadData(fileQuery) {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.targetFileId })
|
||||
},
|
||||
subscribe() {
|
||||
|
||||
subscribe(record) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: record.releaseCondition == 'draft' ? _this.$t('confirmRelease') : _this.$t('confirmWithdraw'),
|
||||
onOk() {
|
||||
let releaseCondition = ''
|
||||
if (record.releaseCondition == 'draft') {
|
||||
releaseCondition = 'published'
|
||||
} else {
|
||||
releaseCondition = 'draft'
|
||||
}
|
||||
let query = {
|
||||
releaseCondition: releaseCondition,
|
||||
ids: record.id
|
||||
}
|
||||
postAction('/docTranslation/docTranslationEO/updateRleaseConditionBatch', query).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
uploadClick() {
|
||||
this.$refs.addModelRef.add()
|
||||
@@ -324,14 +316,33 @@
|
||||
this.$refs.RetrieveFilesListRef.addModel()
|
||||
},
|
||||
BatchDelete() {
|
||||
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
deleteData(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
|
||||
@@ -1,96 +1,70 @@
|
||||
<template>
|
||||
<div>
|
||||
<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="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('fileName')">{{$t('fileName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="fileName">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('fileName')">
|
||||
{{ (formInline['fileName'] === 'null' || formInline['fileName'] === '' ||
|
||||
formInline['fileName'] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</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="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('fileDeclaration')">{{$t('fileDeclaration')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="region">
|
||||
<a-input class="box-input add-input"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('fileDeclaration')"
|
||||
v-model="formInline.description"/>
|
||||
</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('Openpersonnel')">{{$t('Openpersonnel')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-form-model-item class="itemModel" prop="description">-->
|
||||
<!-- <PersonnelSelection-->
|
||||
<!-- :query="{db_field_name:'Openpersonnel',db_field_txt:$t('Openpersonnel')}"-->
|
||||
<!-- :personneQuery="formInline"-->
|
||||
<!-- @change="PersonnelSelectionChange"-->
|
||||
<!-- v-model="formInline.Openpersonnel"/>-->
|
||||
<!-- </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('Downloadprivileges')">{{$t('Downloadprivileges')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-form-model-item class="itemModel" prop="description">-->
|
||||
<!-- <PersonnelSelection-->
|
||||
<!-- :query="{db_field_name:'Downloadprivileges',db_field_txt:$t('Downloadprivileges')}"-->
|
||||
<!-- :personneQuery="formInline"-->
|
||||
<!-- @change="PersonnelSelectionChange"-->
|
||||
<!-- v-model="formInline.lawEngineerName"/>-->
|
||||
<!-- </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>
|
||||
<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 :tip="this.$t('Fileuploaded')" :spinning='spinning'>
|
||||
<a-form>
|
||||
<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('fileName')">{{$t('fileName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="sourceFileId">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('sourceFileId')">
|
||||
{{ (formInline.sourceFileId === 'null' || formInline.sourceFileId === '' ||
|
||||
formInline.sourceFileId == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</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="Required">*</span>-->
|
||||
<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"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('fileDeclaration')"
|
||||
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('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<!-- <div class="loading-box" v-if="spinning">-->
|
||||
<!-- <div class="loading-content">-->
|
||||
<!-- <a-icon class="loading" type="loading"/>-->
|
||||
<!-- <div class="loading-tips">-->
|
||||
<!-- {{this.$t('Fileuploaded')}}...-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@@ -106,26 +80,29 @@ export default {
|
||||
PersonnelSelection,
|
||||
uploadFile
|
||||
},
|
||||
props: ['url'],
|
||||
// props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
spinning: false,
|
||||
visible: false,
|
||||
url: {
|
||||
add: 'params/template/add',
|
||||
edit: 'params/template/edit',
|
||||
},
|
||||
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' },
|
||||
// { required: true, message: this.$t('PleaseEnter')+this.$t('fileDeclaration'), trigger: 'blur' },
|
||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
state: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' },
|
||||
sourceFileId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('fileName') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
region: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('zoneOfApplication'), trigger: 'change' },
|
||||
]
|
||||
},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
@@ -162,7 +139,12 @@ export default {
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
if(this.spinning == true){
|
||||
this.visible = true
|
||||
return
|
||||
}else{
|
||||
this.visible = false
|
||||
}
|
||||
},
|
||||
handleSubmit() {
|
||||
if(this.formInline.paramsTemplateName !== undefined) {
|
||||
@@ -170,6 +152,7 @@ export default {
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.spinning = true
|
||||
let url = ''
|
||||
let Action
|
||||
if (this.formInline.id) {
|
||||
@@ -185,14 +168,14 @@ export default {
|
||||
query[res] = query[res].join(',')
|
||||
}
|
||||
})
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.spinning = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('addModelList')
|
||||
} else {
|
||||
this.spinning = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
@@ -357,4 +340,40 @@ export default {
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
.loading-box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999900;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 8px;
|
||||
user-select: none;
|
||||
|
||||
.loading-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
color: #21c9cc;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
|
||||
.loading {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.spin-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
.loading-tips {
|
||||
margin-top: 5px;
|
||||
font-size: 16px;
|
||||
color: #21c9cc;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -164,7 +164,7 @@
|
||||
/>
|
||||
</div>
|
||||
<!-- 上传文件-->
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<addModel ref="addModelRef" @addModelList="addModelList"/>
|
||||
<!-- 文件详情-->
|
||||
<handleModel :url="url" ref="handleModelRef" />
|
||||
<!-- 添加节点-->
|
||||
@@ -189,14 +189,14 @@
|
||||
<a-form-model-item :label="$t('Foldername')" prop="name">
|
||||
<a-input class="box-input add-input" v-model="form.name" :placeholder="$t('PleaseEnter')+$t('Foldername')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Administrativeprivileges')" prop="itemName">
|
||||
<a-form-model-item :label="$t('Administrativeprivileges')" prop="Administrativeprivileges">
|
||||
<PersonnelSelection class="box-input add-input"
|
||||
:personneQuery="form"
|
||||
:query="{db_field_name:'Administrativeprivileges',db_field_txt:$t('Administrativeprivileges')}"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="form.Administrativeprivileges"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Checkthepermissions')" prop="itemName">
|
||||
<a-form-model-item :label="$t('Checkthepermissions')" prop="Checkthepermissions">
|
||||
<PersonnelSelection
|
||||
class="box-input add-input"
|
||||
:personneQuery="form"
|
||||
@@ -283,15 +283,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' },
|
||||
]
|
||||
},
|
||||
@@ -809,8 +811,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 = []
|
||||
@@ -959,7 +968,7 @@ export default {
|
||||
if (this.menuId) {
|
||||
this.$refs.addModelRef.addModel()
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||
this.$message.warning(this.$t('selectDirectorylocation'))
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="Virtual-detail-header" style="position: fixed;top: 0">
|
||||
<div class="Virtual-detail-title">
|
||||
<span>
|
||||
{{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.paramsManifest.title)}}
|
||||
{{$t('ParameteItemCollectionList')}}({{$t(this.$route.query.projectName)}}) — {{$t(this.$route.query.title)}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -198,7 +198,7 @@
|
||||
</div>
|
||||
<!-- 强制撤回-->
|
||||
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text"
|
||||
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt" ||currentPersonRole == "dre"'>
|
||||
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
|
||||
<a-icon type="delete"/>
|
||||
{{$t('CompulsoryWithdrawal')}}
|
||||
</div>
|
||||
@@ -648,7 +648,6 @@
|
||||
mounted() {
|
||||
this.GetgetLoginUserType()
|
||||
console.log(this.currentPersonRole)
|
||||
this.LoginUserType()
|
||||
setTimeout(() => {
|
||||
if (this.currentPersonRole == 'dre') {
|
||||
this.handlePreservation()
|
||||
@@ -1035,12 +1034,12 @@
|
||||
this.currentPersonRole = currentPersonRole || userType || val[0].value
|
||||
}
|
||||
this.RoleType = val
|
||||
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
|
||||
val.forEach((item,index) => {
|
||||
this.RoleType.forEach((item,index) => {
|
||||
if(item.value == this.currentPersonRole){
|
||||
this.rolename = item.label
|
||||
}
|
||||
})
|
||||
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
|
||||
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
|
||||
},
|
||||
// 表格所选中得行内容
|
||||
|
||||
Reference in New Issue
Block a user