bug修改
This commit is contained in:
parent
7b63f708e6
commit
d5467bb89c
@ -10,7 +10,7 @@ import { BannedVO, BannedForm, BannedQuery } from '@/api/manage/banned/types';
|
|||||||
|
|
||||||
export const listBanned = (query?: BannedQuery): AxiosPromise<BannedVO[]> => {
|
export const listBanned = (query?: BannedQuery): AxiosPromise<BannedVO[]> => {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/banned/list',
|
url: '/manage/report/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
177
src/components/Map/index.vue
Normal file
177
src/components/Map/index.vue
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 带有搜索地点的地图 -->
|
||||||
|
<div>
|
||||||
|
<el-form-item :label="title">
|
||||||
|
<el-input
|
||||||
|
v-model="form.address"
|
||||||
|
:placeholder="`请输入${title}`"
|
||||||
|
class="input-with-select"
|
||||||
|
style="width: 300px"
|
||||||
|
@keyup.enter="debouncedSearch(form.address)"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<el-button :icon="Search" @click="debouncedSearch(form.address)" />
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<tlbs-map
|
||||||
|
ref="map"
|
||||||
|
style="margin-left: 80px"
|
||||||
|
api-key="
|
||||||
|
6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO"
|
||||||
|
:center="center"
|
||||||
|
:zoom="zoom"
|
||||||
|
:control="control"
|
||||||
|
@click="onClick"
|
||||||
|
>
|
||||||
|
<tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" />
|
||||||
|
</tlbs-map>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Search } from '@element-plus/icons-vue';
|
||||||
|
import { propTypes } from '@/utils/propTypes';
|
||||||
|
import { jsonp } from 'vue-jsonp';
|
||||||
|
import { debounce } from '@/utils/debounce.js';
|
||||||
|
import { OssVO } from '@/api/system/oss/types';
|
||||||
|
import { listByIds } from '@/api/system/oss';
|
||||||
|
// const prop = defineProps(['datas']);
|
||||||
|
const props = defineProps({
|
||||||
|
datas: {
|
||||||
|
type: [String, Object, Array],
|
||||||
|
default: () => {}
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Object, Array],
|
||||||
|
default: () => {}
|
||||||
|
},
|
||||||
|
//标题
|
||||||
|
title: {
|
||||||
|
type: [String],
|
||||||
|
default: '活动'
|
||||||
|
},
|
||||||
|
//搜索地址
|
||||||
|
address: {
|
||||||
|
type: [String],
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
//查询出来的经纬度
|
||||||
|
// form: {
|
||||||
|
// type: [String, Object, Array],
|
||||||
|
// default: () => []
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
const emit = defineEmits(['modelValue']);
|
||||||
|
// const address = ref(''); // 搜索地点
|
||||||
|
const form = ref(
|
||||||
|
props.datas || {
|
||||||
|
address: '',
|
||||||
|
latitude: '',
|
||||||
|
longitude: '',
|
||||||
|
regionCode: ''
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(() => props.modelValue);
|
||||||
|
// 点击地点,获取经纬度及地址信息
|
||||||
|
const onClick = (e: any) => {
|
||||||
|
jsonp(
|
||||||
|
`https://apis.map.qq.com/ws/geocoder/v1/?key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&location=${e.latLng.lat},${e.latLng.lng}&output=jsonp`,
|
||||||
|
{}
|
||||||
|
).then((data) => {
|
||||||
|
if (data.status == 0) {
|
||||||
|
if (form.value) {
|
||||||
|
form.value.address =
|
||||||
|
data.result.address_component.province +
|
||||||
|
data.result.address_component.city +
|
||||||
|
data.result.address_component.district +
|
||||||
|
data.result.address_component.street +
|
||||||
|
data.result.address_component.street_number;
|
||||||
|
form.value.latitude = data.result.location.lat;
|
||||||
|
form.value.longitude = data.result.location.lng;
|
||||||
|
// form.value.province = data.result.address_component.province;
|
||||||
|
// form.value.city = data.result.address_component.city;
|
||||||
|
// form.value.region = data.result.ad_info.adcode; //行政区划编码
|
||||||
|
form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
||||||
|
center.value.lat = data.result.location.lat;
|
||||||
|
center.value.lng = data.result.location.lng;
|
||||||
|
searchLocation.value = data.result.formatted_addresses.recommend;
|
||||||
|
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
||||||
|
console.log(form.value);
|
||||||
|
emit('modelValue', form.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//输入位置,搜索位置
|
||||||
|
const performSearch = async (text) => {
|
||||||
|
// 这里简单模拟延迟,模拟真实的异步请求耗时
|
||||||
|
// await new Promise((resolve) => setTimeout(resolve, 500));
|
||||||
|
// 假设这里根据输入的文本去查找匹配的数据,实际中替换成真实逻辑
|
||||||
|
if (text === '') {
|
||||||
|
console.log('搜索内容为空');
|
||||||
|
} else {
|
||||||
|
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);
|
||||||
|
if (data.status == 0) {
|
||||||
|
center.value.lat = data.result.location.lat;
|
||||||
|
center.value.lng = data.result.location.lng;
|
||||||
|
form.value.address =
|
||||||
|
data.result.address_components.province +
|
||||||
|
data.result.address_components.city +
|
||||||
|
data.result.address_components.district +
|
||||||
|
data.result.address_components.street +
|
||||||
|
data.result.address_components.street_number;
|
||||||
|
form.value.latitude = data.result.location.lat;
|
||||||
|
form.value.longitude = data.result.location.lng;
|
||||||
|
// form.value.region = data.result.ad_info.adcode; //行政区划编码
|
||||||
|
// form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
||||||
|
|
||||||
|
// form.value.province = data.result.address_components.province;
|
||||||
|
// form.value.city = data.result.address_components.city;
|
||||||
|
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
||||||
|
console.log(form.value);
|
||||||
|
emit('modelValue', form.value);
|
||||||
|
} else if (data.status == 348) {
|
||||||
|
//地址信息不明确,需弹出提示
|
||||||
|
proxy?.$modal.msgError('未查询到地点,请补充详细地址信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const debouncedSearch = debounce(performSearch, 300); // 创建防抖后的搜索函数,延迟设为300毫秒
|
||||||
|
|
||||||
|
const map = ref(null);
|
||||||
|
const center = ref({ lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 });
|
||||||
|
const zoom = ref(20);
|
||||||
|
const control = reactive({
|
||||||
|
scale: {},
|
||||||
|
zoom: {
|
||||||
|
position: 'topLeft'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const searchLocation = ref(''); // 搜索地点
|
||||||
|
const geometries = ref([{ styleId: 'marker', position: { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 } }]);
|
||||||
|
const styles = reactive({
|
||||||
|
marker: {
|
||||||
|
width: 20,
|
||||||
|
height: 30,
|
||||||
|
anchor: { x: 10, y: 30 }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const options = reactive({
|
||||||
|
minZoom: 5,
|
||||||
|
maxZoom: 20
|
||||||
|
});
|
||||||
|
// 监听输入框内容变化,调用防抖后的搜索函数
|
||||||
|
watch(searchLocation, (newValue) => {
|
||||||
|
// debouncedSearch(newValue);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss"></style>
|
@ -5,10 +5,10 @@
|
|||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
|
||||||
<el-form-item label="活动名称" prop="">
|
<el-form-item label="活动名称" prop="">
|
||||||
<el-input class="inputWidth" placeholder="请输入行程路线" clearable @keyup.enter="handleQuery" />
|
<el-input class="inputWidth" placeholder="请输入活动名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="挑选玩友" prop="">
|
<el-form-item label="挑选玩友" prop="">
|
||||||
<el-select v-model="queryParams.status" class="inputWidth" placeholder="请选择是否挑选玩友" clearable>
|
<el-select v-model="queryParams.isSelected" class="inputWidth" placeholder="请选择是否挑选玩友" clearable>
|
||||||
<el-option label="是" :value="1" />
|
<el-option label="是" :value="1" />
|
||||||
<el-option label="否" :value="0" />
|
<el-option label="否" :value="0" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="活动流程" align="center" prop="" width="100px">
|
<el-table-column label="活动流程" align="center" prop="" width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)">查看详情</el-button>
|
<el-button link type="primary" @click="chakanhandle(scope.row)">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="问答" align="center" prop="" width="100px">
|
<el-table-column label="问答" align="center" prop="" width="100px">
|
||||||
@ -136,13 +136,9 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex">
|
<div v-if="dialog.visible" style="display: flex" class="maplist">
|
||||||
<el-form-item label="发布者地址" prop="publisherAddress">
|
<Map :title="'发布者地址'" :datas="Mapvalue" @model-value="getMapValue"></Map>
|
||||||
<el-input v-model="form.publisherAddress" placeholder="请输入活动人数" style="width: 300px" />
|
<Map :title="'活动地点'" :datas="Mapvaluetwo" @model-value="getMapValueTwo"></Map>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动地点" prop="activityLocation">
|
|
||||||
<el-input v-model="form.activityLocation" placeholder="请输入活动人数" style="width: 300px" />
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="收费方式" prop="paymentMethod">
|
<el-form-item label="收费方式" prop="paymentMethod">
|
||||||
<el-radio-group v-model="form.paymentMethod">
|
<el-radio-group v-model="form.paymentMethod">
|
||||||
@ -220,7 +216,7 @@ import {
|
|||||||
activityUsersList
|
activityUsersList
|
||||||
} from '@/api/manage/activity';
|
} from '@/api/manage/activity';
|
||||||
import { ActivityVO, ActivityQuery, ActivityForm } from '@/api/manage/activity/types';
|
import { ActivityVO, ActivityQuery, ActivityForm } from '@/api/manage/activity/types';
|
||||||
|
import { Search } from '@element-plus/icons-vue';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const activityList = ref<ActivityVO[]>([]);
|
const activityList = ref<ActivityVO[]>([]);
|
||||||
@ -238,8 +234,30 @@ const listdatatime = ref([{ activityTime: '', planContent: '' }]);
|
|||||||
const Answeringlist = ref([]);
|
const Answeringlist = ref([]);
|
||||||
const activityUsersListarr = ref([]);
|
const activityUsersListarr = ref([]);
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const publisherAddress = ref({});
|
||||||
|
const Mapvalue = ref({});
|
||||||
|
const Mapvaluetwo = ref({});
|
||||||
|
const note_publish_list = ref([
|
||||||
|
{ value: 2, label: '已发布' },
|
||||||
|
{ value: 2, label: '未发布' },
|
||||||
|
{ value: 1, label: '草稿' }
|
||||||
|
]);
|
||||||
const activityFormRef = ref<ElFormInstance>();
|
const activityFormRef = ref<ElFormInstance>();
|
||||||
|
const getMapValue = (value: any) => {
|
||||||
|
// console.log(value, 'wwwwwwwwwww');
|
||||||
|
// publisherAddress.value = value;
|
||||||
|
//发布者地址
|
||||||
|
form.value.publisherAddress = value.address;
|
||||||
|
form.value.publisherLongitude = value.longitude;
|
||||||
|
form.value.publisherLatitude = value.latitude;
|
||||||
|
};
|
||||||
|
const getMapValueTwo = (value: any) => {
|
||||||
|
//活动地址
|
||||||
|
console.log(value.address);
|
||||||
|
form.value.activityLocation = value.address;
|
||||||
|
form.value.activityLongitude = value.longitude;
|
||||||
|
form.value.activityLatitude = value.latitude;
|
||||||
|
};
|
||||||
const dialog = reactive<DialogOption>({
|
const dialog = reactive<DialogOption>({
|
||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
@ -304,8 +322,8 @@ const data = reactive<PageData<ActivityForm, ActivityQuery>>({
|
|||||||
isSelected: [{ required: true, message: '挑选玩友 0-不挑选 1-挑选不能为空', trigger: 'blur' }],
|
isSelected: [{ required: true, message: '挑选玩友 0-不挑选 1-挑选不能为空', trigger: 'blur' }],
|
||||||
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'blur' }],
|
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'blur' }],
|
||||||
registrationDeadline: [{ required: true, message: '报名截止时间不能为空', trigger: 'blur' }],
|
registrationDeadline: [{ required: true, message: '报名截止时间不能为空', trigger: 'blur' }],
|
||||||
publisherAddress: [{ required: true, message: '发布者地址不能为空', trigger: 'blur' }],
|
// publisherAddress: [{ required: true, message: '发布者地址不能为空', trigger: 'blur' }],
|
||||||
activityLocation: [{ required: true, message: '活动地点不能为空', trigger: 'blur' }],
|
// activityLocation: [{ required: true, message: '活动地点不能为空', trigger: 'blur' }],
|
||||||
paymentMethod: [{ required: true, message: '收费方式 0-免费 1-发起人收款不能为空', trigger: 'blur' }],
|
paymentMethod: [{ required: true, message: '收费方式 0-免费 1-发起人收款不能为空', trigger: 'blur' }],
|
||||||
status: [{ required: true, message: '发布状态 0-未发布 1-审核中 2-发布不能为空', trigger: 'change' }]
|
status: [{ required: true, message: '发布状态 0-未发布 1-审核中 2-发布不能为空', trigger: 'change' }]
|
||||||
}
|
}
|
||||||
@ -370,13 +388,26 @@ const handleUpdate = async (row?: ActivityVO) => {
|
|||||||
console.log(arr);
|
console.log(arr);
|
||||||
// = arr.data;
|
// = arr.data;
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
Object.assign(listdatatime.value, arr.data);
|
// Object.assign(listdatatime.value, arr.data);
|
||||||
|
Mapvalue.value = {
|
||||||
|
address: res.data.publisherAddress,
|
||||||
|
longitude: res.data.publisherLongitude,
|
||||||
|
latitude: res.data.publisherLatitude
|
||||||
|
};
|
||||||
|
Mapvaluetwo.value = {
|
||||||
|
address: res.data.activityLocation,
|
||||||
|
longitude: res.data.activityLongitude,
|
||||||
|
latitude: res.data.activityLatitude
|
||||||
|
};
|
||||||
|
listdatatime.value = arr.data;
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改活动信息';
|
dialog.title = '修改活动信息';
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
|
console.log(form.value);
|
||||||
|
// return;
|
||||||
form.value.dyActivityProcessList = listdatatime.value;
|
form.value.dyActivityProcessList = listdatatime.value;
|
||||||
console.log(form.value);
|
console.log(form.value);
|
||||||
// return
|
// return
|
||||||
@ -438,8 +469,18 @@ const registrationCountnum = async (row) => {
|
|||||||
activityUsersListarr.value = res.rows;
|
activityUsersListarr.value = res.rows;
|
||||||
activityUserstotal.value = res.total;
|
activityUserstotal.value = res.total;
|
||||||
numdialog.visible = true;
|
numdialog.visible = true;
|
||||||
|
};
|
||||||
|
const chakanhandle = async (row?: ActivityVO) => {
|
||||||
|
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.maplist {
|
||||||
|
div {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -45,24 +45,36 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="bannedList">
|
<el-table v-loading="loading" :data="bannedList">
|
||||||
<el-table-column v-if="queryParams.type == 1" label="笔记名称" align="center" prop="contentname" />
|
<el-table-column v-if="queryParams.type == 1" label="笔记名称" align="center" prop="contentId" >
|
||||||
<el-table-column v-if="queryParams.type == 2" label="活动名称" align="center" prop="contentname" />
|
<template #default="scope">
|
||||||
<el-table-column v-if="queryParams.type == 3" label="评论名称" align="center" prop="contentname" />
|
<el-button type="primary" link>查看笔记</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="queryParams.type == 2" label="活动名称" align="center" prop="contentId" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" link>查看活动</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="queryParams.type == 3" label="评论内容" align="center" prop="contentId" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" link>查看笔记</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="用户ID" align="center" prop="reportUserId" />
|
<el-table-column label="用户ID" align="center" prop="reportUserId" />
|
||||||
<el-table-column label="会员等级" align="center" prop="userLevel">
|
<el-table-column label="会员等级" align="center" prop="userLevel">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{formatlevel(scope.row.userLevel)}}</div>
|
<div>{{formatlevel(scope.row.userLevel)}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="昵称" align="center" prop="nickname" />
|
<el-table-column label="昵称" align="center" prop="nickName" />
|
||||||
<el-table-column label="性别" align="center" prop="sex">
|
<el-table-column label="性别" align="center" prop="sex">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="sys_user_sex" :value="scope.row.sex" />
|
<dict-tag :options="sys_user_sex" :value="scope.row.sex" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="头像" align="center" prop="avatar" />
|
<el-table-column label="头像" align="center" prop="avatar" />
|
||||||
<el-table-column label="举报理由" align="center" prop="reportDetails" width="200px" show-overflow-tooltip />
|
<el-table-column label="举报理由" align="center" prop="reportReason" width="200px" show-overflow-tooltip />
|
||||||
<el-table-column label="举报人" align="center" prop="informerNickname" />
|
<el-table-column label="举报人" align="center" prop="informerUserName" />
|
||||||
<el-table-column label="举报时间" align="center" prop="createTime" width="200px" />
|
<el-table-column label="举报时间" align="center" prop="createTime" width="200px" />
|
||||||
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
|
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
|
||||||
<el-table-column label="操作人" align="center" prop="updateByName" width="150px" />
|
<el-table-column label="操作人" align="center" prop="updateByName" width="150px" />
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="180"/>
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip v-if="scope.row.status != 1" content="编辑" placement="top">
|
<el-tooltip v-if="scope.row.status != 1" content="编辑" placement="top">
|
||||||
@ -79,7 +79,13 @@
|
|||||||
<el-input v-model="form.name" placeholder="请输入住宿商家名称" style="width: 300px" />
|
<el-input v-model="form.name" placeholder="请输入住宿商家名称" style="width: 300px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="number">
|
<el-form-item label="联系电话" prop="number">
|
||||||
<el-input v-model="form.number" placeholder="请输入联系电话" style="width: 300px" />
|
<el-input
|
||||||
|
v-model="form.number"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
style="width: 300px"
|
||||||
|
oninput="if(value.length>11)value=value.slice(0,11)"
|
||||||
|
onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商家图片">
|
<el-form-item label="商家图片">
|
||||||
<el-input v-model="imgUrlList.imgUrl" placeholder="请输入商家图片" style="width: 300px" />
|
<el-input v-model="imgUrlList.imgUrl" placeholder="请输入商家图片" style="width: 300px" />
|
||||||
@ -193,7 +199,6 @@ const data = reactive<PageData<HotelForm, HotelQuery>>({
|
|||||||
city: [{ required: true, message: '市级编码不能为空', trigger: 'blur' }],
|
city: [{ required: true, message: '市级编码不能为空', trigger: 'blur' }],
|
||||||
county: [{ required: true, message: '区县编码不能为空', trigger: 'blur' }],
|
county: [{ required: true, message: '区县编码不能为空', trigger: 'blur' }],
|
||||||
address: [{ required: true, message: '地理位置不能为空', trigger: 'blur' }]
|
address: [{ required: true, message: '地理位置不能为空', trigger: 'blur' }]
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const imgUrlList = reactive({
|
const imgUrlList = reactive({
|
||||||
@ -254,7 +259,7 @@ const handleUpdate = async (row?: HotelVO) => {
|
|||||||
reset();
|
reset();
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getHotel(_id);
|
const res = await getHotel(_id);
|
||||||
res.data.regionCode= res.data?.county || res.data?.city || res.data?.province
|
res.data.regionCode = res.data?.county || res.data?.city || res.data?.province;
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改住宿';
|
dialog.title = '修改住宿';
|
||||||
@ -282,7 +287,8 @@ const submitForm = () => {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: HotelVO) => {
|
const handleDelete = async (row?: HotelVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除住宿编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
const _idname = row?.name;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除商家名称为"' + _idname + '"的数据项?').finally(() => (loading.value = false));
|
||||||
await delHotel(_ids);
|
await delHotel(_ids);
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
await getList();
|
await getList();
|
||||||
@ -292,9 +298,10 @@ const handleEdit = async (row?: HotelVO) => {
|
|||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getHotel(_id);
|
const res = await getHotel(_id);
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
const text = row?.status != 1 ? '是否确认发布住宿编号为' : '是否撤销发布住宿编号为';
|
const _idname = row?.name;
|
||||||
|
const text = row?.status != 1 ? '是否确认发布商家名称为' : '是否撤销发布商家名称为';
|
||||||
const messages = row?.status != 1 ? '发布成功' : '撤销成功';
|
const messages = row?.status != 1 ? '发布成功' : '撤销成功';
|
||||||
await proxy?.$modal.confirm(text + _id + '"的数据项?').finally(() => (loading.value = false));
|
await proxy?.$modal.confirm(text + _idname + '"的数据项?').finally(() => (loading.value = false));
|
||||||
const template = {
|
const template = {
|
||||||
...row,
|
...row,
|
||||||
status: row.status == 1 ? 0 : 1,
|
status: row.status == 1 ? 0 : 1,
|
||||||
@ -334,7 +341,6 @@ const performSearch = async (text) => {
|
|||||||
form.value.longitude = data.result.location.lng;
|
form.value.longitude = data.result.location.lng;
|
||||||
// form.value.region = data.result.ad_info.adcode; //行政区划编码
|
// form.value.region = data.result.ad_info.adcode; //行政区划编码
|
||||||
form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
form.value.regionCode = data.result.ad_info.adcode; //行政区划编码
|
||||||
|
|
||||||
// form.value.province = data.result.address_components.province;
|
// form.value.province = data.result.address_components.province;
|
||||||
// form.value.city = data.result.address_components.city;
|
// form.value.city = data.result.address_components.city;
|
||||||
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<!-- 笔记管理 -->
|
<!-- 笔记管理 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
@ -20,8 +19,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布状态" prop="tagId">
|
<el-form-item label="发布状态" prop="tagId">
|
||||||
<!-- <el-input v-model="queryParams.tagId" placeholder="请输入标签" clearable @keyup.enter="handleQuery" /> -->
|
<!-- <el-input v-model="queryParams.tagId" placeholder="请输入标签" clearable @keyup.enter="handleQuery" /> -->
|
||||||
<el-select v-model="queryParams.tagId" placeholder="请选择发布状态" style="width: 240px"
|
<el-select v-model="queryParams.tagId" placeholder="请选择发布状态" style="width: 240px" @keyup.enter="handleQuery">
|
||||||
@keyup.enter="handleQuery">
|
|
||||||
<el-option v-for="item in statusoptions" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in statusoptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -38,8 +36,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['manage:notebook:add']" type="primary" plain icon="Plus" @click="handleAdd">新增
|
<el-button v-hasPermi="['manage:notebook:add']" type="primary" plain icon="Plus" @click="handleAdd">新增 </el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
<!-- <el-button v-hasPermi="['manage:notebook:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"-->
|
<!-- <el-button v-hasPermi="['manage:notebook:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"-->
|
||||||
@ -100,23 +97,26 @@
|
|||||||
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
|
<el-table-column label="操作时间" align="center" prop="updateTime" width="200px" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button v-if="scope.row.status != 2" v-hasPermi="['manage:notebook:edit']" link type="primary"
|
<el-button v-if="scope.row.status != 2" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="handleUpdate(scope.row)"
|
||||||
@click="handleUpdate(scope.row)">编辑</el-button>
|
>编辑</el-button
|
||||||
<el-button v-if="scope.row.status != 2" v-hasPermi="['manage:notebook:edit']" link type="primary"
|
>
|
||||||
@click="fabudata(scope.row)">发布</el-button>
|
<el-button v-if="scope.row.status != 2" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
|
||||||
<el-button v-if="scope.row.status == 2" v-hasPermi="['manage:notebook:edit']" link type="primary"
|
>发布</el-button
|
||||||
@click="fabudata(scope.row)">撤销发布</el-button>
|
>
|
||||||
|
<el-button v-if="scope.row.status == 2" v-hasPermi="['manage:notebook:edit']" link type="primary" @click="fabudata(scope.row)"
|
||||||
|
>撤销发布</el-button
|
||||||
|
>
|
||||||
<!-- <el-tooltip content="发布" placement="top">-->
|
<!-- <el-tooltip content="发布" placement="top">-->
|
||||||
<!-- <el-button v-hasPermi="['manage:notebook:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>-->
|
<!-- <el-button v-hasPermi="['manage:notebook:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>-->
|
||||||
<!-- </el-tooltip>-->
|
<!-- </el-tooltip>-->
|
||||||
<el-button v-hasPermi="['manage:notebook:remove']" link type="primary"
|
<el-button v-if="scope.row.status != 2" v-hasPermi="['manage:notebook:remove']" link type="primary" @click="handleDelete(scope.row)"
|
||||||
@click="handleDelete(scope.row)">删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
|
||||||
:total="total" @pagination="getList" />
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 添加或修改笔记对话框 -->
|
<!-- 添加或修改笔记对话框 -->
|
||||||
<el-dialog v-model="dialog.visible" :title="dialog.title" width="60%" append-to-body>
|
<el-dialog v-model="dialog.visible" :title="dialog.title" width="60%" append-to-body>
|
||||||
@ -167,7 +167,7 @@
|
|||||||
<script setup name="Notebook" lang="ts">
|
<script setup name="Notebook" lang="ts">
|
||||||
import { listNotebook, getNotebook, delNotebook, addNotebook, updateNotebook, tagall, contentall } from '@/api/manage/notebook';
|
import { listNotebook, getNotebook, delNotebook, addNotebook, updateNotebook, tagall, contentall } from '@/api/manage/notebook';
|
||||||
import { NotebookVO, NotebookQuery, NotebookForm } from '@/api/manage/notebook/types';
|
import { NotebookVO, NotebookQuery, NotebookForm } from '@/api/manage/notebook/types';
|
||||||
|
import { hotelall } from '@/api/manage/route';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const notebookList = ref<NotebookVO[]>([]);
|
const notebookList = ref<NotebookVO[]>([]);
|
||||||
@ -261,7 +261,7 @@ const formatTag = (tagId: string | null) => {
|
|||||||
*/
|
*/
|
||||||
const formatlocation = (tagId: string | null) => {
|
const formatlocation = (tagId: string | null) => {
|
||||||
let tagString = '';
|
let tagString = '';
|
||||||
let arrlist = tagId.split(',').map(Number);
|
let arrlist = tagId?.split(',').map(Number);
|
||||||
|
|
||||||
for (let i = 0; i < sys_user_contentOptions.value.length; i++) {
|
for (let i = 0; i < sys_user_contentOptions.value.length; i++) {
|
||||||
const element = sys_user_contentOptions.value[i];
|
const element = sys_user_contentOptions.value[i];
|
||||||
@ -289,7 +289,8 @@ const getTag = async () => {
|
|||||||
};
|
};
|
||||||
const getContent = async () => {
|
const getContent = async () => {
|
||||||
const res = await contentall({ status: 2 });
|
const res = await contentall({ status: 2 });
|
||||||
sys_user_contentOptions.value = res; //地点
|
const arr = await hotelall({ status: 1 });
|
||||||
|
sys_user_contentOptions.value = res.concat(arr); //地点
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<div v-show="showSearch" id="search_div" class="mb-[10px]">
|
<div v-show="showSearch" id="search_div" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
|
||||||
<el-form-item label="行程路线" prop="">
|
<el-form-item label="线路标题" prop="">
|
||||||
<el-input v-model="queryParams.title" class="inputWidth" placeholder="请输入行程路线" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.title" class="inputWidth" placeholder="请输入线路标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布状态" prop="">
|
<el-form-item label="发布状态" prop="">
|
||||||
<el-select v-model="queryParams.status" class="inputWidth" placeholder="请选择发布状态" clearable>
|
<el-select v-model="queryParams.status" class="inputWidth" placeholder="请选择发布状态" clearable>
|
||||||
@ -304,6 +304,7 @@ const dialog = reactive<DialogOption>({
|
|||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
const typeindex = ref('');
|
||||||
const addressdialog = reactive<DialogOption>({
|
const addressdialog = reactive<DialogOption>({
|
||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
@ -506,7 +507,8 @@ const handleUpdate = async (row?: RouteVO) => {
|
|||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
bookrouteDetailsList.value = form.value.routeDetailsList;
|
bookrouteDetailsList.value = form.value.routeDetailsList;
|
||||||
tagvalue.value = form.value.tagId.split(',').map(Number);
|
tagvalue.value = form.value.tagId.split(',');
|
||||||
|
console.log(tagvalue.value);
|
||||||
const arr = form.value.region.split(',');
|
const arr = form.value.region.split(',');
|
||||||
// 使用循环将数组中的元素转换为整数
|
// 使用循环将数组中的元素转换为整数
|
||||||
const result = [];
|
const result = [];
|
||||||
@ -550,7 +552,8 @@ const submitForm = (type) => {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: RouteVO) => {
|
const handleDelete = async (row?: RouteVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除景点、租赁管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
const idstitle = row?.title;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除线路标题为"' + idstitle + '"的数据项?').finally(() => (loading.value = false));
|
||||||
await delRoute(_ids);
|
await delRoute(_ids);
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
await getList();
|
await getList();
|
||||||
@ -574,7 +577,7 @@ const handleExport = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
const getContent = async () => {
|
const getContent = async () => {
|
||||||
const res = await contentall();
|
const res = await contentall({ status: 2 });
|
||||||
sys_user_contentOptions.value = res; //地点
|
sys_user_contentOptions.value = res; //地点
|
||||||
};
|
};
|
||||||
const getTag = async () => {
|
const getTag = async () => {
|
||||||
@ -582,12 +585,13 @@ const getTag = async () => {
|
|||||||
sys_user_tagOptions.value = res; //标签库
|
sys_user_tagOptions.value = res; //标签库
|
||||||
};
|
};
|
||||||
const gethotelall = async () => {
|
const gethotelall = async () => {
|
||||||
const res = await hotelall();
|
const res = await hotelall({ status: 1 });
|
||||||
sys_user_hotelall.value = res;
|
sys_user_hotelall.value = res;
|
||||||
};
|
};
|
||||||
|
|
||||||
//添加行程
|
//添加行程
|
||||||
const add = () => {
|
const add = () => {
|
||||||
|
typeindex.value = undefined;
|
||||||
routeDetailsList.value = {
|
routeDetailsList.value = {
|
||||||
title: '',
|
title: '',
|
||||||
description: '',
|
description: '',
|
||||||
@ -613,6 +617,7 @@ const add = () => {
|
|||||||
};
|
};
|
||||||
//编辑单个行程
|
//编辑单个行程
|
||||||
const editlistitem = (item, index) => {
|
const editlistitem = (item, index) => {
|
||||||
|
typeindex.value = index;
|
||||||
routeDetailsList.value = item;
|
routeDetailsList.value = item;
|
||||||
addressdialog.visible = true;
|
addressdialog.visible = true;
|
||||||
addressdialog.title = `编辑DAY${index + 1}行程`;
|
addressdialog.title = `编辑DAY${index + 1}行程`;
|
||||||
@ -665,7 +670,7 @@ const linkontent = async (row?: RouteVO) => {
|
|||||||
|
|
||||||
//新增编辑行程
|
//新增编辑行程
|
||||||
const savereginer = () => {
|
const savereginer = () => {
|
||||||
if (routeDetailsList.value.id == undefined) {
|
if (typeindex.value == undefined) {
|
||||||
console.log('新增');
|
console.log('新增');
|
||||||
addressdialog.visible = false;
|
addressdialog.visible = false;
|
||||||
routeDetailsList.value.hotelIds = hotelallvalue.value.join(',');
|
routeDetailsList.value.hotelIds = hotelallvalue.value.join(',');
|
||||||
|
Loading…
Reference in New Issue
Block a user