|
@@ -2,21 +2,21 @@
|
2
|
2
|
<div v-loading="loading">
|
3
|
3
|
<div class="screenBox">
|
4
|
4
|
<!-- 创建人 -->
|
5
|
|
- <selfInput label_name="创建人" :reset='resetFlag' :keyword="filter.operator_name" @inputChange='onChangeKeyword' />
|
|
5
|
+ <selfChannel title="创建人" :reset="resetFlag" type="circleCreate" :afferent_value="filter.operator_id" @channelDefine="onChangeOperatorId" />
|
6
|
6
|
<!-- 迁出成员 -->
|
7
|
|
- <serviceSingle title='迁出成员' :reset='resetFlag' :afferent_userId="filter.handover_userid" @customerDefine="onChangeHandoverUserId" />
|
|
7
|
+ <serviceSingle title="迁出成员" :reset="resetFlag" :afferent_userId="filter.handover_userid" @customerDefine="onChangeHandoverUserId" />
|
8
|
8
|
<!-- 接替成员 -->
|
9
|
|
- <serviceSingle title='接替成员' :reset='resetFlag' :afferent_userId="filter.takeover_userid" @customerDefine="onChangeTakeOverUserId" />
|
|
9
|
+ <serviceSingle title="接替成员" :reset="resetFlag" :afferent_userId="filter.takeover_userid" @customerDefine="onChangeTakeOverUserId" />
|
10
|
10
|
<!-- 分配时间 -->
|
11
|
|
- <datePicker title="分配时间" :reset='resetFlag' :afferent_time="filter.time" @changeTime="onChangeTime" />
|
|
11
|
+ <datePicker title="分配时间" :reset="resetFlag" :afferent_time="filter.time" @changeTime="onChangeTime" />
|
12
|
12
|
<!-- 迁移状态 -->
|
13
|
|
- <selfChannel title="迁移状态" :reset='resetFlag' type='remove_status' :afferent_value="filter.assignment_status" @channelDefine="onChangeStatus" />
|
|
13
|
+ <selfChannel title="迁移状态" :reset="resetFlag" type="remove_status" :afferent_value="filter.assignment_status" @channelDefine="onChangeStatus" />
|
14
|
14
|
<!-- 迁移类型 -->
|
15
|
|
- <selfChannel title="迁移类型" :reset='resetFlag' type='remove_type' :afferent_value="filter.type" @channelDefine="onChangeType" />
|
|
15
|
+ <selfChannel title="迁移类型" :reset="resetFlag" type="remove_type" :afferent_value="filter.type" @channelDefine="onChangeType" />
|
16
|
16
|
<div class="reset" @click="resetEvent">重置</div>
|
17
|
17
|
</div>
|
18
|
|
- <!-- table -->
|
19
|
|
- <el-table :height='height' :data="tableData" style="width: 100%;margin-top:10px;">
|
|
18
|
+
|
|
19
|
+ <el-table :height="height" :data="tableData" style="width: 100%;margin-top:10px;">
|
20
|
20
|
<el-table-column prop="create_time" label="分配时间" align="center" min-width="160" />
|
21
|
21
|
<el-table-column prop="type" label="迁移类型" align="center" min-width="140">
|
22
|
22
|
<template slot-scope="{ row }">
|
|
@@ -55,9 +55,9 @@
|
55
|
55
|
</template>
|
56
|
56
|
</el-table-column>
|
57
|
57
|
</el-table>
|
|
58
|
+
|
58
|
59
|
<div class="pagination" v-show="pagination.total > 0">
|
59
|
|
- <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pagination.pages)'>
|
60
|
|
- </el-pagination>
|
|
60
|
+ <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count="Number(pagination.pages)" />
|
61
|
61
|
</div>
|
62
|
62
|
</div>
|
63
|
63
|
</template>
|
|
@@ -80,7 +80,12 @@ const statusMap = new Map([
|
80
|
80
|
])
|
81
|
81
|
|
82
|
82
|
export default {
|
83
|
|
- components: { selfInput, datePicker, serviceSingle, selfChannel },
|
|
83
|
+ components: {
|
|
84
|
+ selfInput,
|
|
85
|
+ datePicker,
|
|
86
|
+ serviceSingle,
|
|
87
|
+ selfChannel
|
|
88
|
+ },
|
84
|
89
|
data () {
|
85
|
90
|
return {
|
86
|
91
|
loading: false,
|
|
@@ -95,7 +100,7 @@ export default {
|
95
|
100
|
total: 0,
|
96
|
101
|
},
|
97
|
102
|
filter: {
|
98
|
|
- operator_name: '',
|
|
103
|
+ operator_id: '',
|
99
|
104
|
handover_userid: '',
|
100
|
105
|
takeover_userid: '',
|
101
|
106
|
time: [],
|
|
@@ -133,7 +138,6 @@ export default {
|
133
|
138
|
},
|
134
|
139
|
onClickDetail({ type, record_id }) {
|
135
|
140
|
this.handleSetLocalParams()
|
136
|
|
-
|
137
|
141
|
const pathOpt = {
|
138
|
142
|
1: '/transferRecord/on',
|
139
|
143
|
2: '/transferRecord/off',
|
|
@@ -149,8 +153,8 @@ export default {
|
149
|
153
|
handleGetTypeName(type) {
|
150
|
154
|
return typesMap.get(Number(type)) || '-'
|
151
|
155
|
},
|
152
|
|
- onChangeKeyword(val) {
|
153
|
|
- this.filter.operator_name = val || ''
|
|
156
|
+ onChangeOperatorId(val) {
|
|
157
|
+ this.filter.operator_id = val
|
154
|
158
|
this.pagination.page = 1
|
155
|
159
|
this.handleGetList()
|
156
|
160
|
},
|
|
@@ -181,9 +185,13 @@ export default {
|
181
|
185
|
this.pagination.page = 1
|
182
|
186
|
this.handleGetList()
|
183
|
187
|
},
|
|
188
|
+ handleCurrentChange(currentPage) {
|
|
189
|
+ this.pagination.page = currentPage
|
|
190
|
+ this.handleGetList()
|
|
191
|
+ },
|
184
|
192
|
resetEvent () {
|
185
|
193
|
this.resetFlag = !this.resetFlag
|
186
|
|
- this.filter.operator_name = ''
|
|
194
|
+ this.filter.operator_id = ''
|
187
|
195
|
this.filter.handover_userid = ''
|
188
|
196
|
this.filter.takeover_userid = ''
|
189
|
197
|
this.filter.time = [];
|
|
@@ -193,7 +201,6 @@ export default {
|
193
|
201
|
this.handleGetList()
|
194
|
202
|
},
|
195
|
203
|
async handleGetList() {
|
196
|
|
- console.log('handleGetList => ')
|
197
|
204
|
this.handleClearLocalParams()
|
198
|
205
|
try {
|
199
|
206
|
this.loading = true
|
|
@@ -202,7 +209,7 @@ export default {
|
202
|
209
|
const params = {
|
203
|
210
|
assignment_date_start,
|
204
|
211
|
assignment_date_end,
|
205
|
|
- operator_name: this.filter.operator_name,
|
|
212
|
+ operator_id: this.filter.operator_id,
|
206
|
213
|
handover_userid: this.filter.handover_userid,
|
207
|
214
|
takeover_userid: this.filter.takeover_userid,
|
208
|
215
|
assignment_status: this.filter.assignment_status,
|
|
@@ -210,31 +217,27 @@ export default {
|
210
|
217
|
page: this.pagination.page,
|
211
|
218
|
page_size: this.pagination.page_size,
|
212
|
219
|
}
|
213
|
|
- console.log('params => ', JSON.parse(JSON.stringify(params)))
|
214
|
220
|
const { data: res = {} } = await this.$axios.get(url, { params })
|
215
|
221
|
if (res && res.errno == 0) {
|
216
|
|
- this.tableData = res.rst.data;
|
217
|
|
- this.pagination.total = res.rst.pageInfo.total;
|
218
|
|
- this.pagination.pages = res.rst.pageInfo.pages;
|
|
222
|
+ this.tableData = res.rst.data
|
|
223
|
+ this.pagination.total = res.rst.pageInfo.total
|
|
224
|
+ this.pagination.pages = res.rst.pageInfo.pages
|
219
|
225
|
} else if (res.errno != 4002) {
|
220
|
226
|
this.$message.warning(res.err)
|
221
|
|
- this.tableData = [];
|
222
|
|
- this.pagination.total = 0;
|
223
|
|
- this.pagination.pages = 0;
|
|
227
|
+ this.handleClearTableData()
|
224
|
228
|
}
|
225
|
229
|
} catch (error) {
|
226
|
230
|
console.log(error)
|
227
|
|
- this.tableData = [];
|
228
|
|
- this.pagination.total = 0;
|
229
|
|
- this.pagination.pages = 0;
|
|
231
|
+ this.handleClearTableData()
|
230
|
232
|
} finally {
|
231
|
233
|
this.loading = false
|
232
|
234
|
}
|
233
|
235
|
},
|
234
|
|
- handleCurrentChange(currentPage) {
|
235
|
|
- this.pagination.page = currentPage
|
236
|
|
- this.handleGetList()
|
237
|
|
- }
|
|
236
|
+ handleClearTableData() {
|
|
237
|
+ this.tableData = []
|
|
238
|
+ this.pagination.total = 0
|
|
239
|
+ this.pagination.pages = 0
|
|
240
|
+ },
|
238
|
241
|
}
|
239
|
242
|
}
|
240
|
243
|
</script>
|