index.vue
6.9 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<template>
<div class="app-container">
<!-- 筛选条件 -->
<el-form
:model="queryParams"
ref="queryRef"
v-show="showSearch"
:inline="true"
label-width="68px"
>
<el-form-item label="用户姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入名称"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="车牌号" prop="carNum">
<el-input
v-model="queryParams.carNum"
placeholder="请输入车牌号"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="操作人员" prop="editAuth">
<el-input
v-model="queryParams.editAuth"
placeholder="填写操作人员"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="分配机制" prop="assignment">
<el-select
v-model="queryParams.assignment"
placeholder="系统分配"
clearable
style="width: 200px"
>
<el-option
v-for="dict in options"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="保单进度" prop="progress">
<el-select
v-model="queryParams.progress"
placeholder="选择进度"
clearable
style="width: 200px"
>
<el-option
v-for="dict in progressOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"
>查询</el-button
>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 表格数据 -->
<el-table
v-loading="loading"
:data="policyList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="序号"
prop="policyId"
width="120"
align="center"
/>
<el-table-column
label="登记时间"
prop="createTime"
width="150"
align="center"
/>
<el-table-column
label="车牌号"
prop="carNum"
width="150"
align="center"
/>
<el-table-column
label="车架号"
prop="frameNum"
width="240"
align="center"
/>
<el-table-column
label="车主姓名"
prop="name"
width="100"
align="center"
/>
<el-table-column
label="联系电话"
prop="phone"
width="180"
align="center"
/>
<el-table-column
label="操作时间"
prop="authTime"
width="150"
align="center"
/>
<el-table-column
label="操作人员"
prop="editAuth"
width="120"
align="center"
/>
<el-table-column
align="center"
label="分配机制"
width="120"
prop="assignment"
>
<template #default="scope">
<span>{{ scope.row.progress === 0 ? "系统分配" : "人工分配" }}</span>
</template>
</el-table-column>
<el-table-column
label="承保公司"
prop="company"
width="150"
align="center"
/>
<el-table-column
label="办理人"
prop="handler"
width="100"
align="center"
/>
<el-table-column label="保单进度" width="100" prop="progress">
<template #default="scope">
<span
:style="{ color: scope.row.progress === 0 ? '#409EFF' : '#67C23A' }"
>{{ scope.row.progress === 0 ? "待承接" : "已承接" }}</span
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script setup>
const { proxy } = getCurrentInstance();
const loading = ref(false);
const total = ref(5);
const showSearch = ref(true);
const queryParams = reactive({
pageNum: 1,
pageSize: 10,
name: "",
carNum: "",
editAuth: "",
assignment: "",
progress: "",
});
const progressOption = ref([
{
value: 0,
label: "待承接",
},
{
value: 1,
label: "已承接",
},
]);
const options = [
{
value: 0,
label: "系统分配",
},
{
value: 1,
label: "人工分配",
},
];
const policyList = ref([
{
policyId: 1,
createTime: "2024-01-01",
carNum: "桂A 1234",
frameNum: "123456789012345678",
name: "张三",
phone: "12345678901",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 0,
handler: "张三",
progress: 0,
},
{
policyId: 2,
createTime: "2024-01-02",
carNum: "粤B 1234",
frameNum: "123456789012345678",
name: "李四",
phone: "12345678902",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 0,
handler: "张三",
progress: 0,
},
{
policyId: 3,
createTime: "2024-01-03",
carNum: "粤C 1234",
frameNum: "123456789012345678",
name: "王五",
phone: "12345678903",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 0,
handler: "张三",
progress: 0,
},
{
policyId: 4,
createTime: "2024-01-04",
carNum: "粤D 1234",
frameNum: "123456789012345678",
name: "赵六",
phone: "12345678904",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 1,
handler: "张三",
progress: 1,
},
{
policyId: 5,
createTime: "2024-01-05",
carNum: "粤E 1234",
frameNum: "123456789012345678",
name: "孙七",
phone: "12345678905",
company: "中国平安",
editAuth: "管理员",
authTime: "2024-01-01",
assignment: 1,
handler: "张三",
progress: 1,
},
]);
/** 多选框选中数据 */
function handleSelectionChange(selection) {
// ids.value = selection.map(item => item.roleId);
// single.value = selection.length != 1;
// multiple.value = !selection.length;
console.log(selection);
}
const getList = () => {};
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
</script>
<style></style>