| | |
| | | <el-form-item label="设备"> |
| | | <el-select |
| | | :model-value="modelValue" |
| | | @change="handleChange" |
| | | @update:model-value="handleChange" |
| | | placeholder="设备" |
| | | size="small" |
| | | class="w-120" |
| | |
| | | deviceList() { |
| | | const t = this.type ? this.type : '0a'; |
| | | return [1, 2, 3].map((v) => { |
| | | const text = `${t}000000000${v}`; |
| | | const label = `${this.getDeviceType(t)}设备${v}号`; |
| | | const value = `${t}000000000${v}`; |
| | | return { |
| | | label: text, |
| | | value: text |
| | | label: label, |
| | | value: value |
| | | }; |
| | | }); |
| | | } |
| | |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | }, |
| | | getDeviceType(t) { |
| | | switch (t) { |
| | | case '0a': |
| | | return '车载'; |
| | | case '0b': |
| | | return '无人机'; |
| | | case '0c': |
| | | return '无人船'; |
| | | default: |
| | | return '车载'; |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |