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 0000000..555c8f9
Binary files /dev/null and b/src/assets/upload.png differ
diff --git a/src/components/GxUpload/index.vue b/src/components/GxUpload/index.vue
index 747845a..b5738be 100644
--- a/src/components/GxUpload/index.vue
+++ b/src/components/GxUpload/index.vue
@@ -2,13 +2,14 @@
-
+
-
+
+
@@ -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 @@
{{ $t('pages.system.user.edit') }}
-
-
- 二维码
-
-
+
{{ $t('pages.system.delete') }}
@@ -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 @@
-
-
-
-
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
- 添加子部门
-
-
- 编辑
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
- 新建部门
-
-
-
-
-
-
-
-
-
-
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 @@
- 新增房源
+ 新增楼盘
-
-
-
-
- 启用
- 停用
+
+ {{ record.price+'(元/平)' }}
+
{{ $t('pages.system.user.edit') }}
+
{{ $t('pages.system.delete') }}
@@ -80,15 +78,18 @@ import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n'
+
defineOptions({
name: 'houseList',
})
const { t } = useI18n() // 解构出t方法
const columns = [
- { title: '区域名称', dataIndex: 'name'},
- { title: '经度', dataIndex: 'lon',width:100,align:'center'},
- { title: '纬度', dataIndex: 'lat',width:100,align:'center'},
- { title: '状态', dataIndex: 'status', key: 'introduce', width: 100,align:'center' },
+ { title: '楼盘名称', dataIndex: 'name' },
+ { title: '主力户型', dataIndex: 'masterType', width: 120, align: 'center' },
+ { title: '开盘时间', dataIndex: 'openAt', width: 100, align: 'center' },
+ { title: '楼盘地址', dataIndex: 'address', align: 'center',ellipsis: true, },
+ { title: '楼盘均价', dataIndex: 'price', align: 'center', width: 110 },
+ { title: '待售状态', dataIndex: 'status', key: 'introduce', width: 100, align: 'center' },
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
]
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
@@ -102,7 +103,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { success, data, total } = await apis.area
+ const { success, data, total } = await apis.house
.getProjectList({
pageSize,
page: current,
@@ -133,7 +134,7 @@ function handleDelete({ id }) {
return new Promise((resolve, reject) => {
; (async () => {
try {
- const { success } = await apis.area.delItem(id).catch(() => {
+ const { success } = await apis.house.delItem(id).catch(() => {
throw new Error()
})
if (config('http.code.success') === success) {
@@ -181,6 +182,7 @@ async function onOk() {
message.success(t('component.message.success.delete'))
await getPageList()
}
+
diff --git a/src/views/regional/projectList/components/EditDialog.vue b/src/views/regional/projectList/components/EditDialog.vue
index 240abf2..c82f07d 100644
--- a/src/views/regional/projectList/components/EditDialog.vue
+++ b/src/views/regional/projectList/components/EditDialog.vue
@@ -6,8 +6,8 @@
-
-
+
+
@@ -58,14 +58,10 @@ const childOpen = ref(false)
const fileList = ref([])
const formArea = ref({ name: '', status: 'enabled' })
formRules.value = {
- title: { required: true, message: '请输入项目名称' },
+ name: { required: true, message: '请输入案场名称' },
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
}
-const areaFormRules = {
- name: [{ required: true, message: '请输入基地名称' }],
- status: [{ required: true, message: '请选择状态', trigger: 'change' }],
- // fileList: [{ required: true, message: '请选择状态', trigger: 'change' }],
-}
+
/**
@@ -74,7 +70,7 @@ const areaFormRules = {
function handleCreate() {
showModal({
type: 'create',
- title: '新增项目',
+ title: '新增案场',
})
// initData()
formData.value.status = 'enabled'
@@ -86,7 +82,7 @@ function handleCreate() {
async function handleEdit(record = {}) {
showModal({
type: 'edit',
- title: '编辑项目',
+ title: '编辑案场',
})
try {
showSpining()
diff --git a/src/views/regional/projectList/index.vue b/src/views/regional/projectList/index.vue
index 1d441de..6a24fa4 100644
--- a/src/views/regional/projectList/index.vue
+++ b/src/views/regional/projectList/index.vue
@@ -38,7 +38,7 @@
- 新增项目
+ 新增案场
{{ $t('pages.system.user.edit') }}
+
+
+ 二维码
+
+
{{ $t('pages.system.delete') }}
@@ -67,7 +72,12 @@
-
+
+
+
+
+
@@ -79,10 +89,13 @@ import { formatUtcDateTime } from '@/utils/util'
import { config } from '@/config'
import { statusUserTypeEnum } from '@/enums/system'
import { usePagination } from '@/hooks'
-
import EditDialog from './components/EditDialog.vue'
-import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
+import { PlusOutlined, EditOutlined, DeleteOutlined,QrcodeOutlined } from '@ant-design/icons-vue'
import { useI18n } from 'vue-i18n'
+import qrlogo from '@/assets/qrlogo.png'
+const content = ref('')
+const qrValue = ref('')
+const qropen = ref(false)
defineOptions({
name: 'projectList',
})
@@ -91,7 +104,7 @@ const columns = [
{ title: '图片', dataIndex: 'img', width: 120,align:'center'},
{ title: '项目名称', dataIndex: 'name', key: 'title' },
{ title: '状态', dataIndex: 'status', key: 'introduce', width: 100,align:'center' },
- { title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
+ { title: t('button.action'), key: 'action', fixed: 'right', width: 150, align: 'center' },
]
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
@@ -179,6 +192,22 @@ function handleResetSearch() {
resetPagination()
getPageList()
}
+const createQrcode = (params) => {
+ const {name,areaId,id}=params
+ const item={ title:name,
+ typer:'activity',
+ pathUrl:'/pages/sceneDetail/index.vue',
+ areaId,
+ relationId:id,
+ kvalue1:'',
+ kvalue2:'',
+ kvalue3:'',
+ kvalue4:'',
+ kvalue5:'',}
+ qrValue.value = JSON.stringify(item)
+ console.log(qrValue.value)
+ qropen.value = true
+}
/**
* 编辑完成
*/