|
@@ -3,7 +3,20 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
<el-col :span="24" class="one">
|
|
|
- <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @export="toExport">
|
|
|
+ <data-table
|
|
|
+ @query="search"
|
|
|
+ :fields="fields"
|
|
|
+ :opera="opera"
|
|
|
+ :data="list"
|
|
|
+ :total="total"
|
|
|
+ @view="toView"
|
|
|
+ :select="true"
|
|
|
+ :selected="selected"
|
|
|
+ @handleSelect="handleSelect"
|
|
|
+ >
|
|
|
+ <template #selfbtn>
|
|
|
+ <el-button type="primary" size="mini" @click="toExport()">导出</el-button>
|
|
|
+ </template>
|
|
|
<template #options="{ item }">
|
|
|
<template v-if="item.prop == 'status_name'">
|
|
|
<el-option v-for="item in statusList" :key="item.label" :label="item.label" :value="item.label"></el-option>
|
|
@@ -35,18 +48,12 @@ export default {
|
|
|
},
|
|
|
data: function () {
|
|
|
return {
|
|
|
- // 数据项
|
|
|
fields: [
|
|
|
{ label: '联系电话', prop: 'user_phone', filter: true },
|
|
|
{ label: '审核时间', prop: 'examine_date', filter: true },
|
|
|
{ label: '审核状态', prop: 'status_name', filter: 'select' },
|
|
|
],
|
|
|
- //操作项
|
|
|
- opera: [
|
|
|
- { label: '详细信息', method: 'view' },
|
|
|
- { label: '导出数据', method: 'export', type: 'success' },
|
|
|
- ],
|
|
|
- //表格数据
|
|
|
+ opera: [{ label: '详情', method: 'view' }],
|
|
|
list: [
|
|
|
{
|
|
|
id: '111',
|
|
@@ -61,6 +68,8 @@ export default {
|
|
|
],
|
|
|
// 列表数据总数
|
|
|
total: 0,
|
|
|
+ // 多选值
|
|
|
+ selected: [],
|
|
|
//弹框
|
|
|
dialog: { title: '详细信息', show: false, type: '1' },
|
|
|
form: { order: [] },
|
|
@@ -79,9 +88,13 @@ export default {
|
|
|
this.$set(this, `form`, data);
|
|
|
this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
|
|
|
},
|
|
|
+ // 多选
|
|
|
+ handleSelect(data) {
|
|
|
+ this.$set(this, `selected`, data);
|
|
|
+ },
|
|
|
//导出数据
|
|
|
- async toExport({ data }) {
|
|
|
- this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
|
|
|
+ async toExport() {
|
|
|
+ console.log(this.selected);
|
|
|
},
|
|
|
// 提交保存,创建/修改
|
|
|
async toSave({ data }) {
|