6/22完善引入,

This commit is contained in:
Zy
2026-06-22 08:14:35 +08:00
parent ea8129216b
commit 826bf3c782
208 changed files with 1122 additions and 1685 deletions

View File

@@ -28,9 +28,9 @@
v-model="activityTime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
@update:model-value="
(data) => {
if (data && data.length > 0) {
@change="
(data: string[] | null) => {
if (data) {
form.startTime = data[0];
form.endTime = data[1];
} else {
@@ -116,7 +116,7 @@
:on-error="handleError"
:limit="1"
>
<img v-if="form.coverImage" :src="form.coverImage" class="avatar" />
<img alt="活动封面" v-if="form.coverImage" :src="form.coverImage" class="avatar" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</el-form-item>
@@ -210,11 +210,13 @@
</div>
</template>
<script setup lang="ts">
import editor from '@/components/Editor/index.vue';
import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { addActivity, getActivity, updateActivity } from '@/api/system/Activity';
import { genFileId, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
import { genFileId, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
import AMapLoader from '@amap/amap-jsapi-loader';
import { Plus } from '@element-plus/icons-vue';
const uploadUrl = import.meta.env.VITE_APP_BASE_API + '/activity/uploadImage';
@@ -290,7 +292,7 @@ const activityTime = ref([]);
// 上传文件
const upload = ref<UploadInstance>();
// 上传成功
const handleAvatarSuccess: UploadProps['onSuccess'] = (response, uploadFile) => {
const handleAvatarSuccess: UploadProps['onSuccess'] = (response) => {
if (response.data && response.data.url) {
form.value.coverImage = response.data.url;
}
@@ -305,14 +307,14 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
upload.value?.submit();
};
// 上传失败
const handleError: UploadProps['onError'] = (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
const handleError: UploadProps['onError'] = (error: Error) => {
console.log(error);
};
// ! 投诉 ====================================================================================================
// ! 签到 =======================================
const isSignin = ref(false);
// const isSignin = ref(false);
let AMapLi = null;
let map: any = null;
let circle: any = null;
@@ -514,17 +516,17 @@ function handleBack() {
/**
* 销毁地图及所有工具实例(防内存泄漏、重复初始化)
*/
function destroyMapInstance() {
if (map) {
map.destroy();
map = null;
}
mouseTool = null;
geocoder = null;
circle = null;
AMapLi = null;
mapReady.value = false;
}
// function destroyMapInstance() {
// if (map) {
// map.destroy();
// map = null;
// }
// mouseTool = null;
// geocoder = null;
// circle = null;
// AMapLi = null;
// mapReady.value = false;
// }
onUnmounted(() => {
// destroyMapInstance();
});