Browse Source

多语言

master
DOUDOU 3 years ago
parent
commit
7498e78797
  1. 114
      src/views/modules/yieldReport/com_start_produce.vue
  2. 2
      src/views/modules/yieldReport/com_start_tuning.vue

114
src/views/modules/yieldReport/com_start_produce.vue

@ -7,7 +7,7 @@
<!-- 时间 --> <!-- 时间 -->
<el-row style="margin-top: -10px;"> <el-row style="margin-top: -10px;">
<el-col :span="10" > <el-col :span="10" >
<el-form-item :label="'当前时间:'">
<el-form-item :label=labels.currentTime>
<el-date-picker style="width: 100px;" <el-date-picker style="width: 100px;"
v-model="pageData.reportDate" v-model="pageData.reportDate"
format="yyyy-MM-dd" format="yyyy-MM-dd"
@ -31,8 +31,9 @@
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="startProduceFun">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="startProduceFun">{{ buttons.saveButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">对语言设置</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -51,11 +52,27 @@ import {
from '@/api/yieldReport//com_start_produce.js'; from '@/api/yieldReport//com_start_produce.js';
/*引入组件*/ /*引入组件*/
import comEndTuning from './com_end_tuning'; import comEndTuning from './com_end_tuning';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000009';
/*开始生产时候报告调机的材料的使用数量*/ /*开始生产时候报告调机的材料的使用数量*/
export default { export default {
data() { data() {
return { return {
titleCon: '开始生产', titleCon: '开始生产',
showDefault: false,
endTuningFlag: false, endTuningFlag: false,
sfdcTimeList: [], sfdcTimeList: [],
pageData: { pageData: {
@ -79,6 +96,63 @@ export default {
showFlag: false showFlag: false
}, },
dataListLoading: false, dataListLoading: false,
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: {
titleCon: '开始生产 ',
seqNoName: '派工单号:',
currentTime: '当前时间:',
},
labelsList: [
{
functionId: functionId,
languageValue: '开始生产 ',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '派工单号:',
objectId: 'seqNoName',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
} }
}, },
components: { components: {
@ -100,8 +174,8 @@ export default {
// //
this.operatorData = JSON.parse(JSON.stringify(operatorData)); this.operatorData = JSON.parse(JSON.stringify(operatorData));
// //
this.titleCon = '开始生产操作 \
派工单号:'+scheduleData.seqNo;
//
this.titleCon = this.labels.titleCon+this.labels.seqNoName+scheduleData.seqNo;
// this.currentRollOps.seqNo = seqNo; // this.currentRollOps.seqNo = seqNo;
// this.currentRollOps.rollNo = rollNo; // this.currentRollOps.rollNo = rollNo;
// //
@ -159,12 +233,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() { created() {
// this.factoryList() // this.factoryList()
// this.getLanguageList() // this.getLanguageList()
this.getMultiLanguageList()//
} }
} }

2
src/views/modules/yieldReport/com_start_tuning.vue

@ -63,7 +63,7 @@ export default {
data() { data() {
return { return {
titleCon: '开始调机', titleCon: '开始调机',
showDefault: true,
showDefault: false,
scheduleData: { scheduleData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
username: this.$store.state.user.name, username: this.$store.state.user.name,

Loading…
Cancel
Save