generated from Leo_Ding/web-template
用户头像
This commit is contained in:
parent
b811bf9370
commit
0b89202de5
2
.env.dev
2
.env.dev
@ -12,7 +12,7 @@ VITE_ROUTER_BASE=/
|
||||
VITE_ROUTER_HISTORY=hash
|
||||
|
||||
# api
|
||||
VITE_API_BASIC=https://zh.shibeitong.com
|
||||
VITE_API_BASIC=http://10.10.1.6:8070
|
||||
VITE_API_HTTP=/api/v1/
|
||||
# storage
|
||||
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
||||
@ -12,3 +12,5 @@ export const createProject = (params) => request.basic.post('/api/v1/activities'
|
||||
export const updateItem = (id, params) => request.basic.put(`/api/v1/activities/${id}`, params)
|
||||
// 删除数据
|
||||
export const delItem = (id) => request.basic.delete(`/api/v1/activities/${id}`)
|
||||
//获取活动报名列表
|
||||
export const getActivityList=(params)=>request.basic.get('/api/v1/activity-details',params)
|
||||
BIN
src/assets/default.jpg
Normal file
BIN
src/assets/default.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
export default {
|
||||
welcome: '欢迎',
|
||||
home: '首页',
|
||||
@ -95,4 +97,5 @@ export default {
|
||||
ycyllvs: '医疗绿色通道',
|
||||
ycparentChild: '亲子权益',
|
||||
ycbirth: '生日礼遇',
|
||||
activityOrder:'活动报名列表'
|
||||
}
|
||||
|
||||
@ -13,5 +13,18 @@ export default [
|
||||
permission: '*',
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
path: 'activityOrder/index',
|
||||
name: 'activityOrder',
|
||||
component: 'activityOrder/index.vue',
|
||||
meta: {
|
||||
icon: CoffeeOutlined,
|
||||
title: '活动报名列表',
|
||||
isMenu: true,
|
||||
keepAlive: true,
|
||||
permission: '*',
|
||||
}
|
||||
|
||||
},
|
||||
]
|
||||
|
||||
@ -155,7 +155,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.activity
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
217
src/views/activityOrder/index.vue
Normal file
217
src/views/activityOrder/index.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<x-search-bar class="mb-8-2">
|
||||
<template #default="{ gutter, colSpan }">
|
||||
<a-form :model="searchFormData" layout="inline">
|
||||
<a-row :gutter="12">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="活动名称" name="name">
|
||||
<a-select v-model:value="searchFormData.activityId" >
|
||||
<a-select-option v-for="item of activityList" :value="item.id">{{ item.title }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col class="align-right" :span="12">
|
||||
<a-space>
|
||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||
<a-button ghost type="primary" @click="handleSearch">
|
||||
{{ $t('button.search') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</x-search-bar>
|
||||
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card type="flex">
|
||||
<!-- <x-action-bar class="mb-8-2">
|
||||
<a-button type="primary" @click="$refs.editDialogRef.handleCreate()">
|
||||
<template #icon>
|
||||
<plus-outlined></plus-outlined>
|
||||
</template>
|
||||
新增活动
|
||||
</a-button>
|
||||
</x-action-bar> -->
|
||||
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||
:pagination="paginationState" :scroll="{ x: 1000 }" @change="onTableChange">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'createdAt'">
|
||||
<span>{{ record.createdAt && dayjs(record.createdAt).format('YYYY-MM-DD HH:mm') }}</span>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- <template v-if="'action' === column.key">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
|
||||
<a-tooltip>
|
||||
<template #title> {{ $t('pages.system.user.edit') }}</template>
|
||||
<edit-outlined /> </a-tooltip></x-action-button>
|
||||
|
||||
<x-action-button @click="handleDelete(record)">
|
||||
<a-tooltip>
|
||||
<template #title>{{ $t('pages.system.delete') }}</template>
|
||||
<delete-outlined style="color: #ff4d4f" /> </a-tooltip></x-action-button>
|
||||
</template> -->
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-modal v-model:open="open" :title="type === 1 ? '活动图片' : '活动详情'" @ok="open = false">
|
||||
<template v-if="type === 1">
|
||||
<a-image v-if="imgList.length > 0" :width="200" v-for="item of imgList"
|
||||
:src="config('http.apiBasic') + item" />
|
||||
<span v-else>
|
||||
暂无图片
|
||||
</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ content }}</span>
|
||||
</template>
|
||||
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { ref } from 'vue'
|
||||
import apis from '@/apis'
|
||||
import { formatUtcDateTime } from '@/utils/util'
|
||||
import { config } from '@/config'
|
||||
import dayjs from 'dayjs'
|
||||
import { usePagination } from '@/hooks'
|
||||
import { customersEnum, areaEnum } from "@/enums/useEnum"
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined, QrcodeOutlined } from '@ant-design/icons-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
defineOptions({
|
||||
name: 'activityOrder',
|
||||
})
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
const open = ref(false)
|
||||
const imgList = ref([])
|
||||
const type = ref(1)
|
||||
|
||||
const columns = [
|
||||
{ title: '客户名称', dataIndex: 'customerName' },
|
||||
{ title: '活动名称', dataIndex: 'activityName' },
|
||||
{ title: '报名时间', dataIndex: 'createdAt', width: 150, align: 'center' },
|
||||
|
||||
// { title: t('button.action'), key: 'action', fixed: 'right', width: 150, align: 'center' },
|
||||
]
|
||||
const activityList=ref([])
|
||||
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } =
|
||||
usePagination()
|
||||
|
||||
const editDialogRef = ref()
|
||||
getPageList()
|
||||
getActiveList()
|
||||
async function getActiveList() {
|
||||
try {
|
||||
showLoading()
|
||||
const { success, data } = await apis.activity
|
||||
.getProjectList({
|
||||
pageSize:99,
|
||||
current: 1,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
hideLoading()
|
||||
if (config('http.code.success') === success) {
|
||||
activityList.value = data.map(item=>({id:item.id,title:item.title}))
|
||||
}
|
||||
} catch (error) {
|
||||
hideLoading()
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取表格数据
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function getPageList() {
|
||||
try {
|
||||
showLoading()
|
||||
const { pageSize, current } = paginationState
|
||||
const { success, data, total } = await apis.activity
|
||||
.getActivityList({
|
||||
pageSize,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
hideLoading()
|
||||
if (config('http.code.success') === success) {
|
||||
listData.value = data
|
||||
paginationState.total = total
|
||||
}
|
||||
} catch (error) {
|
||||
hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
function handleDelete({ id }) {
|
||||
Modal.confirm({
|
||||
title: t('pages.system.user.delTip'),
|
||||
content: t('button.confirm'),
|
||||
okText: t('button.confirm'),
|
||||
onOk: () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
; (async () => {
|
||||
try {
|
||||
const { success } = await apis.activity.delItem(id).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
resolve()
|
||||
message.success(t('component.message.success.delete'))
|
||||
await getPageList()
|
||||
}
|
||||
} catch (error) {
|
||||
reject()
|
||||
}
|
||||
})()
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
function onTableChange({ current, pageSize }) {
|
||||
paginationState.current = current
|
||||
paginationState.pageSize = pageSize
|
||||
getPageList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
function handleSearch() {
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function handleResetSearch() {
|
||||
searchFormData.value = {}
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
/**
|
||||
* 编辑完成
|
||||
*/
|
||||
async function onOk() {
|
||||
await getPageList()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('aiya'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('birth'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('menchuang'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('jdnk'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('hotel'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('jiazhuang'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('kangyang'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('life'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('lvyou'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('parentchild'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('quanwu'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('yllvs'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -158,7 +158,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.role
|
||||
.getRoleList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -158,7 +158,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.role
|
||||
.getRoleList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-search-bar class="mb-8-2">
|
||||
<!-- <x-search-bar class="mb-8-2">
|
||||
<template #default="{ gutter, colSpan }">
|
||||
<a-form :model="searchFormData" layout="inline">
|
||||
<a-row :gutter="gutter">
|
||||
@ -19,7 +19,7 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</x-search-bar>
|
||||
</x-search-bar> -->
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card type="flex">
|
||||
@ -62,6 +62,7 @@ defineOptions({
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
const columns = [
|
||||
{ title: '客户姓名', dataIndex: 'customerName', align: 'center',width:120 },
|
||||
{ title: '客户手机', dataIndex: 'customerPhone', align: 'center',width:120 },
|
||||
{ title: '变动前积分', dataIndex: 'before', align: 'center',width:100 },
|
||||
{ title: '变动后积分', dataIndex: 'before', align: 'center',width:100 },
|
||||
{ title: '变动积分', dataIndex: 'change', align: 'center',width:100 },
|
||||
@ -85,7 +86,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.points
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -143,7 +143,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -115,7 +115,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -147,7 +147,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -154,7 +154,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -131,7 +131,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -194,7 +194,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -90,7 +90,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrders
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -82,7 +82,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.raffleProduct
|
||||
.getRaffleOrders({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -110,7 +110,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.raffleProduct
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -117,7 +117,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.raffles
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -128,7 +128,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.houseArticles
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -43,7 +43,8 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item :label="'待售状态'" name="daiShowStatus">
|
||||
<a-input :placeholder="'请输入待售状态'" v-model:value="formData.daiShowStatus"></a-input>
|
||||
<a-input :placeholder="'请输入待售状态'"
|
||||
v-model:value="formData.daiShowStatus"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@ -99,10 +100,9 @@
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item :label="'占地面积'" name="basicArea">
|
||||
<a-input :placeholder="'请输入占地面积'"
|
||||
v-model:value="formData.basicArea"></a-input>
|
||||
<a-input :placeholder="'请输入占地面积'" v-model:value="formData.basicArea"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@ -113,8 +113,8 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item :label="'楼盘视频'">
|
||||
<gx-upload v-model="formData.videos" accept-types=".avi,.mp4,.mov,.wmv,.mkv,.m4v"
|
||||
:fileNumber="20" />
|
||||
<gx-upload v-model="formData.videos"
|
||||
accept-types=".avi,.mp4,.mov,.wmv,.mkv,.m4v" :fileNumber="20" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -289,16 +289,14 @@
|
||||
v-model:value="formData.greeningRate"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-col :span="12">
|
||||
<a-form-item :label="'车位比'" name="carRatio">
|
||||
<a-input :placeholder="'请输入车位比'"
|
||||
v-model:value="formData.carRatio"></a-input>
|
||||
<a-input :placeholder="'请输入车位比'" v-model:value="formData.carRatio"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-col :span="12">
|
||||
<a-form-item :label="'容积率'" name="ratio">
|
||||
<a-input :placeholder="'请输入容积率'"
|
||||
v-model:value="formData.ratio"></a-input>
|
||||
<a-input :placeholder="'请输入容积率'" v-model:value="formData.ratio"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@ -340,6 +338,10 @@
|
||||
</a-row>
|
||||
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="7" tab="免责声明">
|
||||
<x-editor v-model="formData.disclaimerContain" :uploadHandler="uploadHandler"
|
||||
:height="300"></x-editor>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
</a-card>
|
||||
@ -358,7 +360,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import { PlusOutlined, MinusOutlined, SettingOutlined } from '@ant-design/icons-vue';
|
||||
import dayjs from 'dayjs'
|
||||
import { customersEnum, areaEnum } from "@/enums/useEnum"
|
||||
import {spliceUrl} from "@/utils/util.js"
|
||||
import { spliceUrl } from "@/utils/util.js"
|
||||
const emit = defineEmits(['ok'])
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||
@ -417,10 +419,10 @@ async function handleEdit(record = {}) {
|
||||
}
|
||||
hideSpining()
|
||||
formData.value = {
|
||||
id:data.id,
|
||||
id: data.id,
|
||||
address: data.address,
|
||||
areaId: data.areaId,//所属区域
|
||||
imgList: data.images?data.images.map(item => config('http.apiBasic') + item):[],
|
||||
imgList: data.images ? data.images.map(item => config('http.apiBasic') + item) : [],
|
||||
labels: data.labels,
|
||||
latitude: data.latitude,
|
||||
longitude: data.longitude,
|
||||
@ -429,23 +431,24 @@ async function handleEdit(record = {}) {
|
||||
openAt: data.openAt,
|
||||
price: data.price,
|
||||
status: data.status,
|
||||
basicArea:data.area,
|
||||
basicArea: data.area,
|
||||
disclaimerContain: data.disclaimerContain,
|
||||
title: data.title,
|
||||
videos: data.videos? data.videos.map(item => config('http.apiBasic') + item):[],
|
||||
advisers: data.advisers?data.advisers.map(item=>({adviserName:item.name,adviserPhone:item.phone,adviserImg:item.avatar?[config('http.apiBasic')+item.avatar]:[]})):[{ adviserName: '', adviserPhone: '', adviserImg: [] },
|
||||
{ adviserName: '', adviserPhone: '', adviserImg: [] },
|
||||
{ adviserName: '', adviserPhone: '', adviserImg: [] },],
|
||||
videos: data.videos ? data.videos.map(item => config('http.apiBasic') + item) : [],
|
||||
advisers: data.advisers ? data.advisers.map(item => ({ adviserName: item.name, adviserPhone: item.phone, adviserImg: item.avatar ? [config('http.apiBasic') + item.avatar] : [] })) : [{ adviserName: '', adviserPhone: '', adviserImg: [] },
|
||||
{ adviserName: '', adviserPhone: '', adviserImg: [] },
|
||||
{ adviserName: '', adviserPhone: '', adviserImg: [] },],
|
||||
address: data.detail.basicInfo.address,
|
||||
houseArea: data.detail.basicInfo.area,
|
||||
buildingarea: data.detail.basicInfo.buildingarea,
|
||||
showAddress: data.detail.basicInfo.showAddress,
|
||||
daiShowStatus:data.detail.basicInfo.status,
|
||||
daiShowStatus: data.detail.basicInfo.status,
|
||||
type: data.detail.basicInfo.type,
|
||||
louPanStatus: data.detail.salesInfo.status,
|
||||
duration: data.detail.salesInfo.duration,
|
||||
salesType: data.detail.salesInfo.salesType,
|
||||
salesPhone: data.detail.salesInfo.salesPhone,
|
||||
salesAddress:data.detail.salesInfo.salesAddress,
|
||||
salesAddress: data.detail.salesInfo.salesAddress,
|
||||
greeningRate: data.detail.communityInfo.greeningRate,
|
||||
packingNum: data.detail.communityInfo.packingNum,
|
||||
propertyName: data.detail.communityInfo.propertyName,
|
||||
@ -455,16 +458,16 @@ async function handleEdit(record = {}) {
|
||||
r19010Ratio: data.detail.communityInfo.r19010Ratio,
|
||||
r19011Ratio: data.detail.communityInfo.r19011Ratio,
|
||||
roomNum: data.detail.communityInfo.roomNum,
|
||||
carRatio:data.detail.communityInfo.carRatio,
|
||||
ratio:data.detail.communityInfo.ratio,
|
||||
layOuts: data.layOuts ? data.layOuts.map(item => ({ area: item.area, direction: item.direction, layImgList: item.img?[config('http.apiBasic') + item.img]:[], price: item.price, title: item.title })):[{ area: '', price: '', direction: '', title: '', layImgList: [] },
|
||||
{ area: '', price: '', direction: '', title: '', layImgList: [] },
|
||||
{ area: '', price: '', direction: '', title: '', layImgList: [] },],
|
||||
busNum: data.surroundings&&data.surroundings.busNum,
|
||||
hospitalNum: data.surroundings&&data.surroundings.hospitalNum,
|
||||
lifeNum: data.surroundings&&data.surroundings.lifeNum,
|
||||
metroNum: data.surroundings&&data.surroundings.metroNum,
|
||||
schoolNum: data.surroundings&&data.surroundings.schoolNum,
|
||||
carRatio: data.detail.communityInfo.carRatio,
|
||||
ratio: data.detail.communityInfo.ratio,
|
||||
layOuts: data.layOuts ? data.layOuts.map(item => ({ area: item.area, direction: item.direction, layImgList: item.img ? [config('http.apiBasic') + item.img] : [], price: item.price, title: item.title })) : [{ area: '', price: '', direction: '', title: '', layImgList: [] },
|
||||
{ area: '', price: '', direction: '', title: '', layImgList: [] },
|
||||
{ area: '', price: '', direction: '', title: '', layImgList: [] },],
|
||||
busNum: data.surroundings && data.surroundings.busNum,
|
||||
hospitalNum: data.surroundings && data.surroundings.hospitalNum,
|
||||
lifeNum: data.surroundings && data.surroundings.lifeNum,
|
||||
metroNum: data.surroundings && data.surroundings.metroNum,
|
||||
schoolNum: data.surroundings && data.surroundings.schoolNum,
|
||||
}
|
||||
} catch (error) {
|
||||
message.error({ content: error.message })
|
||||
@ -484,7 +487,7 @@ function handleOk() {
|
||||
address: formData.value.address,
|
||||
areaId: formData.value.areaId,//所属区域
|
||||
cover: formData.value.imgList && spliceUrl(formData.value.imgList[0]),
|
||||
images: formData.value.imgList && formData.value.imgList.map(item=>spliceUrl(item)),
|
||||
images: formData.value.imgList && formData.value.imgList.map(item => spliceUrl(item)),
|
||||
labels: formData.value.labels,
|
||||
latitude: formData.value.latitude,
|
||||
longitude: formData.value.longitude,
|
||||
@ -494,9 +497,10 @@ function handleOk() {
|
||||
price: formData.value.price,
|
||||
status: formData.value.status,
|
||||
title: formData.value.title,
|
||||
area:formData.value.basicArea,
|
||||
videos: formData.value.videos&&formData.value.videos.map(item=>spliceUrl(item)),
|
||||
advisers: formData.value.advisers&&formData.value.advisers.map(item=>({name:item.adviserName,phone:item.adviserPhone,avatar:item.adviserImg[0]&&spliceUrl(item.adviserImg[0])})),
|
||||
area: formData.value.basicArea,
|
||||
disclaimerContain: formData.value.disclaimerContain,
|
||||
videos: formData.value.videos && formData.value.videos.map(item => spliceUrl(item)),
|
||||
advisers: formData.value.advisers && formData.value.advisers.map(item => ({ name: item.adviserName, phone: item.adviserPhone, avatar: item.adviserImg[0] && spliceUrl(item.adviserImg[0]) })),
|
||||
detail: {
|
||||
basicInfo: {
|
||||
address: formData.value.address,//楼盘地址
|
||||
@ -524,11 +528,11 @@ function handleOk() {
|
||||
r19010Ratio: formData.value.r19010Ratio,
|
||||
r19011Ratio: formData.value.r19011Ratio,
|
||||
roomNum: formData.value.roomNum,
|
||||
carRatio:formData.value.carRatio,
|
||||
ratio:formData.value.ratio
|
||||
carRatio: formData.value.carRatio,
|
||||
ratio: formData.value.ratio
|
||||
}
|
||||
},
|
||||
layOuts: formData.value.layOuts && formData.value.layOuts.map(item => ({ area: item.area, direction: item.direction, img: item.layImgList[0]&&spliceUrl(item.layImgList[0]), price: item.price, title: item.title })),
|
||||
layOuts: formData.value.layOuts && formData.value.layOuts.map(item => ({ area: item.area, direction: item.direction, img: item.layImgList[0] && spliceUrl(item.layImgList[0]), price: item.price, title: item.title })),
|
||||
surroundings: {
|
||||
busNum: formData.value.busNum,
|
||||
hospitalNum: formData.value.hospitalNum,
|
||||
@ -546,7 +550,7 @@ function handleOk() {
|
||||
})
|
||||
break
|
||||
case 'edit':
|
||||
|
||||
|
||||
result = await apis.house.updateItem(formData.value.id, params).catch(() => {
|
||||
console.log(error.message)
|
||||
throw new Error(error)
|
||||
@ -580,6 +584,12 @@ const addLabel = () => {
|
||||
const removeLabel = (index) => {
|
||||
formData.value.labels.splice(index, 1);
|
||||
};
|
||||
const uploadHandler = async (file) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const { data } = await apis.common.uploadImg(formData);
|
||||
return config('http.apiBasic') + data
|
||||
}
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
@ -606,8 +616,8 @@ const addLayout = () => {
|
||||
formData.value.layOuts.push(params)
|
||||
}
|
||||
//新增顾问
|
||||
const addAdviser=()=>{
|
||||
const params={ adviserName: '', adviserPhone: '', adviserImg: [] }
|
||||
const addAdviser = () => {
|
||||
const params = { adviserName: '', adviserPhone: '', adviserImg: [] }
|
||||
formData.value.advisers.push(params)
|
||||
}
|
||||
//删除户型
|
||||
|
||||
@ -106,7 +106,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.house
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'img'">
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.img || $imageErr.imgErr" />
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.img" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'startAt'">
|
||||
<span>{{ dayjs(record.startAt).format('YYYY-MM-DD HH:mm:ss') }}</span>
|
||||
@ -59,11 +59,11 @@
|
||||
<a-tag v-if="!record.isDaily" :color="'red'">否</a-tag>
|
||||
</template>
|
||||
<template v-if="'action' === column.key">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record.product.id)">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record.id)">
|
||||
<a-tooltip>
|
||||
<template #title> {{ $t('pages.system.user.edit') }}</template>
|
||||
<edit-outlined /> </a-tooltip></x-action-button>
|
||||
<x-action-button @click="handleDelete(record.product.id)">
|
||||
<x-action-button @click="handleDelete(record.id)">
|
||||
<a-tooltip>
|
||||
<template #title>{{ $t('pages.system.delete') }}</template>
|
||||
<delete-outlined style="color: #ff4d4f" /> </a-tooltip></x-action-button>
|
||||
@ -124,7 +124,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.houseProduct
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -91,7 +91,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.companyProductOrders
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -123,7 +123,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.project
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -105,7 +105,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.area
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -107,7 +107,7 @@ async function getPageList() {
|
||||
const { code, data } = await apis.common
|
||||
.getPageList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
|
||||
@ -162,7 +162,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.system
|
||||
.getLoggers({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
startTime: startTime.value,
|
||||
endTime: endTime.value,
|
||||
|
||||
@ -158,7 +158,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.role
|
||||
.getRoleList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -153,7 +153,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.users
|
||||
.getUsersList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'avatar'">
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="30" :src="record.avatar?(config('http.apiBasic') + record.avatar):defaultAvatar" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ customersEnum.getName(record.type) }}</span>
|
||||
@ -92,6 +92,7 @@ import { customersEnum, areaEnum } from "@/enums/useEnum"
|
||||
import EditDialog from './components/EditDialog.vue'
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import defaultAvatar from '@/assets/default.jpg'
|
||||
defineOptions({
|
||||
name: 'allCustomerList',
|
||||
})
|
||||
@ -125,7 +126,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.customer
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@ -46,7 +46,8 @@
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'avatar'">
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="60" v-if="record.avatar.includes('https://loremflickr.com')" :src="record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="60" v-else :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ customersEnum.getName(record.type) }}</span>
|
||||
@ -125,7 +126,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.customer
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
type:'owner',
|
||||
...searchFormData.value,
|
||||
})
|
||||
|
||||
@ -44,9 +44,9 @@
|
||||
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||
:pagination="paginationState" :scroll="{ x: 1000 }" @change="onTableChange">
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'avatar'">
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="60" v-if="record.avatar.includes('https://loremflickr.com')" :src="record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="60" v-else :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ customersEnum.getName(record.type) }}</span>
|
||||
@ -125,7 +125,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.customer
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
type:'intermediary',
|
||||
...searchFormData.value,
|
||||
})
|
||||
|
||||
@ -46,7 +46,8 @@
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'avatar'">
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="60" v-if="record.avatar.includes('https://loremflickr.com')" :src="record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="60" v-else :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ customersEnum.getName(record.type) }}</span>
|
||||
@ -125,7 +126,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.customer
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
type:'closer',
|
||||
...searchFormData.value,
|
||||
})
|
||||
|
||||
@ -46,7 +46,8 @@
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'avatar'">
|
||||
<a-image :width="60" :src="config('http.apiBasic') + record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="30" v-if="record.avatar.includes('https://loremflickr.com')" :src="record.avatar || $imageErr.imgErr" />
|
||||
<a-image :width="30" v-else :src="record.avatar?(config('http.apiBasic') + record.avatar):defaultAvatar" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'type'">
|
||||
<span>{{ customersEnum.getName(record.type) }}</span>
|
||||
@ -92,6 +93,7 @@ import { customersEnum, areaEnum } from "@/enums/useEnum"
|
||||
import EditDialog from './components/EditDialog.vue'
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import defaultAvatar from '@/assets/default.jpg'
|
||||
defineOptions({
|
||||
name: 'visitor',
|
||||
})
|
||||
@ -125,7 +127,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.customer
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
type:'visitor',
|
||||
...searchFormData.value,
|
||||
})
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycbirth'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycfwjbj'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycjd'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycjztg'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycmcby'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycparentchild'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycqw'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycqwsc'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycxwybm'),
|
||||
...searchFormData.value,
|
||||
|
||||
@ -96,7 +96,7 @@ async function getPageList() {
|
||||
const { success, data, total } = await apis.productOrder
|
||||
.getProjectList({
|
||||
pageSize,
|
||||
page: current,
|
||||
current: current,
|
||||
channel: 'product',
|
||||
productId: equiteEnum.getValue('ycyllvs'),
|
||||
...searchFormData.value,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user