修改文档库的中英文切换

This commit is contained in:
qq787203167
2022-03-01 14:24:34 +08:00
parent 40c13f8731
commit e214d98d16
12 changed files with 59 additions and 32 deletions
+14 -1
View File
@@ -361,5 +361,18 @@ module.exports = {
BatchCancel:'Batch cancel collection', BatchCancel:'Batch cancel collection',
SubscriptionManagement:'Subscription domain management', SubscriptionManagement:'Subscription domain management',
BatchCancellation:'Batch cancellation', BatchCancellation:'Batch cancellation',
clickUpload:'Click upload',
viewUploadedFiles:'View uploaded files',
standardSelection:'Standard selection',
Collection:'Collection',
CancelCollection:'Cancel collection',
deleteLib:'delete',
subscribe:'Subscribe',
CancelSubscribe:'Cancel Subscribe',
ConfirmCollection:'Confirm collection ?',
cancelConfirmCollection:'Are you sure you want to cancel the collection',
ConfirmSubscribe:'Confirm Subscribe ?',
cancelConfirmSubscribe:'Are you sure you want to cancel the subscribe',
ConfirmDelete:'Confirm Delete ?',
ConfirmBatchDeletion:'Confirm Batch Deletion ? ',
} }
+14
View File
@@ -365,4 +365,18 @@ module.exports = {
BatchCancellation:'批量取消', BatchCancellation:'批量取消',
enterMenuEnName:'请输入菜单英文名称', enterMenuEnName:'请输入菜单英文名称',
MenuEnName:'菜单英文名称', MenuEnName:'菜单英文名称',
clickUpload:'点击上传',
viewUploadedFiles:'查看已上传文件',
standardSelection:'标准选择',
Collection:'收藏',
CancelCollection:'取消收藏',
deleteLib:'删除',
subscribe:'订阅',
CancelSubscribe:'取消订阅',
ConfirmCollection:'确定收藏?',
cancelConfirmCollection:'确定取消收藏?',
ConfirmSubscribe:'确定订阅?',
cancelConfirmSubscribe:'确定取消订阅?',
ConfirmDelete:'确定删除?',
ConfirmBatchDeletion:'确定批量删除?',
} }
@@ -9,11 +9,11 @@
<a-input class="box-input" :value="value" @input="indexclick($event)" <a-input class="box-input" :value="value" @input="indexclick($event)"
:placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/> :placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/>
<a-button type="primary" class="button-box" @click="standardClick"> <a-button type="primary" class="button-box" @click="standardClick">
标准选择 {{this.$t('standardSelection')}}
</a-button> </a-button>
</div> </div>
<a-drawer <a-drawer
:title="'标准选择'" :title="$t('standardSelection')"
:maskClosable="false" :maskClosable="false"
:width="1000" :width="1000"
placement="right" placement="right"
@@ -61,7 +61,7 @@
export default { export default {
name: 'index', name: 'index',
components:{ components: {
currencySearch currencySearch
}, },
props: ['query', 'value', 'replace_standard_id'], props: ['query', 'value', 'replace_standard_id'],
+1 -1
View File
@@ -107,7 +107,7 @@
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload(item.db_field_name)"> @click="clickButtonToUpload(item.db_field_name)">
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' || {{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
formInline[item.db_field_name] == null) ? '点击上传' : '查看已上传文件' formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
@@ -69,10 +69,10 @@
methods: { methods: {
initDictData() { initDictData() {
//优先从缓存中读取字典配置 //优先从缓存中读取字典配置
if(getDictItemsFromCache(this.dictCode)){ /* if(getDictItemsFromCache(this.dictCode)){
this.dictOptions = getDictItemsFromCache(this.dictCode); this.dictOptions = getDictItemsFromCache(this.dictCode);
return return
} }*/
//根据字典Code, 初始化字典数组 //根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
@@ -88,11 +88,11 @@
this.dictOptions = [...this.options] this.dictOptions = [...this.options]
}else{ }else{
//优先从缓存中读取字典配置 //优先从缓存中读取字典配置
let cacheOption = getDictItemsFromCache(this.dictCode) // let cacheOption = getDictItemsFromCache(this.dictCode)
if(cacheOption && cacheOption.length>0){ // if(cacheOption && cacheOption.length>0){
this.dictOptions = cacheOption // this.dictOptions = cacheOption
return // return
} // }
//根据字典Code, 初始化字典数组 //根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => { ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) { if (res.success) {
@@ -112,7 +112,7 @@
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload(item.db_field_name)"> @click="clickButtonToUpload(item.db_field_name)">
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' || {{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
formInline[item.db_field_name] == null) ? '点击上传' : '查看已上传文件' formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
@@ -590,7 +590,7 @@
.button-text { .button-text {
height: 38px; height: 38px;
width: calc(100% - 120px); width: calc(100% - 100px);
line-height: 38px; line-height: 38px;
background: #fff; background: #fff;
border: 1px #00B3BE solid; border: 1px #00B3BE solid;
+1 -1
View File
@@ -53,7 +53,7 @@
</div> </div>
</template> </template>
</a-col> </a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button> <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-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
+4 -4
View File
@@ -15,11 +15,11 @@
<span slot="operation" slot-scope="record"> <span slot="operation" slot-scope="record">
<a class="text" v-for="(ol,index) in OperationList" <a class="text" v-for="(ol,index) in OperationList"
@click="OperationClick(ol,record)"> @click="OperationClick(ol,record)">
<span v-if="ol.text == '取消收藏'"> <span v-if="ol.text == $t('CancelCollection')">
{{!record.collectFlag || record.collectFlag == 0 ? '收藏' :'取消收藏'}} {{!record.collectFlag || record.collectFlag == 0 ? $t('Collection') :$t('CancelCollection')}}
</span> </span>
<span v-else-if="ol.text == '取消订阅'"> <span v-else-if="ol.text == $t('CancelSubscribe')">
{{!record.subscribeFlag || record.subscribeFlag == 0 ? '订阅' :'取消订阅'}} {{!record.subscribeFlag || record.subscribeFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</span> </span>
<span v-else> <span v-else>
{{ol.text}} {{ol.text}}
+2 -2
View File
@@ -14,7 +14,7 @@
:remove='remove' :remove='remove'
@change="handleChange"> @change="handleChange">
<p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p> <p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p>
<p class="ant-upload-text" style="font-size: 14px;line-height: 30px">点击上传</p> <p class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{this.$t('clickUpload')}}</p>
</a-upload-dragger> </a-upload-dragger>
</a-modal> </a-modal>
</div> </div>
@@ -29,7 +29,7 @@
data(){ data(){
return{ return{
visible:false, visible:false,
title:'上传文件', title:this.$t('clickUpload'),
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload", uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
myuploadAction:window._CONFIG['domianURL']+this.thisFileUploadUrl, myuploadAction:window._CONFIG['domianURL']+this.thisFileUploadUrl,
upDataList:[], upDataList:[],
@@ -90,19 +90,19 @@
return { return {
OperationList: [ OperationList: [
{ {
text: '取消收藏', text: this.$t('CancelCollection'),
ClickEvent: 'Collection' ClickEvent: 'Collection'
}, },
{ {
text: '取消订阅', text: this.$t('CancelSubscribe'),
ClickEvent: 'subscribe' ClickEvent: 'subscribe'
}, },
{ {
text: '编辑', text: this.$t('edit'),
ClickEvent: 'editTable' ClickEvent: 'editTable'
}, },
{ {
text: '删除', text: this.$t('deleteLib'),
ClickEvent: 'deleteTable' ClickEvent: 'deleteTable'
} }
], ],
@@ -146,7 +146,7 @@
let query = { let query = {
...this.$refs.searchRef.queryParam, ...this.$refs.searchRef.queryParam,
id: this.idList.join(','), id: this.idList.join(','),
flag:'file' flag: 'file'
} }
downloadFile('document/bussDocumentLibraryEO/exportZip', '文档库.zip', query, this.Deselect) downloadFile('document/bussDocumentLibraryEO/exportZip', '文档库.zip', query, this.Deselect)
}, },
@@ -163,7 +163,7 @@
if (this.idList.length > 0) { if (this.idList.length > 0) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: '确认删除?', content: _this.$t('ConfirmBatchDeletion'),
onOk() { onOk() {
deleteAction(_this.url.deleteBatch, { ids: _this.idList.join(',') }).then((res) => { deleteAction(_this.url.deleteBatch, { ids: _this.idList.join(',') }).then((res) => {
if (res.success) { if (res.success) {
@@ -198,7 +198,7 @@
deleteTable(val) { deleteTable(val) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: '确认删除?', content: _this.$t('ConfirmDelete'),
onOk() { onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => { deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) { if (res.success) {
@@ -215,7 +215,7 @@
Collection(val) { Collection(val) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: val.collectFlag == 0 || !val.collectFlag ? '确认收藏?' : '确定取消收藏?', content: val.collectFlag == 0 || !val.collectFlag ? _this.$t('ConfirmCollection') : _this.$t('cancelConfirmCollection'),
onOk() { onOk() {
let url = '' let url = ''
if (val.collectFlag == 0 || !val.collectFlag) { if (val.collectFlag == 0 || !val.collectFlag) {
@@ -238,7 +238,7 @@
subscribe(val) { subscribe(val) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: val.subscribeFlag == 0 || !val.subscribeFlag ? '确认订阅?' : '确定取消订阅?', content: val.subscribeFlag == 0 || !val.subscribeFlag ? _this.$t('ConfirmSubscribe') : _this.$t('cancelConfirmSubscribe'),
onOk() { onOk() {
let url = '' let url = ''
if (val.subscribeFlag == 0 || !val.subscribeFlag) { if (val.subscribeFlag == 0 || !val.subscribeFlag) {
@@ -59,14 +59,14 @@
this.visible = false this.visible = false
}, },
add() { add() {
this.title = '新增' this.title = this.$t('add')
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addFormDataRef.add() this.$refs.addFormDataRef.add()
}) })
}, },
edit(item) { edit(item) {
this.title = '编辑' this.title = this.$t('edit')
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addFormDataRef.edit(item) this.$refs.addFormDataRef.edit(item)