From 65230a42e4cb4e2c055c8ac700d39a61a6a10679 Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Thu, 26 Jun 2025 17:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A5=BC=E7=9B=98=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/modules/house.js | 14 + src/assets/upload.png | Bin 0 -> 4755 bytes src/components/GxUpload/index.vue | 49 +- src/components/index.js | 2 + src/locales/lang/zh-CN/menu.js | 6 +- src/router/routes/activity.js | 2 +- src/router/routes/regional.js | 4 +- src/utils/util.js | 6 + src/views/activity/index.vue | 23 +- .../hoseBookList/components/Department.vue | 169 ------ .../components/EditDepartmentDialog.vue | 131 ----- .../hoseBookList/components/EditDialog.vue | 314 ++++------ src/views/regional/hoseBookList/index.vue | 192 +++---- .../houseList/components/EditDialog.vue | 537 +++++++++++++++--- src/views/regional/houseList/index.vue | 30 +- .../projectList/components/EditDialog.vue | 16 +- src/views/regional/projectList/index.vue | 39 +- 17 files changed, 765 insertions(+), 769 deletions(-) create mode 100644 src/apis/modules/house.js create mode 100644 src/assets/upload.png delete mode 100644 src/views/regional/hoseBookList/components/Department.vue delete mode 100644 src/views/regional/hoseBookList/components/EditDepartmentDialog.vue diff --git a/src/apis/modules/house.js b/src/apis/modules/house.js new file mode 100644 index 0000000..25a99f9 --- /dev/null +++ b/src/apis/modules/house.js @@ -0,0 +1,14 @@ +/** + * 区域模块接口 + */ +import request from '@/utils/request' +// 获取项目列表 +export const getProjectList = (params) => request.basic.get('/api/v1/houses', params) +// 获取单挑数据 +export const getItem = (id) => request.basic.get(`/api/v1/houses/${id}`) +// 添加条目 +export const createProject = (params) => request.basic.post('/api/v1/houses', params) +// 更新role +export const updateItem = (id, params) => request.basic.put(`/api/v1/houses/${id}`, params) +// 删除数据 +export const delItem = (id) => request.basic.delete(`/api/v1/houses/${id}`) diff --git a/src/assets/upload.png b/src/assets/upload.png new file mode 100644 index 0000000000000000000000000000000000000000..555c8f9c4bd7c10b2e3f0798a81772beb90eca70 GIT binary patch literal 4755 zcmb7I`9GBH_rLGkZOjZZ#x_F67`sIFEZrl^SQ`?`(%4cFlB7`gppb2dNUEWDBs@fg z!bp@Q=}DF>DP)O6l$83;^L+k-?=RQ6uIqJP=bYC$@Ar9~>q=ob*$Cse;sF2`dz4%@P@^Lh!8UkxpimX_L_Kune)@$5i&W z&d-*l1>iUck_jXhH=tUHH2_89O}+F4U=-koz!auEWSDAm93+3SQP8f#!N~-Mh4+s} z0b$&%5SrsC3+(2F7-4~U!YyyI_HwHgKo8K^R?eRvS|YF`&i!869aL2xLPr`5(6b1D zrCKxP zgj9z|Z15g7@4e)x6GC$81IfsviED$kxBmmpbtBc9W53O_?AKOS+SVGXNTdYVkCSG8 z&zf2LML?>lQ)nr;DM$?ITKbJYi-PZpxj&b>|x_GY6R z5oPYOJjgs-YGO4T)t)*xJs1>C2IW^753%spujluUD=VY=SKg|xS7!J%3XoZpe$wSH zG?c~vC2Bn@1)xscGAp}g1}$Kj31!dxZ$7X9aYK}gEA8a)uZuIsbA(V0KbPK@e>P`& z?l&GaW20&=s_x>@U}{p^?rY~G$?UbgxKox*c>tArkYC$K9S;30e={+5Y-#VC%+rrV zMR92w!FVb`0JWr_v*@)X)v~`2Rz9#XdK$DXy zjKZ<^@oTjfv>ZsGc)m@+l?c> zEjyT&rmk}qY-H?Harto20$wkoxQob3?Lo|%lR@4Knj(>sB8bBC-ctKtj2?JpTr~AQ zLBz35S|)Rutjx8oQJ1#=yo?UWdtARM8@pxuPBwDH^3^tb7=bqZKwP!!0U>ogs6l|= zFuG7){(0XJ3R@^%`sP7l;Bk!G-84vZzhnYF9T@4}qp5-?R>MN=EG~uzb3e#K_+K3J zklPGvZ&L2@SzuvIQ8&UBWqD;1T5f95xy~R%7%N_LJb(6sbAUj#c{##~V@|1k>Wqg= zKYbrx=7Y9ia}dbxPVI1K8R`u%tybn>>F&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9)#0u5JjjwY|u)0)MudXy1+_h%a%_5LuM6`4D*)q7* z_gEtKcG;1O1h8}faieOpkAgVDyjH=MByO2LoB0lLqG~7JbXXpbF?xg8zacaIgrCMd zt!0@>5lMno$L!G;j@#d;>M74Ba)<0&YZ4N#vbnQu>e<~Xnktn@Nh5(&gDD81Jq_;E zC9|BNzWk#^dgJ?It?eBlaiXMJ%s~n#wl>^^e}Kw)YPacTqr8J^Yo=HaHU24*y*`AMPb|m0lcPi!#XGx zI;F^o^SRS|_}S}e0%3zs<=fMv!SPb*S1b9eL4SLwQvL$j_ti0%p()MyLsmhpLb#f} z8)0;gn^<{uiStNg+CR)i8!fv5@;xAJCd>hnp&W5gRchh=fhg|9kAa{D?C^mvY;-*0 z13V6MPW)iv7K-1k@4Gp$)ZE!QmC87FNR=I*d$BlN9NtPXy4vfwOGAMWx+m5@UnraF z5%^0UJC%l9-a2UfGp%Bbo!X+SonMRSM3E=rxdt)ZcWd6|L8lJisP+q-W~ps zATc?`V53Wt4OMVwKL?G2Iy>-Y*kiYvp8FWx -
+
上传
- example + example +
@@ -20,6 +21,11 @@ import { UploadOutlined } from '@ant-design/icons-vue'; import { message } from 'ant-design-vue'; import { config } from '@/config' import apis from '@/apis' + +defineOptions({ + name: 'GxUpload', +}) +const fileType=ref('img') const previewVisible = ref(false) const previewImage = ref('') const props = defineProps({ @@ -31,7 +37,15 @@ const props = defineProps({ listType: { type: String, default: 'text' }, disabled: { type: Boolean, default: false }, uploadText: { type: String }, - fileNumber: { type: Number, default: 6 } + fileNumber: { type: Number, default: 6 }, + width: { + type: Number, + default: 120, + }, + height: { + type: Number, + default: 120, + }, }); const emit = defineEmits(['update:modelValue', 'uploadSuccess', 'uploadError']); @@ -49,18 +63,18 @@ onMounted(() => { }); // 文件上传前校验 const beforeUpload = (file) => { - const isValidType = props.acceptTypes === '*' || - props.acceptTypes.split(',').some(type => file.name.endsWith(type.replace('*', ''))); - const isValidSize = file.size / 1024 / 1024 < props.maxSize; + // const isValidType = props.acceptTypes === '*' || + // props.acceptTypes.split(',').some(type => file.name.endsWith(type.replace('*', ''))); + // const isValidSize = file.size / 1024 / 1024 < props.maxSize; - if (!isValidType) { - message.error(`仅支持 ${props.acceptTypes} 格式文件`); - return false; - } - if (!isValidSize) { - message.error(`文件大小不能超过 ${props.maxSize}MB`); - return false; - } + // if (!isValidType) { + // message.error(`仅支持 ${props.acceptTypes} 格式文件`); + // return false; + // } + // if (!isValidSize) { + // message.error(`文件大小不能超过 ${props.maxSize}MB`); + // return false; + // } return true; }; const handleCancel = () => { @@ -75,10 +89,17 @@ const getBase64 = (file) => { }); } const handlePreview = async (file) => { + console.log(file.name) + const list=['.avi','.mp4','.mov','.wmv','.mkv','.m4v'] + const fileSuffix=file.name.substring(file.name.lastIndexOf('.')) + if(list.includes(fileSuffix)){ + fileType.value='video' + } if (!file.url && !file.preview) { file.preview = await getBase64(file.originFileObj) } previewImage.value = file.url || file.preview; + console.log(previewImage.value) previewVisible.value = true; }; diff --git a/src/components/index.js b/src/components/index.js index c4bba98..7a747b5 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -19,6 +19,7 @@ import UploadImage from './Upload/UploadImage.vue' import UploadInput from './Upload/UploadInput.vue' import Scrollbar from './Scrollbar/Scrollbar.vue' import Cascader from './Cascader/Cascader.vue' +import GxUpload from './GxUpload/index.vue' import { setupLoadingDirective } from './Loading/directive' const componentList = [ @@ -41,6 +42,7 @@ const componentList = [ UploadInput, Scrollbar, Cascader, + GxUpload ] export const loading = Loading diff --git a/src/locales/lang/zh-CN/menu.js b/src/locales/lang/zh-CN/menu.js index c69cd56..90e52a9 100644 --- a/src/locales/lang/zh-CN/menu.js +++ b/src/locales/lang/zh-CN/menu.js @@ -47,9 +47,9 @@ export default { equityGoods: '权益商品', regional: '区域模块', regionalList: '区域列表 ', - projectList: '项目列表', + projectList: '案场列表', hoseBookList: '房刊列表', - houseList: '房源列表', + houseList: '楼盘列表', announcement: '消息公告', announcementList: '公告列表', bannberTypeList: '轮播图分类列表', @@ -65,5 +65,5 @@ export default { erCodeList: '二维码列表', order:"权益订单", points:'积分列表', - activity:'案场活动' + activity:'活动列表' } diff --git a/src/router/routes/activity.js b/src/router/routes/activity.js index 61ca84b..61c40d0 100644 --- a/src/router/routes/activity.js +++ b/src/router/routes/activity.js @@ -7,7 +7,7 @@ export default [ component: 'activity/index.vue', meta: { icon: CoffeeOutlined, - title: '案场活动', + title: '活动列表', isMenu: true, keepAlive: true, permission: '*', diff --git a/src/router/routes/regional.js b/src/router/routes/regional.js index a996a72..ace1a59 100644 --- a/src/router/routes/regional.js +++ b/src/router/routes/regional.js @@ -30,7 +30,7 @@ export default [ name: 'projectList', component: 'regional/projectList/index.vue', meta: { - title: '项目列表', + title: '案场列表', isMenu: true, keepAlive: true, permission: '*', @@ -52,7 +52,7 @@ export default [ name: 'houseList', component: 'regional/houseList/index.vue', meta: { - title: '房源列表', + title: '楼盘列表', isMenu: true, keepAlive: true, permission: '*', diff --git a/src/utils/util.js b/src/utils/util.js index 4a22a24..9141acb 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -328,3 +328,9 @@ export const myTrim = (str, char, type = 'right') => { } return str.replace(/^\s+|\s+$/g, '') } +/**截取图片路径域名部分 */ +export const spliceUrl=(fullUrl)=>{ + if(!fullUrl) return null + const pathOnly = fullUrl.replace(/^https?:\/\/[^\/]+/, ''); + return pathOnly +} \ No newline at end of file diff --git a/src/views/activity/index.vue b/src/views/activity/index.vue index 50a800d..883c494 100644 --- a/src/views/activity/index.vue +++ b/src/views/activity/index.vue @@ -74,11 +74,7 @@ - - - - - + @@ -102,11 +98,7 @@ - - - - - + @@ -122,7 +114,7 @@ import { customersEnum, areaEnum } from "@/enums/useEnum" import EditDialog from './components/EditDialog.vue' import { PlusOutlined, EditOutlined, DeleteOutlined, QrcodeOutlined } from '@ant-design/icons-vue' import { useI18n } from 'vue-i18n' -import qrlogo from '@/assets/qrlogo.png' + defineOptions({ name: 'activity', }) @@ -130,9 +122,7 @@ const { t } = useI18n() // 解构出t方法 const open = ref(false) const imgList = ref([]) const type = ref(1) -const content = ref('') -const qrValue = ref('') -const qropen = ref(false) + const columns = [ { title: '活动标题', dataIndex: 'title', width: 200 }, { title: '活动时间', dataIndex: 'startAt', width: 300, align: 'center' }, @@ -209,10 +199,7 @@ function handleDelete({ id }) { }, }) } -const createQrcode = (params) => { - qrValue.value = 'ceshi' - qropen.value = true -} + /** * 分页 */ diff --git a/src/views/regional/hoseBookList/components/Department.vue b/src/views/regional/hoseBookList/components/Department.vue deleted file mode 100644 index efaefad..0000000 --- a/src/views/regional/hoseBookList/components/Department.vue +++ /dev/null @@ -1,169 +0,0 @@ - - - - - diff --git a/src/views/regional/hoseBookList/components/EditDepartmentDialog.vue b/src/views/regional/hoseBookList/components/EditDepartmentDialog.vue deleted file mode 100644 index e5a271f..0000000 --- a/src/views/regional/hoseBookList/components/EditDepartmentDialog.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/src/views/regional/hoseBookList/components/EditDialog.vue b/src/views/regional/hoseBookList/components/EditDialog.vue index 3f3aa09..c82f07d 100644 --- a/src/views/regional/hoseBookList/components/EditDialog.vue +++ b/src/views/regional/hoseBookList/components/EditDialog.vue @@ -1,155 +1,68 @@ diff --git a/src/views/regional/houseList/index.vue b/src/views/regional/houseList/index.vue index 1889229..54fecf8 100644 --- a/src/views/regional/houseList/index.vue +++ b/src/views/regional/houseList/index.vue @@ -29,7 +29,7 @@ - --> + --> @@ -38,25 +38,23 @@ - 新增房源 + 新增楼盘