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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
| <template>
| <avue-crud
| class="company-box"
| :option="serviceOption"
| :search.sync="serviceSearch"
| :table-loading="serviceLoading"
| :data="serviceData"
| ref="serviceCrud"
| :page.sync="servicePage"
| @selection-change="serviceSelectionChange"
| @search-change="serviceSearchChange"
| @search-reset="serviceSearchReset"
| @current-change="serviceCurrentChange"
| @size-change="serviceSizeChange"
| @on-load="serviceOnLoad"
| @refresh-change="refreshChange"
| >
| </avue-crud>
| <!-- @on-load="serviceOnLoad" -->
| </template>
|
| <script>
| import { getListedispatcherUnit } from "@/api/securityCompany/securityCompany";
| export default {
| props: ["form"],
| data() {
| return {
| serviceOption: {
| // 操作栏多余按钮去除
| delBtn: false,
| editBtn: false,
| searchShowBtn: false,
| addBtn: false,
| selection: true,
| menu: false,
| border: true,
| align: "center",
| height: "auto",
| calcHeight: 270,
| tip: false,
| searchShow: false,
| searchMenuSpan: 4,
| index: false,
| viewBtn: true,
| //dialogType: 'drawer',
| dialogClickModal: false,
| // 操作栏宽度
| menuWidth: 156,
|
| column: [
| {
| label: "派遣单位",
| prop: "name",
| search: true,
| searchSpan: 4,
| display: false,
| },
| {
| label: "联系人",
| prop: "linkman",
| display: false,
| width: 120,
| search: true,
| searchSpan: 4,
| },
|
| {
| label: "联系电话",
| prop: "phone",
| display: false,
| width: 200,
| },
| {
| label: "创建时间",
| prop: "createTime",
| type: "date",
| format: "yyyy-MM-dd",
| valueFormat: "yyyy-MM-dd",
| mock: {
| type: "datetime",
| format: "yyyy-MM-dd",
| },
| display: false,
| width: 180,
| },
| {
| label: "派遣地址",
| prop: "address",
| display: false,
| width: 280,
| },
| ],
| },
| serviceSearch: {},
| serviceLoading: true,
| serviceData: [],
| servicePage: {
| pageSize: 10,
| currentPage: 1,
| total: 0,
| },
| serviceQuery: {},
| serviceSelectionList: [],
| };
| },
| mounted() {
| console.log(this.form, "serviceData");
| // this.serviceOnLoad(this.servicePage);
| },
| methods: {
| refreshChange() {
| this.serviceOnLoad(this.servicePage, this.serviceQuery);
| },
| serviceOnLoad(page, params = {}) {
| this.serviceLoading = true;
| getListedispatcherUnit(
| page.currentPage,
| page.pageSize,
| Object.assign(params, this.serviceQuery),
| this.form.departmentid
| ).then((res) => {
| const data = res.data.data;
|
| this.servicePage.total = data.total;
| this.serviceData = data.records;
| console.log(this.serviceData, "this.serviceData");
| this.serviceLoading = false;
| this.$refs.serviceCrud.refreshTable();
| this.$refs.serviceCrud.doLayout();
| this.serviceSelectionClear();
| });
| },
| serviceSelectionClear() {
| this.serviceSelectionList = [];
| this.$refs.serviceCrud.toggleSelection();
| },
| serviceSelectionChange(list) {
| this.serviceSelectionList = list;
| },
| serviceSearchChange(params, done) {
| this.serviceQuery = params;
| this.servicePage.currentPage = 1;
| this.serviceOnLoad(this.servicePage, params);
| done();
| },
| serviceSearchReset() {
| this.serviceQuery = {};
| this.serviceOnLoad(this.servicePage);
| },
| serviceCurrentChange(currentPage) {
| this.servicePage.currentPage = currentPage;
| },
| serviceSizeChange(pageSize) {
| this.servicePage.pageSize = pageSize;
| },
| },
| };
| </script>
|
| <style>
| </style>
|
|