diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 1f53553..083f566 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -3038,7 +3038,7 @@ export default { } ], labels: { - reportPageName: '机台工作台', + componentTitle: '机台工作台', orderNo: '订单号', partNo: '物料编码', partDesc: '物料名称/规则', @@ -3077,7 +3077,7 @@ export default { { functionId: functionId, languageValue: '机台工作台', - objectId: 'reportPageName', + objectId: 'componentTitle', objectType: 'label', tableId: '*' }, { @@ -3577,7 +3577,7 @@ export default { this.scheduleData.resourceDesc = data.row.resourceDesc; this.scheduleData.preItemNo = data.row.preItemNo; //设置弹窗的标题 - this.titleCon = this.labels.reportPageName + ' - ' + data.row.itemDesc + ' ' + this.titleCon = this.labels.componentTitle + ' - ' + data.row.itemDesc + ' ' + data.row.resourceDesc + ' (' + this.operatorData.operatorName + ')'; }) //刷新页面的卷信息 diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index 6bf8b69..facc200 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -44,8 +44,9 @@ - 确 定 - 关闭 + {{ buttons.confirmButton }} + {{ buttons.closeButton }} + 对语言设置 @@ -62,11 +63,27 @@ printSfdcLabel, } from "@/views/modules/yieldReport/print_roll_label.js"; + import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList + } from "@/api/sysLanguage.js"; + + var functionId = 'C10000004'; + export default { name: "com_separate_roll", data() { return { titleCon: '创建分卷', + showDefault: false, scheduleData: { site: this.$store.state.user.site, username: this.$store.state.user.name, @@ -114,6 +131,70 @@ 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: '创建分卷', + currentTime: '当前时间:', + rollQty: '良品数量:', + rollNums: '卷数:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '创建分卷', + objectId: 'componentTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '当前时间:', + objectId: 'currentTime', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '良品数量:', + objectId: 'rollQty', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '卷数:', + objectId: 'rollNums', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, methods: { @@ -139,6 +220,7 @@ export default { this.$nextTick(() => { this.$refs.rollQty.focus(); }); + this.titleCon = this.labels.componentTitle;//重置标题 }, /*关闭modal*/ @@ -234,10 +316,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()//刷新按钮 } }