|
@@ -27,15 +27,15 @@
|
|
<permission-button type="primary" @click="getList">查询</permission-button>
|
|
<permission-button type="primary" @click="getList">查询</permission-button>
|
|
<permission-button type="primary" @click="$_navigationTo('club-add?type=edit')">添加</permission-button>
|
|
<permission-button type="primary" @click="$_navigationTo('club-add?type=edit')">添加</permission-button>
|
|
<permission-button type="primary" @click="improtDialogVisible = true">导入</permission-button>
|
|
<permission-button type="primary" @click="improtDialogVisible = true">导入</permission-button>
|
|
- <permission-button type="primary" @click="handleExportExcel">导出</permission-button>
|
|
|
|
|
|
+ <permission-button type="primary" @click="onHandleExport()">导出</permission-button>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<permission-button type="primary" @click="downLoadExportExcel">获取导入模板</permission-button>
|
|
<permission-button type="primary" @click="downLoadExportExcel">获取导入模板</permission-button>
|
|
- <permission-button type="primary" @click="handleExport(1)">一键下载授权牌</permission-button>
|
|
|
|
- <permission-button type="primary" @click="handleExport(3)">一键下载机构二维码</permission-button>
|
|
|
|
|
|
+ <permission-button type="primary" @click="onHandleExport(1)">一键下载授权牌</permission-button>
|
|
|
|
+ <permission-button type="primary" @click="onHandleExport(3)">一键下载机构二维码</permission-button>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
- <permission-button type="primary" @click="handleExport(2)">一键下载设备二维码</permission-button>
|
|
|
|
|
|
+ <permission-button type="primary" @click="onHandleExport(2)">一键下载设备二维码</permission-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 表格区域 -->
|
|
<!-- 表格区域 -->
|
|
@@ -78,6 +78,8 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
+ <el-table-column label="扫码次数" align="center" prop="" width="80" />
|
|
|
|
+
|
|
<el-table-column label="创建时间" class-name="status-col" width="160px">
|
|
<el-table-column label="创建时间" class-name="status-col" width="160px">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
<span>{{ row.createTime | formatTime }}</span>
|
|
<span>{{ row.createTime | formatTime }}</span>
|
|
@@ -134,6 +136,11 @@
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <!-- 导出时选择机构 -->
|
|
|
|
+ <el-dialog title="选择机构" :visible.sync="exportDialogVisible" width="70%">
|
|
|
|
+ <club-list-selector v-if="exportDialogVisible" @cancel="onSelectorCancel" @confirm="onSelectorConfirm" />
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 二维码 -->
|
|
<!-- 二维码 -->
|
|
<transition name="fade">
|
|
<transition name="fade">
|
|
<qrcode-club v-if="showQRcode" :qrcode-data="clubInfo" @close="showQRcode = false" />
|
|
<qrcode-club v-if="showQRcode" :qrcode-data="clubInfo" @close="showQRcode = false" />
|
|
@@ -144,13 +151,14 @@
|
|
<script>
|
|
<script>
|
|
import FileUpload from '@/components/FileUpload'
|
|
import FileUpload from '@/components/FileUpload'
|
|
import QrcodeClub from '@/components/QrcodeClub'
|
|
import QrcodeClub from '@/components/QrcodeClub'
|
|
|
|
+import { ClubListSelector } from '@/views/components'
|
|
import { fecthAuthList, changeAuthStatus, removeAuth, authImportExcel } from '@/api/auth'
|
|
import { fecthAuthList, changeAuthStatus, removeAuth, authImportExcel } from '@/api/auth'
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import { debounce, downloadWithUrl } from '@/utils/tools'
|
|
import { debounce, downloadWithUrl } from '@/utils/tools'
|
|
import handleClipboard from '@/utils/clipboard'
|
|
import handleClipboard from '@/utils/clipboard'
|
|
export default {
|
|
export default {
|
|
name: 'ComplexTable',
|
|
name: 'ComplexTable',
|
|
- components: { FileUpload, QrcodeClub },
|
|
|
|
|
|
+ components: { FileUpload, QrcodeClub, ClubListSelector },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
showQRcode: false,
|
|
showQRcode: false,
|
|
@@ -185,7 +193,10 @@ export default {
|
|
}
|
|
}
|
|
]
|
|
]
|
|
},
|
|
},
|
|
- chooseFile: ''
|
|
|
|
|
|
+ chooseFile: '',
|
|
|
|
+ exportDialogVisible: false,
|
|
|
|
+ exportType: '',
|
|
|
|
+ exportClubList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -240,22 +251,48 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 取消选择机构
|
|
|
|
+ onSelectorCancel() {
|
|
|
|
+ this.exportType = ''
|
|
|
|
+ this.exportClubList = []
|
|
|
|
+ this.exportDialogVisible = false
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 选择确认机构
|
|
|
|
+ onSelectorConfirm(list) {
|
|
|
|
+ this.exportClubList = list
|
|
|
|
+ console.log(this.exportType)
|
|
|
|
+ if (this.exportType) {
|
|
|
|
+ this.handleExport(this.exportType) // 导出文件 授权牌 || 二维码
|
|
|
|
+ } else {
|
|
|
|
+ this.handleExportExcel() // 导出机构数据 Excel
|
|
|
|
+ }
|
|
|
|
+ this.exportDialogVisible = false
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 导出下载授权牌 || 二维码 操作
|
|
|
|
+ onHandleExport(type) {
|
|
|
|
+ this.exportDialogVisible = true
|
|
|
|
+ this.exportType = type
|
|
|
|
+ },
|
|
|
|
+
|
|
// 导出下载授权牌 || 二维码
|
|
// 导出下载授权牌 || 二维码
|
|
async handleExport(type) {
|
|
async handleExport(type) {
|
|
let confirmText = ''
|
|
let confirmText = ''
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
- confirmText = '授权牌'
|
|
|
|
|
|
+ confirmText = '设备授权牌'
|
|
} else if (type === 2) {
|
|
} else if (type === 2) {
|
|
confirmText = '设备二维码'
|
|
confirmText = '设备二维码'
|
|
} else {
|
|
} else {
|
|
confirmText = '机构二维码'
|
|
confirmText = '机构二维码'
|
|
}
|
|
}
|
|
|
|
|
|
- const text = await this.$confirm(`确认下载所有${confirmText}?`, '提示', {
|
|
|
|
|
|
+ const text = await this.$confirm(`确认下载所选${confirmText}?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
|
+ this.exportClubList = []
|
|
this.$message.info('已取消操作')
|
|
this.$message.info('已取消操作')
|
|
})
|
|
})
|
|
if (text !== 'confirm') return
|
|
if (text !== 'confirm') return
|
|
@@ -276,6 +313,7 @@ export default {
|
|
})
|
|
})
|
|
.finally(() => {
|
|
.finally(() => {
|
|
notification.close()
|
|
notification.close()
|
|
|
|
+ this.onSelectorCancel()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -323,6 +361,7 @@ export default {
|
|
})
|
|
})
|
|
.finally(() => {
|
|
.finally(() => {
|
|
notification.close()
|
|
notification.close()
|
|
|
|
+ this.onSelectorCancel()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|