Browse Source

多语言

master
DOUDOU 3 years ago
parent
commit
afb3e9c474
  1. 130
      src/views/modules/yieldReport/com_end_tuning.vue

130
src/views/modules/yieldReport/com_end_tuning.vue

@ -7,7 +7,7 @@
<!-- 菜单信息 -->
<el-row>
<el-col :span="3" >
<el-form-item :label="'当前时间:'">
<el-form-item :label=labels.currentTime>
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
@ -31,22 +31,23 @@
<el-col :span="8">
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
{{buttons.refreshButton}}</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button @click="endTuningAndStartProduceOperation" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
结束调机</el-button>
{{buttons.endTuningButton}}</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" @click="closeDialog" style="margin-left: 10px; margin-bottom: 5px;">
关闭</el-button>
{{buttons.closeButton}}</el-button>
</el-form-item>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">对语言设置</el-button>
</el-col>
</el-row>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 830px;">
<legend>主材料</legend>
<legend>{{labels.primaryMaterial}}</legend>
<el-table height="180"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="sfdcMaterialList"
@ -89,11 +90,27 @@ import {
getSfdcMaterialByRollNo,
endTuningAndStartProduce,
} from '@/api/yieldReport/com_end_tuning.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000010';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
@ -300,6 +317,70 @@ export default {
}
],
dataListLoading: false,
buttons: {
refreshButton: '刷新',
endTuningButton: '结束调机',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '刷新',
objectId: 'refreshButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '结束调机',
objectId: 'endTuningButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '卷调机-卷材料结算',
currentTime: '当前时间:',
primaryMaterial: '主材料',
},
labelsList: [
{
functionId: functionId,
languageValue: '卷调机-卷材料结算',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '主材料',
objectId: 'primaryMaterial',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
@ -317,7 +398,7 @@ export default {
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '卷调机-卷材料结算';
this.titleCon = this.labels.titleCon;
//
this.refreshPageData();
},
@ -389,11 +470,42 @@ export default {
if(column.property == 'netIssueQty'){
return 'padding: 0px 0px;';
}
}
},
//
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()//
}
}

Loading…
Cancel
Save