68 lines
1.3 KiB
Vue
68 lines
1.3 KiB
Vue
<!--
|
|
* @Author: zhp
|
|
* @Date: 2023-04-12 09:46:34
|
|
* @LastEditTime: 2023-04-12 10:19:44
|
|
* @LastEditors: zhp
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<div class="tableInner">
|
|
<el-select v-model="list[itemProp]" @change="changeInput">
|
|
<el-option v-for=" item in teamList" :key="item.id" :label="item.teamName" :value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: 'InputArea',
|
|
props: {
|
|
injectData: {
|
|
type: Object,
|
|
default: () => ({})
|
|
},
|
|
itemProp: {
|
|
type: String
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
list: this.injectData,
|
|
teamList: [],
|
|
urlOptions: {
|
|
getTeamURL: '/basic/qmsTeam/page'
|
|
},
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getData();
|
|
},
|
|
methods: {
|
|
getData() {
|
|
this.$http
|
|
.get(this.urlOptions.getTeamURL, this.listQuery)
|
|
.then(({ data: res }) => {
|
|
if (res.code === 0) {
|
|
console.log(res.data);
|
|
this.teamList = res.data.list
|
|
}
|
|
})
|
|
.catch(() => {
|
|
});
|
|
},
|
|
changeInput() {
|
|
console.log(this.list)
|
|
this.$emit('emitData', this.list)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="css">
|
|
|
|
.tableInner .el-input__inner {
|
|
border: none;
|
|
padding: 0;
|
|
height: 33px;
|
|
}
|
|
|
|
</style>
|