生产工序
This commit is contained in:
45
klp-ui/src/components/KLPService/CraftSelect/index.vue
Normal file
45
klp-ui/src/components/KLPService/CraftSelect/index.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<el-select v-model="processId" placeholder="请选择工艺">
|
||||
<el-option v-for="item in craftList" :key="item.processId" :label="item.processName" :value="item.processId" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'CraftSelect',
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number, undefined],
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
craftList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCraftList();
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['processList']),
|
||||
processId: {
|
||||
get() {
|
||||
return this.$props.value;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit('input', value);
|
||||
this.$emit('change', value);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCraftList() {
|
||||
console.log(this.processList)
|
||||
this.craftList = this.processList;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user