Browse Source

多语言

master
DOUDOU 3 years ago
parent
commit
e7ccf452f7
  1. 120
      src/views/modules/yieldReport/com_start_tuning.vue

120
src/views/modules/yieldReport/com_start_tuning.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="startTuningFun"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
<el-button type="primary" @click="startTuningFun"> {{ buttons.confirmButton }}</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>
</div> </div>
@ -41,12 +42,28 @@
<script> <script>
import { import {
startTuning, startTuning,
}
from '@/api/yieldReport/com_start_tuning.js';
}from '@/api/yieldReport/com_start_tuning.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000008';
export default { export default {
data() { data() {
return { return {
titleCon: '开始调机', titleCon: '开始调机',
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,
@ -91,6 +108,63 @@ export default {
seqNo: '', seqNo: '',
showFlag: false 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: {
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'
},
} }
}, },
methods: { methods: {
@ -102,8 +176,7 @@ 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.pageData.orderNo = scheduleData.orderNo; this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo; this.pageData.itemNo = scheduleData.itemNo;
@ -136,10 +209,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() { created() {
// this.factoryList() // this.factoryList()
// this.getLanguageList() // this.getLanguageList()
this.getMultiLanguageList()//
} }
} }

Loading…
Cancel
Save