This commit is contained in:
helen 2024-12-25 11:57:31 +08:00
parent 38e05e148e
commit 2d119334ec
3 changed files with 96 additions and 34 deletions

View File

@ -128,7 +128,12 @@
<el-input v-model="form.activityDescription" placeholder="请输入活动描述" style="width: 500px" autosize type="textarea" />
</el-form-item>
<el-form-item label="活动人数" prop="activityUserCount">
<el-input v-model="form.activityUserCount" placeholder="请输入活动人数" style="width: 300px" />
<el-input
v-model="form.activityUserCount"
placeholder="请输入活动人数"
style="width: 300px"
oninput="value=value.replace(/[^\d.]/g,'')"
/>
</el-form-item>
<div style="display: flex">
<el-form-item label="活动时间" prop="activityTime">
@ -210,11 +215,42 @@
v-model:page="queryAnswerings.pageNum"
v-model:limit="queryAnswerings.pageSize"
:total="Answeringtotal"
@pagination="wendalist"
@pagination="wendalistid"
/>
</el-dialog>
<!-- 报名人数弹窗-->
<el-dialog v-model="numdialog.visible" title="报名人数" width="50%" append-to-body> </el-dialog>
<el-dialog v-model="numdialog.visible" title="报名人数" width="60%" append-to-body>
<el-table v-loading="loading" :height="autoTableHeight" :data="activityUsersListarr">
<el-table-column v-if="true" label="序号" align="center" prop="id" fixed width="80px" />
<el-table-column label="昵称" align="center" fixed prop="nickname" width="180px" />
<el-table-column label="头像" align="center" fixed prop="avatar" width="80px" />
<el-table-column label="性别" align="center" prop="sex">
<template #default="scope">
<dict-tag :options="sys_user_sex" :value="scope.row.sex" />
</template>
</el-table-column>
<el-table-column label="报名宣言" align="center" prop="declaration" show-overflow-tooltip />
<el-table-column label="介绍照片" align="center" prop="introducePhoto" />
<el-table-column label="微信号" align="center" prop="wechat" />
<el-table-column label="报名时间" align="center" prop="createTime" width="180px" />
<el-table-column label="报名结果" align="center" prop="status" width="180px">
<template #default="scope">
<el-tag v-if="scope.row.status == 1" type="info">通过</el-tag>
<el-tag v-if="scope.row.status == 0" type="primary">待挑选</el-tag>
<!-- <el-tag v-if="scope.row.status == 3" type="primary">拒绝</el-tag>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="activityUserstotal > 0"
id="table_page"
v-model:page="queryUsers.pageNum"
v-model:limit="queryUsers.pageSize"
:total="activityUserstotal"
@pagination="registrationCountnumlist"
/>
</el-dialog>
</div>
</template>
@ -230,9 +266,14 @@ import {
activityUsersList
} from '@/api/manage/activity';
import { ActivityVO, ActivityQuery, ActivityForm } from '@/api/manage/activity/types';
import { Search } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { dy_banned_handling_method, sys_user_sex, dy_banned_ban_reason, dy_user_ban_days } = toRefs<any>(
proxy?.useDict('dy_banned_handling_method', 'sys_user_sex', 'dy_banned_ban_reason', 'dy_user_ban_days')
);
import { Search } from '@element-plus/icons-vue';
const activityList = ref<ActivityVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
@ -243,7 +284,7 @@ const multiple = ref(true);
const total = ref(0);
const Answeringtotal = ref(0);
const activityUserstotal = ref(0);
const queryUsersactivityId = ref('');
const listdatatime = ref([{ activityTime: '', planContent: '' }]);
const Answeringlist = ref([]);
const activityUsersListarr = ref([]);
@ -487,7 +528,11 @@ const dellistdata = (index) => {
};
//
const wendalist = async (row) => {
queryAnswerings.activityId = row.id;
queryUsersactivityId.value = row.id;
wendalistid(queryUsersactivityId.value);
};
const wendalistid = async () => {
queryAnswerings.activityId = queryUsersactivityId.value;
const res = await activityAnsweringlist(queryAnswerings);
console.log(res);
Answeringlist.value = res.rows;
@ -496,7 +541,11 @@ const wendalist = async (row) => {
};
//
const registrationCountnum = async (row) => {
queryUsers.activityId = row.id;
queryUsersactivityId.value = row.id;
registrationCountnumlist(queryUsersactivityId.value);
};
const registrationCountnumlist = async () => {
queryUsers.activityId = queryUsersactivityId.value;
const res = await activityUsersList(queryUsers);
activityUsersListarr.value = res.rows;
activityUserstotal.value = res.total;

View File

@ -96,9 +96,14 @@
</el-table-column>
<el-table-column label="操作人" align="center" prop="updateByName" show-overflow-tooltip />
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px" >
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
<template #default="scope">
<el-button v-if="scope.row.status == 0||scope.row.status == 1" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="handleUpdate(scope.row)"
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-hasPermi="['manage:notebook:edit']"
link
type="primary"
@click="handleUpdate(scope.row)"
>编辑</el-button
>
<el-button v-if="scope.row.status == 0" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
@ -110,7 +115,12 @@
<!-- <el-tooltip content="发布" placement="top">-->
<!-- <el-button v-hasPermi="['manage:notebook:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>-->
<!-- </el-tooltip>-->
<el-button v-if="scope.row.status == 0||scope.row.status == 1" v-hasPermi="['manage:notebook:remove']" link type="primary" @click="handleDelete(scope.row)"
<el-button
v-if="scope.row.status == 0 || scope.row.status == 1"
v-hasPermi="['manage:notebook:remove']"
link
type="primary"
@click="handleDelete(scope.row)"
>删除</el-button
>
</template>
@ -150,7 +160,7 @@
</div>
<div>
<el-button @click="cancel"> </el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm('3')"> </el-button>
<el-button :loading="buttonLoading" type="primary" @click="submitForm('0')"> </el-button>
</div>
</div>
</template>
@ -158,8 +168,8 @@
<!-- 笔记详情-->
<el-dialog v-model="concentdialog.visible" title="笔记详情" width="50%" append-to-body>
<div>{{ form.title }}</div>
<div>{{ formatTag(form.tagId) }}</div>
<div>{{ formatlocation(form.location) }}</div>
<div>{{formatTag(form.tagId) }}</div>
<div>{{formatlocation(form.location) }}</div>
<div v-html="form.content"></div>
</el-dialog>
<!-- 评论详情 -->
@ -181,7 +191,7 @@ import { listNotebook, getNotebook, delNotebook, addNotebook, updateNotebook, ta
import { NotebookVO, NotebookQuery, NotebookForm } from '@/api/manage/notebook/types';
import { hotelall } from '@/api/manage/route';
import { reactive } from 'vue';
import { string } from "vue-types";
import { string } from 'vue-types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const notebookList = ref<NotebookVO[]>([]);
@ -223,7 +233,7 @@ const props = defineProps({
});
const addressvalue = ref('');
const statusoptions = ref([
const statusoptions = ref([
{ label: '已发布', value: 3 },
{ label: '审核中', value: 2 },
{ label: '未发布', value: 0 },
@ -398,12 +408,13 @@ const handleUpdate = async (row?: NotebookVO) => {
const fabudata = async (row?: NotebookVO) => {
const _id = row?.id || ids.value[0];
const _idtitle = row?.title ;
const res = await getNotebook(_id);
Object.assign(form.value, res.data);
form.value.status = row.status == 2 ? 0 : 2;
const text = row.status == 2 ? '撤销发布' : '发布';
const textmessage = row.status == 2 ? '撤销发布成功' : '发布成功';
await proxy?.$modal.confirm('是否确认' + text + '笔记编号为' + _id + '"的数据项?').finally(() => (loading.value = false));
form.value.status = row.status == 3 ? 0 : 2;
const text = row.status == 3 ? '撤销发布' : '确认发布';
const textmessage = row.status == 3 ? '撤销发布成功' : '发布成功';
await proxy?.$modal.confirm('是否' + text + '笔记标题为' + _idtitle + '"的数据项?').finally(() => (loading.value = false));
await updateNotebook(form.value).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess(`${textmessage}`);
await getList();
@ -415,13 +426,13 @@ const contenttext = async (row?: NotebookVO) => {
concentdialog.visible = true;
};
/** 提交按钮 */
const submitForm = async(type) => {
const submitForm = async (type) => {
form.value.tagId = tagvalue.value.join(',');
form.value.location = addressvalue.value.join(',');
form.value.cover = '';
form.value.status = Number(type);
form.value.content = form.value.content == '<p><br></p>' ? '' : form.value.content;
if(type == 1){
if (type == 1) {
buttonLoading.value = true;
if (form.value.id) {
await updateNotebook(form.value).finally(() => (buttonLoading.value = false));
@ -432,7 +443,7 @@ const submitForm = async(type) => {
proxy?.$modal.msgSuccess('操作成功');
await getList();
}else{
} else {
notebookFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
@ -449,20 +460,21 @@ const submitForm = async(type) => {
}
});
}
};
/** 删除按钮操作 */
const handleDelete = async (row?: NotebookVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除笔记编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
const _idsname = row?.title;
await proxy?.$modal.confirm('是否确认删除笔记标题为"' + _idsname + '"的数据项?').finally(() => (loading.value = false));
await delNotebook(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();
};
//
const yulansave = () => {
form.value.tagId = tagvalue.value.join(',');
form.value.location = addressvalue.value.join(',');
concentdialog.visible = true;
};

View File

@ -91,10 +91,10 @@
@click="handleDelete(scope.row)"
>删除</el-button
>
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
<el-button v-if="scope.row.status == 0" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row, 1)"
>发布</el-button
>
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row)"
<el-button v-if="scope.row.status == 3" v-hasPermi="['system:Route:remove']" link type="primary" @click="savelistrow(scope.row, 0)"
>撤销发布</el-button
>
</template>
@ -234,7 +234,7 @@
<el-form ref="RouteFormRef" :model="form" :rules="rules" label-width="120px">
<div>线路标题{{ form.title }}</div>
<!-- <el-form-item label="路线封面" prop="attribute">-->
<div>路线标签{{ formatTag(tagvalue) }}</div>
<div>路线标签{{ formatTag(form.tagId) }}</div>
<div>涉及的行政区域{{ addressdata(form.region) }}</div>
<!-- <el-form-item label="涉及的行政区域" prop="treevalue">-->
<!-- <el-cascader v-model="treevalue" :options="regiontree" :props="props" clearable placeholder="请选择涉及的行政区域" style="width: 400px" />-->
@ -286,6 +286,7 @@ import { RouteVO, RouteQuery, RouteForm } from '@/api/manage/route/types';
import { Plus } from '@element-plus/icons-vue';
import { contentall, tagall } from '@/api/manage/notebook';
import { ElMessage } from 'element-plus';
import { updateActivity } from '@/api/manage/activity';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const autoTableHeight = ref<number>(750);
const RouteList = ref<RouteVO[]>([]);
@ -666,16 +667,16 @@ const yulanform = () => {
const yulanquxiao = () => {
yulandialog.visible = false;
};
const savelistrow = async (row) => {
reset();
// tagvalue.value=[]
const savelistrow = async (row, type) => {
const _id = row?.id || ids.value[0];
const res = await getRoute(_id);
Object.assign(form.value, res.data);
form.value.status = Number(res.data.status == 3 ? 0 : 2);
console.log(form.value);
form.value.status = type == 1 ? 2 : 0;
const test = type == 1 ? '发布' : '撤销发布';
const _ids = row?.title || ids.value;
await proxy?.$modal.confirm('是否确认' + test + '行程标题为' + _ids + '的数据项?').finally(() => (loading.value = false));
await updateRoute(form.value).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess('操作成功');
proxy?.$modal.msgSuccess(test + '成功');
await getList();
};
//