From 26b095f2efbd7f5f575abe6eeef72e87e6becf6c Mon Sep 17 00:00:00 2001 From: DOUDOU <877258667@qq.com> Date: Sun, 9 Oct 2022 14:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=8D=B7=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_switch_roll.vue | 108 +++++++++++++++++- 1 file changed, 105 insertions(+), 3 deletions(-) diff --git a/src/views/modules/yieldReport/com_switch_roll.vue b/src/views/modules/yieldReport/com_switch_roll.vue index 6462f91..e63e842 100644 --- a/src/views/modules/yieldReport/com_switch_roll.vue +++ b/src/views/modules/yieldReport/com_switch_roll.vue @@ -14,8 +14,9 @@ - 确 定 - 关闭 + {{ buttons.confirmButton }} + {{ buttons.closeButton }} + 对语言设置 @@ -30,12 +31,29 @@ import comExceptionReason from "./com_exception_reason";//异常远远 import { checkSwitchSfdcRoll,/*校验是否可以切换卷*/ switchSfdcRoll,/*执行切换卷的操作*/ -} from '@/api/yieldReport/com_switch_roll.js' +} from '@/api/yieldReport/com_switch_roll.js'; + +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + +var functionId = 'C10000003'; + export default { name: "com_merge_roll", data() { return { titleCon: '切换卷', + showDefault: false, scheduleData: { site: this.$store.state.user.site, username: this.$store.state.user.name, @@ -79,6 +97,56 @@ export default { seqNo: '', showFlag: false }, + buttons: { + confirmButton: '确定', + closeButton: '关闭', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '确定', + objectId: 'confirmButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + componentTitle: '切换卷', + sfdcRoll: '半成品卷卷号:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '切换卷', + objectId: 'componentTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '半成品卷卷号:', + objectId: 'sfdcRoll', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, components: { @@ -101,6 +169,7 @@ export default { this.$nextTick(() => { this.$refs.newRollNo.focus(); }); + this.titleCon = this.labels.componentTitle;//重置标题 }, /*关闭modal*/ @@ -158,10 +227,43 @@ export default { } }) }, + + // 保存 默认配置 列 + async saveMultiLanguage() { + // 保存页面 button label title 属性 + let buttons = this.buttonList; + let labels = this.labelsList; + await saveButtonList(buttons) + await saveButtonList(labels) + this.getMultiLanguageList() + }, + + getMultiLanguageList() { + //首先查询当前按钮的多语言 + searchFunctionButtonList(this.queryButton).then(({data}) => { + if (JSON.stringify(data.data) != '{}') { + this.buttons = data.data + } else { + // saveButtonList(this.buttonList).then(({data}) => { + // }) + } + }); + //其次查询当前标签的多语言 + searchFunctionButtonList(this.queryLabel).then(({data}) => { + if (JSON.stringify(data.data) != '{}') { + this.labels = data.data + } else { + // saveButtonList(this.buttonList).then(({data}) => { + // }) + } + }); + }, + }, created() { // this.factoryList() // this.getLanguageList() + this.getMultiLanguageList()//刷新按钮 } }