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
70
71
72
73
74
75
76
77
78
79
80
81
| <template>
| <div>
| <div class="app-container">
| <div class="tree-view">
| <div class="tree-list">
| <school ref="schoolRef" @schoolChange="schoolChange"></school>
| </div>
| <div class="right-view">
| <organization-list ref="organizationRef" :schoolId="schoolId"></organization-list>
| </div>
| </div>
| </div>
| <div slot="footer" class="dialog-footer">
| <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
| <!-- <el-button @click="cancel">取 消</el-button>-->
| </div>
| </div>
| </template>
|
| <script>
| /**
| * 选择组织机构
| */
| import school from '../../components/school'
| import organizationList from "./organizationList";
|
| export default {
| name: "organizationForm",
| components: {
| school,
| organizationList
| },
| data() {
| return {
| buttonLoading: false,
| activeName: 'second',
| batchOpen: false,
| ipOpen: false,
| schoolId: undefined
| }
| },
| methods: {
| // 选择高校
| schoolChange(v) {
| this.schoolId = v;
| },
| submitForm() {
| this.buttonLoading = true;
| if (!this.$refs.organizationRef.currentRow) {
| this.$message.warning("请选择一条数据")
| this.buttonLoading = false;
| return;
| }
| this.$emit('choice', this.$refs.organizationRef.currentRow);
| }
| }
| }
| </script>
|
| <style scoped>
| .tree-view {
| display: flex;
| flex-direction: row;
| flex: 1;
| }
| .tree-list {
| margin-right: 10px;
| }
| .right-view {
| display: flex;
| flex-direction: row;
| justify-content: space-between;
| flex: 1;
| }
| .right-view-title-icon {
| display: flex;
| flex-direction: row;
| height: 40px;
| align-items: center;
| }
| </style>
|
|