From b05806e8d122715bfc7f949b83805e44a39c34d0 Mon Sep 17 00:00:00 2001 From: DOUDOU <877258667@qq.com> Date: Sun, 9 Oct 2022 14:08:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=91=98=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 --- .../yieldReport/com_switch_operator.vue | 118 +++++++++++++++++- 1 file changed, 113 insertions(+), 5 deletions(-) diff --git a/src/views/modules/yieldReport/com_switch_operator.vue b/src/views/modules/yieldReport/com_switch_operator.vue index ec868a7..777746f 100644 --- a/src/views/modules/yieldReport/com_switch_operator.vue +++ b/src/views/modules/yieldReport/com_switch_operator.vue @@ -5,7 +5,7 @@ - 操作员: + {{ labels.operatorId }} @@ -13,7 +13,7 @@ - + @@ -22,11 +22,12 @@ - 保存 + {{ buttons.saveButton }} - 关闭 + {{ buttons.closeButton }} + 对语言设置 @@ -40,14 +41,31 @@ import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ import { getOperatorData, -} from '@/api/yieldReport/produce_order.js' +} from '@/api/yieldReport/produce_order.js'; + +import { + searchSysLanguagePackList, + searchSysLanguageParam, + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + searchLanguageListByLanguageCode, + saveSysLanguageOne, + searchPageLanguageData, + removerLanguage, + saveSysLanguageList +} from "@/api/sysLanguage.js"; + import comOpenRoutingMenu from "../schedule/com_open_routing_menu"; import comOpenScheduleMenu from "../schedule/com_open_schedule_menu"; +var functionId = 'C10000001'; + export default { data() { return { titleCon: '操作员切换', + showDefault: false, operatorFlag: false, operatorData: { site: this.$store.state.user.site, @@ -57,6 +75,63 @@ export default { status: '', reportType: 0 }, + buttons: { + saveButton: '保存', + closeButton: '关闭', + }, + buttonList: [ + { + functionId: functionId, + languageValue: '保存', + objectId: 'saveButton', + objectType: 'button', + tableId: '*' + }, { + functionId: functionId, + languageValue: '关闭', + objectId: 'closeButton', + objectType: 'button', + tableId: '*' + }, + ], + queryButton: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'button' + }, + labels: { + componentTitle: '操作员切换', + operatorId: '操作员:', + operatorName: '操作员名称:', + }, + labelsList: [ + { + functionId: functionId, + languageValue: '操作员切换', + objectId: 'componentTitle', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '操作员:', + objectId: 'operatorId', + objectType: 'label', + tableId: '*' + }, { + functionId: functionId, + languageValue: '操作员名称:', + objectId: 'operatorName', + objectType: 'label', + tableId: '*' + }, + ], + queryLabel: { + functionId: functionId, + table_id: '*', + languageCode: this.$i18n.locale, + objectType: 'label' + }, } }, /*组件*/ @@ -85,6 +160,7 @@ export default { }); //刷新当前派工单的信息 //this.refreshPageData(); + this.titleCon = this.labels.componentTitle;//重置标题 }, //查询操作员信息 saveOperatorData() { @@ -182,8 +258,40 @@ 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.getMultiLanguageList()//刷新多语言 } }