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
| <template>
| <div class="box-card">
| <div class="box-content">
| <el-tabs v-model="activeName" @tab-click="handleClick">
| <el-tab-pane label="报到单位统计" name="unit">
| <UnitComponents ref="unitRefs" :orgNameList="orgNameList" />
| </el-tab-pane>
| <el-tab-pane label="报到党员统计" name="party">
| <PartyComponents ref="partyRefs" :orgNameList="orgNameList" />
| </el-tab-pane>
| </el-tabs>
| </div>
| </div>
| </template>
|
| <script>
| import UnitComponents from "./unitStatistic.vue";
| import PartyComponents from "./partyStatistic.vue";
| export default {
| data() {
| return {
| activeName: "unit",
| orgNameList: []
| };
| },
| components: {
| UnitComponents,
| PartyComponents,
| },
| mounted() {
| if (this.activeName === "unit") {
| this.$refs.unitRefs.getTable();
| } else {
| this.$refs.partyRefs.getTable();
| }
| this.getOrgnameList();
| },
| methods: {
| handleClick({ _props: { name } }) {
| if (name === "unit") {
| this.$refs.unitRefs.getTable();
| } else {
| this.$refs.partyRefs.getTable();
| }
| },
| // 所属党组织列表
| getOrgnameList() {
| // comPbCheckUnit/orgList
| this.$api.get(
| 'checkUnit/orgList',
| {},
| (res) => {
| const data = res.map((i) => {
| return { label: i.orgName, value: i.orgName };
| });
| this.orgNameList = data
| },
| (err) => {
| console.log(err);
| }
| );
| },
| },
| };
| </script>
|
|