From d392b0595549a920d15e2accf10320954d8089c0 Mon Sep 17 00:00:00 2001
From: DOUDOU <877258667@qq.com>
Date: Mon, 10 Oct 2022 15:12:39 +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_down.vue | 126 +++++++++++++++++-
.../yieldReport/com_produce_material.vue | 117 +++++++++++++++-
.../modules/yieldReport/com_produce_tool.vue | 20 +--
3 files changed, 247 insertions(+), 16 deletions(-)
diff --git a/src/views/modules/yieldReport/com_produce_down.vue b/src/views/modules/yieldReport/com_produce_down.vue
index 174c31b..781b1a2 100644
--- a/src/views/modules/yieldReport/com_produce_down.vue
+++ b/src/views/modules/yieldReport/com_produce_down.vue
@@ -70,6 +70,7 @@
关闭
+ 对语言设置
@@ -87,12 +88,28 @@ import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
checkDownTimeCode,
reportDownTime,
-}
-from '@/api/yieldReport/com_produce_down.js';
+}from '@/api/yieldReport/com_produce_down.js';
+
+import {
+ searchSysLanguagePackList,
+ searchSysLanguageParam,
+ searchFunctionButtonList,
+ saveButtonList,
+ searchSysLanguage,
+ searchLanguageListByLanguageCode,
+ saveSysLanguageOne,
+ searchPageLanguageData,
+ removerLanguage,
+ saveSysLanguageList
+} from "@/api/sysLanguage.js";
+
+var functionId = 'C10000014';
+
export default {
data() {
return {
titleCon: '报告停机',
+ showDefault: false,
sfdcTimeList: [],
scheduleData: {
site: this.$store.state.user.site,
@@ -145,6 +162,77 @@ export default {
createRollFlag: true
},
dataListLoading: false,
+ buttons: {
+ insertButton: '插入',
+ closeButton: '关闭',
+ },
+ buttonList: [
+ {
+ functionId: functionId,
+ languageValue: '插入',
+ objectId: 'insertButton',
+ objectType: 'button',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '关闭',
+ objectId: 'closeButton',
+ objectType: 'button',
+ tableId: '*'
+ },
+ ],
+ queryButton: {
+ functionId: functionId,
+ table_id: '*',
+ languageCode: this.$i18n.locale,
+ objectType: 'button'
+ },
+ labels: {
+ titleCon: '报告停机',
+ startTime: '开始时间:',
+ downTimes: '时长:',
+ downTimeCode: '停机代码:',
+ downTimeDesc: '停机描述:',
+ },
+ labelsList: [
+ {
+ functionId: functionId,
+ languageValue: '报告停机',
+ objectId: 'titleCon',
+ objectType: 'label',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '开始时间:',
+ objectId: 'startTime',
+ objectType: 'label',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '时长:',
+ objectId: 'downTimes',
+ objectType: 'label',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '停机代码:',
+ objectId: 'downTimeCode',
+ objectType: 'label',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '停机描述:',
+ objectId: 'downTimeDesc',
+ objectType: 'label',
+ tableId: '*'
+ },
+ ],
+ queryLabel: {
+ functionId: functionId,
+ table_id: '*',
+ languageCode: this.$i18n.locale,
+ objectType: 'label'
+ },
}
},
/*组件*/
@@ -176,6 +264,8 @@ export default {
this.$nextTick(() => {
this.$refs.totalTime.focus();
});
+ //重置标题
+ this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
@@ -233,6 +323,37 @@ 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}) => {
+ // })
+ }
+ });
+ },
+
},
/*监听器*/
watch:{
@@ -246,6 +367,7 @@ export default {
created() {
// this.factoryList()
// this.getLanguageList()
+ this.getMultiLanguageList();//刷新多语言的信息
}
}
diff --git a/src/views/modules/yieldReport/com_produce_material.vue b/src/views/modules/yieldReport/com_produce_material.vue
index 18f9004..b829748 100644
--- a/src/views/modules/yieldReport/com_produce_material.vue
+++ b/src/views/modules/yieldReport/com_produce_material.vue
@@ -7,7 +7,7 @@
-
+
-
+
@@ -45,10 +46,27 @@ import {
getBomItemNosByPartNo,
feedingMaterialRoll,
} from "@/api/yieldReport/com_produce_material.js";
+
+import {
+ searchSysLanguagePackList,
+ searchSysLanguageParam,
+ searchFunctionButtonList,
+ saveButtonList,
+ searchSysLanguage,
+ searchLanguageListByLanguageCode,
+ saveSysLanguageOne,
+ searchPageLanguageData,
+ removerLanguage,
+ saveSysLanguageList
+} from "@/api/sysLanguage.js";
+
+var functionId = 'C10000013';
+
export default {
data() {
return {
titleCon: '材料',
+ showDefault: false,
sfdcTimeList: [],
selectFlag: true,
scheduleData: {
@@ -101,6 +119,63 @@ 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: '材料',
+ rmRollNo: '材料卷号:',
+ bomItemNo: 'BOM序号:',
+ },
+ labelsList: [
+ {
+ functionId: functionId,
+ languageValue: '材料',
+ objectId: 'titleCon',
+ objectType: 'label',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '材料卷号:',
+ objectId: 'rmRollNo',
+ objectType: 'label',
+ tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: 'BOM序号:',
+ objectId: 'bomItemNo',
+ objectType: 'label',
+ tableId: '*'
+ },
+ ],
+ queryLabel: {
+ functionId: functionId,
+ table_id: '*',
+ languageCode: this.$i18n.locale,
+ objectType: 'label'
+ },
}
},
methods: {
@@ -127,6 +202,9 @@ export default {
});
//清空当前的时间数据
this.timeArray = [];
+
+ //重置标题
+ this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
@@ -218,13 +296,44 @@ export default {
this.timeArray = [];
}
});
+ },
+
+ // 保存 默认配置 列
+ 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();//刷新多语言的信息
}
}
diff --git a/src/views/modules/yieldReport/com_produce_tool.vue b/src/views/modules/yieldReport/com_produce_tool.vue
index cd4fed2..3c7da46 100644
--- a/src/views/modules/yieldReport/com_produce_tool.vue
+++ b/src/views/modules/yieldReport/com_produce_tool.vue
@@ -7,7 +7,7 @@
-
+
@@ -16,36 +16,36 @@
@@ -184,7 +184,7 @@ export default {
tableId: '*'
}, {
functionId: functionId,
- languageValue: '换刀模:',
+ languageValue: '换刀模',
objectId: 'replaceToolTitle',
objectType: 'label',
tableId: '*'