添加推荐接口及优化评论、笔记、标签等组件显示
This commit is contained in:
parent
dc43a2d40b
commit
10ab6380c4
@ -105,3 +105,15 @@ export const commentList = (query: any): AxiosPromise<ArticleVO[]> => {
|
||||
params: query
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param query
|
||||
* @returns
|
||||
*/
|
||||
export const recommend = (query: any) => {
|
||||
return request({
|
||||
url: '/manage/notebook/recommend-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
@ -10,8 +10,8 @@
|
||||
<div style="margin-right: 5px;">
|
||||
{{ comment.nickName }}
|
||||
</div>
|
||||
<div v-if="comment.parentId" class="reply-to"></div>
|
||||
<div v-if="comment.parentId" class="reply-to-username">{{ comment.replyNickName }}</div>
|
||||
<!-- <div v-if="comment.parentId" class="reply-to"></div>
|
||||
<div v-if="comment.parentId" class="reply-to-username">{{ comment.replyNickName }}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-details">
|
||||
@ -21,21 +21,26 @@
|
||||
<span class="ip-address">IP: {{ comment.address?comment.address:'未知' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="comment.replies && comment.replies.length" class="replies">
|
||||
<div v-for="reply in comment.replies" :key="reply.id" class="reply-item">
|
||||
<div v-if="comment.daList && comment.daList.length" class="replies">
|
||||
<div v-for="reply in comment.daList" :key="reply.id" class="reply-item">
|
||||
<div class="user-info">
|
||||
<img :src="reply.avatar" alt="回复用户昵称" class="avatar">
|
||||
<div class="user-details">
|
||||
<div class="username">回复 {{ reply.username }}</div>
|
||||
<div class="comment-content">{{ reply.content }}</div>
|
||||
<div class="comment-info">
|
||||
<span class="comment-time">{{ reply.time }}</span>
|
||||
<span class="ip-address">IP: {{ reply.ipAddress }}</span>
|
||||
<!-- <img :src="reply.avatar" alt="" class="avatar"> -->
|
||||
<image-preview :src="reply.avatar" :width="25" :height="25" />
|
||||
<div class="">
|
||||
<div class="username">
|
||||
<span>{{ reply.nickName }}</span>
|
||||
<div class="reply-to"></div>
|
||||
<span>{{ reply.replyNickName }}</span>
|
||||
</div>
|
||||
<div class="comment-content" style="margin-left: 10px;">{{ reply.content }}</div>
|
||||
<div class="comment-info" style="margin-left: 10px;">
|
||||
<span class="comment-time">{{ reply.createTime }}</span>
|
||||
<span class="ip-address">IP: {{ reply.address?reply.address:'未知' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination v-show="total > 0" id="table_page" :total="total" v-model:page="queryParams.pageNum"
|
||||
@ -113,13 +118,15 @@ const getCommentList = async () => {
|
||||
.reply-to {
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-top: 5px;
|
||||
border-top: 6px solid transparent;
|
||||
/* 上边框透明 */
|
||||
border-bottom: 6px solid transparent;
|
||||
/* 下边框透明 */
|
||||
border-left: 6px solid #999;
|
||||
/* 左边框为箭头颜色,这里设为黑色,可按需更改 */
|
||||
|
||||
margin: 0px 8px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.reply-to-username {
|
||||
@ -130,12 +137,12 @@ const getCommentList = async () => {
|
||||
|
||||
.user-details {
|
||||
margin-left: 35px;
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
padding: 3px 0px;
|
||||
}
|
||||
.comment-content {
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
padding: 3px 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -145,6 +152,15 @@ const getCommentList = async () => {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.replies {
|
||||
margin-left: 35px;
|
||||
|
||||
.reply-item {
|
||||
margin-top: 5px;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
#table_page {
|
||||
height: 50px !important;
|
||||
margin-top: 10px !important;
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<el-table :height="props.autoTableHeight" v-loading="loading" :data="props.articleList"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55" align="center" v-if="props.parentName != 'dyUser'" />
|
||||
<!-- <el-table-column type="selection" width="55" align="center" v-if="props.parentName != 'dyUser'" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" v-if="props.parentName != 'dyUser'" /> -->
|
||||
<el-table-column label="笔记标题" align="center" prop="title" width="180px" />
|
||||
<el-table-column label="笔记封面" align="center" prop="" width="80px" />
|
||||
@ -28,16 +28,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="点赞数" align="center" prop="agreeCount" width="80px">
|
||||
<template #default="scope">
|
||||
<!-- <template #default="scope">
|
||||
<el-button link type="primary" @click="handleComment(scope.row)">12</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="发布状态" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.status == 0 ? '未发布' : scope.row.status == 1 ? '审核中' : scope.row.status == 2 ? '已发布' : '草稿' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" align="center" prop="updateByName" />
|
||||
<!-- <el-table-column label="操作人" align="center" prop="updateByName" /> -->
|
||||
<el-table-column label="操作时间" align="center" prop="updateTime" width="180px" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"
|
||||
v-if="props.parentName != 'dyUser' && props.parentName != 'scenic'">
|
||||
|
@ -14,7 +14,11 @@
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="排序" align="center" prop="" /> -->
|
||||
<el-table-column label="活动人数" align="center" prop="activityUserCount" />
|
||||
<el-table-column label="报名人数" align="center" prop="registrationCount" />
|
||||
<el-table-column label="报名人数" align="center" prop="registrationCount">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="baominglist(scope.row)">{{ scope.row.registrationCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动流程" align="center" prop="" width="100px">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="chakanhandle(scope.row)">查看详情</el-button>
|
||||
@ -51,12 +55,44 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 报名人数弹窗-->
|
||||
<el-dialog v-model="numdialog.visible" title="报名人数" width="60%" append-to-body>
|
||||
<el-table v-loading="loading" :height="500" border :data="numdialog.activityUsersList">
|
||||
<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="numdialog.total > 0" id="table_page" v-model:page="numdialog.params.pageNum"
|
||||
v-model:limit="numdialog.params.pageSize" :total="numdialog.total" @pagination="baominglist" />
|
||||
<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';
|
||||
//导入父组件传递的值
|
||||
const props = defineProps({
|
||||
partyList: {
|
||||
@ -89,6 +125,34 @@ const handleUpdate = async (row?: any) => {
|
||||
const handleDelete = (row: any) => {
|
||||
emit('handleDelete', row);
|
||||
};
|
||||
const cancel = () => {
|
||||
numdialog.visible = false;
|
||||
numdialog.params.pageNum = 1;
|
||||
numdialog.params.activityId = undefined;
|
||||
}
|
||||
// 报名人数弹窗
|
||||
const numdialog = reactive({
|
||||
visible: false,
|
||||
type:'',
|
||||
title:'',
|
||||
total:0,
|
||||
activityUsersList:[],
|
||||
params:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
activityId: undefined
|
||||
}
|
||||
});
|
||||
// 查看报名人数
|
||||
const baominglist = async (row:any) => {
|
||||
if (row.id) {
|
||||
numdialog.params.activityId = row.id;
|
||||
}
|
||||
const res = await activityUsersList(numdialog.params);
|
||||
numdialog.activityUsersList = res.rows;
|
||||
numdialog.total = res.total;
|
||||
numdialog.visible = true;
|
||||
};
|
||||
// 导入父组件定义的函数
|
||||
const emit = defineEmits(['hideDialog', 'handleUpdate', 'handleDelete']);
|
||||
</script>
|
||||
|
@ -32,8 +32,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
v-hasPermi="['manage:dyUser:query']">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery" v-hasPermi="['manage:dyUser:query']">重置</el-button>
|
||||
<!-- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['manage:dyUser:edit']"
|
||||
>封禁</el-button
|
||||
> -->
|
||||
@ -90,46 +91,50 @@
|
||||
</el-table-column>
|
||||
<el-table-column width="55" label="年龄" align="center" prop="age" />
|
||||
<el-table-column width="150" label="常住地" align="center" prop="address" />
|
||||
<el-table-column width="70" label="星座" align="center" prop="constellation" />
|
||||
<el-table-column width="80" label="星座" align="center" prop="constellation">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="dy_user_sign" :value="scope.row.constellation" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" label="职业" align="center" prop="occupation" />
|
||||
<el-table-column width="120" label="简介" align="center" prop="remark" />
|
||||
<el-table-column width="80" label="IP形象" align="center" prop="" />
|
||||
<el-table-column width="80" label="发布笔记" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openNoteListDialog(scope.row)">12</span>
|
||||
@click="openNoteListDialog(scope.row)">{{ scope.row.notebookCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="90" label="发布的活动" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openPartyListDialog(scope.row)">15</span>
|
||||
@click="openPartyListDialog(scope.row)">{{ scope.row.pubMateCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80" label="关注的人" align="center" prop="" />
|
||||
<el-table-column width="80" label="粉丝数" align="center" prop="" />
|
||||
<el-table-column width="80" label="关注的人" align="center" prop="focusCount" />
|
||||
<el-table-column width="80" label="粉丝数" align="center" prop="fanCount" />
|
||||
<el-table-column width="90" label="到过的景点" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openScenicListDialog(scope.row)">20</span>
|
||||
@click="openScenicListDialog(scope.row)">{{ scope.row.scenicSpotCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="90" label="点亮的城市" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openCityListDialog(scope.row)">25</span>
|
||||
@click="openCityListDialog(scope.row)">{{ scope.row.cityCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="110" label="获得的明信片" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span style="color: dodgerblue; cursor: pointer; text-decoration: underline"
|
||||
@click="openPostcardListDialog(scope.row)">12</span>
|
||||
@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="80" label="我的背包" align="center" prop="" />
|
||||
<el-table-column width="90" label="获得的物品" align="center" prop="" />
|
||||
<el-table-column width="70" label="积分" align="center" prop="score" />
|
||||
<el-table-column width="90" label="获得的物品" align="center" prop="obtainedItemsCount" />
|
||||
<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>
|
||||
@ -158,7 +163,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column width="90" label="操作人" align="center" prop="" />
|
||||
<el-table-column width="120" label="操作时间" align="center" prop="" />
|
||||
<el-table-column fixed="right" label="操作" min-width="120">
|
||||
<el-table-column fixed="right" label="操作" min-width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" v-hasPermi="['manage:dyUser:edit']" v-if="scope.row.status == 0"
|
||||
@click="openbanned(scope.row)">封禁</el-button>
|
||||
@ -279,7 +284,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 用户邀请人数 -->
|
||||
<el-dialog title="邀请人数" v-model="inviteListDialog.visible" width="500px" append-to-body>
|
||||
<el-dialog title="邀请人数(大转盘)" v-model="inviteListDialog.visible" width="500px" append-to-body>
|
||||
<el-table :height="300" v-loading="loading" :data="inviteListDialog.inviteList" border>
|
||||
<el-table-column label="用户名称" align="center" fixed prop="nickName" />
|
||||
<el-table-column label="用户头像" align="center" fixed prop="" />
|
||||
@ -317,8 +322,8 @@ import { listDyUser, getDyUser, delDyUser, addDyUser, updateDyUser,userSights,us
|
||||
import { DyUserVO, DyUserQuery, DyUserForm } from '@/api/manage/dyUser/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { dy_user_ban_days, dy_user_status, sys_user_sex, dy_user_ban_mode } = toRefs<any>(
|
||||
proxy?.useDict('dy_user_ban_days', 'dy_user_status', 'sys_user_sex', 'dy_user_ban_mode')
|
||||
const { dy_user_ban_days, dy_user_status, sys_user_sex, dy_user_ban_mode,dy_user_sign } = toRefs<any>(
|
||||
proxy?.useDict('dy_user_ban_days', 'dy_user_status', 'sys_user_sex', 'dy_user_ban_mode','dy_user_sign')
|
||||
);
|
||||
const orderLists = ref([]); //用户订单列表
|
||||
const scenicList = ref([]); //用户点亮的景点
|
||||
|
@ -63,6 +63,11 @@
|
||||
|
||||
<el-table :height="autoTableHeight" v-loading="loading" :data="articleList"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column fixed label="序号" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ID" align="center" prop="id" fixed v-if="false" width="50px" />
|
||||
<el-table-column label="景点名称" align="center" prop="name" fixed v-if="queryParams.type == '0'" width="180px" />
|
||||
<el-table-column label="商家名称" align="center" prop="name" fixed v-if="queryParams.type != '0'" width="180px" />
|
||||
@ -105,26 +110,29 @@
|
||||
<el-button link type="primary" @click="handleDetail(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="喜欢数量" align="center" prop="likeCount" />
|
||||
<el-table-column label="收藏数量" align="center" prop="collectionCount" />
|
||||
<el-table-column label="相关笔记" align="center" prop="pubNotebookCount">
|
||||
<el-table-column label="相关笔记" align="center" prop="recommendNotebookCount">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" v-if="scope.row.status!==3" @click="handleNote(scope.row)">11{{
|
||||
scope.row.noteNumber }}</el-button>
|
||||
<el-button link type="primary" v-if="scope.row.status!==3" @click="handleNote(scope.row)">1{{
|
||||
scope.row.pubNotebookCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="笔记评论数" align="center" prop="notebookCommentCount" width="90px">
|
||||
<el-table-column :label="queryParams.type == '0' ?'景点评论数':queryParams.type == '1' ?'租车评论数':'游艇评论数'" align="center"
|
||||
prop="commentCount" width="90px">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" v-if="scope.row.status!==3" @click="handleNote(scope.row)">11{{
|
||||
scope.row.noteNumber }}</el-button>
|
||||
<el-button link type="primary" v-if="scope.row.status!==3" @click="handleNote(scope.row)">1{{
|
||||
scope.row.notebookCommentCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="笔记点赞数" align="center" prop="notebookAgreeCount" width="90px">
|
||||
<el-table-column :label="queryParams.type == '0' ?'景点喜欢数':queryParams.type == '1' ?'租车喜欢数':'游艇喜欢数'" align="center"
|
||||
prop="agreeCount" width="90" />
|
||||
<el-table-column :label="queryParams.type == '0' ?'景点收藏数':queryParams.type == '1' ?'租车收藏数':'游艇收藏数'" align="center"
|
||||
prop="collectionCount" width="90" />
|
||||
<!-- <el-table-column label="点赞数" align="center" prop="notebookAgreeCount" width="90px">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" v-if="scope.row.status!==3" @click="handleNote(scope.row)">11{{
|
||||
scope.row.noteNumber }}</el-button>
|
||||
<el-button link type="primary" v-if="scope.row.status!==3" @click="handleNote(scope.row)">1{{
|
||||
scope.row.notebookAgreeCount }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- 0-未发布 1-审核中 2-发布 -->
|
||||
<el-table-column label="发布状态" align="center" prop="status" width="100">
|
||||
<template #default="scope">
|
||||
@ -245,12 +253,19 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="地理位置" prop="introduce">
|
||||
<!-- <el-input v-model="searchLocation" type="text" placeholder="请输入地址信息" clearable /> -->
|
||||
<el-input v-model="searchLocation" placeholder="请输入地址信息" class="input-with-select"
|
||||
<!-- <el-input v-model="searchLocation" placeholder="请输入地址信息" class="input-with-select"
|
||||
@keyup.enter="debouncedSearch(searchLocation)">
|
||||
<template #append>
|
||||
<el-button @click="debouncedSearch(searchLocation)" :icon="Search" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-input> -->
|
||||
<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"
|
||||
:value="item.province+item.city+item.title" />
|
||||
<!-- :value="item.ad_info.province+item.ad_info.city+item.title" /> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<tlbs-map style="margin-left: 80px" ref="map" api-key="
|
||||
6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO" :center="center" :zoom="zoom" :control="control" @click="onClick">
|
||||
@ -399,9 +414,12 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 相关笔记 -->
|
||||
<el-dialog title="相关笔记" v-model="noteBookVisible" width="1200px" append-to-body>
|
||||
<noteList :autoTableHeight="300" :sys_user_tagOptions="sys_user_tagOptions" :noteBookTagIds="noteBookTagIds"
|
||||
parentName="scenic" :type="queryParams.type" :id="form.id"></noteList>
|
||||
<el-dialog title="相关笔记" v-model="noteListDialog.visible" width="1200px" append-to-body>
|
||||
<noteList :autoTableHeight="300" :sys_user_tagOptions="sys_user_tagOptions" parentName="scenic"
|
||||
:articleList="noteListDialog.articleList" :type="queryParams.type" :id="form.id"></noteList>
|
||||
<pagination v-show="noteListDialog.total > 0" :total="noteListDialog.total"
|
||||
v-model:page="noteListDialog.params.pageNum" v-model:limit="noteListDialog.params.pageSize"
|
||||
@pagination="handleNote" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel('noteBookVisible')">关 闭</el-button>
|
||||
@ -413,7 +431,7 @@
|
||||
|
||||
<script setup name="Article" lang="ts">
|
||||
import { listTag,tagAll } from '@/api/manage/tag';
|
||||
import { listArticle, getArticle, delArticle, addArticle, updateArticle, listByTagIdNotebook } from '@/api/manage/scenic';
|
||||
import { listArticle, getArticle, delArticle, addArticle, updateArticle, listByTagIdNotebook,recommend } from '@/api/manage/scenic';
|
||||
import { ArticleVO, ArticleQuery, ArticleForm } from '@/api/manage/scenic/types';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { getToken } from '@/utils/auth';
|
||||
@ -443,6 +461,7 @@ const dialog = reactive<DialogOption>({
|
||||
title: '',
|
||||
type:''
|
||||
});
|
||||
const locationOptions = ref([]); //腾讯地图返回的搜索地址列表
|
||||
const noteLists = ref([]); // 相关笔记列表
|
||||
const previewRef = ref(null);
|
||||
const previewVisible = ref(false); //预览弹层
|
||||
@ -608,6 +627,32 @@ const getTagList = async (visible: boolean) => {
|
||||
getTag(); //标签库
|
||||
}
|
||||
}
|
||||
// 地理位置 输入实时搜索
|
||||
const remoteMethod = (query: string) => {
|
||||
if (query !== '') {
|
||||
// 调用腾讯地图API进行搜索,并展示在地图上
|
||||
// geocoder(query).then((result) => {
|
||||
// console.log(result);
|
||||
// });
|
||||
console.log(query);
|
||||
// jsonp(`https://apis.map.qq.com/ws/place/v1/search?key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&keyword=${encodeURI(query)}&boundary=nearby(20.018883,110.348801,1000)&output=jsonp`, {}).then((res) => {
|
||||
jsonp(`https://apis.map.qq.com/ws/place/v1/suggestion?key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&keyword=${encodeURI(query)}®ion=三亚市®ion_fix=0&output=jsonp`, {}).then((res) => {
|
||||
// if (res.region.title!=='海南省') {
|
||||
// proxy?.$modal.msgError('仅支持海南省地理位置');
|
||||
// return
|
||||
// }
|
||||
if (res.status == 0) {
|
||||
locationOptions.value = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 选择地理位置 下拉框值变化
|
||||
const selectChnange = (val:string) => {
|
||||
if (val) {
|
||||
debouncedSearch(searchLocation.value)
|
||||
}
|
||||
}
|
||||
//输入位置,搜索位置
|
||||
const performSearch = async (text) => {
|
||||
// 这里简单模拟延迟,模拟真实的异步请求耗时
|
||||
@ -616,13 +661,13 @@ const performSearch = async (text) => {
|
||||
if (text === '') {
|
||||
console.log('搜索内容为空');
|
||||
} else {
|
||||
console.log('搜索内容为:', text);
|
||||
// console.log('搜索内容为:', text);
|
||||
// 调用腾讯地图API进行搜索,并展示在地图上
|
||||
// geocoder(text).then((result) => {
|
||||
// console.log(result);
|
||||
// });
|
||||
jsonp(`https://apis.map.qq.com/ws/geocoder/v1/?address=${text}&key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&output=jsonp`, {}).then((data) => {
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
if (data.status == 0) {
|
||||
form.value.address =
|
||||
data.result.address_components.province +
|
||||
@ -668,7 +713,7 @@ const onClick = (e: any) => {
|
||||
form.value.region = data.result.ad_info.adcode; //行政区划编码
|
||||
form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
||||
center.value = { lat: data.result.location.lat, lng: data.result.location.lng };
|
||||
searchLocation.value = data.result.formatted_addresses.recommend;
|
||||
searchLocation.value = data.result.formatted_addresses?.recommend;
|
||||
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
||||
}
|
||||
}
|
||||
@ -683,6 +728,7 @@ const getList = async () => {
|
||||
queryParams.value.tagId = queryParams.value.tagId.toString();
|
||||
}
|
||||
const res = await listArticle(queryParams.value).finally(() => (loading.value = false));
|
||||
articleList.value=[];
|
||||
res.rows.forEach((element: any) => {
|
||||
if (element.region == null) {
|
||||
element.region = element.city;
|
||||
@ -706,6 +752,8 @@ const cancel = (type: string) => {
|
||||
dialog.visible = false;
|
||||
noteBookVisible.value = false;
|
||||
noteBookTagIds.value = ''; // 清空标签
|
||||
noteListDialog.visible = false;
|
||||
noteListDialog.params.pageNum=1;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
@ -836,11 +884,26 @@ const handleDetail = async (row?: ArticleVO) => {
|
||||
*/
|
||||
const noteBookVisible = ref(false);
|
||||
const noteBookTagIds = ref(''); //相关笔记的标签id
|
||||
const noteListDialog = reactive({
|
||||
visible: false,
|
||||
total: 0,
|
||||
articleList:[],
|
||||
params:{
|
||||
articleId: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
});
|
||||
// 相关笔记 请求列表
|
||||
const handleNote = async (row?: ArticleVO) => {
|
||||
noteBookTagIds.value = '';
|
||||
noteBookTagIds.value = row?.tagId as string;
|
||||
noteBookVisible.value = true;
|
||||
console.log(row.tagId);
|
||||
// noteBookTagIds.value = '';
|
||||
// noteBookTagIds.value = row?.tagId as string;
|
||||
if (row.id) {
|
||||
noteListDialog.params.articleId = row?.id;
|
||||
}
|
||||
let res = await recommend(noteListDialog.params);
|
||||
noteListDialog.articleList=res.rows;
|
||||
noteListDialog.visible = true;
|
||||
};
|
||||
/** 新增景点,商家提交按钮 */
|
||||
const submitForm = async (type: string) => {
|
||||
|
@ -29,6 +29,11 @@
|
||||
|
||||
<el-table v-loading="loading" :height="autoTableHeight" :data="tagList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column fixed label="序号" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标签ID" align="center" prop="id" v-if="false" width="70px" />
|
||||
<el-table-column label="标签名称" align="center" prop="title" />
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
@ -96,7 +101,8 @@ const tagFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
title: '',
|
||||
type:''
|
||||
});
|
||||
|
||||
const initFormData: TagForm = {
|
||||
@ -108,7 +114,7 @@ const data = reactive<PageData<TagForm, TagQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
title: undefined,
|
||||
sort: undefined,
|
||||
params: {}
|
||||
|
@ -144,7 +144,7 @@ const data = reactive<PageData<UserLevelForm, UserLevelQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
levelName: undefined,
|
||||
status: undefined,
|
||||
score: undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user