布局文档翻译
This commit is contained in:
@@ -1142,4 +1142,7 @@ module.exports = {
|
||||
comparisonResults:'Comparison results',
|
||||
Published:'Published',
|
||||
initiateComparison:'Initiate comparison',
|
||||
translationLanguage:'Translation language',
|
||||
translationResults:'Translation results',
|
||||
conversionTime:'Conversion time',
|
||||
}
|
||||
@@ -1146,4 +1146,7 @@ module.exports = {
|
||||
comparisonResults:'对比结果',
|
||||
Published:'已发布',
|
||||
initiateComparison:'发起对比',
|
||||
translationLanguage:'翻译语言',
|
||||
translationResults:'翻译结果',
|
||||
conversionTime:'转换时间',
|
||||
}
|
||||
@@ -73,7 +73,7 @@
|
||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
|
||||
<a class="text-operation"
|
||||
@click="subscribe(record)">
|
||||
{{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
|
||||
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
|
||||
|
||||
@@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></j-input>
|
||||
</div>
|
||||
</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>
|
||||
<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>
|
||||
<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-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="initiatingProcessClick" class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('initiateComparison')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
<!-- -->
|
||||
<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>
|
||||
<a class="text-operation" @click="downloadData(record)">{{$t('download')}}</a>
|
||||
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.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="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
list: '',
|
||||
deleteBatch:'',
|
||||
},
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
queryParam: {},
|
||||
gatherResultList: [
|
||||
{
|
||||
value: '1',
|
||||
name: this.$t('draft')
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
name: this.$t('Published')
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'TextStatus'
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileName'
|
||||
},
|
||||
{
|
||||
title: this.$t('translationLanguage'),
|
||||
align: 'center',
|
||||
dataIndex: 'translationLanguage',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('translationResults'),
|
||||
align: 'center',
|
||||
dataIndex: 'translationResults',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('conversionTime'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'conversionTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('releaseSituation'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'releaseSituation'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 260,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
pageOnChange(page) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
queryParam[val] = queryParam[val].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
viewClick(row) {
|
||||
|
||||
},
|
||||
checkClick(row){
|
||||
|
||||
},
|
||||
downloadData(){
|
||||
|
||||
},
|
||||
subscribe() {
|
||||
|
||||
},
|
||||
initiatingProcessClick(){
|
||||
|
||||
},
|
||||
deleteData(val){
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
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: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user