Commit 775f2127 authored by shuiluo's avatar shuiluo

feat: 设备管理国际化优化

parent a2d69b3f
......@@ -31,11 +31,11 @@ export default {
this.form = { ...data };
this.type = type;
if (type === 0) {
this.title = '新增';
this.title = this.$t('table.add');
} else if (type === 1) {
this.title = '编辑';
this.title = this.$t('table.edit');
} else if (type === 2) {
this.title = '查看';
this.title = this.$t('table.view');
} else {
this.title = '';
}
......
......@@ -7,7 +7,7 @@
@cancel="close"
>
<a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm">
<a-form-model-item :label="$t('system.organizatio')" prop="catalogValue">
<a-form-model-item :label="$t('system.organization')" prop="catalogValue">
<OrganizationTree v-model="form.catalogValue" :disabled="isView" />
</a-form-model-item>
</a-form-model>
......
......@@ -2,7 +2,12 @@
<Drawer ref="drawerRef" v-model="visible" :title="title" :onOk="submit" :colesAfter="colesAfter">
<a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm">
<a-form-model-item :label="$t('oc.equipmentCode')" prop="equipmentId">
<a-select v-model="form.equipmentId" :disabled="true" :options="options" />
<a-select
v-model="form.equipmentId"
:disabled="true"
:options="options"
:placeholder="$t('select.placeholder')"
/>
</a-form-model-item>
<a-form-model-item :label="$t('log.eventType')" prop="eventType">
<MySelect
......@@ -53,9 +58,7 @@ export default {
watch: {
dataInfo: {
handler(val) {
console.log(val);
const { catalogName, equipmentId } = val;
this.options = [{ value: equipmentId, label: catalogName, key: equipmentId }];
},
deep: true,
......@@ -67,12 +70,10 @@ export default {
visible: false,
form: {},
rules: {
equipmentId: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
eventType: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
occurTime: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
eventDescription: [
{ required: true, message: 'Please select Activity zone', trigger: 'change' },
],
equipmentId: [{ required: true, message: this.$t('select.placeholder'), trigger: 'change' }],
eventType: [{ required: true, message: this.$t('select.placeholder'), trigger: 'change' }],
occurTime: [{ required: true, message: this.$t('select.placeholder'), trigger: 'change' }],
eventDescription: [{ required: true, message: this.$t('input.error'), trigger: 'change' }],
},
options: [],
getStaticDataApi,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment