1.活动列表增加小程序链接,点击可复制
This commit is contained in:
parent
8c0c4516a8
commit
4e6662d69b
@ -8,18 +8,8 @@
|
||||
<!-- <t-tab-panel value="3" label="公益捐赠" :destroyOnHide="false"></t-tab-panel>-->
|
||||
<!-- <t-tab-panel value="4" label="学习培训" :destroyOnHide="false"></t-tab-panel>-->
|
||||
<!-- </t-tabs>-->
|
||||
<t-table
|
||||
rowKey="index"
|
||||
:data="list"
|
||||
:columns="columns"
|
||||
:stripe="false"
|
||||
:bordered="false"
|
||||
:hover="true"
|
||||
size="large"
|
||||
table-layout="auto"
|
||||
cellEmptyContent="-"
|
||||
:pagination="pagination"
|
||||
>
|
||||
<t-table rowKey="index" :data="list" :columns="columns" :stripe="false" :bordered="false" :hover="true"
|
||||
size="large" table-layout="auto" cellEmptyContent="-" :pagination="pagination">
|
||||
<!-- <template #activity_image="{ row }">-->
|
||||
<!-- <div style="text-align: center;">-->
|
||||
<!-- <t-image-->
|
||||
@ -29,6 +19,9 @@
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<template #wechatUrl="{ row }">
|
||||
<div style="cursor: pointer;color: blue;" @click="copyUrl(row)">pages/packageB/event/event_info?id={{ row.id }}</div>
|
||||
</template>
|
||||
<template #start="{ row }">
|
||||
<div>{{ row.activity_start_time }}</div>
|
||||
<div>-</div>
|
||||
@ -65,11 +58,8 @@
|
||||
</template>
|
||||
<template #qr_code="{ row }">
|
||||
<div style="text-align: center;">
|
||||
<vue-qr v-if="row.if_sign==2"
|
||||
:text="$store.state.user.apiUrl+'?type=1&id='+row.id+'&association_id=1'"
|
||||
width="100"
|
||||
height="100"
|
||||
></vue-qr>
|
||||
<vue-qr v-if="row.if_sign == 2" :text="$store.state.user.apiUrl + '?type=1&id=' + row.id + '&association_id=1'"
|
||||
width="100" height="100"></vue-qr>
|
||||
</div>
|
||||
<div v-if="row.activity_type != 4 && row.activity_type != 1 && row.if_sign == 1">
|
||||
-
|
||||
@ -102,12 +92,8 @@
|
||||
</template>
|
||||
</t-table>
|
||||
<div style="margin-top: 30px">
|
||||
<t-pagination
|
||||
:total="pagination.total"
|
||||
:page-size="pagination.size"
|
||||
@current-change="onCurrentChange"
|
||||
:showPageSize="false"
|
||||
></t-pagination>
|
||||
<t-pagination :total="pagination.total" :page-size="pagination.size" @current-change="onCurrentChange"
|
||||
:showPageSize="false"></t-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<t-dialog header="报名详情" :confirmBtn="null" :visible="infoMode" :onClose="onCloseMy" width="65%" top="50px">
|
||||
@ -131,20 +117,11 @@
|
||||
<t-tab-panel value="3" label="已拒绝" :destroyOnHide="false"></t-tab-panel>
|
||||
</t-tabs>
|
||||
</div>
|
||||
<t-table
|
||||
rowKey="index"
|
||||
:data="info_list"
|
||||
:columns="info_columns"
|
||||
:stripe="false"
|
||||
:bordered="false"
|
||||
:hover="true"
|
||||
size="large"
|
||||
table-layout="auto"
|
||||
cellEmptyContent="-"
|
||||
>
|
||||
<t-table rowKey="index" :data="info_list" :columns="info_columns" :stripe="false" :bordered="false"
|
||||
:hover="true" size="large" table-layout="auto" cellEmptyContent="-">
|
||||
<template #nikename="{ row }">
|
||||
<a :href="$store.state.user.apiUrl+'/dist/#/user/user_info?id='+row.member_id"
|
||||
target="_blank">{{ row.nikename }}</a>
|
||||
<a :href="$store.state.user.apiUrl + '/dist/#/user/user_info?id=' + row.member_id" target="_blank">{{
|
||||
row.nikename }}</a>
|
||||
</template>
|
||||
<template #sign="{ row }">
|
||||
<t-tag v-if="row.sign == 1" theme="success">已签到</t-tag>
|
||||
@ -167,17 +144,12 @@
|
||||
</template>
|
||||
</t-table>
|
||||
<div style="margin-top: 30px">
|
||||
<t-pagination
|
||||
:total="info_pagination.total"
|
||||
:page-size="info_pagination.size"
|
||||
@current-change="onCurrentChangeInfo"
|
||||
:showPageSize="false"
|
||||
></t-pagination>
|
||||
<t-pagination :total="info_pagination.total" :page-size="info_pagination.size"
|
||||
@current-change="onCurrentChangeInfo" :showPageSize="false"></t-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</t-dialog>
|
||||
<t-dialog header="问卷统计" :confirmBtn="null" :visible="QuestionnaireMode" :onClose="onCloseMy" width="65%"
|
||||
top="50px">
|
||||
<t-dialog header="问卷统计" :confirmBtn="null" :visible="QuestionnaireMode" :onClose="onCloseMy" width="65%" top="50px">
|
||||
<div style="height: 600px;overflow-y: scroll;">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div style="font-size: 18px;font-weight: 600;color: #e60000;margin: 15px 0px"></div>
|
||||
@ -216,8 +188,8 @@
|
||||
</table>
|
||||
</div>
|
||||
</t-dialog>
|
||||
<t-dialog :header="getType==3?'捐赠详情':'付费详情'" :confirmBtn="null" :visible="JuanMode" :onClose="onCloseMy"
|
||||
width="65%" top="50px">
|
||||
<t-dialog :header="getType == 3 ? '捐赠详情' : '付费详情'" :confirmBtn="null" :visible="JuanMode" :onClose="onCloseMy" width="65%"
|
||||
top="50px">
|
||||
<div style="height: 600px;overflow-y: scroll;">
|
||||
<table class="layui-table" style="margin: 10px 0px">
|
||||
<thead>
|
||||
@ -238,12 +210,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="margin-top: 30px">
|
||||
<t-pagination
|
||||
:total="JuanTotal"
|
||||
:page-size="15"
|
||||
@current-change="onJuanChange"
|
||||
:showPageSize="false"
|
||||
></t-pagination>
|
||||
<t-pagination :total="JuanTotal" :page-size="15" @current-change="onJuanChange"
|
||||
:showPageSize="false"></t-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</t-dialog>
|
||||
@ -292,8 +260,7 @@
|
||||
</div>
|
||||
</t-dialog>
|
||||
<t-dialog header="编辑题目" :visible="questionnaireUpdateMode" :confirmBtn="null" :onClose="onCloseMy"
|
||||
@confirm="onCloseMy"
|
||||
width="45%" top="20px">
|
||||
@confirm="onCloseMy" width="45%" top="20px">
|
||||
<div style="height: 600px;overflow-y: scroll;">
|
||||
<t-form>
|
||||
<t-card v-for="(item, index) in questionnaire" style="margin-bottom: 10px">
|
||||
@ -507,7 +474,7 @@ export default {
|
||||
this.tabIndex = toInteger(tab);
|
||||
if (tab == 1) {
|
||||
this.columns = [
|
||||
{colKey: 'id', title: '活动ID', align: 'center', width: 150,},
|
||||
{ colKey: 'wechatUrl', title: '小程序链接', align: 'center', width: 150 },
|
||||
{ colKey: 'activity_name', title: '活动标题', align: 'center', width: 150, },
|
||||
{ colKey: 'activity_type', title: '活动类别', width: 140, align: 'center' },
|
||||
{ colKey: 'qr_code', title: '签到二维码', width: 150, align: 'center' },
|
||||
@ -521,7 +488,7 @@ export default {
|
||||
];
|
||||
} else if (tab == 2) {
|
||||
this.columns = [
|
||||
{colKey: 'id', title: '活动ID', align: 'center', width: 150,},
|
||||
{ colKey: 'wechatUrl', title: '小程序链接', align: 'center', width: 150 },
|
||||
{ colKey: 'activity_name', title: '活动标题', align: 'center', width: 150, },
|
||||
{ colKey: 'activity_type', title: '活动类别', width: 200, align: 'center' },
|
||||
{ colKey: 'qr_code', title: '签到二维码', width: 200, align: 'center' },
|
||||
@ -532,7 +499,7 @@ export default {
|
||||
];
|
||||
} else if (tab == 3) {
|
||||
this.columns = [
|
||||
{colKey: 'id', title: '活动ID', align: 'center', width: 150,},
|
||||
{ colKey: 'wechatUrl', title: '小程序链接', align: 'center', width: 150 },
|
||||
{ colKey: 'activity_name', title: '活动标题', align: 'center', width: 250, },
|
||||
{ colKey: 'activity_type', title: '活动类别', width: 200, align: 'center' },
|
||||
// {colKey: 'qr_code', title: '签到二维码', width: 200, align: 'center'},
|
||||
@ -543,7 +510,7 @@ export default {
|
||||
];
|
||||
} else {
|
||||
this.columns = [
|
||||
{colKey: 'id', title: '活动ID', align: 'center', width: 150,},
|
||||
{ colKey: 'wechatUrl', title: '小程序链接', align: 'center', width: 150 },
|
||||
{ colKey: 'activity_name', title: '活动标题', align: 'center', width: 150, },
|
||||
{ colKey: 'activity_type', title: '活动类别', width: 200, align: 'center' },
|
||||
{ colKey: 'qr_code', title: '签到二维码', width: 200, align: 'center' },
|
||||
@ -1029,6 +996,22 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
copyUrl(row){
|
||||
//复制
|
||||
const text = `pages/packageB/event/event_info?id=${row.id}`;
|
||||
// 创建临时textarea元素
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = text;
|
||||
textarea.style.position = 'fixed';
|
||||
textarea.style.opacity = '0';
|
||||
document.body.appendChild(textarea);
|
||||
// 选择文本并复制
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
// 移除临时元素
|
||||
document.body.removeChild(textarea);
|
||||
this.$message.success('复制成功');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -1037,11 +1020,22 @@ export default {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-table-mend, .layui-table-tool, .layui-table-patch, .layui-table-click, .layui-table-hover, .layui-table-header, .table-total-wrapper, .layui-table-total td, .layui-table thead tr, .layui-table tbody tr:hover td, .layui-table.layui-table-even tr:nth-child(2n) td {
|
||||
.layui-table-mend,
|
||||
.layui-table-tool,
|
||||
.layui-table-patch,
|
||||
.layui-table-click,
|
||||
.layui-table-hover,
|
||||
.layui-table-header,
|
||||
.table-total-wrapper,
|
||||
.layui-table-total td,
|
||||
.layui-table thead tr,
|
||||
.layui-table tbody tr:hover td,
|
||||
.layui-table.layui-table-even tr:nth-child(2n) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
.layui-table td, .layui-table th {
|
||||
.layui-table td,
|
||||
.layui-table th {
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
height: 50px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user