|
@@ -107,7 +107,7 @@
|
|
|
<permission-button type="primary" size="mini" @click="$_navigationTo(`device-list?id=${row.authId}`)">
|
|
|
设备认证
|
|
|
</permission-button>
|
|
|
- <permission-button type="primary" size="mini" @click="createClubQrcode(row)"> 二维码 </permission-button>
|
|
|
+ <permission-button type="primary" size="mini" :disabled="row.status !== 1" @click="createClubQrcode(row)"> 二维码 </permission-button>
|
|
|
<permission-button type="primary" size="mini" @click="cotyClubLink($event, row)">
|
|
|
复制链接
|
|
|
</permission-button>
|
|
@@ -185,7 +185,7 @@ import Qrcode from '@/components/qrcode/club-qrcode.vue'
|
|
|
import { fecthAuthList, saveBrandAuth, changeAuthStatus, removeAuth, authImportExcel } from '@/api/auth'
|
|
|
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
|
import { mapGetters } from 'vuex'
|
|
|
-import { debounce, downLoadWithATag } from '@/utils/tools'
|
|
|
+import { debounce, downloadWithUrl } from '@/utils/tools'
|
|
|
import handleClipboard from '@/utils/clipboard'
|
|
|
export default {
|
|
|
name: 'ComplexTable',
|
|
@@ -317,15 +317,43 @@ export default {
|
|
|
this.$message.info('已取消操作')
|
|
|
})
|
|
|
if (text !== 'confirm') return
|
|
|
+
|
|
|
+ let notification = null
|
|
|
+ notification = this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: `正在下载${confirmText},请勿重复操作!`,
|
|
|
+ duration: 0
|
|
|
+ })
|
|
|
+
|
|
|
// 使用a链接下载
|
|
|
- downLoadWithATag(`${process.env.VUE_APP_BASE_API}/download/shop/image?authUserId=${this.authUserId}&type=${type}`)
|
|
|
+ const downUrl = `${process.env.VUE_APP_BASE_API}/download/shop/image?authUserId=${this.authUserId}&type=${type}`
|
|
|
+ downloadWithUrl(downUrl, confirmText)
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error(`下载${confirmText}失败`)
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ notification.close()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 下载模板
|
|
|
downLoadExportExcel() {
|
|
|
- downLoadWithATag(
|
|
|
- `${process.env.VUE_APP_BASE_API}/download/file?ossName=%E6%AD%A3%E5%93%81%E8%81%94%E7%9B%9F%E6%9C%BA%E6%9E%84%E3%80%81%E5%95%86%E5%93%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx&fileName=%E6%AD%A3%E5%93%81%E8%81%94%E7%9B%9F%E6%9C%BA%E6%9E%84%E3%80%81%E5%95%86%E5%93%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`
|
|
|
- )
|
|
|
+ const downUrl = `${process.env.VUE_APP_BASE_API}/download/file?ossName=%E6%AD%A3%E5%93%81%E8%81%94%E7%9B%9F%E6%9C%BA%E6%9E%84%E3%80%81%E5%95%86%E5%93%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx&fileName=%E6%AD%A3%E5%93%81%E8%81%94%E7%9B%9F%E6%9C%BA%E6%9E%84%E3%80%81%E5%95%86%E5%93%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`
|
|
|
+ let notification = null
|
|
|
+ notification = this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: '正在下载机构导入模板,请勿重复操作!',
|
|
|
+ duration: 0
|
|
|
+ })
|
|
|
+ downloadWithUrl(downUrl, '机构导入模板.xlsx')
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error(`下载机构导入模板失败`)
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ notification.close()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 导出为Excel
|
|
@@ -338,8 +366,22 @@ export default {
|
|
|
this.$message.info('已取消操作')
|
|
|
})
|
|
|
if (text !== 'confirm') return
|
|
|
+ let notification = null
|
|
|
+ notification = this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: '正在导出机构信息,请勿重复操作!',
|
|
|
+ duration: 0
|
|
|
+ })
|
|
|
// 使用a链接下载
|
|
|
- downLoadWithATag(`${process.env.VUE_APP_BASE_API}/auth/export/excel?authUserId=${this.authUserId}`)
|
|
|
+ const downUrl = `${process.env.VUE_APP_BASE_API}/auth/export/excel?authUserId=${this.authUserId}`
|
|
|
+ downloadWithUrl(downUrl, '机构数据.xlsx')
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error(`导出机构数据失败`)
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ notification.close()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 导入Excel 并提交
|