|
@@ -1,13 +1,13 @@
|
|
<template>
|
|
<template>
|
|
<div class="snapshot-invite-code-list-container layout-padding">
|
|
<div class="snapshot-invite-code-list-container layout-padding">
|
|
<div class="layout-padding-auto layout-padding-view pd20">
|
|
<div class="layout-padding-auto layout-padding-view pd20">
|
|
- <vxe-grid v-bind="gridOptions" ref="gridRef" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
|
|
|
|
|
|
+ <vxe-grid v-bind="gridOptions" ref="gridRef" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
|
|
<template #toolbar_buttons>
|
|
<template #toolbar_buttons>
|
|
<el-button type="primary" @click="onAdd" v-auth="'snapshot:inviteCode:list:add'">
|
|
<el-button type="primary" @click="onAdd" v-auth="'snapshot:inviteCode:list:add'">
|
|
<SvgIcon name="ele-Plus" class="mr5" />新增邀请码
|
|
<SvgIcon name="ele-Plus" class="mr5" />新增邀请码
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="danger" @click="onDelete" v-auth="'snapshot:inviteCode:list:delete'" :disabled="isChecked" :loading="state.loading"
|
|
|
|
- > <SvgIcon name="ele-Delete" class="mr5" />删除<span v-if="checkTable.length">({{ checkTable.length }})</span>
|
|
|
|
|
|
+ <el-button type="danger" @click="onDelete" v-auth="'snapshot:inviteCode:list:delete'" :disabled="isChecked" :loading="state.loading">
|
|
|
|
+ <SvgIcon name="ele-Delete" class="mr5" />删除<span v-if="checkTable.length">({{ checkTable.length }})</span>
|
|
</el-button>
|
|
</el-button>
|
|
<el-button type="primary" @click="onExport" v-auth="'snapshot:inviteCode:list:export'">
|
|
<el-button type="primary" @click="onExport" v-auth="'snapshot:inviteCode:list:export'">
|
|
<SvgIcon name="iconfont icon-daochu" class="mr5" />导出邀请码
|
|
<SvgIcon name="iconfont icon-daochu" class="mr5" />导出邀请码
|
|
@@ -16,6 +16,14 @@
|
|
<SvgIcon name="iconfont icon-daochu" class="mr5" />批量生成
|
|
<SvgIcon name="iconfont icon-daochu" class="mr5" />批量生成
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #qrCodeUrl="{ row }">
|
|
|
|
+ <el-image
|
|
|
|
+ style="width: 40px; height: 40px"
|
|
|
|
+ :src="'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'"
|
|
|
|
+ :preview-src-list="['https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg']"
|
|
|
|
+ fit="cover"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
<template #action="{ row }">
|
|
<template #action="{ row }">
|
|
<el-button link type="primary" @click="onEdit(row)" v-auth="'snapshot:inviteCode:list:edit'" title="编辑"> 编辑 </el-button>
|
|
<el-button link type="primary" @click="onEdit(row)" v-auth="'snapshot:inviteCode:list:edit'" title="编辑"> 编辑 </el-button>
|
|
<el-button link type="primary" @click="download(row)" v-auth="'snapshot:inviteCode:list:download'" title="编辑人员"> 下载 </el-button>
|
|
<el-button link type="primary" @click="download(row)" v-auth="'snapshot:inviteCode:list:download'" title="编辑人员"> 下载 </el-button>
|
|
@@ -42,7 +50,6 @@
|
|
|
|
|
|
<script lang="tsx" setup name="snapshotInviteCodeList">
|
|
<script lang="tsx" setup name="snapshotInviteCodeList">
|
|
import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
-import { getClueList } from '@/api/snapshot/config';
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
import { getInviteCodeList } from '@/api/snapshot/inviteCode';
|
|
import { getInviteCodeList } from '@/api/snapshot/inviteCode';
|
|
|
|
|
|
@@ -92,14 +99,14 @@ const gridOptions = reactive<any>({
|
|
storage: true,
|
|
storage: true,
|
|
},
|
|
},
|
|
id: 'snapshotInviteCodeList',
|
|
id: 'snapshotInviteCodeList',
|
|
- rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
|
|
|
|
|
|
+ rowConfig: { isHover: true, height: 50, isCurrent: true, useKey: true },
|
|
height: 'auto',
|
|
height: 'auto',
|
|
columns: [
|
|
columns: [
|
|
{ type: 'checkbox', width: 50, align: 'center' },
|
|
{ type: 'checkbox', width: 50, align: 'center' },
|
|
{
|
|
{
|
|
field: 'orgName',
|
|
field: 'orgName',
|
|
title: '部门名称',
|
|
title: '部门名称',
|
|
- minWidth: 200
|
|
|
|
|
|
+ minWidth: 200,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
field: 'beginCode',
|
|
field: 'beginCode',
|
|
@@ -112,6 +119,7 @@ const gridOptions = reactive<any>({
|
|
{
|
|
{
|
|
field: 'qrCodeUrl',
|
|
field: 'qrCodeUrl',
|
|
title: '邀请码地址',
|
|
title: '邀请码地址',
|
|
|
|
+ slots: { default: 'qrCodeUrl' },
|
|
},
|
|
},
|
|
{ title: '操作', width: 120, fixed: 'right', align: 'center', slots: { default: 'action' } },
|
|
{ title: '操作', width: 120, fixed: 'right', align: 'center', slots: { default: 'action' } },
|
|
],
|
|
],
|
|
@@ -149,9 +157,7 @@ const onEdit = (row: any) => {
|
|
codeEditRef.value.openDialog(row.id);
|
|
codeEditRef.value.openDialog(row.id);
|
|
};
|
|
};
|
|
// 下载
|
|
// 下载
|
|
-const download = (row:any)=>{
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+const download = (row: any) => {};
|
|
const checkTable = ref<EmptyArrayType>([]);
|
|
const checkTable = ref<EmptyArrayType>([]);
|
|
const gridRef = ref<RefType>();
|
|
const gridRef = ref<RefType>();
|
|
const selectAllChangeEvent = ({ checked }) => {
|
|
const selectAllChangeEvent = ({ checked }) => {
|
|
@@ -173,16 +179,14 @@ const isChecked = computed(() => {
|
|
return !Boolean(checkTable.value.length);
|
|
return !Boolean(checkTable.value.length);
|
|
});
|
|
});
|
|
// 删除
|
|
// 删除
|
|
-const onDelete = ()=>{
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+const onDelete = () => {};
|
|
// 导出邀请码
|
|
// 导出邀请码
|
|
const exportCodeRef = ref<RefType>();
|
|
const exportCodeRef = ref<RefType>();
|
|
-const onExport = ()=>{
|
|
|
|
|
|
+const onExport = () => {
|
|
exportCodeRef.value.openDialog();
|
|
exportCodeRef.value.openDialog();
|
|
-}
|
|
|
|
|
|
+};
|
|
// 批量生成
|
|
// 批量生成
|
|
-const onCreate = ()=>{
|
|
|
|
|
|
+const onCreate = () => {
|
|
ElMessageBox.confirm(`您确定要批量生成邀请码,是否继续?`, '提示', {
|
|
ElMessageBox.confirm(`您确定要批量生成邀请码,是否继续?`, '提示', {
|
|
confirmButtonText: '确认',
|
|
confirmButtonText: '确认',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -192,10 +196,10 @@ const onCreate = ()=>{
|
|
autofocus: false,
|
|
autofocus: false,
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- queryList();
|
|
|
|
|
|
+ queryList();
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
-}
|
|
|
|
|
|
+};
|
|
// 页面加载时
|
|
// 页面加载时
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
queryList();
|
|
queryList();
|