From 2c833fa87d8d3bb9f95d530c6d282bfd4bc92283 Mon Sep 17 00:00:00 2001 From: DOUDOU <877258667@qq.com> Date: Mon, 10 Oct 2022 14:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_produce_tool.vue | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/src/views/modules/yieldReport/com_produce_tool.vue b/src/views/modules/yieldReport/com_produce_tool.vue index dd7bffb..cd4fed2 100644 --- a/src/views/modules/yieldReport/com_produce_tool.vue +++ b/src/views/modules/yieldReport/com_produce_tool.vue @@ -58,6 +58,7 @@ 确 定 关闭 + 对语言设置 @@ -69,10 +70,26 @@ import { addToolInstanceId, } from '@/api/yieldReport/com_produce_tool.js'; + +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + +var functionId = 'C10000012'; export default { data() { return { titleCon: '刀模板', + showDefault: false, readonlyFlag: true, scheduleData: { site: this.$store.state.user.site, @@ -123,6 +140,92 @@ export default { showFlag: false }, dataListLoading: 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: { + titleCon: '刀模板', + toolInstanceId: '工具实例编号:', + replaceToolTitle: '换刀模', + replaceTool: '换刀模', + oriToolInstanceId: '原工具实例编码:', + currentRollProdQty: '本卷生产数量:', + oriRollProdQty: '之前卷生产数量:', + totalRollProdQty: '累积生产数量:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '刀模板', + objectId: 'titleCon', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '换刀模:', + objectId: 'replaceToolTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '换刀模', + objectId: 'replaceTool', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '原工具实例编码:', + objectId: 'oriToolInstanceId', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '本卷生产数量:', + objectId: 'currentRollProdQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '之前卷生产数量:', + objectId: 'oriRollProdQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '累积生产数量:', + objectId: 'totalRollProdQty', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, methods: { @@ -161,6 +264,8 @@ export default { } //重置校验的标记 this.pageData.checkFlag = false; + //重置标题 + this.titleCon = this.labels.titleCon; }, /*关闭modal*/ @@ -215,10 +320,42 @@ 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();//刷新多语言的信息 } }