对接文档翻译

This commit is contained in:
qq787203167
2022-07-26 16:43:04 +08:00
parent 4d523eddd8
commit 87de9dabe5
2 changed files with 28 additions and 8 deletions
@@ -42,7 +42,7 @@
<a-table
:columns="columns"
rowKey="id"
:scroll="{x: '100%',y:'calc(100vh - 430px)'}"
:scroll="{x: '100%',y:'calc(100vh - 440px)'}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' }"
@@ -68,7 +68,7 @@
<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-form-model-item class="itemModel-One" 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')"
@@ -78,7 +78,7 @@
<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-form-model-item class="itemModel-One" 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')"
@@ -111,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'),
@@ -191,6 +191,9 @@
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
searchQuery() {
this.pageNo = 1
@@ -216,7 +219,7 @@
let query = {
pageNo: pageNo + '',
pageSize: pageSize + '',
type: 'pdf',
type: 'doc',
...this.queryParam
}
this.loading = true
@@ -249,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 {
@@ -222,6 +222,7 @@
this.getList()
},
RetrieveFilesListForm() {
this.pageNo = 1
this.getList()
},
handleToggleSearch() {