提交 8a34c656 authored 作者: lidongxu's avatar lidongxu

refactor(mobiles_promotion): 修改促销移动端详情页的部分 内容

同上
上级 a03f6c88
...@@ -8,6 +8,7 @@ VITE_APP_PUBLIC_PATH = '/' ...@@ -8,6 +8,7 @@ VITE_APP_PUBLIC_PATH = '/'
# 基地址 # 基地址
VITE_APP_BASE_API = '/dev-api' # 小卤 VITE_APP_BASE_API = '/dev-api' # 小卤
# VITE_APP_BASE_API = '/ql_local' # 小卤 # VITE_APP_BASE_API = '/ql_local' # 小卤
# VITE_APP_BASE_API = '/bc_local' # 小卤
VITE_APP_PROMOTION = '/promotion-api' # 促销 VITE_APP_PROMOTION = '/promotion-api' # 促销
# 飞书服务回调地址(本地测试已经通过并上线,后台飞书登录接口重定向地址已经不是 localhost 了所以本地开发无需使用飞书登录,线上已经可用) # 飞书服务回调地址(本地测试已经通过并上线,后台飞书登录接口重定向地址已经不是 localhost 了所以本地开发无需使用飞书登录,线上已经可用)
......
...@@ -28,4 +28,13 @@ export function addReportGroupAPI(data) { ...@@ -28,4 +28,13 @@ export function addReportGroupAPI(data) {
method: 'post', method: 'post',
data data
}) })
}
// 新增/编辑自定义分组
export function editReportGroupAPI(data) {
return request({
url: '/report/customer/core/group/insertOrUpdate',
method: 'post',
data
})
} }
\ No newline at end of file
...@@ -67,6 +67,31 @@ ...@@ -67,6 +67,31 @@
</div> </div>
</template> </template>
</van-cell> </van-cell>
<van-cell v-for="item in planList"
:key="item.id"
label-class="image-cell">
<template #title>
<p>{{ item.temporaryName }}</p>
<p>{{ item.province + item.city }}</p>
</template>
<template #label>
<div class="item"
v-for="o in item.photoList">
<template v-if="o.list">
<p>{{ o.title }}</p>
<div class="image-wrap">
<div class="small-item"
v-for="obj, index in o.list">
<van-image :src="obj.photoUrl"
@click="previewImage(o.list, index)" />
<p>{{ obj.title }}</p>
<p>{{ obj.time }}</p>
</div>
</div>
</template>
</div>
</template>
</van-cell>
</van-cell-group> </van-cell-group>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
...@@ -173,6 +198,7 @@ const getPlanDetail = async () => { ...@@ -173,6 +198,7 @@ const getPlanDetail = async () => {
// allPhotoList.value.push(...o.list) // allPhotoList.value.push(...o.list)
// } // }
// }) // })
console.log('photoDialogList', photoDialogList)
return { return {
id: o.reported.id, // 用的是促销上报的id,不是打卡的 id id: o.reported.id, // 用的是促销上报的id,不是打卡的 id
province: o.reported.province, // 省份 province: o.reported.province, // 省份
...@@ -240,6 +266,10 @@ p { ...@@ -240,6 +266,10 @@ p {
.van-list { .van-list {
margin-top: 20px; margin-top: 20px;
min-height: 100vh; min-height: 100vh;
::v-deep(.van-cell:nth-child(n+2)){
margin-top: 20px;
}
} }
::v-deep(.van-cell__title) { ::v-deep(.van-cell__title) {
...@@ -286,9 +316,11 @@ p { ...@@ -286,9 +316,11 @@ p {
.small-item { .small-item {
width: 125px; width: 125px;
text-align: center; text-align: center;
display: inline-block;
.van-image { .van-image {
height: 135px; height: 135px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<el-input v-else <el-input v-else
v-model="group.groupName" v-model="group.groupName"
ref="groupNameRef" ref="groupNameRef"
@blur="group.showEdit = false"></el-input> @blur="blue"></el-input>
</div> </div>
<div class="card-header-right"> <div class="card-header-right">
<el-button type="primary" <el-button type="primary"
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<!-- 新增分组 --> <!-- 新增分组 -->
<div class="add-group"> <div class="add-group">
<el-button type="primary" <el-button type="primary"
@click="groups.push({ groupName: '新分组', showEdit: false, items: [] })"> @click="addGroups">
<el-icon> <el-icon>
<Plus /> <Plus />
</el-icon> </el-icon>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</template> </template>
<script setup> <script setup>
import { getReportListAPI, getReportListBySelfAPI, getReportListByGroupAPI, addReportGroupAPI } from '@/api' import { getReportListAPI, getReportListBySelfAPI, getReportListByGroupAPI, addReportGroupAPI, editReportGroupAPI } from '@/api'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const visible = ref(false) const visible = ref(false)
...@@ -174,14 +174,28 @@ const removeGroupName = (group) => { ...@@ -174,14 +174,28 @@ const removeGroupName = (group) => {
// 判断组内还有下属表,给提示不让删除 // 判断组内还有下属表,给提示不让删除
if (group.items.length > 0) { if (group.items.length > 0) {
proxy.$message.error('分组内还有报表,无法删除,可重命名') proxy.$message.error('分组内还有报表,无法删除,可重命名')
return return
} }
// 确认删除吗? // 确认删除吗?
proxy.$modal.confirm('确认删除分组"' + group.groupName + '"?删除后下属报表自动回到左侧列表中').then(async () => { proxy.$modal.confirm('确认删除分组"' + group.groupName + '"?删除后下属报表自动回到左侧列表中').then(async () => {
// 把当前分组的报表放到左侧 // 把当前分组的报表放到左侧
reportList.value = reportList.value.concat(group.items) reportList.value = reportList.value.concat(group.items)
const index = groups.value.indexOf(group) const index = groups.value.indexOf(group)
groups.value.splice(index, 1) groups.value.splice(index, 1)
})
}
// 新增分组
const addGroups = async () => {
// await editReportGroupAPI({
// groupName: '新分组',
// categoryName: '供应链报表',
// items: []
// })
groups.value.push({
groupName: '新分组',
items: []
}) })
} }
</script> </script>
...@@ -263,17 +277,19 @@ const removeGroupName = (group) => { ...@@ -263,17 +277,19 @@ const removeGroupName = (group) => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.card-header-right{
.el-button{ .card-header-right {
.el-button {
margin: 0; margin: 0;
padding: 10px; padding: 10px;
} }
} }
} }
.add-group{ .add-group {
margin-top: 20px; margin-top: 20px;
.el-button{
.el-button {
width: 100%; width: 100%;
} }
} }
......
...@@ -32,8 +32,15 @@ export default defineConfig(({ mode, command }) => { ...@@ -32,8 +32,15 @@ export default defineConfig(({ mode, command }) => {
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/promotion-api/, '') rewrite: (p) => p.replace(/^\/promotion-api/, '')
}, },
'ql_local': { '/ql_local': {
target: 'http://192.168.131.48' target: 'http://192.168.131.48',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/ql_local/, '')
},
'/bc_local': {
target: 'http://192.168.131.5:8180',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/bc_local/, '')
} }
} }
}, },
...@@ -56,7 +63,9 @@ export default defineConfig(({ mode, command }) => { ...@@ -56,7 +63,9 @@ export default defineConfig(({ mode, command }) => {
return file.indexOf('vant') !== -1 ? 37.5 : 37.5; return file.indexOf('vant') !== -1 ? 37.5 : 37.5;
}, },
propList: ['*'], propList: ['*'],
exclude: file => !file.includes('mobile_views') && !file.includes('node_modules/vant') exclude: file => {
return !file.includes('mobile_views') && !file.includes('node_modules/vant')
}
}) })
] ]
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论