修复类型定义及UI更新,优化活动问答和用户邀请功能
This commit is contained in:
parent
9768b04c88
commit
e3f734b8d3
@ -8,7 +8,7 @@ export interface ActivityVO {
|
||||
* 活动名称
|
||||
*/
|
||||
activityName: string;
|
||||
|
||||
activityId: string | number;
|
||||
/**
|
||||
* 活动描述
|
||||
*/
|
||||
@ -83,7 +83,6 @@ export interface ActivityVO {
|
||||
* 操作时间
|
||||
*/
|
||||
updateTime: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ActivityForm extends BaseEntity {
|
||||
@ -151,16 +150,14 @@ export interface ActivityForm extends BaseEntity {
|
||||
* 发布状态 0-未发布 1-审核中 2-发布
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ActivityQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
activityName?: string;
|
||||
|
||||
activityId?: string | number;
|
||||
/**
|
||||
* 活动描述
|
||||
*/
|
||||
@ -221,6 +218,3 @@ export interface ActivityQuery extends PageQuery {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ export interface DyUserVO {
|
||||
/**
|
||||
* 会员等级
|
||||
*/
|
||||
leveId: string | number;
|
||||
levelId: string | number;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
@ -154,7 +154,7 @@ export interface DyUserForm extends BaseEntity {
|
||||
/**
|
||||
* 会员等级
|
||||
*/
|
||||
leveId?: string | number;
|
||||
levelId?: string | number;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
@ -251,7 +251,7 @@ export interface DyUserQuery extends PageQuery {
|
||||
/**
|
||||
* 会员等级
|
||||
*/
|
||||
leveId?: string | number;
|
||||
levelId?: string | number;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
|
@ -26,7 +26,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="问答" align="center" prop="" width="100px">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="wendalist(scope.row)">查看详情</el-button>
|
||||
<el-button link type="primary" @click="wendalistid(scope.row)">查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布状态" align="center" prop="status" width="100px">
|
||||
@ -87,12 +87,46 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 查看活动流程 -->
|
||||
<el-dialog v-model="seedialog.visible" :title="seedialog.title" width="60%" append-to-body>
|
||||
<activitylink :form="form" :listdatatime="seedialog.listdatatime"></activitylink>
|
||||
</el-dialog>
|
||||
<!-- 问答弹窗-->
|
||||
<el-dialog v-model="wendadialog.visible" title="问答" width="40%" append-to-body>
|
||||
<div v-if="wendadialog.Answeringlist.length>0">
|
||||
<div style="height: 400px;overflow: auto;">
|
||||
<div v-for="item in wendadialog.Answeringlist" style="line-height: 30px; padding: 0 20px">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="font-weight: 600; font-size: 14px">Q:{{ item.declaration }}</div>
|
||||
<div style="font-size: 12px">{{ item.quserName }} {{ item.createTime }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 12px">A:{{ item.answer }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination v-show="wendadialog.total > 0" id="table_page" v-model:page="wendadialog.params.pageNum"
|
||||
v-model:limit="wendadialog.params.pageSize" :total="wendadialog.total" @pagination="wendalistid" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-empty description="暂无数据" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="partyList">
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import {activityUsersList} from '@/api/manage/activity';
|
||||
import {
|
||||
getActivity,
|
||||
activityprocess,
|
||||
activityUsersList,
|
||||
activityAnsweringlist
|
||||
} from '@/api/manage/activity';
|
||||
//导入父组件传递的值
|
||||
const props = defineProps({
|
||||
partyList: {
|
||||
@ -108,8 +142,26 @@ const props = defineProps({
|
||||
default: () => ''
|
||||
}
|
||||
});
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_user_sex } = toRefs<any>(
|
||||
proxy?.useDict('sys_user_sex')
|
||||
);
|
||||
const loading = ref(false);
|
||||
|
||||
const form = reactive({
|
||||
id: undefined,
|
||||
activityName: undefined,
|
||||
activityDescription: undefined,
|
||||
sortNum: undefined,
|
||||
activityUserCount: undefined,
|
||||
registrationCount: undefined,
|
||||
isSelected: undefined,
|
||||
activityTime: undefined,
|
||||
registrationDeadline: undefined,
|
||||
publisherAddress: undefined,
|
||||
activityLocation: undefined,
|
||||
paymentMethod: undefined,
|
||||
status: undefined
|
||||
});
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: any) => {
|
||||
// ids.value = selection.map((item) => item.id);
|
||||
@ -129,6 +181,9 @@ const cancel = () => {
|
||||
numdialog.visible = false;
|
||||
numdialog.params.pageNum = 1;
|
||||
numdialog.params.activityId = undefined;
|
||||
wendadialog.visible = false;
|
||||
wendadialog.params.pageNum = 1;
|
||||
wendadialog.params.activityId = undefined;
|
||||
}
|
||||
// 报名人数弹窗
|
||||
const numdialog = reactive({
|
||||
@ -153,6 +208,46 @@ const baominglist = async (row:any) => {
|
||||
numdialog.total = res.total;
|
||||
numdialog.visible = true;
|
||||
};
|
||||
// 查看活动流程
|
||||
const seedialog = reactive({
|
||||
visible: false,
|
||||
title: '活动流程',
|
||||
form: {},
|
||||
listdatatime: [{ activityTime: '', planContent: '' }],
|
||||
});
|
||||
const chakanhandle = async (row: any) => {
|
||||
const res = await getActivity(row.id);
|
||||
const arr = await activityprocess({ activityId: row.id });
|
||||
console.log(arr);
|
||||
// = arr.data;
|
||||
Object.assign(form, res.data);
|
||||
// Object.assign(listdatatime.value, arr.data);
|
||||
seedialog.listdatatime = arr.data;
|
||||
seedialog.visible = true;
|
||||
}
|
||||
// 问答弹窗
|
||||
const wendadialog = reactive({
|
||||
visible: false,
|
||||
title: '问答',
|
||||
total: 0,
|
||||
params:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
activityId: undefined
|
||||
},
|
||||
Answeringlist:[]
|
||||
});
|
||||
const wendalistid = async (row:any) => {
|
||||
if (row.id) {
|
||||
wendadialog.params.activityId = row.id;
|
||||
}
|
||||
loading.value = true;
|
||||
const res = await activityAnsweringlist(wendadialog.params).finally(()=>{loading.value = false});
|
||||
console.log(res);
|
||||
wendadialog.Answeringlist = res.rows;
|
||||
wendadialog.total = res.total;
|
||||
wendadialog.visible = true;
|
||||
};
|
||||
// 导入父组件定义的函数
|
||||
const emit = defineEmits(['hideDialog', 'handleUpdate', 'handleDelete']);
|
||||
</script>
|
||||
|
@ -99,7 +99,8 @@
|
||||
<el-input v-model="form.title" placeholder="请输入文章标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标签" prop="tagId_copy">
|
||||
<el-select class="inputWidth" v-model="form.tagId_copy" multiple filterable placeholder="请选择标签" clearable>
|
||||
<el-select class="inputWidth" v-model="form.tagId_copy" multiple filterable placeholder="请选择标签" clearable
|
||||
@visible-change="getTagList">
|
||||
<el-option v-for="dict in sys_user_tagOptions" :key="dict.id" :label="dict.title"
|
||||
:value="String(dict.id)" />
|
||||
</el-select>
|
||||
@ -286,6 +287,11 @@ const handleUpdate = async (row?:any) => {
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改文章";
|
||||
}
|
||||
const getTagList = async (visible: boolean) => {
|
||||
if (visible) {
|
||||
getTag(); //标签库
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param row 发布,撤销发布
|
||||
@ -319,6 +325,8 @@ const submitForm = () => {
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}else{
|
||||
proxy?.$modal.msgError("缺少必填项");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -24,10 +24,10 @@
|
||||
<el-option v-for="dict in dy_user_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员等级" prop="leveId">
|
||||
<!-- <el-input class="inputWidth" v-model="queryParams.leveId" placeholder="请输入会员等级" clearable
|
||||
<el-form-item label="会员等级" prop="levelId">
|
||||
<!-- <el-input class="inputWidth" v-model="queryParams.levelId" placeholder="请输入会员等级" clearable
|
||||
@keyup.enter="handleQuery" /> -->
|
||||
<el-select class="inputWidth" v-model="queryParams.leveId" placeholder="请选择会员等级" clearable>
|
||||
<el-select class="inputWidth" v-model="queryParams.levelId" placeholder="请选择会员等级" clearable>
|
||||
<el-option v-for="dict in levelList" :key="dict.id" :label="dict.levelName" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -131,19 +131,24 @@
|
||||
@click="openPostcardListDialog(scope.row)">{{ scope.row.postcardCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80" label="我的愿望" align="center" prop="" />
|
||||
<el-table-column width="150" label="我的愿望" align="center" prop="wish" show-overflow-tooltip />
|
||||
<el-table-column width="80" label="我的背包" align="center" prop="" />
|
||||
<el-table-column width="90" label="获得的物品" align="center" prop="obtainedItemsCount" />
|
||||
<el-table-column width="90" label="获得的物品" align="center" prop="obtainedItemsCount">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openObtainedItemsListDialog(scope.row)">{{ scope.row.obtainedItemsCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70" label="积分" align="center" prop="userScore" />
|
||||
<el-table-column width="90" label="我的订单" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer" @click="openOrderListDialog(scope.row)">查看详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80" label="邀请人数" align="center" prop="">
|
||||
<el-table-column width="100" label="邀请人数(大转盘)" align="center" prop="inviteCount">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openInviteListDialog(scope.row)">35</span>
|
||||
@click="openInviteListDialog(scope.row)">{{ scope.row.inviteCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80" label="处理方式" align="center" prop="">
|
||||
@ -311,6 +316,23 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 用户邀请人数 -->
|
||||
<el-dialog title="获得物品" v-model="obtainedItemsDialog.visible" width="500px" append-to-body>
|
||||
<el-table :height="300" v-loading="loading" :data="obtainedItemsDialog.obtainedList" border>
|
||||
<el-table-column label="名称" align="center" fixed prop="" />
|
||||
<el-table-column label="来源" align="center" fixed prop="" />
|
||||
<el-table-column label="获得时间" align="center" fixed prop="" />
|
||||
<el-table-column label="邮寄/使用状态" align="center" fixed prop="" />
|
||||
</el-table>
|
||||
<pagination v-show="obtainedItemsDialog.total > 0" :total="obtainedItemsDialog.total"
|
||||
v-model:page="obtainedItemsDialog.params.pageNum" v-model:limit="obtainedItemsDialog.params.pageSize"
|
||||
@pagination="openInviteListDialog" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -358,7 +380,7 @@ const initFormData: DyUserForm = {
|
||||
loginIp: undefined,
|
||||
loginDate: undefined,
|
||||
remark: undefined,
|
||||
leveId: undefined,
|
||||
levelId: undefined,
|
||||
birthday: undefined,
|
||||
age: undefined,
|
||||
address: undefined,
|
||||
@ -383,7 +405,7 @@ const data = reactive<PageData<DyUserForm, DyUserQuery>>({
|
||||
status: undefined,
|
||||
loginIp: undefined,
|
||||
loginDate: undefined,
|
||||
leveId: undefined,
|
||||
levelId: undefined,
|
||||
birthday: undefined,
|
||||
age: undefined,
|
||||
address: undefined,
|
||||
@ -451,6 +473,8 @@ const cancel = () => {
|
||||
inviteListDialog.params.pageNum = 1;
|
||||
orderListDialog.visible = false;
|
||||
orderListDialog.params.pageNum = 1;
|
||||
obtainedItemsDialog.visible = false;
|
||||
obtainedItemsDialog.params.pageNum = 1;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
@ -554,7 +578,8 @@ const openNoteListDialog = async (row?: any) => {
|
||||
if (row.id) {
|
||||
noteListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await listNotebook(noteListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await listNotebook(noteListDialog.params).finally(()=>{loading.value = false});
|
||||
noteListDialog.articleList=res.rows;
|
||||
noteListDialog.total=res.total;
|
||||
noteListDialog.visible = true;
|
||||
@ -577,7 +602,8 @@ const openPartyListDialog = async (row: any) => {
|
||||
if (row.id) {
|
||||
partyListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await listActivity(partyListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await listActivity(partyListDialog.params).finally(()=>{loading.value = false});;
|
||||
partyListDialog.partyList = res.rows;
|
||||
partyListDialog.total = res.total;
|
||||
partyListDialog.visible = true;
|
||||
@ -603,7 +629,8 @@ const openScenicListDialog = async (row: DyUserVO) => {
|
||||
if (row.id) {
|
||||
scenicListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await userSights(scenicListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await userSights(scenicListDialog.params).finally(()=>{loading.value = false});;
|
||||
scenicListDialog.scenicList = res.rows;
|
||||
scenicListDialog.total = res.total;
|
||||
scenicListDialog.visible = true;
|
||||
@ -629,7 +656,8 @@ const openCityListDialog = async (row: DyUserVO) => {
|
||||
if (row.id) {
|
||||
cityListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await userCity(cityListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await userCity(cityListDialog.params).finally(()=>{loading.value = false});;
|
||||
cityListDialog.cityList = res.rows;
|
||||
cityListDialog.total = res.total;
|
||||
cityListDialog.visible = true;
|
||||
@ -652,7 +680,8 @@ const openPostcardListDialog = async (row: DyUserVO) => {
|
||||
if (row.id) {
|
||||
postcardListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await userPostcard(postcardListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await userPostcard(postcardListDialog.params).finally(()=>{loading.value = false});;
|
||||
postcardListDialog.postcardList = res.rows;
|
||||
postcardListDialog.total = res.total;
|
||||
postcardListDialog.visible = true;
|
||||
@ -675,12 +704,37 @@ const openOrderListDialog = async (row: DyUserVO) => {
|
||||
if (row.id) {
|
||||
orderListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await userOrders(orderListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await userOrders(orderListDialog.params).finally(()=>{loading.value = false});;
|
||||
orderListDialog.postcardList = res.rows;
|
||||
orderListDialog.total = res.total;
|
||||
orderListDialog.visible = true;
|
||||
orderListDialog.visible = true;
|
||||
};
|
||||
/**
|
||||
* 获得的物品
|
||||
*/
|
||||
const obtainedItemsDialog = reactive({
|
||||
visible: false,
|
||||
total: 0,
|
||||
obtainedList: [],
|
||||
params: {
|
||||
userId: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
})
|
||||
const openObtainedItemsListDialog = async (row: DyUserVO) => {
|
||||
if (row.id) {
|
||||
obtainedItemsDialog.params.userId = row?.id;
|
||||
}
|
||||
loading.value = true;
|
||||
let res = await userOrders(obtainedItemsDialog.params).finally(()=>{loading.value = false});;
|
||||
obtainedItemsDialog.obtainedList = res.rows;
|
||||
obtainedItemsDialog.total = res.total;
|
||||
obtainedItemsDialog.visible = true;
|
||||
obtainedItemsDialog.visible = true;
|
||||
};
|
||||
/**
|
||||
* 用户邀请列表
|
||||
*/
|
||||
@ -698,7 +752,8 @@ const openInviteListDialog = async (row: DyUserVO) => {
|
||||
if (row.id) {
|
||||
inviteListDialog.params.userId = row?.id;
|
||||
}
|
||||
let res = await userInvite(inviteListDialog.params);
|
||||
loading.value = true;
|
||||
let res = await userInvite(inviteListDialog.params).finally(()=>{loading.value = false});;
|
||||
inviteListDialog.inviteList = res.rows;
|
||||
inviteListDialog.total = res.total;
|
||||
inviteListDialog.visible = true;
|
||||
|
@ -262,7 +262,7 @@
|
||||
<el-select v-model="searchLocation" filterable remote reserve-keyword clearable placeholder="请输入地址信息"
|
||||
@change="selectChnange" :remote-method="remoteMethod">
|
||||
<el-option v-for="item in locationOptions" :key="item.id"
|
||||
:label="item.title + '      ' + item.province+' - '+item.city"
|
||||
:label="item.title + '      ' +'('+ item.province+' - '+item.city+`${item.district?' - '+item.district:''}`+')'"
|
||||
:value="item.province+item.city+item.title" />
|
||||
<!-- :value="item.ad_info.province+item.ad_info.city+item.title" /> -->
|
||||
</el-select>
|
||||
@ -674,7 +674,8 @@ const performSearch = async (text) => {
|
||||
data.result.address_components.city +
|
||||
data.result.address_components.district +
|
||||
data.result.address_components.street +
|
||||
data.result.address_components.street_number;
|
||||
data.result.address_components.street_number+
|
||||
data.result.title;
|
||||
form.value.latitude = data.result.location.lat;
|
||||
form.value.longitude = data.result.location.lng;
|
||||
form.value.region = data.result.ad_info.adcode; //行政区划编码
|
||||
@ -950,6 +951,8 @@ const submitForm = async (type: string) => {
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}else{
|
||||
proxy?.$modal.msgError("缺少必填项");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user