You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
911 B
49 lines
911 B
|
3 years ago
|
<template>
|
||
|
|
<div>
|
||
|
|
<el-select multiple collapse-tags value-key="id" style="width: 100%" v-model="value" @change="change">
|
||
|
|
<el-option v-for="item in tags" :value="item.mingcheng" :label="item.mingcheng"></el-option>
|
||
|
|
</el-select>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import { index } from "@/api/system/baseForm"
|
||
|
|
export default {
|
||
|
|
props: {
|
||
|
|
fieldInfo: Object,
|
||
|
|
form: Object
|
||
|
|
},
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
value: '',
|
||
|
|
tags: [],
|
||
|
|
}
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
async getTags () {
|
||
|
|
const res = await index({
|
||
|
|
page: 1,
|
||
|
|
page_size: 9999,
|
||
|
|
table_name: 'tags',
|
||
|
|
})
|
||
|
|
this.tags = res.data
|
||
|
|
},
|
||
|
|
change (e) {
|
||
|
|
this.$emit('update', this.value.toString())
|
||
|
|
}
|
||
|
|
},
|
||
|
|
computed: {},
|
||
|
|
watch: {
|
||
|
|
'form.biaoqian' (newVal) {
|
||
|
|
this.value = newVal.split(',')
|
||
|
|
}
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
this.getTags()
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped lang="scss">
|
||
|
|
</style>
|