Compare commits

...

2 Commits

Author SHA1 Message Date
9768b04c88 封禁bug 2024-12-27 14:18:06 +08:00
95a14f596c map 2024-12-27 11:39:34 +08:00
8 changed files with 358 additions and 66 deletions

View File

@ -43,9 +43,9 @@ export const addBanned = (data: BannedForm) => {
* *
* @param data * @param data
*/ */
export const updateBanned = (data: BannedForm) => { export const updatemanage = (data: BannedForm) => {
return request({ return request({
url: '/manage/banned', url: '/manage/report',
method: 'put', method: 'put',
data: data data: data
}); });

View File

@ -95,3 +95,14 @@ export const productCategoryall = (query?: MkJigsawQuery): AxiosPromise<MkJigsaw
params: query params: query
}); });
}; };
/**
*
* @param query
*/
export const mkJoinlist = (query?: MkJigsawQuery): AxiosPromise<MkJigsawVO[]> => {
return request({
url: '/manage/mkJoin/list',
method: 'get',
params: query
});
};

View File

@ -2,17 +2,25 @@
<!-- 带有搜索地点的地图 --> <!-- 带有搜索地点的地图 -->
<div> <div>
<el-form-item :label="title"> <el-form-item :label="title">
<el-input <el-select
v-model="form.address" v-model="searchLocation"
:placeholder="`请输入${title}`" filterable
class="input-with-select" remote
reserve-keyword
clearable
placeholder="请输入地址信息"
:remote-method="remoteMethod"
@change="selectChnange"
style="width: 300px" style="width: 300px"
@keyup.enter="debouncedSearch(form.address)"
> >
<template #append> <el-option
<el-button :icon="Search" @click="debouncedSearch(form.address)" /> v-for="item in locationOptions"
</template> :key="item.id"
</el-input> :label="item.title + '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp' + 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> </el-form-item>
<tlbs-map <tlbs-map
ref="map" ref="map"
@ -26,6 +34,15 @@
> >
<tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" /> <tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" />
</tlbs-map> </tlbs-map>
<el-form-item label="详细地址" prop="address" style="margin-top: 15px">
<el-input v-model="form.address" placeholder="输入地理位置或点击度图上的地点" disabled />
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="输入地理位置或点击度图上的地点" disabled />
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="输入地理位置或点击度图上的地点" disabled />
</el-form-item>
</div> </div>
</template> </template>
@ -73,7 +90,39 @@ const form = ref(
regionCode: '' regionCode: ''
} }
); );
const searchLocation = ref(props.datas.address||''); //
const locationOptions = ref([]); //
watch(() => props.modelValue); watch(() => props.modelValue);
//
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)}&region=三亚市&region_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 onClick = (e: any) => { const onClick = (e: any) => {
jsonp( jsonp(
@ -82,15 +131,15 @@ const onClick = (e: any) => {
).then((data) => { ).then((data) => {
if (data.status == 0) { if (data.status == 0) {
if (form.value) { if (form.value) {
// form.value.address = form.value.address =
// data.result.address_component.province + data.result.address_component.province +
// data.result.address_component.city + data.result.address_component.city +
// data.result.address_component.district + data.result.address_component.district +
// data.result.address_component.street + data.result.address_component.street +
// data.result.address_component.street_number; data.result.address_component.street_number + data.result.formatted_addresses.recommend;
form.value.latitude = data.result.location.lat; form.value.latitude = data.result.location.lat;
form.value.longitude = data.result.location.lng; form.value.longitude = data.result.location.lng;
form.value.address = data.result.formatted_addresses.recommend; // form.value.address = data.result.formatted_addresses.recommend;
// form.value.city = data.result.address_component.city; // form.value.city = data.result.address_component.city;
// 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; //
@ -119,18 +168,18 @@ const performSearch = async (text) => {
jsonp(`https://apis.map.qq.com/ws/geocoder/v1/?address=${text}&key=${'6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO'}&output=jsonp`, {}).then((data) => { 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) { if (data.status == 0) {
// form.value.address = form.value.address =
// data.result.address_components.province + data.result.address_components.province +
// data.result.address_components.city + data.result.address_components.city +
// data.result.address_components.district + data.result.address_components.district +
// data.result.address_components.street + 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.latitude = data.result.location.lat;
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.address = text; // form.value.address = text;
// form.value.city = data.result.address_components.city; // form.value.city = data.result.address_components.city;
center.value = { lat: data.result.location.lat, lng: data.result.location.lng }; center.value = { 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 } }]; geometries.value = [{ styleId: 'marker', position: { lat: data.result.location.lat, lng: data.result.location.lng } }];
@ -147,16 +196,15 @@ const performSearch = async (text) => {
const debouncedSearch = debounce(performSearch, 300); // 300 const debouncedSearch = debounce(performSearch, 300); // 300
const map = ref(null); const map = ref(null);
const center = ref({ lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 }); const center = ref({ lat: form.value.latitude || 20.018883, lng: form.value.longitude || 110.348801 });
const zoom = ref(20); const zoom = ref(147);
const control = reactive({ const control = reactive({
scale: {}, scale: {},
zoom: { zoom: {
position: 'topLeft' position: 'topLeft'
} }
}); });
const searchLocation = ref(''); // const geometries = ref([{ styleId: 'marker', position: { lat: form.value.latitude || 20.018883, lng: form.value.longitude || 110.348801 } }]);
const geometries = ref([{ styleId: 'marker', position: { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 } }]);
const styles = reactive({ const styles = reactive({
marker: { marker: {
width: 20, width: 20,

View File

@ -10,7 +10,8 @@
<el-form-item label="发布状态" prop="status"> <el-form-item label="发布状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择发布状态" style="width: 200px" @keyup.enter="handleQuery"> <el-select v-model="queryParams.status" placeholder="请选择发布状态" style="width: 200px" @keyup.enter="handleQuery">
<el-option label="未发布" value="0" /> <el-option label="未发布" value="0" />
<el-option label="已发布" value="1" /> <el-option label="已发布" value="2" />
<el-option label="审核中" value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -24,7 +25,7 @@
</transition> </transition>
<el-card shadow="never"> <el-card shadow="never">
<el-table v-loading="loading" :data="hotelList"> <el-table v-loading="loading" :data="hotelList" border>
<el-table-column fixed label="序号" align="center" width="80"> <el-table-column fixed label="序号" align="center" width="80">
<template #default="scope"> <template #default="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span> <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
@ -36,7 +37,8 @@
<el-table-column label="联系方式" align="center" prop="number" /> <el-table-column label="联系方式" align="center" prop="number" />
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.status == 1" type="primary">已发布</el-tag> <el-tag v-if="scope.row.status == 1" type="success">审核中</el-tag>
<el-tag v-if="scope.row.status == 2" type="primary">已发布</el-tag>
<el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag> <el-tag v-if="scope.row.status == 0" type="info">未发布</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -44,16 +46,16 @@
<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 == 0" content="编辑" placement="top">
<el-button v-hasPermi="['manage:hotel:edit']" link type="primary" @click="handleUpdate(scope.row)">编辑</el-button> <el-button v-hasPermi="['manage:hotel:edit']" link type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip v-if="scope.row.status != 1" content="删除" placement="top"> <el-tooltip v-if="scope.row.status == 0" content="删除" placement="top">
<el-button v-hasPermi="['manage:hotel:remove']" link type="primary" @click="handleDelete(scope.row)">删除</el-button> <el-button v-hasPermi="['manage:hotel:remove']" link type="primary" @click="handleDelete(scope.row)">删除</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip v-if="scope.row.status == 0" content="发布" placement="top"> <el-tooltip v-if="scope.row.status == 0" content="发布" placement="top">
<el-button v-hasPermi="['manage:hotel:remove']" link type="primary" @click="handleEdit(scope.row)">发布</el-button> <el-button v-hasPermi="['manage:hotel:remove']" link type="primary" @click="handleEdit(scope.row)">发布</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip v-if="scope.row.status == 1" content="撤销发布" placement="top"> <el-tooltip v-if="scope.row.status == 2" content="撤销发布" placement="top">
<el-button v-hasPermi="['manage:hotel:remove']" link type="primary" @click="handleEdit(scope.row)">撤销发布</el-button> <el-button v-hasPermi="['manage:hotel:remove']" link type="primary" @click="handleEdit(scope.row)">撤销发布</el-button>
</el-tooltip> </el-tooltip>
</template> </template>
@ -87,17 +89,24 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="地理位置" prop="address"> <el-form-item label="地理位置" prop="address">
<!-- <el-input v-model="searchLocation" type="text" placeholder="请输入地址信息" clearable /> --> <!-- <el-input v-model="searchLocation" type="text" placeholder="请输入地址信息" clearable /> -->
<el-input <el-select
v-model="form.address" v-model="searchLocation"
filterable
remote
reserve-keyword
clearable
placeholder="请输入地址信息" placeholder="请输入地址信息"
class="input-with-select" :remote-method="remoteMethod"
style="width: 300px" @change="selectChnange"
@keyup.enter="debouncedSearch(form.address)"
> >
<template #append> <el-option
<el-button :icon="Search" @click="debouncedSearch(form.address)" /> v-for="item in locationOptions"
</template> :key="item.id"
</el-input> :label="item.title + '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp' + item.province + ' - ' + item.city + '-' + item.district"
:value="item.province + item.city + item.title"
/>
<!-- :value="item.ad_info.province+item.ad_info.city+item.title" /> -->
</el-select>
</el-form-item> </el-form-item>
<tlbs-map <tlbs-map
v-if="dialog.visible" v-if="dialog.visible"
@ -112,6 +121,15 @@
> >
<tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" /> <tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" />
</tlbs-map> </tlbs-map>
<el-form-item label="详细地址" prop="address" style="margin-top: 15px">
<el-input v-model="form.address" placeholder="输入地理位置或点击度图上的地点" disabled />
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="输入地理位置或点击度图上的地点" disabled />
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="输入地理位置或点击度图上的地点" disabled />
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -143,6 +161,7 @@ const idsname = ref([]);
const single = ref(true); const single = ref(true);
const multiple = ref(true); const multiple = ref(true);
const total = ref(0); const total = ref(0);
const locationOptions = ref([]); //
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const hotelFormRef = ref<ElFormInstance>(); const hotelFormRef = ref<ElFormInstance>();
@ -251,8 +270,9 @@ const handleAdd = () => {
reset(); reset();
dialog.visible = true; dialog.visible = true;
dialog.title = '添加住宿'; dialog.title = '添加住宿';
geometries.value = [{ styleId: 'marker', position: { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 } }]; searchLocation.value = '';
center.value = { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 }; geometries.value = [{ styleId: 'marker', position: { lat: form.value.latitude || 20.018883, lng: form.value.longitude || 110.348801 } }];
center.value = { lat: form.value.latitude || 20.018883, lng: form.value.longitude || 110.348801 };
}; };
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -264,6 +284,7 @@ const handleUpdate = async (row?: HotelVO) => {
Object.assign(form.value, res.data); Object.assign(form.value, res.data);
center.value = { lat: row.latitude, lng: row.longitude }; center.value = { lat: row.latitude, lng: row.longitude };
geometries.value = [{ styleId: 'marker', position: { lat: row.latitude, lng: row.longitude } }]; geometries.value = [{ styleId: 'marker', position: { lat: row.latitude, lng: row.longitude } }];
searchLocation.value = form.value.address;
dialog.visible = true; dialog.visible = true;
dialog.title = '修改住宿'; dialog.title = '修改住宿';
}; };
@ -316,7 +337,35 @@ const handleEdit = async (row?: HotelVO) => {
proxy?.$modal.msgSuccess(messages); proxy?.$modal.msgSuccess(messages);
await getList(); await getList();
}; };
//
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)}&region=三亚市&region_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) => { const performSearch = async (text) => {
// //
@ -338,7 +387,8 @@ const performSearch = async (text) => {
data.result.address_components.city + data.result.address_components.city +
data.result.address_components.district + data.result.address_components.district +
data.result.address_components.street + 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.latitude = data.result.location.lat;
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; //
@ -368,7 +418,8 @@ const onClick = (e: any) => {
data.result.address_component.city + data.result.address_component.city +
data.result.address_component.district + data.result.address_component.district +
data.result.address_component.street + data.result.address_component.street +
data.result.address_component.street_number; data.result.address_component.street_number +
data.result.formatted_addresses.recommend;
form.value.latitude = data.result.location.lat; form.value.latitude = data.result.location.lat;
form.value.longitude = data.result.location.lng; form.value.longitude = data.result.location.lng;
// form.value.province = data.result.address_component.province; // form.value.province = data.result.address_component.province;
@ -385,8 +436,8 @@ const onClick = (e: any) => {
const debouncedSearch = debounce(performSearch, 300); // 300 const debouncedSearch = debounce(performSearch, 300); // 300
const map = ref(null); const map = ref(null);
const center = ref({ lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 }); const center = ref({ lat: form.value.latitude || 20.018883, lng: form.value.longitude || 110.348801 });
const zoom = ref(20); const zoom = ref(17);
const control = reactive({ const control = reactive({
scale: {}, scale: {},
zoom: { zoom: {
@ -394,7 +445,7 @@ const control = reactive({
} }
}); });
const searchLocation = ref(''); // const searchLocation = ref(''); //
const geometries = ref([{ styleId: 'marker', position: { lat: form.value.latitude || 39.145902, lng: form.value.longitude || 117.17546 } }]); const geometries = ref([{ styleId: 'marker', position: { lat: form.value.latitude || 20.018883, lng: form.value.longitude || 110.348801 } }]);
const styles = reactive({ const styles = reactive({
marker: { marker: {
width: 20, width: 20,

View File

@ -47,12 +47,12 @@
<el-table-column label="设置得奖人数" align="center" prop="awardConfigCount" /> <el-table-column label="设置得奖人数" align="center" prop="awardConfigCount" />
<el-table-column label="参与人数" align="center" prop="joinCount"> <el-table-column label="参与人数" align="center" prop="joinCount">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link>{{ scope.row.joinCount }}</el-button> <el-button type="primary" link @click="handleJoin(scope.row)">{{ scope.row.joinCount }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际得奖人数" align="center" prop="awardCount"> <el-table-column label="实际得奖人数" align="center" prop="awardCount">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link>{{ scope.row.awardCount }}</el-button> <el-button link type="primary" @click="handleAward(scope.row)">{{ scope.row.awardCount }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="拼图碎片获得人数" align="center" prop="awardCount"> <el-table-column label="拼图碎片获得人数" align="center" prop="awardCount">
@ -222,6 +222,64 @@
<el-table-column prop="joinCount" label="获得人数" /> <el-table-column prop="joinCount" label="获得人数" />
</el-table> </el-table>
</el-dialog> </el-dialog>
<!-- 获奖人员 -->
<el-dialog v-model="mkReward.visible" title="获奖人员" width="600px" append-to-body>
<div>
<el-table :data="mkRewardUserLists" border style="width: 100%">
<el-table-column prop="userId" label="用户ID" />
<el-table-column prop="nickName" label="昵称" />
<el-table-column prop="" label="获得奖品">
<template #default="scope">
<el-button link type="primary" @click="getproductInfo(scope.row.productId)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
<!-- 奖品详情 -->
<el-dialog v-model="productInfo.visible" title="奖品详情" width="600px" append-to-body>
<div>
<el-form ref="" :model="productInfo.form" label-width="70px">
<el-row :gutter="10" style="margin-bottom: 10px; margin-right: 5px !important">
<el-col :span="8">
<el-form-item label="商品名称" prop="">
<span>{{ productInfo.form.productName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商品类别" prop="">
<span>{{ formatCategoryName(productInfo.form.categoryId) }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应商" prop="">
<span>{{ formatVendorName(productInfo.form.vendorId) }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商品图片" prop="">
<image-preview :src="productInfo.form.image" :width="100" :height="100" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商品说明" prop="">
<span>{{ productInfo.form.productShows }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancelProductInfo()"> </el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
@ -234,9 +292,12 @@ import {
updateMkJigsaw, updateMkJigsaw,
productall, productall,
mkJigsawDetaillist, mkJigsawDetaillist,
productCategoryall productCategoryall, mkJoinlist
} from '@/api/manage/mkJigsaw'; } from "@/api/manage/mkJigsaw";
import { MkJigsawVO, MkJigsawQuery, MkJigsawForm } from '@/api/manage/mkJigsaw/types'; import { MkJigsawVO, MkJigsawQuery, MkJigsawForm } from '@/api/manage/mkJigsaw/types';
import { mkRewardUserList } from '@/api/manage/mkConfig';
import { listProductCategory } from '@/api/manage/productCategory';
import { getProduct } from '@/api/manage/product';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { mk_jigsaw_task_catagory } = toRefs<any>(proxy?.useDict('mk_jigsaw_task_catagory')); const { mk_jigsaw_task_catagory } = toRefs<any>(proxy?.useDict('mk_jigsaw_task_catagory'));
@ -266,7 +327,24 @@ const dialog = reactive<DialogOption>({
visible: false, visible: false,
title: '' title: ''
}); });
const mkRewardUserParams = reactive({
pageNum: 1,
pageSize: 10,
bizId: null
});
const mkReward = reactive({
visible: false
});
const productInfo = reactive({
visible: false,
form: {
image: null,
vendorId: null,
categoryId: null,
productName: null,
productShows: null
}
});
const mksave = reactive<DialogOption>({ const mksave = reactive<DialogOption>({
visible: false, visible: false,
title: '拼图详情' title: '拼图详情'
@ -364,6 +442,7 @@ const getList = async () => {
const cancel = () => { const cancel = () => {
reset(); reset();
dialog.visible = false; dialog.visible = false;
mkReward.visible = false;
}; };
/** 表单重置 */ /** 表单重置 */
@ -570,10 +649,80 @@ const mkdatetime = () => {
form.value.endDate = value2.value[1]; form.value.endDate = value2.value[1];
} }
}; };
//
const handleJoin = async () => {
const res = await mkJoinlist()
};
//
const cancelProductInfo = () => {
productInfo.visible = false;
};
/**
* 查看奖品详情
* @param productId
*/
const getproductInfo = async (productId: any) => {
const res = await getProduct(productId);
productInfo.form = res.data;
productInfo.visible = true;
};
const mkRewardUserLists = ref([]);
const handleAward = async (row: any) => {
loading.value = true;
mkRewardUserParams.bizId = row.id;
const res = await mkRewardUserList(mkRewardUserParams).finally(() => (loading.value = false));
mkRewardUserLists.value = res.rows;
mkReward.visible = true;
// dialog.title = "";
};
/**
* 供应商列表
*/
const listVendorList = ref([]);
const getlistVendor = async () => {
let res = await listVendor({ pageNum: 1, pageSize: 9999 });
listVendorList.value = res.rows;
};
/**
* 格式化 供应商名称
* @param id
*/
const formatVendorName = (id: any) => {
for (let i = 0; i < listVendorList.value.length; i++) {
const element = listVendorList.value[i];
if (element.id == id) {
return element.vendorName;
}
}
};
/**
* 商品类别列表
*/
const productCategoryList = ref([]);
const getProductCategoryList = async () => {
let res = await listProductCategory({ pageNum: 1, pageSize: 9999 });
productCategoryList.value = res.rows;
};
/**
* 格式化商品类别名称
* @param row
*/
const formatCategoryName = (id: any) => {
for (let i = 0; i < productCategoryList.value.length; i++) {
const element = productCategoryList.value[i];
if (element.id == id) {
return element.category;
}
}
};
onMounted(() => { onMounted(() => {
getList(); getList();
getproductall(); getproductall();
goodleibie(); goodleibie();
getlistVendor(); //
getProductCategoryList(); //
}); });
</script> </script>
<style> <style>

View File

@ -365,6 +365,9 @@ const handleQuery = () => {
/** 重置按钮操作 */ /** 重置按钮操作 */
const resetQuery = () => { const resetQuery = () => {
queryParams.value.status = ''; queryParams.value.status = '';
queryParams.value.title = '';
queryParams.value.location = '';
queryParams.value.updateByName = '';
queryFormRef.value?.resetFields(); queryFormRef.value?.resetFields();
handleQuery(); handleQuery();
}; };
@ -419,8 +422,8 @@ const contenttext = async (row?: NotebookVO) => {
}; };
/** 提交按钮 */ /** 提交按钮 */
const submitForm = async (type) => { const submitForm = async (type) => {
form.value.tagId = tagvalue.value.join(','); form.value.tagId = tagvalue.value == '' ? '' : tagvalue.value.join(',');
form.value.location = addressvalue.value.join(','); form.value.location = addressvalue.value == '' ? '' : addressvalue.value.join(',');
form.value.cover = ''; form.value.cover = '';
form.value.status = Number(type); form.value.status = Number(type);
form.value.content = form.value.content == '<p><br></p>' ? '' : form.value.content; form.value.content = form.value.content == '<p><br></p>' ? '' : form.value.content;

View File

@ -76,6 +76,13 @@
<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="updateName" width="150px" /> <el-table-column label="操作人" align="center" prop="updateName" width="150px" />
<el-table-column label="用户状态" align="center" prop="status" width="150px" >
<template #default="scope">
<el-tag v-if="scope.row.status == 1" type="info">禁言</el-tag>
<el-tag v-if="scope.row.status == 2" type="warning">封禁</el-tag>
<el-tag v-if="scope.row.status == 0" type="primary">正常</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="handlingStatus"> <el-table-column label="状态" align="center" prop="handlingStatus">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.handlingStatus == 0" type="info">未处理</el-tag> <el-tag v-if="scope.row.handlingStatus == 0" type="info">未处理</el-tag>
@ -85,13 +92,31 @@
<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"> <template #default="scope">
<el-button v-hasPermi="['manage:report:edit']" link type="primary" @click="handleUpdate(scope.row)">封禁</el-button> <el-button v-hasPermi="['manage:report:edit']" link type="primary" @click="handleUpdate(scope.row)">封禁</el-button>
<el-button v-if="queryParams.type == 1" v-hasPermi="['manage:report:remove']" link type="primary" @click="handleDelete(scope.row)" <el-button
v-if="queryParams.type == 1"
v-hasPermi="['manage:report:remove']"
link
type="primary"
:disabled="scope.row.status == 1"
@click="handleDelete(scope.row)"
>删除笔记</el-button >删除笔记</el-button
> >
<el-button v-if="queryParams.type == 2" v-hasPermi="['manage:report:remove']" link type="primary" @click="handleDelete(scope.row)" <el-button
v-if="queryParams.type == 2"
v-hasPermi="['manage:report:remove']"
link
type="primary"
:disabled="scope.row.status == 1"
@click="handleDelete(scope.row)"
>删除活动</el-button >删除活动</el-button
> >
<el-button v-if="queryParams.type == 3" v-hasPermi="['manage:report:remove']" link type="primary" @click="handleDelete(scope.row)" <el-button
v-if="queryParams.type == 3"
v-hasPermi="['manage:report:remove']"
link
type="primary"
:disabled="scope.row.status == 1"
@click="handleDelete(scope.row)"
>删除评论</el-button >删除评论</el-button
> >
</template> </template>
@ -131,7 +156,7 @@
</template> </template>
<script setup name="Banned" lang="ts"> <script setup name="Banned" lang="ts">
import { listBanned, getBanned, delBanned, addBanned, updateBanned, userLevelall } from '@/api/manage/banned'; import { listBanned, getBanned, delBanned, addBanned, updatemanage, userLevelall } from '@/api/manage/banned';
import { BannedVO, BannedQuery, BannedForm } from '@/api/manage/banned/types'; import { BannedVO, BannedQuery, BannedForm } from '@/api/manage/banned/types';
import { delNotebook } from '@/api/manage/notebook'; import { delNotebook } from '@/api/manage/notebook';
@ -292,9 +317,14 @@ const submitForm = () => {
const handleDelete = async (row?: BannedVO) => { const handleDelete = async (row?: BannedVO) => {
const _ids = row?.contentId; const _ids = row?.contentId;
const _idsname = row?.contentName; const _idsname = row?.contentName;
const arr = {
id: row?.contentId,
type: queryParams.value.type,
handlingStatus: 1
};
const text = queryParams.value.type == 1 ? '笔记名称为“' : queryParams.value.type == 2 ? '活动名称为“' : '评论内容为“'; const text = queryParams.value.type == 1 ? '笔记名称为“' : queryParams.value.type == 2 ? '活动名称为“' : '评论内容为“';
await proxy?.$modal.confirm('是否确认删除' + text + _idsname + '"的数据项?').finally(() => (loading.value = false)); await proxy?.$modal.confirm('是否确认删除' + text + _idsname + '"的数据项?').finally(() => (loading.value = false));
await delNotebook(_ids); await updatemanage(arr);
proxy?.$modal.msgSuccess('删除成功'); proxy?.$modal.msgSuccess('删除成功');
await getList(); await getList();
}; };

View File

@ -267,7 +267,7 @@
<!-- :value="item.ad_info.province+item.ad_info.city+item.title" /> --> <!-- :value="item.ad_info.province+item.ad_info.city+item.title" /> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
<tlbs-map style="margin-left: 80px" ref="map" api-key=" <tlbs-map style="margin-left: 80px" ref="map" api-key="
6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO" :center="center" :zoom="zoom" :control="control" @click="onClick"> 6XFBZ-SAVLT-JGIX2-VOLMK-6S2H3-XUBGO" :center="center" :zoom="zoom" :control="control" @click="onClick">
<tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" /> <tlbs-multi-marker :geometries="geometries" :styles="styles" :options="options" />
</tlbs-map> </tlbs-map>
@ -679,7 +679,7 @@ 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;
center.value = { lat: data.result.location.lat, lng: data.result.location.lng }; center.value = { lat: data.result.location.lat, lng: data.result.location.lng };