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
| <template>
| <div>
| <p class="desc">选择能发起该审批的人员,不选则默认开放给所有人</p>
| <el-button size="mini" @click="selectOrg" icon="el-icon-plus" type="primary" round>请选择</el-button>
| <org-items v-model="select"/>
| <org-picker title="请选择可发起本审批的人员" multiple ref="orgPicker" :selected="select" @ok="selected"/>
| </div>
| </template>
|
| <script>
| import OrgPicker from "@/components/common/OrgPicker";
| import OrgItems from "../OrgItems";
|
| export default {
| name: "RootConfig",
| components: {OrgPicker, OrgItems},
| props:{
| config:{
| type: Object,
| default: ()=>{
| return {}
| }
| }
| },
| data() {
| return {
| showOrgSelect: false
| }
| },
| computed:{
| select(){
| return this.config.assignedUser
| }
| },
| methods: {
| selectOrg() {
| this.$refs.orgPicker.show()
| },
| selected(select) {
| this.select.length = 0
| select.forEach(val => this.select.push(val))
| },
| removeOrgItem(index){
| this.select.splice(index, 1)
| }
| }
| }
| </script>
|
| <style lang="less" scoped>
| .desc{
| font-size: small;
| color: #8c8c8c;
| }
| .org-item{
| margin: 5px;
| }
| </style>
|
|