1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
| <template>
| <el-select
| :model-value="modelValue"
| @update:model-value="handleChange"
| multiple
| clearable
| placeholder="选择执行人"
| class="w-300"
| >
| <el-option
| v-for="(s, i) in executorOptions"
| :key="i"
| :label="s.label"
| :value="s.value"
| />
| </el-select>
| </template>
|
| <script>
| /**
| * 线索任务执行人选项
| */
| import userApi from '@/api/fysp/userApi';
| export default {
| props: {
| modelValue: {
| type: Array,
| default: () => []
| },
| userType: {
| type: Number,
| default: 1
| }
| },
| emits: ['update:modelValue', 'initOver'],
| data() {
| return {
| executorOptions: []
| };
| },
| methods: {
| getOptions() {
| return userApi.getUserByType(this.userType).then((res) => {
| res.forEach((v) => {
| this.executorOptions.push({
| label: v.realname,
| value: v.guid
| // data: v
| });
| });
| // this.executorOptions = res.map((v) => {
| // return {
| // label: v.realname,
| // value: v.guid
| // // data: v
| // };
| // });
| });
| },
| handleChange(value) {
| this.$emit('update:modelValue', value);
| }
| },
| mounted() {
| this.getOptions().finally(() => this.$emit('initOver'));
| // this.handleChange(this.pollutionList[0].value);
| }
| };
| </script>
|
|