Compare commits
No commits in common. "master" and "Branch_csl" have entirely different histories.
master
...
Branch_csl
@ -1,66 +0,0 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
- name: build-copy-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 101.43.112.107 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 20m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- ssh root@47.118.40.3 "sh -c 'cd /build_project/allLikeMall/yudao-admin-vue3 && git pull origin master && /usr/bin/pnpm install && /usr/bin/pnpm run build:prod && zip -r dist-prod.zip dist-prod'"
|
||||
- scp root@47.118.40.3:/build_project/allLikeMall/yudao-admin-vue3/dist-prod.zip /build_package/
|
||||
- scp /build_package/dist-prod.zip root@1.14.205.126:/build_package/
|
||||
- name: build-java-and-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 1.14.205.126 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- echo "build-java......"
|
||||
- cd /root/allLikeMall
|
||||
- git fetch origin
|
||||
- git reset --hard origin/master
|
||||
- git clean -fd
|
||||
- /root/apache-maven-3.9.4/bin/mvn package -Dmaven.test.skip=true
|
||||
- cd yudao-server
|
||||
- chmod +x all.sh
|
||||
- ./all.sh
|
||||
- echo "build-vue......"
|
||||
- cd /build_package
|
||||
- rm -rf dist-prod
|
||||
- unzip dist-prod.zip
|
||||
- rm -rf /root/nginx/html/mall
|
||||
- mv dist-prod /root/nginx/html/mall
|
||||
|
@ -1,27 +0,0 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
- name: build-java
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
settings:
|
||||
host: 1.14.205.126 # 远程连接地址
|
||||
username: root # 远程连接账号
|
||||
password:
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
script:
|
||||
- echo "build-java......"
|
||||
- cd /root/allLikeMall
|
||||
- git fetch origin
|
||||
- git reset --hard origin/master
|
||||
- git clean -fd
|
||||
- /root/apache-maven-3.9.4/bin/mvn package -Dmaven.test.skip=true
|
||||
- cd yudao-server
|
||||
- chmod +x all.sh
|
||||
- ./all.sh
|
@ -1,57 +0,0 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
- name: build-copy-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 101.43.112.107 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 20m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- ssh root@47.118.40.3 "sh -c 'cd /build_project/allLikeMall/yudao-admin-vue3 && git pull origin master && /usr/bin/pnpm install && /usr/bin/pnpm run build:prod && zip -r dist-prod.zip dist-prod'"
|
||||
- scp root@47.118.40.3:/build_project/allLikeMall/yudao-admin-vue3/dist-prod.zip /build_package/
|
||||
- scp /build_package/dist-prod.zip root@1.14.205.126:/build_package/
|
||||
- name: build-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 1.14.205.126 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- echo "build-vue......"
|
||||
- cd /build_package
|
||||
- rm -rf dist-prod
|
||||
- unzip dist-prod.zip
|
||||
- rm -rf /root/nginx/html/mall
|
||||
- mv dist-prod /root/nginx/html/mall
|
||||
|
@ -24,7 +24,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 10m # 远程执行命令超时时间
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- cd /root/allLikeMall
|
||||
@ -60,7 +60,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
# - ls
|
@ -136,7 +136,7 @@
|
||||
<div class="app-loading">
|
||||
<div class="app-loading-wrap">
|
||||
<div class="app-loading-title">
|
||||
<!-- <img src="/logo.gif" class="app-loading-logo" alt="Logo" />-->
|
||||
<img src="/logo.gif" class="app-loading-logo" alt="Logo" />
|
||||
<div class="app-loading-title">%VITE_APP_TITLE%</div>
|
||||
</div>
|
||||
<div class="app-loading-item">
|
||||
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡档案 VO
|
||||
export interface CardBaseVO {
|
||||
id: number // 档案编号
|
||||
cardNum: string // 卡号
|
||||
scret: string // 卡密
|
||||
parentId: number // 上级id
|
||||
subId: number // 下级id
|
||||
}
|
||||
|
||||
// 会员卡档案 API
|
||||
export const CardBaseApi = {
|
||||
// 查询会员卡档案分页
|
||||
getCardBasePage: async (params: any) => {
|
||||
return await request.get({ url: `/mall/card-base/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡档案详情
|
||||
getCardBase: async (id: number) => {
|
||||
return await request.get({ url: `/mall/card-base/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡档案
|
||||
createCardBase: async (data: CardBaseVO) => {
|
||||
return await request.post({ url: `/mall/card-base/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡档案
|
||||
updateCardBase: async (data: CardBaseVO) => {
|
||||
return await request.put({ url: `/mall/card-base/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡档案
|
||||
deleteCardBase: async (id: number) => {
|
||||
return await request.delete({ url: `/mall/card-base/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡档案 Excel
|
||||
exportCardBase: async (params) => {
|
||||
return await request.download({ url: `/mall/card-base/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 发卡记录 VO
|
||||
export interface CardLogVO {
|
||||
id: number // 编号
|
||||
nickName: string // 会员昵称
|
||||
phone: string // 手机号
|
||||
countNumber: number // 数量
|
||||
cardSection: number // 区间
|
||||
}
|
||||
|
||||
// 发卡记录 API
|
||||
export const CardLogApi = {
|
||||
// 查询发卡记录分页
|
||||
getCardLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/send/card-log/page`, params })
|
||||
},
|
||||
|
||||
// 查询发卡记录详情
|
||||
getCardLog: async (id: number) => {
|
||||
return await request.get({ url: `/send/card-log/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增发卡记录
|
||||
createCardLog: async (data: CardLogVO) => {
|
||||
return await request.post({ url: `/send/card-log/create`, data })
|
||||
},
|
||||
|
||||
// 修改发卡记录
|
||||
updateCardLog: async (data: CardLogVO) => {
|
||||
return await request.put({ url: `/send/card-log/update`, data })
|
||||
},
|
||||
|
||||
// 删除发卡记录
|
||||
deleteCardLog: async (id: number) => {
|
||||
return await request.delete({ url: `/send/card-log/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出发卡记录 Excel
|
||||
exportCardLog: async (params) => {
|
||||
return await request.download({ url: `/send/card-log/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡 VO
|
||||
export interface CardVO {
|
||||
id: number // 会员卡编号
|
||||
parentId: number // 上级用户id
|
||||
subId: number // 下级用户id
|
||||
cardNumber: string // 会员卡号
|
||||
isActivate: number // 是否已激活(0:未激活 , 1:已激活)
|
||||
activateTime: number // 激活时间
|
||||
}
|
||||
|
||||
// 会员卡 API
|
||||
export const CardApi = {
|
||||
// 查询会员卡分页
|
||||
getCardPage: async (params: any) => {
|
||||
return await request.get({ url: `/club/card/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡详情
|
||||
getCard: async (id: number) => {
|
||||
return await request.get({ url: `/club/card/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡
|
||||
createCard: async (data: CardVO) => {
|
||||
return await request.post({ url: `/club/card/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡
|
||||
updateCard: async (data: CardVO) => {
|
||||
return await request.put({ url: `/club/card/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡
|
||||
deleteCard: async (id: number) => {
|
||||
return await request.delete({ url: `/club/card/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡 Excel
|
||||
exportCard: async (params) => {
|
||||
return await request.download({ url: `/club/card/export-excel`, params })
|
||||
},
|
||||
}
|
@ -12,27 +12,12 @@ export const FollowUpRecordApi = {
|
||||
return await request.post({ url: `/intelligentForm/saveDynamicData`, data })
|
||||
},
|
||||
|
||||
//修改智能表单
|
||||
updateDynamicData: async (data) => {
|
||||
return await request.post({ url: `/intelligentForm/updateDynamicData`, data })
|
||||
},
|
||||
|
||||
//删除智能表单
|
||||
deleteDynamicDataById: async (id) => {
|
||||
return await request.get({ url: `/intelligentForm/deleteDynamicDataById?id=` + id, })
|
||||
},
|
||||
|
||||
// 查询文章管理列表
|
||||
collectDataList: async (id) => {
|
||||
return await request.get({ url: `/intelligentForm/collectDataList?id=` + id, })
|
||||
//查询对应表单的采集数据列表
|
||||
collectDataList: async(query) => {
|
||||
return await request.get({
|
||||
url: '/intelligentForm/collectDataList',
|
||||
method: 'get',
|
||||
params: {id:query}
|
||||
})
|
||||
}
|
||||
|
||||
// //查询对应表单的采集数据列表
|
||||
// collectDataList: async(query) => {
|
||||
// return await request.get({
|
||||
// url: '/intelligentForm/collectDataList',
|
||||
// method: 'get',
|
||||
// params: {id:query}
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ export interface FilePageReqVO extends PageParam {
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
|
||||
// 文件预签名地址 Response VO
|
||||
export interface FilePresignedUrlRespVO {
|
||||
// 文件配置编号
|
||||
@ -44,9 +43,3 @@ export const createFile = (data: any) => {
|
||||
export const updateFile = (data: any) => {
|
||||
return request.upload({ url: '/infra/file/upload', data })
|
||||
}
|
||||
|
||||
export const updatePicType = (id: number , picType: number) => {
|
||||
return request.get({ url: '/infra/file/updatePicType?id=' + id + `&picType=` + picType })
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 权益通知 VO
|
||||
export interface InterestVO {
|
||||
id: number // 权益编号
|
||||
title: string // 权益标题
|
||||
goodsName: string // 商品名称
|
||||
desc: string // 权益描述
|
||||
isUsed: string // 权益次数
|
||||
equity: string // 权益内容
|
||||
notice: string // 须知内容
|
||||
}
|
||||
|
||||
// 权益通知 API
|
||||
export const InterestApi = {
|
||||
// 查询权益通知分页
|
||||
getInterestPage: async (params: any) => {
|
||||
return await request.get({ url: `/notice/interest/page`, params })
|
||||
},
|
||||
|
||||
// 查询权益通知详情
|
||||
getInterest: async (id: number) => {
|
||||
return await request.get({ url: `/notice/interest/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增权益通知
|
||||
createInterest: async (data: InterestVO) => {
|
||||
return await request.post({ url: `/notice/interest/create`, data })
|
||||
},
|
||||
|
||||
// 修改权益通知
|
||||
updateInterest: async (data: InterestVO) => {
|
||||
return await request.put({ url: `/notice/interest/update`, data })
|
||||
},
|
||||
|
||||
// 删除权益通知
|
||||
deleteInterest: async (id: number) => {
|
||||
return await request.delete({ url: `/notice/interest/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出权益通知 Excel
|
||||
exportInterest: async (params) => {
|
||||
return await request.download({ url: `/notice/interest/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 开屏广告 VO
|
||||
export interface AdvertisingVO {
|
||||
id: number // id
|
||||
status: number // 广告状态
|
||||
time: number // 广告时间(秒)
|
||||
property: string // 广告属性
|
||||
picData: []
|
||||
stat: boolean,
|
||||
}
|
||||
|
||||
// 开屏广告 API
|
||||
export const AdvertisingApi = {
|
||||
// 查询开屏广告分页
|
||||
getAdvertisingPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/advertising/page`, params })
|
||||
},
|
||||
|
||||
// 查询开屏广告详情
|
||||
getAdvertising: async () => {
|
||||
return await request.get({ url: `/promotion/advertising/getAdvertising`})
|
||||
},
|
||||
|
||||
// 新增开屏广告
|
||||
createAdvertising: async (data: AdvertisingVO) => {
|
||||
return await request.post({ url: `/promotion/advertising/create`, data })
|
||||
},
|
||||
|
||||
// 修改开屏广告
|
||||
updateAdvertising: async (data: AdvertisingVO) => {
|
||||
return await request.put({ url: `/promotion/advertising/update`, data })
|
||||
},
|
||||
|
||||
// 删除开屏广告
|
||||
deleteAdvertising: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/advertising/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出开屏广告 Excel
|
||||
exportAdvertising: async (params) => {
|
||||
return await request.download({ url: `/promotion/advertising/export-excel`, params })
|
||||
},
|
||||
|
||||
// 新增修稿开屏广告
|
||||
saveAdvertising: async (data: AdvertisingVO) => {
|
||||
return await request.post({ url: `/promotion/advertising/saveAdvertising`, data })
|
||||
},
|
||||
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 自动回复 VO
|
||||
export interface AutoResponseVO {
|
||||
id: number // id
|
||||
keyword: string // 关键字
|
||||
type: number // 回复类型,文字消息/0,图片消息/1
|
||||
content: string // 回复内容
|
||||
status: number // 是否开启,开启/1,关闭/0
|
||||
}
|
||||
|
||||
// 自动回复 API
|
||||
export const AutoResponseApi = {
|
||||
// 查询自动回复分页
|
||||
getAutoResponsePage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/auto-response/page`, params })
|
||||
},
|
||||
|
||||
// 查询自动回复详情
|
||||
getAutoResponse: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/auto-response/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增自动回复
|
||||
createAutoResponse: async (data: AutoResponseVO) => {
|
||||
return await request.post({ url: `/promotion/auto-response/create`, data })
|
||||
},
|
||||
|
||||
// 修改自动回复
|
||||
updateAutoResponse: async (data: AutoResponseVO) => {
|
||||
return await request.put({ url: `/promotion/auto-response/update`, data })
|
||||
},
|
||||
|
||||
// 删除自动回复
|
||||
deleteAutoResponse: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/auto-response/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出自动回复 Excel
|
||||
exportAutoResponse: async (params) => {
|
||||
return await request.download({ url: `/promotion/auto-response/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 客服配置 VO
|
||||
export interface ConfigurationVO {
|
||||
id: number // id
|
||||
type: number // 客服类型
|
||||
feedback: string // 客服反馈
|
||||
phone: string // 客服电话
|
||||
link: string // 客服链接
|
||||
enterpriseID: string // 企业ID
|
||||
}
|
||||
|
||||
// 客服配置 API
|
||||
export const ConfigurationApi = {
|
||||
// 查询客服配置分页
|
||||
getConfigurationPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/ke-fu-configuration/page`, params })
|
||||
},
|
||||
|
||||
// 查询客服配置详情
|
||||
getConfiguration: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/ke-fu-configuration/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增客服配置
|
||||
createConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.post({ url: `/promotion/ke-fu-configuration/create`, data })
|
||||
},
|
||||
|
||||
// 修改客服配置
|
||||
updateConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.put({ url: `/promotion/ke-fu-configuration/update`, data })
|
||||
},
|
||||
|
||||
// 删除客服配置
|
||||
deleteConfiguration: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/ke-fu-configuration/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客服配置 Excel
|
||||
exportConfiguration: async (params) => {
|
||||
return await request.download({ url: `/promotion/ke-fu-configuration/export-excel`, params })
|
||||
}
|
||||
}
|
@ -56,32 +56,3 @@ export const getDiyTemplateProperty = async (id: number) => {
|
||||
export const updateDiyTemplateProperty = async (data: DiyTemplateVO) => {
|
||||
return await request.put({ url: `/promotion/diy-template/update-property`, data })
|
||||
}
|
||||
|
||||
|
||||
// 设置商品分类接口
|
||||
export const setDiyProjuctClass = async (id) => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/diy-template-goods?id=` + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商品分类接口
|
||||
export const getDiyProjuctClass = async () => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/getGoods`
|
||||
})
|
||||
}
|
||||
|
||||
// 设置主题风格
|
||||
export const setDiyZtClass = async (id) => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/diy-template-theme?id=` + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获取主题风格
|
||||
export const getDiyZtClass = async () => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/getTheme`
|
||||
})
|
||||
}
|
@ -25,8 +25,8 @@ export const saveDynamicData = async (data: ArticleVO) => {
|
||||
}
|
||||
|
||||
// 查询文章管理列表
|
||||
export const collectDataList = async (id: any) => {
|
||||
return await request.get({ url: `/intelligentForm/collectDataList?id=` + id, })
|
||||
export const collectDataList = async (query: any) => {
|
||||
return await request.get({ url: `/intelligentForm/collectDataList`, query })
|
||||
}
|
||||
|
||||
// // 修改文章管理
|
||||
|
@ -1,5 +1,4 @@
|
||||
import request from '@/config/axios'
|
||||
import { number } from 'vue-types'
|
||||
|
||||
export interface KeFuConversationRespVO {
|
||||
id: number // 编号
|
||||
@ -22,10 +21,6 @@ export const KeFuConversationApi = {
|
||||
getConversationList: async () => {
|
||||
return await request.get({ url: '/promotion/kefu-conversation/list' })
|
||||
},
|
||||
// 获得客服会话列表
|
||||
getConversationListByKefuId: async (kefuId: number , name: string) => {
|
||||
return await request.get({ url: '/promotion/kefu-conversation/list?kefuId=' + kefuId + `&name=` + name })
|
||||
},
|
||||
// 客服会话置顶
|
||||
updateConversationPinned: async (data: any) => {
|
||||
return await request.put({
|
||||
@ -35,10 +30,6 @@ export const KeFuConversationApi = {
|
||||
},
|
||||
// 删除客服会话
|
||||
deleteConversation: async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/kefu-conversation/delete?id=' + id })
|
||||
},
|
||||
// 转接会话给其它客服
|
||||
transferConversion: async (id: number, kefuId: number) => {
|
||||
return await request.get({ url: `/promotion/kefu-conversation/transfer/${id}/${kefuId}`})
|
||||
return await request.get({ url: '/promotion/kefu-conversation/delete?id' + id })
|
||||
}
|
||||
}
|
||||
|
@ -32,10 +32,5 @@ export const KeFuMessageApi = {
|
||||
// 获得消息分页数据
|
||||
getKeFuMessagePage: async (params: any) => {
|
||||
return await request.get({ url: '/promotion/kefu-message/page', params })
|
||||
},
|
||||
|
||||
// 获得消息分页数据
|
||||
getBySenderIdStat: async (senderId: number) => {
|
||||
return await request.get({ url: '/promotion/kefu-message/getBySenderIdStat?senderId=' + senderId })
|
||||
}
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 用户留言 VO
|
||||
export interface LeaveWordVO {
|
||||
id: number // id
|
||||
name: string // 昵称
|
||||
phone: string // 电话
|
||||
content: string // 内容
|
||||
response: string //回复内容
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 用户留言 API
|
||||
export const LeaveWordApi = {
|
||||
// 查询用户留言分页
|
||||
getLeaveWordPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/leave-word/page`, params })
|
||||
},
|
||||
|
||||
// 查询用户留言详情
|
||||
getLeaveWord: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/leave-word/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增用户留言
|
||||
createLeaveWord: async (data: LeaveWordVO) => {
|
||||
return await request.post({ url: `/promotion/leave-word/create`, data })
|
||||
},
|
||||
|
||||
// 修改用户留言
|
||||
updateLeaveWord: async (data: LeaveWordVO) => {
|
||||
return await request.put({ url: `/promotion/leave-word/update`, data })
|
||||
},
|
||||
|
||||
// 删除用户留言
|
||||
deleteLeaveWord: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/leave-word/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出用户留言 Excel
|
||||
exportLeaveWord: async (params) => {
|
||||
return await request.download({ url: `/promotion/leave-word/export-excel`, params })
|
||||
},
|
||||
|
||||
// 添加回复内容
|
||||
addResponse: async (id: number, content: string) => {
|
||||
return await request.get({ url: `/promotion/leave-word/addResponse?id=` + id +`&&response=` + content })
|
||||
},
|
||||
|
||||
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 付费会员权益 VO
|
||||
export interface PaidMemberBenefitVO {
|
||||
id: number // 编号
|
||||
benName: string // 权益名称
|
||||
showName: string // 展示名称
|
||||
iconUrl: string // 图标地址
|
||||
intro: string // 描述
|
||||
status: boolean // 状态:(默认)0隐藏 1显示
|
||||
sort: number // 排序
|
||||
}
|
||||
|
||||
// 付费会员权益 API
|
||||
export const PaidMemberBenefitApi = {
|
||||
// 查询付费会员权益分页
|
||||
getPaidMemberBenefitPage: async (params: any) => {
|
||||
return await request.get({ url: `/paidmemberbenefit/paid-member-benefit/page`, params })
|
||||
},
|
||||
|
||||
// 查询付费会员权益详情
|
||||
getPaidMemberBenefit: async (id: number) => {
|
||||
return await request.get({ url: `/paidmemberbenefit/paid-member-benefit/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增付费会员权益
|
||||
createPaidMemberBenefit: async (data: PaidMemberBenefitVO) => {
|
||||
return await request.post({ url: `/paidmemberbenefit/paid-member-benefit/create`, data })
|
||||
},
|
||||
|
||||
// 修改付费会员权益
|
||||
updatePaidMemberBenefit: async (data: PaidMemberBenefitVO) => {
|
||||
return await request.put({ url: `/paidmemberbenefit/paid-member-benefit/update`, data })
|
||||
},
|
||||
// 修改会员权益状态
|
||||
updatePaidMemberBenefitStatus: async (data: any) => {
|
||||
return await request.put({ url: `/paidmemberbenefit/paid-member-benefit/updateStatus`, data})
|
||||
},
|
||||
|
||||
// 删除付费会员权益
|
||||
deletePaidMemberBenefit: async (id: number) => {
|
||||
return await request.delete({ url: `/paidmemberbenefit/paid-member-benefit/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出付费会员权益 Excel
|
||||
exportPaidMemberBenefit: async (params) => {
|
||||
return await request.download({ url: `/paidmemberbenefit/paid-member-benefit/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 兑换记录 VO
|
||||
export interface PointOrderVO {
|
||||
id: number // id
|
||||
orderNumber: string // 订单号
|
||||
userId: number // 用户id
|
||||
productId: number // 商品id
|
||||
integral: number // 兑换积分
|
||||
orderStatus: number // 订单状态
|
||||
orderTime: Date // 下单时间
|
||||
userName: string
|
||||
productName: string
|
||||
imageUrl: string
|
||||
|
||||
}
|
||||
|
||||
// 兑换记录 API
|
||||
export const PointOrderApi = {
|
||||
// 查询兑换记录分页
|
||||
getPointOrderPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/point-order/page`, params })
|
||||
},
|
||||
|
||||
// 查询兑换记录详情
|
||||
getPointOrder: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/point-order/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增兑换记录
|
||||
createPointOrder: async (data: PointOrderVO) => {
|
||||
return await request.post({ url: `/promotion/point-order/create`, data })
|
||||
},
|
||||
|
||||
// 修改兑换记录
|
||||
updatePointOrder: async (data: PointOrderVO) => {
|
||||
return await request.put({ url: `/promotion/point-order/update`, data })
|
||||
},
|
||||
|
||||
// 删除兑换记录
|
||||
deletePointOrder: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/point-order/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出兑换记录 Excel
|
||||
exportPointOrder: async (params) => {
|
||||
return await request.download({ url: `/promotion/point-order/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 客服人员 VO
|
||||
export interface SupportStaffVO {
|
||||
id: number // ID
|
||||
name: string // 客服名称
|
||||
pic: string //头像
|
||||
phone: string // 手机号码
|
||||
account: string // 登录账号
|
||||
password: string // 登录密码
|
||||
status: number // 客服状态
|
||||
orderManage: number // 手机订单管理
|
||||
orderInform: number // 订单通知
|
||||
}
|
||||
|
||||
// 客服人员 API
|
||||
export const SupportStaffApi = {
|
||||
// 查询客服人员分页
|
||||
getSupportStaffPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/support-staff/page`, params })
|
||||
},
|
||||
|
||||
// 查询客服人员详情
|
||||
getSupportStaff: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/support-staff/get?id=` + id })
|
||||
},
|
||||
|
||||
|
||||
// 新增客服人员
|
||||
createSupportStaff: async (data: SupportStaffVO) => {
|
||||
return await request.post({ url: `/promotion/support-staff/create`, data })
|
||||
},
|
||||
|
||||
// 修改客服人员
|
||||
updateSupportStaff: async (data: SupportStaffVO) => {
|
||||
return await request.put({ url: `/promotion/support-staff/update`, data })
|
||||
},
|
||||
|
||||
// 删除客服人员
|
||||
deleteSupportStaff: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/support-staff/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客服人员 Excel
|
||||
exportSupportStaff: async (params) => {
|
||||
return await request.download({ url: `/promotion/support-staff/export-excel`, params })
|
||||
},
|
||||
|
||||
|
||||
// 修改客服人员
|
||||
updateLineStatus: async (id: string,lineStatus: number) => {
|
||||
return await request.get({ url: `/promotion/support-staff/updateLineStatus?id=` + id + `&lineStatus=` + lineStatus })
|
||||
},
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 客服话术 VO
|
||||
export interface VerbalTrickVO {
|
||||
id: number // id
|
||||
type: number // 分类
|
||||
title: string // 标题
|
||||
details: string // 详情
|
||||
}
|
||||
|
||||
// 客服话术 API
|
||||
export const VerbalTrickApi = {
|
||||
// 查询客服话术分页
|
||||
getVerbalTrickPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/verbal-trick/page`, params })
|
||||
},
|
||||
|
||||
// 查询客服话术详情
|
||||
getVerbalTrick: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/verbal-trick/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增客服话术
|
||||
createVerbalTrick: async (data: VerbalTrickVO) => {
|
||||
return await request.post({ url: `/promotion/verbal-trick/create`, data })
|
||||
},
|
||||
|
||||
// 修改客服话术
|
||||
updateVerbalTrick: async (data: VerbalTrickVO) => {
|
||||
return await request.put({ url: `/promotion/verbal-trick/update`, data })
|
||||
},
|
||||
|
||||
// 删除客服话术
|
||||
deleteVerbalTrick: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/verbal-trick/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客服话术 Excel
|
||||
exportVerbalTrick: async (params) => {
|
||||
return await request.download({ url: `/promotion/verbal-trick/export-excel`, params })
|
||||
},
|
||||
|
||||
// 查询客服话术
|
||||
getVerbalTrickList: async (id: string) => {
|
||||
return await request.get({ url: `/promotion/verbal-trick/getVerbalTrickList?id=` +id })
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员协议 VO
|
||||
export interface PaidMemberAgreeVO {
|
||||
id: number // 编号
|
||||
content: string // 内容
|
||||
}
|
||||
|
||||
// 会员协议 API
|
||||
export const PaidMemberAgreeApi = {
|
||||
// 查询会员协议
|
||||
getPaidMemberAgree: async () => {
|
||||
return await request.get({ url: `/member/paid-member-agree/get`})
|
||||
},
|
||||
|
||||
|
||||
// 保存会员协议
|
||||
savePaidMemberAgree: async (data: PaidMemberAgreeVO) => {
|
||||
return await request.put({ url: `/member/paid-member-agree/save`, data })
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 付费会员配置 VO
|
||||
export interface PaidMemberConfigVO {
|
||||
id: number // 编号
|
||||
openPaidMember: boolean // 开启付费会员
|
||||
paidMemberPrice: boolean // 商品付费会员价
|
||||
}
|
||||
|
||||
// 付费会员配置 API
|
||||
export const PaidMemberConfigApi = {
|
||||
// 查询付费会员配置详情
|
||||
getPaidMemberConfig: async () => {
|
||||
return await request.get({ url: `/member/paid-member-config/get` })
|
||||
},
|
||||
|
||||
// 保存付费会员配置
|
||||
savePaidMemberConfig: async (data: PaidMemberConfigVO) => {
|
||||
return await request.put({ url: `/member/paid-member-config/save`, data })
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 付费会员 VO
|
||||
export interface PaidMemberUserVO {
|
||||
id: number // 编号
|
||||
mobile: string // 手机号
|
||||
password: string // 密码
|
||||
status: number // 状态
|
||||
registerIp: string // 注册 IP
|
||||
registerTerminal: number // 注册终端
|
||||
loginIp: string // 最后登录IP
|
||||
loginDate: Date // 最后登录时间
|
||||
nickname: string // 用户昵称
|
||||
avatar: string // 头像
|
||||
name: string // 真实名字
|
||||
sex: number // 性别
|
||||
birthday: Date // 出生日期
|
||||
areaId: number // 所在地
|
||||
mark: string // 用户备注
|
||||
point: number // 积分
|
||||
tagIds: string // 用户标签编号列表,以逗号分隔
|
||||
levelId: number // 等级编号
|
||||
experience: number // 经验
|
||||
groupId: number // 用户分组编号
|
||||
|
||||
paid: Boolean //是否支付,0:未支付,1:已支付
|
||||
|
||||
payTime: Date //支付时间
|
||||
|
||||
cardExpirationTime: Date; //到期时间
|
||||
|
||||
price:number //支付金额,单位为分
|
||||
|
||||
deadlineDay:string //期限天数
|
||||
|
||||
payType: string //支付方式
|
||||
|
||||
|
||||
payChannel: string//支付渠道
|
||||
|
||||
orderNo: string //订单号
|
||||
|
||||
payOrderId: number //支付订单编号
|
||||
|
||||
payMemberType: string//会员类型
|
||||
}
|
||||
|
||||
// 付费会员 API
|
||||
export const PaidMemberUserApi = {
|
||||
// 查询付费会员分页
|
||||
getPaidMemberUserPage: async (params: any) => {
|
||||
return await request.get({ url: `/member/paid-member-user/page`, params })
|
||||
},
|
||||
|
||||
// 查询付费会员详情
|
||||
getPaidMemberUser: async (id: number) => {
|
||||
return await request.get({ url: `/member/paid-member-user/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增付费会员
|
||||
createPaidMemberUser: async (data: PaidMemberUserVO) => {
|
||||
return await request.post({ url: `/member/paid-member-user/create`, data })
|
||||
},
|
||||
|
||||
// 修改付费会员
|
||||
updatePaidMemberUser: async (data: PaidMemberUserVO) => {
|
||||
return await request.put({ url: `/member/paid-member-user/update`, data })
|
||||
},
|
||||
|
||||
// 删除付费会员
|
||||
deletePaidMemberUser: async (id: number) => {
|
||||
return await request.delete({ url: `/member/paid-member-user/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出付费会员 Excel
|
||||
exportPaidMemberUser: async (params) => {
|
||||
return await request.download({ url: `/member/paid-member-user/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡类型 VO
|
||||
export interface cardVO {
|
||||
id: number // id
|
||||
name: string // 会员名
|
||||
vid: string // 有效期
|
||||
originalPrice: number // 原价
|
||||
specialPrice: number // 优惠价
|
||||
sort: string // 排序
|
||||
status: number// 是否禁用
|
||||
}
|
||||
|
||||
// 会员卡类型 API
|
||||
export const cardApi = {
|
||||
// 查询会员卡类型分页
|
||||
getcardPage: async (params: any) => {
|
||||
return await request.get({ url: `/paid/member/card/type/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡类型详情
|
||||
getcard: async (id: number) => {
|
||||
return await request.get({ url: `/paid/member/card/type/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡类型
|
||||
createcard: async (data: cardVO) => {
|
||||
return await request.post({ url: `/paid/member/card/type/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡类型
|
||||
updatecard: async (data: cardVO) => {
|
||||
return await request.put({ url: `/paid/member/card/type/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡类型
|
||||
deletecard: async (id: number) => {
|
||||
return await request.delete({ url: `/paid/member/card/type/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡类型 Excel
|
||||
exportcard: async (params) => {
|
||||
return await request.download({ url: `/paid/member/card/type/export-excel`, params })
|
||||
},
|
||||
|
||||
// 获取会员卡类型下拉列表
|
||||
getcardlist: async () => {
|
||||
return await request.get({ url: `/paid/member/card/type/get-list`})
|
||||
},
|
||||
}
|
@ -20,7 +20,6 @@ export interface UserVO {
|
||||
point: number | undefined | null
|
||||
totalPoint: number | undefined | null
|
||||
experience: number | null | undefined
|
||||
groupName: string
|
||||
}
|
||||
|
||||
// 查询会员用户列表
|
||||
@ -52,8 +51,3 @@ export const updateUserPoint = async (data: any) => {
|
||||
export const updateUserBalance = async (data: any) => {
|
||||
return await request.put({ url: `/member/user/update-balance`, data })
|
||||
}
|
||||
|
||||
// 客服查询用户详情
|
||||
export const getUserInfo = async (id: number) => {
|
||||
return await request.get({ url: `/member/user/getUserInfo?id=` + id })
|
||||
}
|
||||
|
@ -27,5 +27,5 @@ export const getWalletPage = async (params) => {
|
||||
|
||||
// 修改会员钱包余额
|
||||
export const updateWalletBalance = async (data: any) => {
|
||||
return await request.put({ url: `/pay/wallet/update-balance`, data })
|
||||
return await request.post({ url: `/pay/wallet/update`, data })
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 钱包充值 VO
|
||||
export interface WalletRechargeVO {
|
||||
id: number // id
|
||||
walletId: number // 钱包编号
|
||||
totalPrice: number // 充值实际到账
|
||||
payPrice: number // 实际支付金额
|
||||
bonusPrice: number // 钱包赠送金额
|
||||
packageId: number // 充值套餐编号
|
||||
payStatus: boolean // 是否支付
|
||||
payOrderId: number // 支付订单编号
|
||||
payChannelCode: string // 支付成功的支付渠道
|
||||
payTime: Date // 订单支付时间
|
||||
payRefundId: number // 支付退款单编号
|
||||
refundTotalPrice: number // 退款金额(包含赠送金额)
|
||||
refundPayPrice: number // 退款支付金额
|
||||
refundBonusPrice: number // 退款钱包赠送金额
|
||||
refundTime: Date // 退款时间
|
||||
refundStatus: number // 退款状态
|
||||
name : string
|
||||
avatar: string
|
||||
}
|
||||
|
||||
// 钱包充值 API
|
||||
export const WalletRechargeApi = {
|
||||
// 查询钱包充值分页
|
||||
getWalletRechargePage: async (params: any) => {
|
||||
return await request.get({ url: `/pay/wallet-recharge/page`, params })
|
||||
},
|
||||
|
||||
// 查询钱包充值详情
|
||||
getWalletRecharge: async (id: number) => {
|
||||
return await request.get({ url: `/pay/wallet-recharge/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增钱包充值
|
||||
createWalletRecharge: async (data: WalletRechargeVO) => {
|
||||
return await request.post({ url: `/pay/wallet-recharge/create`, data })
|
||||
},
|
||||
|
||||
// 修改钱包充值
|
||||
updateWalletRecharge: async (data: WalletRechargeVO) => {
|
||||
return await request.put({ url: `/pay/wallet-recharge/update`, data })
|
||||
},
|
||||
|
||||
// 删除钱包充值
|
||||
deleteWalletRecharge: async (id: number) => {
|
||||
return await request.delete({ url: `/pay/wallet-recharge/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出钱包充值 Excel
|
||||
exportWalletRecharge: async (params) => {
|
||||
return await request.download({ url: `/pay/wallet-recharge/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 预约配置 VO
|
||||
export interface ConfigurationVO {
|
||||
id: number // id
|
||||
projectdayId: number
|
||||
serviceTime: string
|
||||
technicianId: number // 套餐id
|
||||
technicianName: string
|
||||
timeQuantum: string // 时间段
|
||||
availableNumber: number // 可预约数
|
||||
residueNumber: number // 剩余预约数
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 预约配置 API
|
||||
export const ConfigurationApi = {
|
||||
// 查询预约配置分页
|
||||
getConfigurationPage: async (params: any) => {
|
||||
return await request.get({ url: `/subscribe/configuration/page`, params })
|
||||
},
|
||||
|
||||
// 查询预约配置详情
|
||||
getConfiguration: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/configuration/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增预约配置
|
||||
createConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.post({ url: `/subscribe/configuration/create`, data })
|
||||
},
|
||||
|
||||
// 修改预约配置
|
||||
updateConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.put({ url: `/subscribe/configuration/update`, data })
|
||||
},
|
||||
|
||||
// 删除预约配置
|
||||
deleteConfiguration: async (id: number) => {
|
||||
return await request.delete({ url: `/subscribe/configuration/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出预约配置 Excel
|
||||
exportConfiguration: async (params) => {
|
||||
return await request.download({ url: `/subscribe/configuration/export-excel`, params })
|
||||
},
|
||||
|
||||
// addUpdConfiguration: async (projectdayId: number,technicianId: number,serviceTimes: string) => {
|
||||
// return await request.post({ url: `/subscribe/configuration/addUpdConfiguration?projectdayId=`+projectdayId+`&technicianId=`+technicianId+`&serviceTimes=`+serviceTimes })
|
||||
// },
|
||||
|
||||
|
||||
addUpdConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.post({ url: `/subscribe/configuration/addUpdConfiguration`, data })
|
||||
},
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 预约项目 VO
|
||||
export interface ProjectVO {
|
||||
id: number // ID
|
||||
brandId: number // 所属门店
|
||||
yuyueNum: number //可预约数量
|
||||
name: string // 项目名称
|
||||
pictrue: string // 项目图片
|
||||
content: string // 项目简介
|
||||
status: number // 状态
|
||||
timeInterval: string // 可预约日期
|
||||
brandName: string
|
||||
}
|
||||
|
||||
// 预约项目 API
|
||||
export const ProjectApi = {
|
||||
// 查询预约项目分页
|
||||
getProjectPage: async (params: any) => {
|
||||
return await request.get({ url: `/subscribe/project/page`, params })
|
||||
},
|
||||
|
||||
// 查询预约项目详情
|
||||
getProject: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/project/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增预约项目
|
||||
createProject: async (data: ProjectVO) => {
|
||||
return await request.post({ url: `/subscribe/project/create`, data })
|
||||
},
|
||||
|
||||
// 修改预约项目
|
||||
updateProject: async (data: ProjectVO) => {
|
||||
return await request.put({ url: `/subscribe/project/update`, data })
|
||||
},
|
||||
|
||||
// 删除预约项目
|
||||
deleteProject: async (id: number) => {
|
||||
return await request.delete({ url: `/subscribe/project/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出预约项目 Excel
|
||||
exportProject: async (params) => {
|
||||
return await request.download({ url: `/subscribe/project/export-excel`, params })
|
||||
},
|
||||
|
||||
getProjectName: async () => {
|
||||
return await request.get({ url: `/subscribe/project/getProjectName` })
|
||||
},
|
||||
|
||||
getProjectDay: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/project/getProjectDay?id=` + id })
|
||||
},
|
||||
|
||||
getConfiguration: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/configuration/getConfiguration?id=` + id })
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -5,21 +5,13 @@ export interface LitemallReservationVO {
|
||||
id: number // id
|
||||
userId: number // 用户id
|
||||
nickname: string
|
||||
// type: number // 预约类型
|
||||
type: number // 预约类型
|
||||
brandId: string // 门店id
|
||||
technicianId: string // 人员id
|
||||
|
||||
name: string
|
||||
phone: string
|
||||
brandName: string
|
||||
porjectName: string
|
||||
technicianId: string // 人员id
|
||||
technicianName: string
|
||||
days: string
|
||||
timeQuantum: string
|
||||
|
||||
|
||||
// reAddTime: Date // 预约时间
|
||||
// hsstr: string // 预约时间段
|
||||
reAddTime: Date // 预约时间
|
||||
hsstr: string // 预约时间段
|
||||
reStatus: number // 预约状态
|
||||
status: number // 审核状态
|
||||
remark: string // 备注
|
||||
@ -55,10 +47,5 @@ export const LitemallReservationApi = {
|
||||
// 导出预约订单 Excel
|
||||
exportLitemallReservation: async (params) => {
|
||||
return await request.download({ url: `/subscribe/litemall-reservation/export-excel`, params })
|
||||
},
|
||||
|
||||
// 删除预约订单
|
||||
checkLitemallReservation: async (id: number,check: number) => {
|
||||
return await request.get({ url: `/subscribe/litemall-reservation/check?id=` + id + `&check=` + check })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,17 @@ import request from '@/config/axios'
|
||||
|
||||
// 人员管理 VO
|
||||
export interface LitemallTechnicianVO {
|
||||
id: number // idd
|
||||
name: string
|
||||
projectId: number // 项目id
|
||||
brandName: string //项目名称
|
||||
id: number // id
|
||||
techSn: string // 人员编号
|
||||
type: number // 人员类型
|
||||
technicianName: string // 人员名称
|
||||
brandId: number // 门店id
|
||||
brandName: string
|
||||
sex: number // 性别
|
||||
photo: string // 照片
|
||||
serviceTime: string // 服务时间段
|
||||
serviceScope: string // 服务范围
|
||||
phone: string // 手机号
|
||||
ym: number // 约满标记
|
||||
status: number // 状态
|
||||
content: string // 介绍
|
||||
|
@ -47,33 +47,3 @@ export const deleteDictData = (id: number) => {
|
||||
export const exportDictData = (params) => {
|
||||
return request.download({ url: '/system/dict-data/export', params })
|
||||
}
|
||||
|
||||
// 图片素材管理分类
|
||||
export const getTypeList = () => {
|
||||
return request.get({ url: '/system/dict-data/getTypeList' })
|
||||
}
|
||||
|
||||
// 客服话术分类
|
||||
export const getHuaShuTypeList = () => {
|
||||
return request.get({ url: '/system/dict-data/getHuaShuTypeList' })
|
||||
}
|
||||
|
||||
// 新增字典数据,客服话术分类
|
||||
export const createType = (data: DictDataVO) => {
|
||||
return request.post({ url: '/system/dict-data/createType', data })
|
||||
}
|
||||
|
||||
// 新增字典数据,素材管理图片分类
|
||||
export const createPicType = (data: DictDataVO) => {
|
||||
return request.post({ url: '/system/dict-data/createPicType', data })
|
||||
}
|
||||
|
||||
// 新增字典数据,素材管理图片分类
|
||||
export const updateMenu = (id : number, name : string) => {
|
||||
return request.get({ url: '/system/dict-data/updateMenu?id='+ id + `&name=` + name })
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export const deleteMenu = (id: number | undefined) => {
|
||||
return request.delete({ url: '/system/dict-data/deleteMenu?id=' + id })
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡划拨 VO
|
||||
export interface TransferVO {
|
||||
id: number // 编号
|
||||
cardNumber: string // 会员卡号
|
||||
assignorId: number // 合伙人
|
||||
transfereeId: number // 会员
|
||||
assignorPhone: string // 合伙人电话
|
||||
transfereePhone: string // 会员电话
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 会员卡划拨 API
|
||||
export const TransferApi = {
|
||||
// 查询会员卡划拨分页
|
||||
getTransferPage: async (params: any) => {
|
||||
return await request.get({ url: `/card/transfer/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡划拨详情
|
||||
getTransfer: async (id: number) => {
|
||||
return await request.get({ url: `/card/transfer/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡划拨
|
||||
createTransfer: async (data: TransferVO) => {
|
||||
return await request.post({ url: `/card/transfer/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡划拨
|
||||
updateTransfer: async (data: TransferVO) => {
|
||||
return await request.put({ url: `/card/transfer/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡划拨
|
||||
deleteTransfer: async (id: number) => {
|
||||
return await request.delete({ url: `/card/transfer/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡划拨 Excel
|
||||
exportTransfer: async (params) => {
|
||||
return await request.download({ url: `/card/transfer/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡划拨记录 VO
|
||||
export interface TransferLogVO {
|
||||
id: number // 划拨id
|
||||
cardNumber: string // 会员卡号
|
||||
assignorId: number // 发起人
|
||||
transfereeId: number // 划拨人
|
||||
assignorPhone: string // 发起人手机
|
||||
transfereePhone: string // 划拨人手机
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 会员卡划拨记录 API
|
||||
export const TransferLogApi = {
|
||||
// 查询会员卡划拨记录分页
|
||||
getTransferLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/card/transfer-log/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡划拨记录详情
|
||||
getTransferLog: async (id: number) => {
|
||||
return await request.get({ url: `/card/transfer-log/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡划拨记录
|
||||
createTransferLog: async (data: TransferLogVO) => {
|
||||
return await request.post({ url: `/card/transfer-log/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡划拨记录
|
||||
updateTransferLog: async (data: TransferLogVO) => {
|
||||
return await request.put({ url: `/card/transfer-log/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡划拨记录
|
||||
deleteTransferLog: async (id: number) => {
|
||||
return await request.delete({ url: `/card/transfer-log/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡划拨记录 Excel
|
||||
exportTransferLog: async (params) => {
|
||||
return await request.download({ url: `/card/transfer-log/export-excel`, params })
|
||||
},
|
||||
}
|
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.7 KiB |
@ -24,7 +24,7 @@
|
||||
:content="appLink.path" placement="bottom" :show-after="300">
|
||||
|
||||
<el-button class="m-b-8px m-r-8px m-l-0px!"
|
||||
:type="appLink.path == activeAppLink.path ? 'primary' : 'default'"
|
||||
:type="isSameLink(appLink.path, activeAppLink.path) ? 'primary' : 'default'"
|
||||
@click="handleAppLinkSelected(appLink)">
|
||||
{{ appLink.name }}
|
||||
</el-button>
|
||||
@ -109,14 +109,9 @@
|
||||
|
||||
// 处理 APP 链接选中
|
||||
const handleAppLinkSelected = (appLink : AppLink) => {
|
||||
if(!appLink.path.includes('/pages/index/page')){
|
||||
if (!isSameLink(appLink.path, activeAppLink.value.path)) {
|
||||
activeAppLink.value = appLink
|
||||
// console.log(activeAppLink.value,activeAppLink.value.path,"activeAppLink.value")
|
||||
}
|
||||
}else{
|
||||
activeAppLink.value.path = appLink.path
|
||||
console.log(activeAppLink.value.path,"activeAppLink.value.path")
|
||||
if (!isSameLink(appLink.path, activeAppLink.value.path)) {
|
||||
activeAppLink.value = appLink
|
||||
console.log(activeAppLink.value,activeAppLink.value.path,"activeAppLink.value")
|
||||
}
|
||||
switch (appLink.type) {
|
||||
case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST:
|
||||
|
@ -65,11 +65,11 @@ export const APP_LINK_GROUP_LIST = [
|
||||
name: '商品搜索',
|
||||
path: '/pages/index/search'
|
||||
},
|
||||
// {
|
||||
// name: '自定义页面',
|
||||
// path: '/pages/index/page',
|
||||
// type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL
|
||||
// },
|
||||
{
|
||||
name: '自定义页面',
|
||||
path: '/pages/index/page',
|
||||
type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL
|
||||
},
|
||||
{
|
||||
name: '客服',
|
||||
path: '/pages/chat/index'
|
||||
@ -78,25 +78,13 @@ export const APP_LINK_GROUP_LIST = [
|
||||
name: '系统设置',
|
||||
path: '/pages/public/setting'
|
||||
},
|
||||
// {
|
||||
// name: '常见问题',
|
||||
// path: '/pages/public/faq'
|
||||
// },
|
||||
{
|
||||
name: '常见问题',
|
||||
path: '/pages/public/faq'
|
||||
},
|
||||
{
|
||||
name: '积分商城',
|
||||
path: '/pages/index/page?id=3'
|
||||
},
|
||||
{
|
||||
name:'我的积分',
|
||||
path:'/pages/user/wallet/score'
|
||||
},
|
||||
{
|
||||
name:'兑换记录',
|
||||
path:'/pages/activity/point/exchange_list'
|
||||
},
|
||||
{
|
||||
name:'积分商品列表',
|
||||
path:'/pages/activity/point/exchange_listall?id=3'
|
||||
path: '/pages/public/faq'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -123,11 +111,11 @@ export const APP_LINK_GROUP_LIST = [
|
||||
path: '/pages/goods/seckill',
|
||||
type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
|
||||
},
|
||||
// {
|
||||
// name: '促销列表',
|
||||
// path: '/pages/goods/sales',
|
||||
// type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
|
||||
// },
|
||||
{
|
||||
name: '促销列表',
|
||||
path: '/pages/goods/sales',
|
||||
type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
|
||||
},
|
||||
{
|
||||
name: '门店管理',
|
||||
path: '/pages/user/goods_details_store/index',
|
||||
@ -207,12 +195,11 @@ export const APP_LINK_GROUP_LIST = [
|
||||
{
|
||||
name: '充值记录',
|
||||
path: '/pages/pay/recharge-log'
|
||||
},
|
||||
{
|
||||
name: '核销记录',
|
||||
path: '/pages/pay/recharge-log'
|
||||
}
|
||||
// ,
|
||||
// {
|
||||
// name: '核销记录',
|
||||
// path: '/pages/pay/recharge-log'
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -261,19 +248,7 @@ export const APP_LINK_GROUP_LIST = [
|
||||
{
|
||||
name: '会员中心',
|
||||
path: '/pages/user/user_vip/index'
|
||||
},
|
||||
{
|
||||
name:'付费会员',
|
||||
path:'/pages/user/user_vip/list'
|
||||
},
|
||||
{
|
||||
name:'预约中心',
|
||||
path:'/pages/subscribe/subscribe'
|
||||
},
|
||||
{
|
||||
name:'预约记录',
|
||||
path:'pages/reservation_record/reservation_record'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
// ,
|
||||
|
@ -67,8 +67,7 @@ export const CouponValidTerm = defineComponent({
|
||||
coupon.validEndTime,
|
||||
'YYYY-MM-DD'
|
||||
)}`
|
||||
// : `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用`
|
||||
: `领取后 ${coupon.fixedEndTerm} 天内可用`
|
||||
: `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用`
|
||||
return () => <div>{text}</div>
|
||||
}
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-scrollbar class="z-1 min-h-30px" wrap-class="w-full" ref="containerRef">
|
||||
<div
|
||||
class="new-class flex-row text-12px"
|
||||
class="new-class flex flex-row text-12px"
|
||||
:style="{
|
||||
gap: `${property.space}px`,
|
||||
width: scrollbarWidth
|
||||
@ -13,13 +13,11 @@
|
||||
background: property.bgImg
|
||||
? `url(${property.bgImg}) 100% center / 100% 100% no-repeat`
|
||||
: '#fff',
|
||||
width: `150px`,
|
||||
padding: `10px 10px`,
|
||||
width: `${couponWidth}px`,
|
||||
color: property.textColor
|
||||
}"
|
||||
v-for="(coupon, index) in couponList"
|
||||
:key="index"
|
||||
style="padding-left: 0px;padding-right: 4px;"
|
||||
>
|
||||
<!-- 布局1:1列-->
|
||||
<!-- <div v-if="property.columns === 1" class="m-l-16px flex flex-row justify-between p-8px">
|
||||
@ -43,17 +41,16 @@
|
||||
<!-- 布局2:2列-->
|
||||
<!-- v-else-if="property.columns === 2"s -->
|
||||
<div
|
||||
class="flex flex-row justify-between"
|
||||
style=""
|
||||
class="m-l-16px flex flex-row justify-between"
|
||||
>
|
||||
<div class="flex flex-col justify-evenly gap-4px" style="flex:1;">
|
||||
<div class="flex flex-col justify-evenly gap-4px">
|
||||
<!-- 优惠值 -->
|
||||
<CouponDiscount :coupon="coupon" style="text-align:center;" />
|
||||
<div style="text-align:center;">{{ coupon.name }}</div>
|
||||
<CouponDiscount :coupon="coupon" />
|
||||
<div>{{ coupon.name }}</div>
|
||||
</div>
|
||||
<div class="flex flex-col" style="writing-mode: vertical-rl;">
|
||||
<div class="flex flex-col">
|
||||
<div
|
||||
class="h-full w-20px rounded-20px text-center"
|
||||
class="h-full w-20px rounded-20px p-x-2px p-y-8px text-center"
|
||||
:style="{
|
||||
color: property.button.color,
|
||||
background: property.button.bgColor
|
||||
@ -141,11 +138,8 @@ onMounted(() => {
|
||||
<style scoped lang="scss">
|
||||
.new-class{
|
||||
margin-left: 10px;
|
||||
overflow-x:scroll;
|
||||
white-space: nowrap;
|
||||
.box-content{
|
||||
margin-right:10px;
|
||||
display:inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div
|
||||
v-for="(item, index) in property.list"
|
||||
:key="index"
|
||||
class="relative flex flex-col items-center"
|
||||
class="relative flex flex-col items-center p-b-14px p-t-20px"
|
||||
:style="{ width: `${100 * (1 / property.column)}%` }"
|
||||
>
|
||||
<!-- 右上角角标 -->
|
||||
@ -14,11 +14,11 @@
|
||||
>
|
||||
{{ item.badge.text }}
|
||||
</span>
|
||||
<el-image v-if="item.iconUrl" class="h-40px w-40px" :src="item.iconUrl" />
|
||||
<el-image v-if="item.iconUrl" class="h-28px w-28px" :src="item.iconUrl" />
|
||||
<span class="m-t-8px h-16px text-12px leading-16px" :style="{ color: item.titleColor }">
|
||||
{{ item.title }}
|
||||
</span>
|
||||
<span v-if="item.subtitle" class="m-t-6px h-12px text-10px leading-12px" :style="{ color: item.subtitleColor }">
|
||||
<span class="m-t-6px h-12px text-10px leading-12px" :style="{ color: item.subtitleColor }">
|
||||
{{ item.subtitle }}
|
||||
</span>
|
||||
</div>
|
||||
@ -32,9 +32,4 @@ defineOptions({ name: 'MenuGrid' })
|
||||
defineProps<{ property: MenuGridProperty }>()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.items-center{
|
||||
margin:5px 0;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -1,80 +0,0 @@
|
||||
import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
|
||||
/** 宫格导航属性 */
|
||||
export interface MenuGridProperty {
|
||||
// 列数
|
||||
column: number
|
||||
// 导航菜单列表
|
||||
list: MenuGridItemProperty[]
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
|
||||
/** 宫格导航项目属性 */
|
||||
export interface MenuGridItemProperty {
|
||||
// 图标链接
|
||||
iconUrl: string
|
||||
// 标题
|
||||
title: string
|
||||
// 标题颜色
|
||||
titleColor: string
|
||||
// 副标题
|
||||
subtitle: string
|
||||
// 副标题颜色
|
||||
subtitleColor: string
|
||||
// 链接
|
||||
url: string
|
||||
// 角标
|
||||
badge: {
|
||||
// 是否显示
|
||||
show: boolean
|
||||
// 角标文字
|
||||
text: string
|
||||
// 角标文字颜色
|
||||
textColor: string
|
||||
// 角标背景颜色
|
||||
bgColor: string
|
||||
}
|
||||
}
|
||||
|
||||
export const EMPTY_MENU_GRID_ITEM_PROPERTY = {
|
||||
title: '标题',
|
||||
titleColor: '#333',
|
||||
subtitle: '副标题',
|
||||
subtitleColor: '#bbb',
|
||||
badge: {
|
||||
show: false,
|
||||
textColor: '#fff',
|
||||
bgColor: '#FF6000'
|
||||
}
|
||||
} as MenuGridItemProperty
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-04.png'
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuGridTow',
|
||||
name: '魔方',
|
||||
// icon: 'bi:grid-3x3-gap',
|
||||
icon: logo,
|
||||
property: {
|
||||
column: 3,
|
||||
list: [cloneDeep(EMPTY_MENU_GRID_ITEM_PROPERTY)],
|
||||
style: {
|
||||
bgType: 'color',
|
||||
bgColor: '#fff',
|
||||
marginBottom: 8,
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
padding: 8,
|
||||
paddingTop: 8,
|
||||
paddingRight: 8,
|
||||
paddingBottom: 8,
|
||||
paddingLeft: 8,
|
||||
borderRadius: 8,
|
||||
borderTopLeftRadius: 8,
|
||||
borderTopRightRadius: 8,
|
||||
borderBottomRightRadius: 8,
|
||||
borderBottomLeftRadius: 8
|
||||
} as ComponentStyle
|
||||
}
|
||||
} as DiyComponent<MenuGridProperty>
|
@ -1,201 +0,0 @@
|
||||
<template>
|
||||
<div class='new_czbk'>
|
||||
<div class="t">
|
||||
<text class="left-font">超值爆款</text>
|
||||
<div class="sub">美好生活由此开始</div>
|
||||
</div>
|
||||
<div class="new-list">
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendBest',
|
||||
});"> -->
|
||||
<div class="item" >
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">今日推荐</div>
|
||||
<div class="c">店主诚意推荐品质商品</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img src="https://zysc.fjptzykj.com:3000/shangcheng/40a7582be7aeb5a6047415ab3a6728439a2798a4752ffcc1c063d66a534aa630.png"
|
||||
class="img"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/c80faeeeb2d6dadcdbe7e6d1a4caa06869b94301612cdf157414a10559b38267.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendHot',
|
||||
});"> -->
|
||||
<div class="item">
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">热门榜单</div>
|
||||
<div class="c">店主诚意推荐品质商品</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/5c72fc99989bf0a7e59b57f519c76c9a98cb20478384e20b1b934aa8f80cc598.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/904fd4848fde8025ccc17693662efd5b7bf5ec3f2656ecc7de407c8c46f910b2.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendNew',
|
||||
});"> -->
|
||||
<div class="item">
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">首发新品</div>
|
||||
<div class="c">新品上架等 你来拿</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/ebb2fc0512d1bd6a6d21a2c07f6603bfd2ea6f7e23377eb4cd8118d89d666589.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/7c71cbf2c757418302ea9ef2952893c24e1d46c4cc35a821f56be0f315bcabb0.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendGood',
|
||||
});"> -->
|
||||
<div class="item">
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">促销单品</div>
|
||||
<div class="c">综合评选好 产品</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/aac8baa7a6feb9ee3459d1cf75ba9a7e8bacb5d93c88ac95c1b0ecd29b847f96.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/8a61c35d82702c61f97ef3db43a8d6755b2eca3d78a22dbaa55851e815e96a23.png"
|
||||
class="img" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { MenuGridProperty } from './config'
|
||||
/** 宫格导航 */
|
||||
defineOptions({ name: 'MenuGridTow' })
|
||||
defineProps<{ property: MenuGridProperty }>()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.new_czbk {
|
||||
width: 100%;
|
||||
background: rgba(255, 229, 227);
|
||||
border-radius: 5px;
|
||||
margin: 0 auto;
|
||||
padding: 5px 0;
|
||||
// margin-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
&>.t {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:0 10px;
|
||||
.left-font {
|
||||
color: rgba(252, 60, 62);
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sub {
|
||||
background: rgba(248, 79, 43);
|
||||
color: white;
|
||||
border-radius: 20px 0px 20px 0px;
|
||||
padding: 0 13px;
|
||||
margin-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.new-list {
|
||||
// width: 100%;
|
||||
margin-right:10px;
|
||||
.item {
|
||||
float: left;
|
||||
width: 50%;
|
||||
|
||||
.nei {
|
||||
margin: 10px;
|
||||
margin-right:0;
|
||||
margin-bottom: 0;
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px;
|
||||
display: flex;
|
||||
|
||||
.l {
|
||||
width: 50%;
|
||||
|
||||
.t {
|
||||
// font-size: 17px;
|
||||
}
|
||||
|
||||
.c {
|
||||
color: rgba(153, 153, 153);
|
||||
font-size: 12px;
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
.b {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-around;
|
||||
// background: #329cff;
|
||||
// margin: 0 3px;
|
||||
// border-radius: 15px;
|
||||
// color: white;
|
||||
// font-weight: 700;
|
||||
// padding: 0px 9px;
|
||||
// font-style: oblique;
|
||||
|
||||
.img {
|
||||
width: 76%;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.r {
|
||||
width: 49%;
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
@ -1,107 +0,0 @@
|
||||
<template>
|
||||
<ComponentContainerProperty v-model="formData.style">
|
||||
<!-- 表单 -->
|
||||
<el-form label-width="80px" :model="formData" class="m-t-8px">
|
||||
<!-- <el-form-item label="每行数量" prop="column">
|
||||
<el-radio-group v-model="formData.column">
|
||||
<el-radio :label="3">3个</el-radio>
|
||||
<el-radio :label="4">4个</el-radio>
|
||||
<el-radio :label="5">5个</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-card header="菜单设置" class="property-group" shadow="never">
|
||||
<Draggable v-model="formData.list" handle="false">
|
||||
<template #default="{ element }">
|
||||
<!-- <el-form-item label="图标" prop="iconUrl">
|
||||
<UploadImg v-model="element.iconUrl" height="80px" width="80px">
|
||||
<template #tip> 建议尺寸:44 * 44 </template>
|
||||
</UploadImg>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="标题" prop="title">
|
||||
<!-- <InputWithColor v-model="element.title" v-model:color="element.titleColor" /> -->
|
||||
<div>{{element.title}}</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="副标题" prop="subtitle">
|
||||
<InputWithColor v-model="element.subtitle" v-model:color="element.subtitleColor" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="链接" prop="url">
|
||||
<AppLinkInput v-model="element.url" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="显示角标" prop="badge.show">
|
||||
<el-switch v-model="element.badge.show" />
|
||||
</el-form-item>
|
||||
<template v-if="element.badge.show">
|
||||
<el-form-item label="角标内容" prop="badge.text">
|
||||
<InputWithColor
|
||||
v-model="element.badge.text"
|
||||
v-model:color="element.badge.textColor"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="背景颜色" prop="badge.bgColor">
|
||||
<ColorInput v-model="element.badge.bgColor" />
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
</template>
|
||||
</Draggable>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</ComponentContainerProperty>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import {
|
||||
EMPTY_MENU_GRID_ITEM_PROPERTY,
|
||||
MenuGridProperty
|
||||
} from '@/components/DiyEditor/components/mobile/MenuGrid/config'
|
||||
|
||||
/** 宫格导航属性面板 */
|
||||
defineOptions({ name: 'MenuGridProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue : MenuGridProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
if (formData.value.list.length == 1 || formData.value.list.length == 2 || formData.value.list.length == 3) {
|
||||
formData.value = {
|
||||
column: 3,
|
||||
list: [
|
||||
{
|
||||
title: "今日推荐",
|
||||
url: '/pages/index/page?id=19'
|
||||
},
|
||||
{
|
||||
title: "热门榜单",
|
||||
url: '/pages/index/page?id=21'
|
||||
},
|
||||
{
|
||||
title: "首发新品",
|
||||
url: '/pages/index/page?id=22'
|
||||
},
|
||||
{
|
||||
title: "促销单品",
|
||||
url: '/pages/index/page?id=23'
|
||||
}
|
||||
],
|
||||
style: {
|
||||
bgColor: "#fff",
|
||||
bgType: "color",
|
||||
borderBottomLeftRadius: 8,
|
||||
borderBottomRightRadius: 8,
|
||||
borderRadius: 8,
|
||||
borderTopLeftRadius: 8,
|
||||
borderTopRightRadius: 8,
|
||||
marginBottom: 8,
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
padding: 0,
|
||||
paddingBottom: 0,
|
||||
paddingLeft: 0,
|
||||
paddingRight: 0,
|
||||
paddingTop: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
@ -10,7 +10,7 @@
|
||||
<div class="h-24px truncate leading-24px">{{ item.text }}</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<!-- <Icon icon="ep:arrow-right" /> -->
|
||||
<Icon icon="ep:arrow-right" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -1,23 +1,5 @@
|
||||
<template>
|
||||
<div :class="`box-content min-h-30px w-full flex flex-row flex-wrap`" ref="containerRef">
|
||||
<view class="new-fenlei">
|
||||
<view class="list on">
|
||||
<view class="t">首页新品</view>
|
||||
<view class="b">最新出炉</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="t">精品推荐</view>
|
||||
<view class="b">猜你喜欢</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="t">热门榜单</view>
|
||||
<view class="b">好评如云</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="t">促销单品</view>
|
||||
<view class="b">多买多销</view>
|
||||
</view>
|
||||
</view>
|
||||
<div
|
||||
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
|
||||
:style="{
|
||||
@ -182,44 +164,4 @@ const calculateWidth = () => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.new-fenlei {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin:10px 0;
|
||||
justify-content: space-around;
|
||||
.list {
|
||||
width: 100%;
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
&.on{
|
||||
.t {
|
||||
color: #e93422;
|
||||
}
|
||||
|
||||
.b {
|
||||
background: #e93422;
|
||||
color:white;
|
||||
}
|
||||
}
|
||||
.t {
|
||||
width:100%;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.b {
|
||||
// background: rgba(255, 102, 7);
|
||||
text-align: center;
|
||||
color: rgba(153,153,153);
|
||||
border-radius: 15px;
|
||||
width: 63%;
|
||||
margin: 0 auto;
|
||||
font-size: 12px;
|
||||
margin-top:5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -27,8 +27,8 @@
|
||||
:style="{
|
||||
gridGap: `${property.space}px`,
|
||||
gridTemplateColumns,
|
||||
width: scrollbarWidth
|
||||
}"
|
||||
style="padding:0 10px;padding-bottom: 8px;"
|
||||
>
|
||||
<!-- 商品 -->
|
||||
<div
|
||||
@ -53,7 +53,7 @@
|
||||
<el-image fit="cover" :src="spu.picUrl" :style="{ width: imageSize, height: imageSize }" />
|
||||
<div
|
||||
:class="[
|
||||
'flex flex-col p-8px box-border',
|
||||
'flex flex-col gap-8px p-8px box-border',
|
||||
{
|
||||
'w-[calc(100%-64px)]': columns === 2,
|
||||
'w-full': columns === 3
|
||||
@ -79,7 +79,6 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<view class="sss">参与拼团</view>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@ -146,18 +145,9 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sss {
|
||||
width: 100%;
|
||||
// margin-top: 10px;
|
||||
padding: 3px;
|
||||
font-size: 13px;
|
||||
background: #e93422;
|
||||
text-align: center;
|
||||
color: white;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
}
|
||||
|
||||
.new-class{
|
||||
padding:0 0;
|
||||
padding: 10px;
|
||||
// width:42%;
|
||||
}
|
||||
|
||||
|
@ -10,12 +10,7 @@
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/cb995c399d784c08e27d8f56b0a63ace2d13af3a1ee6aba5a2da71868dc4cf00.png" />
|
||||
<span class="new-text">限时秒杀</span>
|
||||
</div>
|
||||
<div style="color: rgba(255, 51, 35, 1); font-size:15px;" class="title-text">
|
||||
<span class="time">05</span>:
|
||||
<span class="time">00</span>:
|
||||
<span class="time">00</span>
|
||||
|
||||
</div>
|
||||
<span class="text-16px" style="color: rgb(187, 187, 187);">已有99人购买</span>
|
||||
</div>
|
||||
<div class="item-center flex flex-row justify-center gap-4px">
|
||||
<span class="text-12px" style="color: rgb(187, 187, 187);">查看更多</span>
|
||||
@ -28,8 +23,10 @@
|
||||
<!-- 商品网格 -->
|
||||
<!-- gridGap: `${property.space}px`, -->
|
||||
<div class="new-main" :style="{
|
||||
gridTemplateColumns,
|
||||
}" style="padding:0 10px;">
|
||||
|
||||
gridTemplateColumns,
|
||||
width: scrollbarWidth
|
||||
}">
|
||||
<!-- 商品 -->
|
||||
<!--
|
||||
:style="{
|
||||
@ -47,14 +44,19 @@
|
||||
</div>
|
||||
<!-- 商品封面图 -->
|
||||
<el-image fit="cover" :src="spu.picUrl" :style="{ width: imageSize, height: imageSize }" />
|
||||
<div>
|
||||
<div :class="[
|
||||
'flex flex-col gap-8px p-8px box-border',
|
||||
{
|
||||
'w-[calc(100%-64px)]': columns === 2,
|
||||
'w-full': columns === 3
|
||||
}
|
||||
]">
|
||||
<!-- 商品名称 -->
|
||||
<div v-if="property.fields.name.show" class="truncate text-12px"
|
||||
:style="{ color: property.fields.name.color }" style="margin: 5px 0;">
|
||||
:style="{ color: property.fields.name.color }">
|
||||
{{ spu.name }}
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div class="fff">抢</div>
|
||||
<div>
|
||||
<!-- 商品价格 -->
|
||||
<span v-if="property.fields.price.show" class="text-12px"
|
||||
:style="{ color: property.fields.price.color }">
|
||||
@ -127,24 +129,6 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.fff {
|
||||
padding: 1px 3px;
|
||||
font-size: 8px;
|
||||
background: #e93422;
|
||||
color: white;
|
||||
border-radius: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: rgba(255, 237, 238, 1);
|
||||
color: rgba(255, 51, 35, 1);
|
||||
text-align: center;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
:deep(.el-scrollbar__view) {
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
@ -152,36 +136,28 @@
|
||||
|
||||
.new-class {
|
||||
width: 33%;
|
||||
border-radius: 8px 8px 8px 0px;
|
||||
padding-bottom: 10px;
|
||||
// padding: 10px;
|
||||
padding: 10px;
|
||||
// width:42%;
|
||||
}
|
||||
|
||||
.new-main {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
grid-template-columns: repeat(3, auto);
|
||||
padding: 0px 10px 8px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
// :deep(.el-image) {
|
||||
// width: 100% !important;
|
||||
// }
|
||||
:deep(.el-image) {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.wh {
|
||||
position: relative;
|
||||
padding-right: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.new-text1 {
|
||||
width: 30px;
|
||||
.new-text1{
|
||||
width:30px;
|
||||
}
|
||||
|
||||
.new-text {
|
||||
font-weight: 700;
|
||||
.new-text{
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,8 +120,7 @@
|
||||
<IFrame class="w-375px border-4px border-rounded-8px border-solid p-2px h-667px!" :src="previewUrl" />
|
||||
<div class="flex flex-col">
|
||||
<el-text>手机扫码预览</el-text>
|
||||
<Qrcode :text="previewUrl" />
|
||||
<!-- <Qrcode :text="previewUrl" logo="/logo.gif" />-->
|
||||
<Qrcode :text="previewUrl" logo="/logo.gif" />
|
||||
</div>
|
||||
</div>
|
||||
</Dialog>
|
||||
@ -513,4 +512,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -118,8 +118,7 @@ export const PAGE_LIBS = [
|
||||
'MenuGrid',
|
||||
'MenuList',
|
||||
'Popover',
|
||||
'FloatingActionButton',
|
||||
"MenuGridTow"
|
||||
'FloatingActionButton'
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ export default defineComponent({
|
||||
onClick={handleClickOutside}
|
||||
></div>
|
||||
) : undefined}
|
||||
|
||||
|
||||
{renderLayout()}
|
||||
|
||||
<Backtop></Backtop>
|
||||
|
@ -35,120 +35,88 @@ const mobile = computed(() => appStore.getMobile)
|
||||
// 固定菜单
|
||||
const fixedMenu = computed(() => appStore.getFixedMenu)
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
export const useRenderLayout = () => {
|
||||
const route = useRoute()
|
||||
let renderClassic = null;
|
||||
if(route.path == "/kefu/kefu"){
|
||||
renderClassic = () => {
|
||||
return (
|
||||
<>
|
||||
|
||||
<div
|
||||
|
||||
style="transition: all var(--transition-time-02);width:83%;margin:0 auto;"
|
||||
>
|
||||
<ElScrollbar
|
||||
v-loading={pageLoading.value}
|
||||
class={[
|
||||
`${prefixCls}-content-scrollbar`,
|
||||
{
|
||||
|
||||
}
|
||||
]}
|
||||
>
|
||||
|
||||
|
||||
<AppView></AppView>
|
||||
</ElScrollbar>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}else {
|
||||
renderClassic = () => {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
class={[
|
||||
'absolute top-0 left-0 h-full layout-border__right',
|
||||
{ '!fixed z-3000': mobile.value }
|
||||
]}
|
||||
>
|
||||
{logo.value ? (
|
||||
<Logo
|
||||
class={[
|
||||
'bg-[var(--left-menu-bg-color)] relative',
|
||||
{
|
||||
'!pl-0': mobile.value && collapse.value,
|
||||
'w-[var(--left-menu-min-width)]': appStore.getCollapse,
|
||||
'w-[var(--left-menu-max-width)]': !appStore.getCollapse
|
||||
}
|
||||
]}
|
||||
style="transition: all var(--transition-time-02);"
|
||||
></Logo>
|
||||
) : undefined}
|
||||
<Menu class={[{ '!h-[calc(100%-var(--logo-height))]': logo.value }]}></Menu>
|
||||
</div>
|
||||
<div
|
||||
class={[
|
||||
`${prefixCls}-content`,
|
||||
'absolute top-0 h-[100%]',
|
||||
{
|
||||
'w-[calc(100%-var(--left-menu-min-width))] left-[var(--left-menu-min-width)]':
|
||||
collapse.value && !mobile.value && !mobile.value,
|
||||
'w-[calc(100%-var(--left-menu-max-width))] left-[var(--left-menu-max-width)]':
|
||||
!collapse.value && !mobile.value && !mobile.value,
|
||||
'fixed !w-full !left-0': mobile.value
|
||||
}
|
||||
]}
|
||||
style="transition: all var(--transition-time-02);"
|
||||
>
|
||||
<ElScrollbar
|
||||
v-loading={pageLoading.value}
|
||||
class={[
|
||||
`${prefixCls}-content-scrollbar`,
|
||||
{
|
||||
'!h-[calc(100%-var(--top-tool-height)-var(--tags-view-height))] mt-[calc(var(--top-tool-height)+var(--tags-view-height))]':
|
||||
fixedHeader.value
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div
|
||||
class={[
|
||||
{
|
||||
'fixed top-0 left-0 z-10': fixedHeader.value,
|
||||
'w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)]':
|
||||
collapse.value && fixedHeader.value && !mobile.value,
|
||||
'w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)]':
|
||||
!collapse.value && fixedHeader.value && !mobile.value,
|
||||
'!w-full !left-0': mobile.value
|
||||
}
|
||||
]}
|
||||
style="transition: all var(--transition-time-02);"
|
||||
>
|
||||
<ToolHeader
|
||||
class={[
|
||||
'bg-[var(--top-header-bg-color)]',
|
||||
{
|
||||
'layout-border__bottom': !tagsView.value
|
||||
}
|
||||
]}
|
||||
></ToolHeader>
|
||||
|
||||
{tagsView.value ? (
|
||||
<TagsView class="layout-border__top layout-border__bottom"></TagsView>
|
||||
) : undefined}
|
||||
</div>
|
||||
|
||||
<AppView></AppView>
|
||||
</ElScrollbar>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
const renderClassic = () => {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
class={[
|
||||
'absolute top-0 left-0 h-full layout-border__right',
|
||||
{ '!fixed z-3000': mobile.value }
|
||||
]}
|
||||
>
|
||||
{logo.value ? (
|
||||
<Logo
|
||||
class={[
|
||||
'bg-[var(--left-menu-bg-color)] relative',
|
||||
{
|
||||
'!pl-0': mobile.value && collapse.value,
|
||||
'w-[var(--left-menu-min-width)]': appStore.getCollapse,
|
||||
'w-[var(--left-menu-max-width)]': !appStore.getCollapse
|
||||
}
|
||||
]}
|
||||
style="transition: all var(--transition-time-02);"
|
||||
></Logo>
|
||||
) : undefined}
|
||||
<Menu class={[{ '!h-[calc(100%-var(--logo-height))]': logo.value }]}></Menu>
|
||||
</div>
|
||||
<div
|
||||
class={[
|
||||
`${prefixCls}-content`,
|
||||
'absolute top-0 h-[100%]',
|
||||
{
|
||||
'w-[calc(100%-var(--left-menu-min-width))] left-[var(--left-menu-min-width)]':
|
||||
collapse.value && !mobile.value && !mobile.value,
|
||||
'w-[calc(100%-var(--left-menu-max-width))] left-[var(--left-menu-max-width)]':
|
||||
!collapse.value && !mobile.value && !mobile.value,
|
||||
'fixed !w-full !left-0': mobile.value
|
||||
}
|
||||
]}
|
||||
style="transition: all var(--transition-time-02);"
|
||||
>
|
||||
<ElScrollbar
|
||||
v-loading={pageLoading.value}
|
||||
class={[
|
||||
`${prefixCls}-content-scrollbar`,
|
||||
{
|
||||
'!h-[calc(100%-var(--top-tool-height)-var(--tags-view-height))] mt-[calc(var(--top-tool-height)+var(--tags-view-height))]':
|
||||
fixedHeader.value
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div
|
||||
class={[
|
||||
{
|
||||
'fixed top-0 left-0 z-10': fixedHeader.value,
|
||||
'w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)]':
|
||||
collapse.value && fixedHeader.value && !mobile.value,
|
||||
'w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)]':
|
||||
!collapse.value && fixedHeader.value && !mobile.value,
|
||||
'!w-full !left-0': mobile.value
|
||||
}
|
||||
]}
|
||||
style="transition: all var(--transition-time-02);"
|
||||
>
|
||||
<ToolHeader
|
||||
class={[
|
||||
'bg-[var(--top-header-bg-color)]',
|
||||
{
|
||||
'layout-border__bottom': !tagsView.value
|
||||
}
|
||||
]}
|
||||
></ToolHeader>
|
||||
|
||||
{tagsView.value ? (
|
||||
<TagsView class="layout-border__top layout-border__bottom"></TagsView>
|
||||
) : undefined}
|
||||
</div>
|
||||
|
||||
<AppView></AppView>
|
||||
</ElScrollbar>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const renderTopLeft = () => {
|
||||
return (
|
||||
|
@ -6,7 +6,6 @@ const { wsCache } = useCache()
|
||||
|
||||
const AccessTokenKey = 'ACCESS_TOKEN'
|
||||
const RefreshTokenKey = 'REFRESH_TOKEN'
|
||||
const StaffTokenKey = 'STAFF_TOKEN'
|
||||
|
||||
// 获取token
|
||||
export const getAccessToken = () => {
|
||||
@ -31,16 +30,6 @@ export const removeToken = () => {
|
||||
wsCache.delete(RefreshTokenKey)
|
||||
}
|
||||
|
||||
// 获取客服id TODO:后面可以完善为token
|
||||
export const getStaffToken = () => {
|
||||
// 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错
|
||||
return wsCache.get(StaffTokenKey) ? wsCache.get(StaffTokenKey) : wsCache.get('STAFF_TOKEN')
|
||||
}
|
||||
// 设置客服id TODO:后面可以完善为token
|
||||
export const setStaffToken = (id: number) => {
|
||||
wsCache.set(StaffTokenKey, id)
|
||||
}
|
||||
|
||||
/** 格式化token(jwt格式) */
|
||||
export const formatToken = (token: string): string => {
|
||||
return 'Bearer ' + token
|
||||
|
@ -123,21 +123,7 @@ export enum DICT_TYPE {
|
||||
TYPES = 'types',
|
||||
TECHNICIAN_STATUS = 'technician_status',
|
||||
SEX = 'sex',
|
||||
|
||||
//客服配置类型
|
||||
KEFU_CONFIGURATION_TYPE = 'kefu_configuration_type',
|
||||
|
||||
INFRA_FILE_TYPE = 'infra_file_type',
|
||||
|
||||
PAY_WALLET_RECHARGE_PAY_STATUS = 'pay_wallet_recharge_pay_status',
|
||||
|
||||
//预约:项目
|
||||
SUBSCRIBE_PROJECT_STATUS = 'subscribe_project_status',
|
||||
|
||||
SUBSCRIBE_RESERVATION_STATUS = 'subscribe_reservation_status',
|
||||
|
||||
//预约:配置
|
||||
SUBSCRIBE_CONFIGURATION_STATUS = 'subscribe_configuration_status',
|
||||
|
||||
|
||||
//预约:人员管理
|
||||
STALL_SEX = 'stall_sex',
|
||||
@ -152,21 +138,6 @@ export enum DICT_TYPE {
|
||||
|
||||
//预约:机构管理
|
||||
ORGANIZATION_STATUS = 'organization_status',
|
||||
|
||||
//客服:自动回复
|
||||
KEFU_AUTO_RESPONSE_TYPE = 'kefu_auto_response_type',
|
||||
KEFU_AUTO_RESPONSE_STATUS = 'kefu_auto_response_status',
|
||||
|
||||
//客服:留言
|
||||
KEFU_LEAVE_WORD_STATUS = 'kefu_leave_word_status',
|
||||
|
||||
//客服:话术
|
||||
KEFU_VERBAL_TRICK_TYPE = 'kefu_verbal_trick_type',
|
||||
|
||||
//客服人员管理
|
||||
KEFU_SUPPORT_STAFF_STATUS = 'kefu_support_staff_status',
|
||||
KEFU_SUPPORT_STAFF_ORDER_MANAGE = 'kefu_support_staff_order_manage',
|
||||
KEFU_SUPPORT_STAFF_ORDER_INFORM = 'kefu_support_staff_order_inform',
|
||||
|
||||
// ========== SYSTEM 模块 ==========
|
||||
SYSTEM_USER_SEX = 'system_user_sex',
|
||||
@ -224,12 +195,6 @@ export enum DICT_TYPE {
|
||||
MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型
|
||||
MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型
|
||||
|
||||
PAID_MEMBER_USER_PAID = 'paid_member_user_paid', //付费会员支付状态
|
||||
|
||||
MEMBER_USER_PAID = 'member_user_paid', //会员支付状态
|
||||
|
||||
MEMBER_USER_PAY_TYPE = 'member_user_pay_type',// 会员记录支付方式
|
||||
|
||||
// ========== MALL - 商品模块 ==========
|
||||
PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态
|
||||
POINT_PRODUCT_STATUS='point_product_status',//积分商品状态
|
||||
@ -262,7 +227,6 @@ export enum DICT_TYPE {
|
||||
PROMOTION_BARGAIN_RECORD_STATUS = 'promotion_bargain_record_status', // 砍价记录的状态
|
||||
PROMOTION_COMBINATION_RECORD_STATUS = 'promotion_combination_record_status', // 拼团记录的状态
|
||||
PROMOTION_BANNER_POSITION = 'promotion_banner_position', // banner 定位
|
||||
MEMBER_BENEFIT_STATUS = 'member_benefit_status', // 会员权益状态
|
||||
|
||||
// ========== CRM - 客户管理模块 ==========
|
||||
CRM_AUDIT_STATUS = 'crm_audit_status', // CRM 审批状态
|
||||
@ -293,7 +257,5 @@ export enum DICT_TYPE {
|
||||
AI_WRITE_LANGUAGE = 'ai_write_language', // AI 写作语言
|
||||
|
||||
// ========== 通用模块 ==========
|
||||
ZERO_OR_ONE = 'zero_or_one',
|
||||
IS_ACTIVATE = 'is_activate',
|
||||
CARD_STATUS = 'card_status'
|
||||
ZERO_OR_ONE = 'zero_or_one'
|
||||
}
|
||||
|
@ -184,9 +184,9 @@ const loginData = reactive({
|
||||
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
|
||||
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
|
||||
loginForm: {
|
||||
tenantName: '众悦e家',
|
||||
username: 'admin',
|
||||
password: 'admin123',
|
||||
tenantName: '雲頂玖號',
|
||||
username: 'ydadmin',
|
||||
password: '123456',
|
||||
captchaVerification: '',
|
||||
rememberMe: true // 默认记录我。如果不需要,可手动修改
|
||||
}
|
||||
@ -351,4 +351,4 @@ onMounted(() => {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -1,117 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="合伙人手机号" prop="nickName">
|
||||
<el-input v-model="formData.nickName" placeholder="请输入合伙人手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="formData.phone" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会员卡号" prop="cardNumber">
|
||||
<el-input v-model="formData.cardNumber" placeholder="请输入会员卡号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="激活状态" prop="isActivate">
|
||||
<el-radio-group v-model="formData.isActivate">
|
||||
<el-radio
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.IS_ACTIVATE)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { CardApi, CardVO } from '@/api/club/clubCard'
|
||||
|
||||
/** 会员卡 表单 */
|
||||
defineOptions({ name: 'CardForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
cardNumber: undefined,
|
||||
isActivate: undefined,
|
||||
activateTime: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await CardApi.getCard(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as CardVO
|
||||
if (formType.value === 'create') {
|
||||
await CardApi.createCard(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await CardApi.updateCard(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
cardNumber: undefined,
|
||||
isActivate: undefined,
|
||||
activateTime: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,237 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="合伙人手机号" prop="nickName">
|
||||
<el-input
|
||||
v-model="queryParams.nickName"
|
||||
placeholder="请输入合伙人手机号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领取人手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入领取人手机号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员卡号" prop="cardNumber">
|
||||
<el-input
|
||||
v-model="queryParams.cardNumber"
|
||||
placeholder="请输入会员卡号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="激活状态" prop="isActivate">
|
||||
<el-select
|
||||
v-model="queryParams.isActivate"
|
||||
placeholder="请选择激活状态"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.IS_ACTIVATE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="openForm('create')"-->
|
||||
<!-- v-hasPermi="['club:card:create']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['club:card:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="会员卡号" align="center" prop="cardNumber" />
|
||||
<el-table-column label="合伙人姓名" align="center" prop="parentName" />
|
||||
<el-table-column label="合伙人手机" align="center" prop="nickName" />
|
||||
<el-table-column label="领取人手机" align="center" prop="phone" />
|
||||
<el-table-column label="领取人姓名" align="center" prop="subName" />
|
||||
<el-table-column label="激活状态" align="center" prop="isActivate">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.IS_ACTIVATE" :value="scope.row.isActivate" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="领取时间"
|
||||
align="center"
|
||||
prop="activateTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<!-- <el-table-column label="操作" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!--<!– <el-button–>-->
|
||||
<!--<!– link–>-->
|
||||
<!--<!– type="primary"–>-->
|
||||
<!--<!– @click="openForm('update', scope.row.id)"–>-->
|
||||
<!--<!– v-hasPermi="['club:card:update']"–>-->
|
||||
<!--<!– >–>-->
|
||||
<!--<!– 编辑–>-->
|
||||
<!--<!– </el-button>–>-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="handleDelete(scope.row.id)"-->
|
||||
<!-- v-hasPermi="['club:card:delete']"-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<CardForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { CardApi, CardVO } from '@/api/club/clubCard'
|
||||
import CardForm from './CardForm.vue'
|
||||
|
||||
/** 会员卡 列表 */
|
||||
defineOptions({ name: 'ClubCard' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<CardVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
cardNumber: undefined,
|
||||
parentName: undefined,
|
||||
subName: undefined,
|
||||
isActivate: undefined,
|
||||
activateTime: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await CardApi.getCardPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await CardApi.deleteCard(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await CardApi.exportCard(queryParams)
|
||||
console.log(data,'data')
|
||||
download.excel(data, '会员卡.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,182 +0,0 @@
|
||||
<template>
|
||||
<Dialog title="会员卡列表" v-model="dialogVisible">
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="会员卡号" align="center" prop="cardNumber" />
|
||||
<!-- <el-table-column label="昵称" align="center" prop="nickName" />-->
|
||||
<!-- <el-table-column label="合伙人" align="center" prop="nickName" />-->
|
||||
<el-table-column label="领取人" align="center" prop="phone" />
|
||||
<el-table-column label="激活状态" align="center" prop="isActivate">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.IS_ACTIVATE" :value="scope.row.isActivate" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="领取时间"
|
||||
align="center"
|
||||
prop="activateTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="openForm('update', scope.row.id)"-->
|
||||
<!-- v-hasPermi="['club:card:update']"-->
|
||||
<!-- >-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['club:card:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
<!-- <template #footer>-->
|
||||
<!-- <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>-->
|
||||
<!-- <el-button @click="dialogVisible = false">取 消</el-button>-->
|
||||
<!-- </template>-->
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { CardLogApi, CardLogVO } from '@/api/cardlog'
|
||||
import {CardApi, CardVO} from "@/api/club/clubCard";
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
/** 发卡记录 表单 */
|
||||
defineOptions({ name: 'CardLogForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const loading = ref(false) // 列表的加载中
|
||||
const list = ref<CardVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
countNumber: undefined,
|
||||
})
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
cardNumber: undefined,
|
||||
isActivate: undefined,
|
||||
activateTime: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await CardApi.getCardPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 会员卡删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
let st = await CardApi.deleteCard(id)
|
||||
// message.success(t('common.delSuccess'))
|
||||
if (st){
|
||||
message.success(t('common.delSuccess'))
|
||||
}else {
|
||||
message.error("删除失败,状态不是未激活")
|
||||
}
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 打开弹窗 */
|
||||
const openCardList = async (phone: String) => {
|
||||
dialogVisible.value = true
|
||||
// dialogTitle.value = t('action.' + type)
|
||||
// formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
formLoading.value = true
|
||||
try {
|
||||
// formData.value = await CardLogApi.getCardLog(id)
|
||||
queryParams.nickName = phone
|
||||
const data = await CardApi.getCardPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ openCardList }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as CardLogVO
|
||||
if (formType.value === 'create') {
|
||||
await CardLogApi.createCardLog(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await CardLogApi.updateCardLog(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
cardNumber: undefined,
|
||||
isActivate: undefined,
|
||||
activateTime: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,104 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="会员昵称" prop="nickName">
|
||||
<el-input v-model="formData.nickName" placeholder="请输入会员昵称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="formData.phone" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="countNumber">
|
||||
<el-input v-model="formData.countNumber" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卡号区间" prop="cardSection">
|
||||
<el-input v-model="formData.cardSection" placeholder="请输入卡号区间" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { CardLogApi, CardLogVO } from '@/api/cardlog'
|
||||
|
||||
/** 发卡记录 表单 */
|
||||
defineOptions({ name: 'CardLogForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
countNumber: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await CardLogApi.getCardLog(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as CardLogVO
|
||||
if (formType.value === 'create') {
|
||||
await CardLogApi.createCardLog(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await CardLogApi.updateCardLog(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
countNumber: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,235 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="合伙人昵称" prop="nickName">
|
||||
<el-input
|
||||
v-model="queryParams.nickName"
|
||||
placeholder="请输入合伙人昵称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="countNumber">
|
||||
<el-input
|
||||
v-model="queryParams.countNumber"
|
||||
placeholder="请输入数量"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发卡时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- @click="openForm('create')"-->
|
||||
<!-- v-hasPermi="['send:card-log:create']"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['send:card-log:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="合伙人昵称" align="center" prop="nickName" />
|
||||
<el-table-column label="手机号" align="center" prop="phone" />
|
||||
<el-table-column label="数量" align="center" prop="countNumber" />
|
||||
<!-- <el-table-column label="卡号区间" align="center" prop="cardSection" @click="toCards" />-->
|
||||
<el-table-column prop="cardSection" label="卡号区间" >
|
||||
<template #default="scope">
|
||||
<div @click="toCards(scope.row.phone)">{{scope.row.cardSection}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="发卡时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<!-- <el-table-column label="操作" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="openForm('update', scope.row.id)"-->
|
||||
<!-- v-hasPermi="['send:card-log:update']"-->
|
||||
<!-- >-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- link-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="handleDelete(scope.row.id)"-->
|
||||
<!-- v-hasPermi="['send:card-log:delete']"-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<CardLogForm ref="formRef" @success="getList" />
|
||||
<CardList ref="cardListFormRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { CardLogApi, CardLogVO } from '@/api/cardlog'
|
||||
import { CardApi, CardVO } from '@/api/club/clubCard'
|
||||
import CardLogForm from './CardLogForm.vue'
|
||||
import CardList from './CardList.vue'
|
||||
|
||||
/** 发卡记录 列表 */
|
||||
defineOptions({ name: 'CardLog' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<CardLogVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
countNumber: undefined,
|
||||
cardSection: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryParamsByCardList = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
nickName: undefined,
|
||||
phone: undefined,
|
||||
cardNumber: undefined,
|
||||
isActivate: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await CardLogApi.getCardLogPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await CardLogApi.deleteCardLog(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 会员卡列表 */
|
||||
const cardListFormRef = ref()
|
||||
const toCards = async (phone: String) => {
|
||||
cardListFormRef.value.openCardList(phone)
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await CardLogApi.exportCardLog(queryParams)
|
||||
download.excel(data, '发卡记录.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,470 +1,189 @@
|
||||
<template>
|
||||
<doc-alert title="上传下载" url="https://doc.iocoder.cn/file/"/>
|
||||
<doc-alert title="上传下载" url="https://doc.iocoder.cn/file/" />
|
||||
<!-- 搜索 -->
|
||||
<ContentWrap>
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="文件路径" prop="path">
|
||||
<el-input
|
||||
v-model="queryParams.path"
|
||||
placeholder="请输入文件路径"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件类型" prop="type" width="80">
|
||||
<el-input
|
||||
v-model="queryParams.type"
|
||||
placeholder="请输入文件类型"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button type="primary" plain @click="openForm">
|
||||
<Icon icon="ep:upload" class="mr-5px" /> 上传文件
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<div class="flex-container">
|
||||
<!-- 菜单区域 -->
|
||||
<div class="menu-area">
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="文件大小"
|
||||
align="center"
|
||||
prop="size"
|
||||
width="120"
|
||||
:formatter="fileSizeFormatter"
|
||||
/>
|
||||
<el-table-column label="文件类型" align="center" prop="type" width="180px" />
|
||||
<el-table-column label="文件内容" align="center" prop="url" width="110px">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
v-if="row.type.includes('image')"
|
||||
class="h-80px w-80px"
|
||||
lazy
|
||||
:src="row.url"
|
||||
:preview-src-list="[row.url]"
|
||||
preview-teleported
|
||||
fit="cover"
|
||||
/>
|
||||
<el-link
|
||||
v-else-if="row.type.includes('pdf')"
|
||||
type="primary"
|
||||
:href="row.url"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
>预览</el-link
|
||||
>
|
||||
<el-link v-else type="primary" download :href="row.url" :underline="false" target="_blank"
|
||||
>下载</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="上传时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['infra:file:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<el-button type="primary" plain @click="createType" style="width: 90;font-size: 12px;">
|
||||
<Icon icon="ep:plus" class="mr-5px"/>
|
||||
新增分类
|
||||
</el-button>
|
||||
|
||||
<el-menu :default-active="targetMenuId" style="width:200px">
|
||||
<el-menu-item :index="targetMenuId" :key="targetMenuId" @click="clickMenu(targetMenuId)">
|
||||
全部类型
|
||||
</el-menu-item>
|
||||
<el-menu-item v-for="item in typeMenu" :index="item.value" :key="item.value"
|
||||
@click="clickMenu(item.value)">
|
||||
{{ item.label }}
|
||||
<el-icon style="margin-left: 60px;width: 10px;" @mouseover="showActions = item.value"
|
||||
@mouseleave="showActions = null">
|
||||
<MoreFilled/>
|
||||
<div v-if="showActions === item.value" class="action-buttons">
|
||||
<el-button size="small" @click.stop="editItem(item.id,item.label)">编辑</el-button>
|
||||
<br/>
|
||||
<el-button size="small" @click.stop="deleteItem(item.id)">删除</el-button>
|
||||
</div>
|
||||
</el-icon>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<div class="content-wrap">
|
||||
|
||||
<div style="margin-top: 25px;margin-left: 20px;">
|
||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true"
|
||||
label-width="68px">
|
||||
<el-form-item label="文件类型" prop="type" width="80">
|
||||
<el-input v-model="queryParams.type" placeholder="请输入文件类型" clearable
|
||||
@keyup.enter="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" />
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery">
|
||||
<Icon icon="ep:search" class="mr-5px"/>
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px"/>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="openForm">
|
||||
<Icon icon="ep:upload" class="mr-5px"/>
|
||||
上传文件
|
||||
</el-button>
|
||||
<img @click="liebiao" style="cursor: pointer;margin-left: 240px;" class="mr-10px h-27px w-27px"
|
||||
src="@/assets/imgs/liebiao.png"/>
|
||||
<img @click="tubiao" style="cursor: pointer;" class="mr-10px h-27px w-27px"
|
||||
src="@/assets/imgs/tubiao.png"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-top: 10px;" >
|
||||
<el-table v-loading="loading" :data="list" v-show="panduan == '1'">
|
||||
<el-table-column label="文件内容" align="center" prop="url" width="110px">
|
||||
<template #default="{ row }">
|
||||
<el-image v-if="row.type.includes('image')" class="h-40px w-40px" lazy :src="row.url"
|
||||
:preview-src-list="[row.url]" preview-teleported fit="cover"/>
|
||||
<el-link v-else-if="row.type.includes('pdf')" type="primary" :href="row.url"
|
||||
:underline="false" target="_blank">预览
|
||||
</el-link>
|
||||
<el-link v-else type="primary" download :href="row.url" :underline="false"
|
||||
target="_blank">下载
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column label="上传时间" align="center" prop="createTime" width="180"
|
||||
:formatter="dateFormatter"/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary"
|
||||
@click="updateForm('update', scope.row.id , scope.row.picType)">
|
||||
更改类型
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['infra:file:delete']">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div v-show="panduan == '2'">
|
||||
<!-- 图片展示区域 -->
|
||||
<div class="image-container">
|
||||
<div
|
||||
v-for="item in tubiaoData"
|
||||
:key="item.id"
|
||||
class="image-item"
|
||||
@mouseover="hover(item.id, true)"
|
||||
@mouseleave="hover(item.id, false)"
|
||||
>
|
||||
<img :src="item.url" alt="图表"/>
|
||||
<div class="image-name">{{ item.name }}</div>
|
||||
<div v-show="hoveredIndex === item.id" class="button-container">
|
||||
<button class="button">按钮1</button>
|
||||
<button class="button">按钮2</button>
|
||||
<button class="button">按钮3</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 分页 -->
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<FileForm ref="formRef" @success="getList"/>
|
||||
|
||||
<UpdateForm ref="forRef" @success="getList"/>
|
||||
|
||||
<Dialog v-model="dialogVisibles" :title="dialogTitles">
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" :rules="formRules"
|
||||
label-width="80px">
|
||||
|
||||
<el-form-item label="数据标签" prop="label">
|
||||
<el-input v-model="formData.label" placeholder="请输入数据标签"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示排序" prop="sort">
|
||||
<el-input-number v-model="formData.sort" :min="0" controls-position="right"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisibles = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
||||
<el-form-item label="数据标签" prop="label">
|
||||
<el-input v-model="updateLabel" placeholder="请输入数据标签"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForms">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
|
||||
|
||||
<FileForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {getIntDictOptions, DICT_TYPE} from '@/utils/dict'
|
||||
import {fileSizeFormatter} from '@/utils'
|
||||
import {Search, MoreFilled} from '@element-plus/icons-vue';
|
||||
import {dateFormatter} from '@/utils/formatTime'
|
||||
// import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import * as FileApi from '@/api/infra/file'
|
||||
import FileForm from './FileForm.vue'
|
||||
import UpdateForm from './updateForm.vue'
|
||||
import * as DictDataApi from '@/api/system/dict/dict.data'
|
||||
import { fileSizeFormatter } from '@/utils'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import * as FileApi from '@/api/infra/file'
|
||||
import FileForm from './FileForm.vue'
|
||||
|
||||
const typeMenu = ref<DictDataApi.DictDataVO[]>([]) //
|
||||
const targetMenuId = ref('0')
|
||||
defineOptions({name: 'InfraFile'})
|
||||
const showActions = ref(null);
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const dialogVisibles = ref(false) // 弹窗的是否展示
|
||||
const dialogTitles = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const panduan = ref('1')
|
||||
const tubiaoData = ref<FileDataVO[]>([]);
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
sort: undefined,
|
||||
label: '',
|
||||
value: '',
|
||||
dictType: '',
|
||||
// status: CommonStatusEnum.ENABLE,
|
||||
colorType: '',
|
||||
cssClass: '',
|
||||
remark: ''
|
||||
})
|
||||
const formRules = reactive({
|
||||
label: [{required: true, message: '数据标签不能为空', trigger: 'blur'}],
|
||||
sort: [{required: true, message: '数据顺序不能为空', trigger: 'blur'}],
|
||||
})
|
||||
const updateLabel = ref('')
|
||||
const message = useMessage() // 消息弹窗
|
||||
const {t} = useI18n() // 国际化
|
||||
defineOptions({ name: 'InfraFile' })
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const total = ref(0) // 列表的总页数
|
||||
const list = ref([]) // 列表的
|
||||
const menuId = ref()
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
picType: '',
|
||||
path: undefined,
|
||||
createTime: [],
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const total = ref(0) // 列表的总页数
|
||||
const list = ref([]) // 列表的数据
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
path: undefined,
|
||||
createTime: []
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
||||
// const hoveredIndex = ref(null);
|
||||
|
||||
// const hover = (index: string, status: boolean) => {
|
||||
// if (status) {
|
||||
// hoveredIndex.value = index; // 鼠标悬停时显示按钮
|
||||
// } else {
|
||||
// hoveredIndex.value = ''; // 鼠标离开时隐藏按钮
|
||||
// }
|
||||
// }
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await FileApi.getFilePage(queryParams)
|
||||
list.value = data.list
|
||||
tubiaoData.value = data.list
|
||||
console.log('111111', tubiaoData)
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await FileApi.getFilePage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
interface FileDataVO {
|
||||
id: string
|
||||
configId: string
|
||||
path: string
|
||||
name: string
|
||||
url: string
|
||||
type: string
|
||||
picType: string
|
||||
size: string
|
||||
createTime: Date
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
const tubiao = () => {
|
||||
panduan.value = '2'
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const liebiao = () => {
|
||||
panduan.value = '1'
|
||||
}
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = () => {
|
||||
formRef.value.open()
|
||||
}
|
||||
|
||||
//新增分类
|
||||
const createType = () => {
|
||||
dialogVisibles.value = true
|
||||
dialogTitles.value = '新增分类'
|
||||
}
|
||||
|
||||
/** 添加分类菜单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
if (!formRef) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as DictDataApi.DictDataVO
|
||||
await DictDataApi.createPicType(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
dialogVisibles.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
getTypeList()
|
||||
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
//修改分类菜单
|
||||
const submitForms = async () => {
|
||||
// 校验表单
|
||||
if (!formRef) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
|
||||
await DictDataApi.updateMenu(menuId.value, updateLabel.value)
|
||||
message.success(t('common.createSuccess'))
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
getTypeList()
|
||||
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
//分类菜单修改按钮
|
||||
const editItem = (id: number | undefined, lable: string) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = '菜单编辑'
|
||||
menuId.value = id
|
||||
updateLabel.value = lable
|
||||
// 处理编辑事件
|
||||
console.log('编辑:',);
|
||||
};
|
||||
//分类菜单删除按钮
|
||||
const deleteItem = async (id: number | undefined) => {
|
||||
// 处理删除事件
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
await DictDataApi.deleteMenu(id)
|
||||
// 发起删除
|
||||
await FileApi.deleteFile(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
getTypeList()
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
};
|
||||
//图片素材管理分类菜单
|
||||
const getTypeList = async () => {
|
||||
const data = await DictDataApi.getTypeList()
|
||||
typeMenu.value = data
|
||||
}
|
||||
|
||||
|
||||
/** */
|
||||
const clickMenu = (id: string) => {
|
||||
queryParams.picType = id
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
|
||||
const formRef = ref()
|
||||
const openForm = () => {
|
||||
formRef.value.open()
|
||||
}
|
||||
|
||||
const forRef = ref()
|
||||
/** 修改操作 */
|
||||
const updateForm = (type: string, id: number, picType: number) => {
|
||||
forRef.value.open(type, id, picType)
|
||||
}
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await FileApi.deleteFile(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
queryParams.picType = targetMenuId.value
|
||||
getTypeList()
|
||||
getList()
|
||||
})
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
.flex-container {
|
||||
height: 100vh;
|
||||
/* 使容器填满视口高度 */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.menu-area {
|
||||
padding: 25px;
|
||||
background-color: white;
|
||||
width: 180px;
|
||||
height: 700px;
|
||||
/* 固定高度 */
|
||||
overflow-y: hidden;
|
||||
/* 禁止滚动 */
|
||||
border-right: 1px solid #e0e0e0;
|
||||
/* 可选:添加分隔线 */
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
background-color: white;
|
||||
flex-grow: 1;
|
||||
/* 使内容区域占据剩余空间 */
|
||||
/* overflow-y: auto; */
|
||||
/* 允许内容区域滚动 */
|
||||
}
|
||||
|
||||
|
||||
/* 图片容器样式 */
|
||||
.image-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px; /* 设置图片之间的间距 */
|
||||
justify-content: flex-start; /* 如果图片少于5张,会平均分布 */
|
||||
max-width: 1000px; /* 设置外部容器的最大宽度 */
|
||||
margin: 0 auto; /* 居中显示 */
|
||||
}
|
||||
|
||||
/* 每张图片占用的宽度,使每行显示5张 */
|
||||
.image-item {
|
||||
width: calc(20% - 8px); /* 宽度设为容器的20%,减去间距 */
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
/* 设置图片的最大宽度 */
|
||||
.image-item img {
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
/* border-radius: 8px; /* 图片边缘圆角(可选) */
|
||||
border: 3px solid #f3f3f3;
|
||||
}
|
||||
|
||||
.image-name {
|
||||
margin-top: 5 px; /* 图片和名称之间的间距 */
|
||||
font-size: 14px; /* 文字大小 */
|
||||
color: #333; /* 文字颜色 */
|
||||
word-wrap: break-word; /* 如果名称很长,自动换行 */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
@ -1,134 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="forRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<!-- <el-form-item label="配置编号" prop="configId">
|
||||
<el-input v-model="formData.configId" placeholder="请输入配置编号" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="图片类型" prop="picType">
|
||||
<el-select v-model="picType" placeholder="请选择图片类型">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.INFRA_FILE_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="文件名" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入文件名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文件路径" prop="path">
|
||||
<el-input v-model="formData.path" placeholder="请输入文件路径" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文件 URL" prop="url">
|
||||
<el-input v-model="formData.url" placeholder="请输入文件 URL" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文件类型" prop="type">
|
||||
<el-select v-model="formData.type" placeholder="请选择文件类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件大小" prop="size">
|
||||
<el-input v-model="formData.size" placeholder="请输入文件大小" />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import * as FileApi from '@/api/infra/file'
|
||||
import { number } from 'echarts';
|
||||
import { NumberFormat } from 'vue-i18n';
|
||||
|
||||
/** 文件 表单 */
|
||||
defineOptions({ name: 'FileForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
configId: undefined,
|
||||
picType: undefined,
|
||||
name: undefined,
|
||||
path: undefined,
|
||||
url: undefined,
|
||||
type: undefined,
|
||||
size: undefined
|
||||
})
|
||||
|
||||
const id = ref(0)
|
||||
const picType = ref(0)
|
||||
const formRules = reactive({
|
||||
path: [{ required: true, message: '文件路径不能为空', trigger: 'blur' }],
|
||||
url: [{ required: true, message: '文件 URL不能为空', trigger: 'blur' }],
|
||||
size: [{ required: true, message: '文件大小不能为空', trigger: 'blur' }]
|
||||
})
|
||||
const forRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, ids: number, picTypes: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
id.value = 0
|
||||
picType.value = 0
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
id.value = ids
|
||||
picType.value = picTypes
|
||||
console.log('11111',ids)
|
||||
console.log('2222',picType.value)
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await forRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
await FileApi.updatePicType(id.value,picType.value)
|
||||
message.success(t('common.updateSuccess'))
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
configId: undefined,
|
||||
picType: undefined,
|
||||
name: undefined,
|
||||
path: undefined,
|
||||
url: undefined,
|
||||
type: undefined,
|
||||
size: undefined
|
||||
}
|
||||
forRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,117 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="权益标题" prop="title">
|
||||
<el-input v-model="formData.title" placeholder="请输入权益标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="权益次数" prop="title">
|
||||
<el-input v-model="formData.isUsed" placeholder="请输入权益次数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input v-model="formData.goodsName" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="权益描述" prop="description">
|
||||
<Editor v-model="formData.description" height="150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="权益内容" prop="equity">
|
||||
<Editor v-model="formData.equity" height="150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="须知内容" prop="notice">
|
||||
<Editor v-model="formData.notice" height="150px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { InterestApi, InterestVO } from '@/api/interest'
|
||||
|
||||
/** 权益通知 表单 */
|
||||
defineOptions({ name: 'InterestForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
title: undefined,
|
||||
goodsName: undefined,
|
||||
description: undefined,
|
||||
isUsed: undefined,
|
||||
equity: undefined,
|
||||
notice: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await InterestApi.getInterest(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as InterestVO
|
||||
if (formType.value === 'create') {
|
||||
console.log(data,'data')
|
||||
await InterestApi.createInterest(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await InterestApi.updateInterest(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
title: undefined,
|
||||
goodsName: undefined,
|
||||
description: undefined,
|
||||
isUsed: undefined,
|
||||
equity: undefined,
|
||||
notice: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,197 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="权益标题" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入权益标题"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['notice:interest:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['notice:interest:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="权益编号" align="center" prop="id" />
|
||||
<el-table-column label="权益标题" align="center" prop="title" />
|
||||
<el-table-column label="权益描述" align="center" prop="description" />
|
||||
<el-table-column label="权益内容" align="center" prop="equity" />
|
||||
<el-table-column label="须知内容" align="center" prop="notice" />
|
||||
<el-table-column label="权益次数" align="center" prop="isUsed" />
|
||||
<el-table-column label="商品名称" align="center" prop="goodsName" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['notice:interest:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['notice:interest:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<InterestForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { InterestApi, InterestVO } from '@/api/interest'
|
||||
import InterestForm from './InterestForm.vue'
|
||||
|
||||
/** 权益通知 列表 */
|
||||
defineOptions({ name: 'Interest' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<InterestVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
title: undefined,
|
||||
goodsName: undefined,
|
||||
description: undefined,
|
||||
equity: undefined,
|
||||
isUsed: undefined,
|
||||
notice: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await InterestApi.getInterestPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await InterestApi.deleteInterest(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await InterestApi.exportInterest(queryParams)
|
||||
download.excel(data, '权益通知.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,118 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="广告状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.PROMOTION_DIY_ADVERTISING)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="广告时间(秒)" prop="time">
|
||||
<el-date-picker
|
||||
v-model="formData.time"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择广告时间(秒)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="广告属性" prop="property">
|
||||
<el-input v-model="formData.property" placeholder="请输入广告属性" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { AdvertisingApi, AdvertisingVO } from '@/api/mall/promotion/advertising'
|
||||
|
||||
/** 开屏广告 表单 */
|
||||
defineOptions({ name: 'AdvertisingForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
status: undefined,
|
||||
time: undefined,
|
||||
property: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
status: [{ required: true, message: '广告状态不能为空', trigger: 'blur' }],
|
||||
time: [{ required: true, message: '广告时间(秒)不能为空', trigger: 'blur' }],
|
||||
property: [{ required: true, message: '广告属性不能为空', trigger: 'blur' }]
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await AdvertisingApi.getAdvertising(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as AdvertisingVO
|
||||
if (formType.value === 'create') {
|
||||
await AdvertisingApi.createAdvertising(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await AdvertisingApi.updateAdvertising(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
status: undefined,
|
||||
time: undefined,
|
||||
property: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,228 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<span>数据配置</span>
|
||||
<el-button type="primary" @click="baocun" style="margin-left:85%">保存</el-button>
|
||||
</ContentWrap>
|
||||
|
||||
<ContentWrap>
|
||||
<div class="container">
|
||||
<div class="left">
|
||||
|
||||
<img :src="image" style="width: 100%;height: 100%;border-radius: 10px;" v-show="check == 1" />
|
||||
|
||||
<span v-show="check == 2" style="margin-left:80px">暂无图片,请添加~</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div>
|
||||
<p style="font-weight: 700;">引导页设置</p>
|
||||
<span>开屏广告:</span><span> <el-switch v-model="formData.stat" size="large" /> </span>
|
||||
<br />
|
||||
<span>广告时间:</span><span> <el-input v-model="formData.time" style="width: 240px"
|
||||
placeholder="请输入秒" /></span><span> 单位(秒)</span>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
<div v-for="(item, index) in timeRanges" :key="index" class="rectangle-container">
|
||||
<div class="imageLeft">
|
||||
<UploadImg width="100px" height="100px" v-model="item.pic" />
|
||||
</div>
|
||||
<div class="inputRight">
|
||||
<div style="margin-top: 20%;">
|
||||
<span>图片名称:</span>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<span>链接地址:</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<el-input style="width: 200px;margin-top: 3%;" type="text" v-model="item.name"
|
||||
placeholder="请输入名称" />
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<AppLinkInput v-model="item.url" />
|
||||
</div>
|
||||
</div>
|
||||
<img @click="removePic(index)"
|
||||
style="width: 25px;height: 25px;position: absolute;top: 1px;right: 1px;cursor: pointer;"
|
||||
src="@/assets/imgs/quxiao.png" />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<el-button type="primary" @click="addNewPic">添加图片</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { AdvertisingApi, AdvertisingVO } from '@/api/mall/promotion/advertising'
|
||||
|
||||
|
||||
/** 开屏广告 列表 */
|
||||
defineOptions({ name: 'Advertising' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
status: undefined,
|
||||
stat: false,
|
||||
time: undefined,
|
||||
property: undefined,
|
||||
picData: [{ pic: '', name: '', url: '' }]
|
||||
})
|
||||
|
||||
const image = ref('')
|
||||
const check = ref(2)
|
||||
|
||||
const timeRanges = ref([{ pic: '', name: '', url: '' }]);
|
||||
//添加
|
||||
const addNewPic = () => {
|
||||
if (timeRanges.value.length <= 5) {
|
||||
timeRanges.value.push({ pic: '', name: '', url: '' });
|
||||
}
|
||||
};
|
||||
//移出
|
||||
const removePic = (index : number) => {
|
||||
if (timeRanges.value.length >= 1) {
|
||||
timeRanges.value.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//提交保存
|
||||
const baocun = async () => {
|
||||
|
||||
formData.value.picData = timeRanges.value
|
||||
const data = formData.value as unknown as AdvertisingVO
|
||||
await AdvertisingApi.saveAdvertising(data)
|
||||
getAdvertising()
|
||||
message.success('保存成功')
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** 查询开屏广告数据配置 */
|
||||
const getAdvertising = async () => {
|
||||
|
||||
formData.value = await AdvertisingApi.getAdvertising()
|
||||
|
||||
if (formData.value.id == null) {
|
||||
console.log('11111:', formData.value)
|
||||
} else {
|
||||
console.log('22222:', formData.value)
|
||||
check.value = 1
|
||||
timeRanges.value = formData.value.picData
|
||||
if (formData.value.picData && formData.value.picData.length > 0) {
|
||||
image.value = formData.value.picData[0].pic
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// if(formData.value.picData.length < 1){
|
||||
// timeRanges.value = [{ pic: '', name: '', url: '' }]
|
||||
// }
|
||||
// if(formData.value.picData.length > 0){
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getAdvertising()
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.container {
|
||||
display: flex;
|
||||
/* justify-content: space-between; /* 左右分布 */
|
||||
width: 1000px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.left {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
width: 300px;
|
||||
height: 550px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*/
|
||||
.rectangle-container {
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
margin-top: 13px;
|
||||
display: grid;
|
||||
/* 使用 Grid 布局 */
|
||||
grid-template-columns: 25% 20% 55%;
|
||||
/* 设置四列,每列占 25% 宽度 */
|
||||
/* 元素间的间隔 */
|
||||
width: 450px;
|
||||
/* 或者设置固定宽度 */
|
||||
height: 100px;
|
||||
|
||||
}
|
||||
|
||||
/* .imageLeft {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
} */
|
||||
|
||||
/* .inputRight {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
} */
|
||||
|
||||
/* .right-input {
|
||||
background-color: aqua;
|
||||
} */
|
||||
|
||||
|
||||
|
||||
.image-preview {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
/* object-fit: cover;
|
||||
border-radius: 8px; */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* .inputRight input {
|
||||
margin-bottom: 10px;
|
||||
padding: 8px;
|
||||
width: 200px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
} */
|
||||
</style>
|
@ -1,125 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyword">
|
||||
<el-input v-model="formData.keyword" placeholder="请输入关键字" />
|
||||
</el-form-item>
|
||||
<el-form-item label="回复类型" prop="type">
|
||||
<el-select v-model="formData.type" placeholder="请选择回复类型">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_AUTO_RESPONSE_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="回复内容" prop="content">
|
||||
<el-input v-model="formData.content" type="textarea" placeholder="请输入回复内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开启" prop="status">
|
||||
<el-select v-model="formData.status" placeholder="请选择是否开启">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_AUTO_RESPONSE_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { AutoResponseApi, AutoResponseVO } from '@/api/mall/promotion/autoresponse'
|
||||
|
||||
/** 自动回复 表单 */
|
||||
defineOptions({ name: 'AutoResponseForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
keyword: undefined,
|
||||
type: undefined,
|
||||
content: undefined,
|
||||
status: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
keyword: [{ required: true, message: '关键字不能为空', trigger: 'blur' }],
|
||||
type: [{ required: true, message: '回复类型不能为空', trigger: 'change' }],
|
||||
content: [{ required: true, message: '回复内容不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '是否开启不能为空', trigger: 'change' }]
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await AutoResponseApi.getAutoResponse(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as AutoResponseVO
|
||||
if (formType.value === 'create') {
|
||||
await AutoResponseApi.createAutoResponse(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await AutoResponseApi.updateAutoResponse(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
keyword: undefined,
|
||||
type: undefined,
|
||||
content: undefined,
|
||||
status: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@ -1,232 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyword">
|
||||
<el-input
|
||||
v-model="queryParams.keyword"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="回复类型" prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择回复类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_AUTO_RESPONSE_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开启" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择是否开启"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_AUTO_RESPONSE_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['promotion:auto-response:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增自动回复
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['promotion:auto-response:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="ID" align="center" prop="id" />
|
||||
<el-table-column label="关键字" align="center" prop="keyword" />
|
||||
<el-table-column label="回复类型" align="center" prop="type">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.KEFU_AUTO_RESPONSE_TYPE" :value="scope.row.type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="回复内容" align="center" prop="content" />
|
||||
<el-table-column label="是否开启" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.KEFU_AUTO_RESPONSE_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['promotion:auto-response:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['promotion:auto-response:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<AutoResponseForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { AutoResponseApi, AutoResponseVO } from '@/api/mall/promotion/autoresponse'
|
||||
import AutoResponseForm from './AutoResponseForm.vue'
|
||||
|
||||
/** 自动回复 列表 */
|
||||
defineOptions({ name: 'AutoResponse' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<AutoResponseVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
keyword: undefined,
|
||||
type: undefined,
|
||||
content: undefined,
|
||||
status: undefined,
|
||||
createTime: []
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await AutoResponseApi.getAutoResponsePage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await AutoResponseApi.deleteAutoResponse(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await AutoResponseApi.exportAutoResponse(queryParams)
|
||||
download.excel(data, '自动回复.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -1,141 +0,0 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<span>客服配置</span>
|
||||
<el-divider />
|
||||
<div style="height:380px;width:650px;padding: 20px;">
|
||||
<span>客服类型:</span>
|
||||
<span>
|
||||
<el-radio-group v-model="radios" @change="handleRadioChange">
|
||||
<el-radio v-for="dict in getIntDictOptions(DICT_TYPE.KEFU_CONFIGURATION_TYPE)"
|
||||
:key="dict.value"
|
||||
:value="dict.value"
|
||||
size="large"
|
||||
>
|
||||
{{dict.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
<p style="margin-left: 80px;color:#bcbaba;font-size:13px">系统客服:点击联系客服使用系统的自带客服;拨打电话:点击联系客服拨打客服电话;跳转链接:跳转外部链接联系客服</p>
|
||||
|
||||
<div v-show="radios == 1">
|
||||
<span style="margin-top: 60px; vertical-align: middle;">客服反馈:</span>
|
||||
<span style="vertical-align: middle;">
|
||||
<el-input
|
||||
v-model="formData.feedback"
|
||||
placeholder="请输入客服反馈"
|
||||
style="width:550px"
|
||||
:rows="5"
|
||||
type="textarea"
|
||||
|
||||
/>
|
||||
</span>
|
||||
<p style="margin-left: 80px;color:#bcbaba;font-size:13px">暂无客服在线是,联系客服跳转的客服反馈页面的显示文字</p>
|
||||
</div>
|
||||
|
||||
<div v-show="radios == 2">
|
||||
<span style="margin-top: 60px; vertical-align: middle;">客服电话:</span>
|
||||
<span style="vertical-align: middle;">
|
||||
<el-input
|
||||
v-model="formData.phone"
|
||||
placeholder="请输入客服电话"
|
||||
style="width:550px"
|
||||
/>
|
||||
</span>
|
||||
<p style="margin-left: 80px;color:#bcbaba;font-size:13px">客服类型选择拨打电话时,用户点击联系客服的联系电话</p>
|
||||
</div>
|
||||
|
||||
<div v-show="radios == 3">
|
||||
<span style="margin-top: 60px; vertical-align: middle;">客服链接:</span>
|
||||
<span style="vertical-align: middle;">
|
||||
<el-input
|
||||
v-model="formData.link"
|
||||
placeholder="请输入客服链接"
|
||||
style="width:550px"
|
||||
/>
|
||||
</span>
|
||||
<p style="margin-left: 80px;color:#bcbaba;font-size:13px">客服类型选择跳转链接时,跳转的链接地址</p>
|
||||
|
||||
<span style="margin-top: 60px; vertical-align: middle;"> 企业ID:</span>
|
||||
<span style="vertical-align: middle;">
|
||||
<el-input
|
||||
v-model="formData.enterpriseID"
|
||||
placeholder="请输入企业ID"
|
||||
style="width:550px"
|
||||
/>
|
||||
</span>
|
||||
<p style="margin-left: 80px;color:#bcbaba;font-size:13px">如果客服链接填写企业微信客服,小程序需要跳转企业微信客服的话需要配置此项,并且在小程序客服中绑定企业ID</p>
|
||||
|
||||
</div>
|
||||
|
||||
<el-button style="margin-left: 80px;" type="primary" @click="submit">提交</el-button>
|
||||
|
||||
</div>
|
||||
</ContentWrap>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
|
||||
import { ConfigurationApi, ConfigurationVO } from '@/api/mall/promotion/configuration'
|
||||
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
|
||||
const radios = ref(1)
|
||||
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
type: undefined,
|
||||
feedback: undefined,
|
||||
phone: undefined,
|
||||
link: undefined,
|
||||
enterpriseID: undefined
|
||||
})
|
||||
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
|
||||
formData.value = await ConfigurationApi.getConfiguration(radios.value)
|
||||
// radios.value = formData.value.id
|
||||
console.log('11111',radios.value)
|
||||
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleRadioChange = async (value) =>{
|
||||
formData.value = await ConfigurationApi.getConfiguration(value)
|
||||
|
||||
|
||||
console.log("选中的值是: ", radios.value); // 输出选中的值
|
||||
|
||||
}
|
||||
|
||||
|
||||
const submit = async () => {
|
||||
const data = formData.value as unknown as ConfigurationVO
|
||||
await ConfigurationApi.updateConfiguration(data)
|
||||
message.success('提交成功')
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@ -28,8 +28,7 @@ export const validityTypeFormat = (row: CouponTemplateVO) => {
|
||||
return `${formatDate(row.validStartTime)} 至 ${formatDate(row.validEndTime)}`
|
||||
}
|
||||
if (row.validityType === CouponTemplateValidityTypeEnum.TERM.type) {
|
||||
// return `领取后第 ${row.fixedStartTerm} - ${row.fixedEndTerm} 天内可用`
|
||||
return `领取后 ${row.fixedEndTerm + 1} 天内可用`
|
||||
return `领取后第 ${row.fixedStartTerm} - ${row.fixedEndTerm} 天内可用`
|
||||
}
|
||||
return '未知【' + row.validityType + '】'
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
<el-form-item label="优惠类型" prop="discountType">
|
||||
<el-radio-group v-model="formData.discountType">
|
||||
<el-radio
|
||||
v-for="dict in filteredDictOptions()"
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.PROMOTION_DISCOUNT_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>
|
||||
@ -151,10 +151,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="formData.validityType === CouponTemplateValidityTypeEnum.TERM.type"
|
||||
label="有效日期"
|
||||
label="领取日期"
|
||||
prop="fixedStartTerm"
|
||||
>
|
||||
<!-- 第
|
||||
第
|
||||
<el-input-number
|
||||
v-model="formData.fixedStartTerm"
|
||||
:min="0"
|
||||
@ -162,13 +162,13 @@
|
||||
class="mx-2"
|
||||
placeholder="0 为今天生效"
|
||||
/>
|
||||
至 -->
|
||||
至
|
||||
<el-input-number
|
||||
v-model="formData.fixedEndTerm"
|
||||
:min="1"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
class="mx-2"
|
||||
placeholder="请输入有效天数"
|
||||
placeholder="请输入结束天数"
|
||||
/>
|
||||
天有效
|
||||
</el-form-item>
|
||||
@ -215,7 +215,7 @@ const formData = ref({
|
||||
validTimes: [],
|
||||
validStartTime: undefined,
|
||||
validEndTime: undefined,
|
||||
fixedStartTerm: 0,
|
||||
fixedStartTerm: undefined,
|
||||
fixedEndTerm: undefined,
|
||||
productScope: PromotionProductScopeEnum.ALL.scope,
|
||||
productScopeValues: [], // 商品范围:值为 品类编号列表 或 商品编号列表 ,用于提交
|
||||
@ -255,7 +255,6 @@ const open = async (type: string, id?: number) => {
|
||||
const data = await CouponTemplateApi.getCouponTemplate(id)
|
||||
formData.value = {
|
||||
...data,
|
||||
fixedEndTerm: data.fixedEndTerm - data.fixedStartTerm + 1, // 显示时总天数(实际需要+1)
|
||||
discountPrice: formatToFraction(data.discountPrice),
|
||||
discountPercent:
|
||||
data.discountPercent !== undefined ? data.discountPercent / 10.0 : undefined,
|
||||
@ -284,7 +283,6 @@ const submitForm = async () => {
|
||||
try {
|
||||
const data = {
|
||||
...formData.value,
|
||||
fixedEndTerm: (formData.value.fixedEndTerm || 0) + formData.value.fixedStartTerm - 1, // 得到结束的天数
|
||||
discountPrice: convertToInteger(formData.value.discountPrice),
|
||||
discountPercent:
|
||||
formData.value.discountPercent !== undefined
|
||||
@ -337,7 +335,7 @@ const resetForm = () => {
|
||||
validTimes: [],
|
||||
validStartTime: undefined,
|
||||
validEndTime: undefined,
|
||||
fixedStartTerm: 0,
|
||||
fixedStartTerm: undefined,
|
||||
fixedEndTerm: undefined,
|
||||
productScope: PromotionProductScopeEnum.ALL.scope,
|
||||
productScopeValues: [],
|
||||
@ -385,12 +383,6 @@ function setProductScopeValues(data: CouponTemplateApi.CouponTemplateVO) {
|
||||
break
|
||||
}
|
||||
}
|
||||
/** 暂时隐藏掉字典中的折扣 */
|
||||
function filteredDictOptions() {
|
||||
return getIntDictOptions(DICT_TYPE.PROMOTION_DISCOUNT_TYPE).filter(
|
||||
dict => dict.value !== 2 // 过滤掉 value 为 2 的选项
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
@ -1,124 +0,0 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="mainTop">
|
||||
<div>商品分类</div>
|
||||
<div class="right">
|
||||
<div class="save" @click="save">保存</div>
|
||||
<div class="cz" @click="cz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mainBottom">
|
||||
<div class='item' :class="currItem == 1 ? 'on': ''" @click="clickItem(1)">
|
||||
<img class="img" src="https://zysc.fjptzykj.com:3000/shangcheng/921278a710b8035ac2e4fd40a08f64e3652c5130c08c633b7e136714d57c1001.jpg" />
|
||||
<div class="text">样式1</div>
|
||||
</div>
|
||||
<div class='item' :class="currItem == 2 ? 'on': ''" @click="clickItem(2)">
|
||||
<img class="img" src="https://zysc.fjptzykj.com:3000/shangcheng/909ef630cff7cdc957962ae782ee9a882c86c35732140b1c9e013341fa559126.jpg" />
|
||||
<div class="text">样式2</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// TODO @疯狂:要不要建个 decorate 目录,然后挪进去,改成 index.vue,这样可以更明确看到是个独立界面哈,更好找
|
||||
import * as DiyTemplateApi from '@/api/mall/promotion/diy/template'
|
||||
import { useTagsdivStore } from '@/store/modules/tagsdiv'
|
||||
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // 商城的 DIY 组件,在 DiyEditor 目录下
|
||||
import { toNumber } from 'lodash-es'
|
||||
const message = useMessage() // 消息弹窗
|
||||
const currItem = ref();
|
||||
|
||||
function clickItem (val){
|
||||
currItem.value = val;
|
||||
}
|
||||
|
||||
function cz (val){
|
||||
currItem.value = 1;
|
||||
}
|
||||
|
||||
function save (){
|
||||
setProjuctClass(currItem.value);
|
||||
// console.log("请求接口还没有写啊!!!!快让后端提供啊")
|
||||
}
|
||||
|
||||
// 设置商品分类
|
||||
const setProjuctClass = async (id) => {
|
||||
const res = await DiyTemplateApi.setDiyProjuctClass(id);
|
||||
console.log(res, "sssss");
|
||||
if(res){
|
||||
message.success('保存成功')
|
||||
}
|
||||
}
|
||||
|
||||
// 获取商品分类
|
||||
const getProjuctClass = async () => {
|
||||
const res = await DiyTemplateApi.getDiyProjuctClass();
|
||||
currItem.value = res
|
||||
}
|
||||
getProjuctClass()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.main{
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
.mainTop{
|
||||
width:100%;
|
||||
margin:10px 10px;
|
||||
background:white;
|
||||
padding:10px 20px;
|
||||
font-weight:700;
|
||||
display:flex;
|
||||
justify-content:space-between;
|
||||
align-items: center;
|
||||
.right{
|
||||
display:flex;
|
||||
div{
|
||||
padding:5px 15px;
|
||||
font-weight:400;
|
||||
font-size: 14px;
|
||||
}
|
||||
.save{
|
||||
background:#0256FF;
|
||||
margin-right:10px;
|
||||
color:white;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cz{
|
||||
border:1px solid #cccccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mainBottom{
|
||||
width:100%;
|
||||
margin:10px 10px;
|
||||
background:white;
|
||||
padding:30px 30px;
|
||||
display:flex;
|
||||
.item{
|
||||
margin-right:20px;
|
||||
text-align: center;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
&.on{
|
||||
.text{
|
||||
color:#0256ff;
|
||||
}
|
||||
.img{
|
||||
border:2px solid #0256ff;
|
||||
}
|
||||
}
|
||||
.img{
|
||||
width:260px;
|
||||
border-radius: 12px;
|
||||
border:2px solid white;
|
||||
}
|
||||
.text{
|
||||
margin-top:10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,215 +0,0 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="mainTop">
|
||||
<div>主题风格</div>
|
||||
<div class="right">
|
||||
<div class="save" @click="save">保存</div>
|
||||
<!-- <div class="cz" @click="cz">重置</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ztfg">
|
||||
<div class='top'>
|
||||
<div class="item" :class="currItem== '' ? 'on': ''" @click="clickItem('')">
|
||||
<div class="le" style="background: rgb(233, 52, 34);"></div>
|
||||
<div class="ri">红色</div>
|
||||
</div>
|
||||
<div class="item" :class="currItem== 'blue' ? 'on': ''" @click="clickItem('blue')">
|
||||
<div class="le"></div>
|
||||
<div class="ri">天空蓝</div>
|
||||
</div>
|
||||
<div class="item" :class="currItem== 'lv' ? 'on': ''" @click="clickItem('lv')">
|
||||
<div class="le" style="background:rgb(66, 202, 77);"></div>
|
||||
<div class="ri">生鲜绿</div>
|
||||
</div>
|
||||
<div class="item" :class="currItem== 'pink' ? 'on': ''" @click="clickItem('pink')">
|
||||
<div class="le" style="background:#ff448f;"></div>
|
||||
<div class="ri">魅力粉</div>
|
||||
</div>
|
||||
<div class="item" :class="currItem== 'orange' ? 'on': ''" @click="clickItem('orange')">
|
||||
<div class="le" style="background:#fe5c2d;"></div>
|
||||
<div class="ri">活力橙</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mainBottom">
|
||||
<div class='item' v-show="currItem== ''">
|
||||
<img class="img"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/f973a0a4648d476a25b14a29250356d065507a1b9134b6303d7acd0b2d2d9cc7.jpg"/>
|
||||
</div>
|
||||
|
||||
<div class='item' v-show="currItem== 'blue'">
|
||||
<img class="img"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/f2c0e04f8491b618d691eb95c3df2f89ba565134cacc9b4e39ff96caa4d1cec0.jpg" />
|
||||
</div>
|
||||
<div class='item' v-show="currItem== 'lv'">
|
||||
<img class="img"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/1ba06619f3f87677b51dd735b03e0378da352abbe47b188dd43c58262ed47cca.jpg" />
|
||||
</div>
|
||||
<div class='item' v-show="currItem== 'pink'">
|
||||
<img class="img"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/13fd006f8883b492db10df8f1d03347b88c8836e68a603db874fd68bc01c7a71.jpg" />
|
||||
</div>
|
||||
<div class='item' v-show="currItem== 'orange'">
|
||||
<img class="img"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/da61c583680494e23a31f39acbb0246cf1d439080ceb53d85dc564da2c1ecfe9.jpg" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// TODO @疯狂:要不要建个 decorate 目录,然后挪进去,改成 index.vue,这样可以更明确看到是个独立界面哈,更好找
|
||||
import * as DiyTemplateApi from '@/api/mall/promotion/diy/template'
|
||||
import * as DiyPageApi from '@/api/mall/promotion/diy/page'
|
||||
import { useTagsdivStore } from '@/store/modules/tagsdiv'
|
||||
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // 商城的 DIY 组件,在 DiyEditor 目录下
|
||||
import { toNumber } from 'lodash-es'
|
||||
const message = useMessage() // 消息弹窗
|
||||
const currItem = ref('blue');
|
||||
|
||||
function clickItem(val) {
|
||||
currItem.value = val;
|
||||
}
|
||||
|
||||
function cz(val) {
|
||||
currItem.value = 'blue';
|
||||
}
|
||||
|
||||
function save() {
|
||||
const val = '';
|
||||
// currItem.value = val;
|
||||
if(currItem.value == 'lv'){
|
||||
setZtClass('lv')
|
||||
}else if(currItem.value == 'blue'){
|
||||
setZtClass('blue')
|
||||
}else if(currItem.value == 'pink'){
|
||||
setZtClass('pink')
|
||||
}else if(currItem.value == 'orange'){
|
||||
setZtClass('orange')
|
||||
}else{
|
||||
setZtClass('')
|
||||
}
|
||||
// console.log("请求接口还没有写啊!!!!快让后端提供啊")
|
||||
}
|
||||
|
||||
// 设置主题风格
|
||||
const setZtClass = async (id) => {
|
||||
const res = await DiyTemplateApi.setDiyZtClass(id);
|
||||
console.log(res, "sssss");
|
||||
if(res || res == ''){
|
||||
message.success('保存成功')
|
||||
}
|
||||
}
|
||||
|
||||
// 获取商品分类
|
||||
const getZtClass = async () => {
|
||||
const res = await DiyTemplateApi.getDiyZtClass();
|
||||
currItem.value = res
|
||||
}
|
||||
getZtClass()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.main {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.mainTop {
|
||||
width: 100%;
|
||||
margin: 10px 10px;
|
||||
background: white;
|
||||
padding: 10px 20px;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
|
||||
div {
|
||||
padding: 5px 15px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.save {
|
||||
background: #0256FF;
|
||||
margin-right: 10px;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cz {
|
||||
border: 1px solid #cccccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ztfg {
|
||||
width: 100%;
|
||||
margin: 10px 10px;
|
||||
background: white;
|
||||
padding: 30px 30px;
|
||||
.top{
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
.item{
|
||||
padding:10px 15px;
|
||||
border:1px solid #cccccc;
|
||||
border-radius:6px;
|
||||
margin-right:10px;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
cursor: pointer;
|
||||
&.on{
|
||||
border:1px solid #0256ff;
|
||||
}
|
||||
.le{
|
||||
margin-right:10px;
|
||||
border-radius:6px;
|
||||
width:25px;
|
||||
height:25px;
|
||||
background:rgb(28, 165, 233);
|
||||
}
|
||||
.ti{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.mainBottom {
|
||||
|
||||
display: flex;
|
||||
|
||||
.item {
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
border-radius: 12px;
|
||||
|
||||
// &.on {
|
||||
// .text {
|
||||
// color: #0256ff;
|
||||
// }
|
||||
|
||||
// .img {
|
||||
// border: 2px solid #0256ff;
|
||||
// }
|
||||
// }
|
||||
|
||||
.img {
|
||||
width: 800px;
|
||||
border-radius: 12px;
|
||||
border: 2px solid white;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
<DiyEditor v-if="formData && !formLoading" v-model="currentFormData!.property"
|
||||
:title="templateItems[selectedTemplateItem].name" :libs="libs" :show-page-config="selectedTemplateItem !== 0"
|
||||
:show-tab-bar="selectedTemplateItem === 0" :show-navigation-bar="selectedTemplateItem !== 0"
|
||||
:preview-url="previewUrl" @save="submitForm" @reset="handleEditorReset" :showTabBar = "false">
|
||||
:preview-url="previewUrl" @save="submitForm" @reset="handleEditorReset">
|
||||
<template #toolBarLeft>
|
||||
<!-- <el-radio-group
|
||||
v-model="selectedTemplateItem"
|
||||
|
@ -4,17 +4,17 @@
|
||||
:show-tab-bar="selectedTemplateItem === 0" :show-navigation-bar="selectedTemplateItem !== 0"
|
||||
:preview-url="previewUrl" @save="submitForm" @reset="handleEditorReset">
|
||||
<template #toolBarLeft>
|
||||
<!-- <el-radio-group-->
|
||||
<!-- v-model="selectedTemplateItem"-->
|
||||
<!-- class="h-full!"-->
|
||||
<!-- @change="handleTemplateItemChange"-->
|
||||
<!-- >-->
|
||||
<!-- <el-tooltip v-for="(item, index) in templateItems" :key="index" :content="item.name">-->
|
||||
<!-- <el-radio-button :label="index">-->
|
||||
<!-- <Icon :icon="item.icon" :size="24" />-->
|
||||
<!-- </el-radio-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- <el-radio-group
|
||||
v-model="selectedTemplateItem"
|
||||
class="h-full!"
|
||||
@change="handleTemplateItemChange"
|
||||
>
|
||||
<el-tooltip v-for="(item, index) in templateItems" :key="index" :content="item.name">
|
||||
<el-radio-button :label="index">
|
||||
<Icon :icon="item.icon" :size="24" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group> -->
|
||||
</template>
|
||||
</DiyEditor>
|
||||
</template>
|
||||
@ -172,4 +172,4 @@
|
||||
// console.log(newPath,'newPathnewPath');
|
||||
// // handleTemplateItemChange()
|
||||
// }, { immediate: true });
|
||||
</script>
|
||||
</script>
|
@ -11,17 +11,14 @@
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="box-card" v-for="o in cardList" :key="o">
|
||||
<div class="clearfix">
|
||||
<span style="font-size: 23px;
|
||||
color: #000000;
|
||||
background-color:#ffffff;
|
||||
border-color: #fdfdff;">{{o.title}}</span>
|
||||
<el-button style="float: right;" type="text" @click="deleteForm(o.id)"> 删除</el-button>
|
||||
<el-button style="float: right;" type="text" @click="handelExtend(o.id)">推广</el-button>
|
||||
<el-button style="float: right;" type="text" @click="preview(o.id)">预览</el-button>
|
||||
<el-button style="float: right;" type="text" @click="redacts(o)">编辑</el-button>
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="handelExtend(o.id)">推广</el-button>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 30%">
|
||||
@ -34,8 +31,8 @@
|
||||
<el-link style="font-size: 18px;
|
||||
color: #999595;
|
||||
background-color:#ffffff;
|
||||
border-color: #fdfdff;" @click="extendList(o.id,o.title)">采集数量</el-link>
|
||||
<p style="font-size: 25px" @click="extendList(o.id,o.title)">{{o.collectionQuantity}}</p>
|
||||
border-color: #fdfdff;" @click="extendList(o.id)">采集数量</el-link>
|
||||
<p style="font-size: 25px" @click="extendList(o.id)">{{o.collectionQuantity}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
@ -51,111 +48,71 @@
|
||||
border-color: #fdfdff;">创建时间:{{o.createTime}}</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<!-- 添加表单对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500">
|
||||
|
||||
|
||||
<div style="text-align: center">
|
||||
<!-- <el-form-item label="表单标题">-->
|
||||
<div>
|
||||
<span>标题</span>
|
||||
<el-input
|
||||
style="border-left: none; border-right: none; border-top: none; border-bottom: 1px solid skyblue; margin-bottom: 10px"
|
||||
<div><span>标题</span> <el-input style="border-bottom: 1px solid skyblue;margin-bottom: 10px"
|
||||
v-model="addParams.title" placeholder="请输入表单标题" />
|
||||
</div>
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="字段名称">-->
|
||||
<div v-for="(item,index) in inputarr" :key="index" style="margin-bottom: 10px;">
|
||||
<span>字段</span>
|
||||
<el-input style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
|
||||
placeholder="请输入字段" />
|
||||
<span>字段</span>
|
||||
<el-input style="border: 1px solid #DCDFE6;border-radius: 3px; "
|
||||
v-model="inputarr[index]" placeholder="请输入字段" />
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="adinput"
|
||||
style="text-align: center;width: 90%;background-color: rgb(232,244,255);color:#1890ff">添加字段</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- </el-form-item>-->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="el-input-foot">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 推广链接对话框-->
|
||||
<el-dialog :title="extendTitle" v-model="extendOpen" width="500px" append-to-body>
|
||||
<el-input v-model="extendLink" placeholder="请输入内容" :disabled="true" />
|
||||
<el-button @click="copyAddress">复制</el-button>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 采集数据列表 -->
|
||||
<el-dialog :title="collectTitle" v-model="collectOpen" append-to-body>
|
||||
|
||||
<el-dialog :title="collectTitle" v-model="collectOpen" append-to-body>
|
||||
<el-table border v-loading="loading" :data="collectLink" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<div>
|
||||
|
||||
<template v-for="(item, index) in getColumnNames" :key="index">
|
||||
<el-table-column
|
||||
:label="capitalize(item)"
|
||||
:prop="item"
|
||||
/>
|
||||
</div>
|
||||
<!-- <el-table-column label="编号" align="center" prop="id" />-->
|
||||
<!-- <el-table-column label="id" align="center" prop="dynamicDataId" />-->
|
||||
<!-- <el-table-column v-for="item in collectLink" :label="item.map" align="center" :prop="item" />-->
|
||||
<template v-for="(item, index) in Object.keys(collectLink[0])" :key="index">
|
||||
<el-table-column :label="item">
|
||||
<template #default="scope">
|
||||
<span>{{scope.row[item]}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
<!--编辑弹出框-->
|
||||
<el-dialog :title="redactTitle" v-model="redactOpen" width="500">
|
||||
|
||||
<div style="text-align: center">
|
||||
<!-- 标题 -->
|
||||
<div>
|
||||
<span>标题</span>
|
||||
<el-input
|
||||
style="border-left: none; border-right: none; border-top: none; border-bottom: 1px solid skyblue; margin-bottom: 10px"
|
||||
v-model="redactName" placeholder="请输入表单标题" />
|
||||
</div>
|
||||
<!-- 字段 -->
|
||||
<div v-for="(item,index) in inputarr" :key="index" style="margin-bottom: 10px;">
|
||||
<span>字段</span>
|
||||
<el-input style="border: 1px solid #DCDFE6;border-radius: 3px; " v-model="inputarr[index]"
|
||||
placeholder="请输入字段" />
|
||||
</div>
|
||||
<!-- 添加字段按钮 -->
|
||||
<div>
|
||||
<el-button @click="adinput"
|
||||
style="text-align: center;width: 90%;background-color: rgb(232,244,255);color:#1890ff">添加字段</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="el-input-foot">
|
||||
<el-button type="primary" @click="submitForms">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { FollowUpRecordApi} from "@/api/crm/intelligent.ts";
|
||||
// import {Message} from 'element-ui';
|
||||
import {FollowUpRecordApi} from "@/api/crm/intelligent.ts";
|
||||
export default {
|
||||
name: "Business",
|
||||
dicts: ['stage_type', 'sales_stage'],
|
||||
data() {
|
||||
return {
|
||||
// 编辑弹出层标题
|
||||
redactTitle: "编辑",
|
||||
// 是否显示编辑弹出层
|
||||
redactOpen: false,
|
||||
//编辑id
|
||||
redactId: '',
|
||||
//编辑标题
|
||||
redactName: '',
|
||||
id: '',
|
||||
inputarr: [''],
|
||||
// 遮罩层
|
||||
@ -185,13 +142,12 @@
|
||||
//推广链接数据
|
||||
extendLink: '',
|
||||
//采集数据列表数据
|
||||
collectLink: [],
|
||||
collectLink: [{}],
|
||||
//下拉框客户列表
|
||||
customerList: [],
|
||||
//卡片列表
|
||||
cardList: [],
|
||||
addParams: {
|
||||
id: '',
|
||||
title: '',
|
||||
pageView: '',
|
||||
collectionQuantity: '',
|
||||
@ -202,38 +158,23 @@
|
||||
created() {
|
||||
this.getIntelligentList();
|
||||
},
|
||||
computed: {
|
||||
// 获取数据对象的所有键名(字段名),用于动态渲染列
|
||||
getColumnNames() {
|
||||
// 确保 collectLink 不是 null 或 undefined,并且不是空数组
|
||||
if (!this.collectLink || this.collectLink.length === 0) {
|
||||
return [];
|
||||
}
|
||||
return Object.keys(this.collectLink[0]);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
capitalize(str) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
},
|
||||
//添加表单
|
||||
adinput() {
|
||||
this.inputarr.push('')
|
||||
console.log(this.inputarr)
|
||||
},
|
||||
//卡片数据
|
||||
getIntelligentList() {
|
||||
this.loading = true;
|
||||
FollowUpRecordApi.selectDynamicData().then(response => {
|
||||
this.cardList = response;
|
||||
console.log(response, 'response.data')
|
||||
console.log(response,'response.data')
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.redactOpen = false;
|
||||
this.open = false;
|
||||
},
|
||||
//提交按钮
|
||||
@ -250,25 +191,6 @@
|
||||
this.getIntelligentList();
|
||||
});
|
||||
},
|
||||
//修改提交按钮
|
||||
submitForms() {
|
||||
|
||||
this.addParams.id = this.redactId
|
||||
this.addParams.inputarr = this.inputarr
|
||||
this.addParams.title = this.redactName
|
||||
|
||||
FollowUpRecordApi.updateDynamicData(this.addParams).then(response => {
|
||||
// this.cardList = response.data;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
this.redactOpen = false;
|
||||
this.getIntelligentList();
|
||||
// this.$message({
|
||||
// message: '修改成功',
|
||||
// type: 'success'
|
||||
// });
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.inputarr = []
|
||||
@ -284,53 +206,6 @@
|
||||
this.extendLink = 'http://zysc.fjptzykj.com/form/extendLink/form?id=' + id
|
||||
this.extendOpen = true;
|
||||
this.extendTitle = "推广链接";
|
||||
},
|
||||
//删除按钮操作
|
||||
deleteForm(id) {
|
||||
// this.$confirm('此操作将永久删除该表单, 是否继续?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '删除成功!'
|
||||
// });
|
||||
// }).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消删除'
|
||||
// });
|
||||
// });
|
||||
FollowUpRecordApi.deleteDynamicDataById(id).then(response => {
|
||||
// this.cardList = response.data;
|
||||
// this.total = response.total;
|
||||
this.getIntelligentList();
|
||||
});
|
||||
},
|
||||
// 预览
|
||||
preview(id) {
|
||||
this.extendLink = 'http://zysc.fjptzykj.com/form/extendLink/form?id=' + id
|
||||
// 打开新页面
|
||||
const newWindow = window.open(this.extendLink, '_blank');
|
||||
// 设置手机端视口(Viewport)meta标签,用来模拟手机尺寸
|
||||
newWindow.onload = () => {
|
||||
const metaTag = newWindow.document.createElement('meta');
|
||||
metaTag.name = 'viewport';
|
||||
metaTag.content = 'width=device-width, initial-scale=1.0, user-scalable=no'; // 设置视口宽度为设备宽度,并禁用缩放
|
||||
newWindow.document.head.appendChild(metaTag);
|
||||
};
|
||||
},
|
||||
// 编辑点击事件
|
||||
redacts(cardData) {
|
||||
this.inputarr = [''];
|
||||
// 1. 获取 cardData.data 中的所有键名
|
||||
this.inputarr = Object.keys(cardData.data);
|
||||
this.redactOpen = true;
|
||||
this.redactId = cardData.id
|
||||
this.redactName = cardData.title;
|
||||
|
||||
|
||||
},
|
||||
//复制按钮操作
|
||||
copyAddress() {
|
||||
@ -343,17 +218,14 @@
|
||||
alert('已复制到剪贴板');
|
||||
},
|
||||
//采集数据展示
|
||||
extendList(id,title) {
|
||||
FollowUpRecordApi.collectDataList(id).then(response => {
|
||||
this.collectLink = response
|
||||
console.log('111111: ' + JSON.stringify(response));
|
||||
});
|
||||
|
||||
extendList(id) {
|
||||
this.collectLink = null;
|
||||
this.id = id
|
||||
this.collectOpen = true;
|
||||
this.collectTitle = title+"采集数据";
|
||||
|
||||
this.collectTitle = "采集数据";
|
||||
collectDataList(this.id).then(response => {
|
||||
this.collectLink = response.data
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@ -404,6 +276,6 @@
|
||||
|
||||
::v-deep.el-input--medium .el-input__inner {
|
||||
border: none;
|
||||
border-bottom: 1px solid blue;
|
||||
/* border-bottom:1px solid blue; */
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="kefu">
|
||||
|
||||
<div
|
||||
v-for="item in conversationList"
|
||||
:key="item.id"
|
||||
@ -10,7 +9,7 @@
|
||||
@contextmenu.prevent="rightClick($event as PointerEvent, item)"
|
||||
>
|
||||
<div class="flex justify-center items-center w-100%">
|
||||
<div class="flex justify-center items-center w-40px h-40px">
|
||||
<div class="flex justify-center items-center w-50px h-50px">
|
||||
<!-- 头像 + 未读 -->
|
||||
<el-badge
|
||||
:hidden="item.adminUnreadMessageCount === 0"
|
||||
@ -20,11 +19,11 @@
|
||||
<el-avatar :src="item.userAvatar" alt="avatar" />
|
||||
</el-badge>
|
||||
</div>
|
||||
<div class="ml-3px w-full">
|
||||
<div class="flex justify-between items-center w-full">
|
||||
<div class="ml-10px w-100%">
|
||||
<div class="flex justify-between items-center w-100%">
|
||||
<span class="username">{{ item.userNickname }}</span>
|
||||
<span class="color-[var(--left-menu-text-color)]" style="font-size: 12px">
|
||||
{{ formatPast(item.lastMessageTime, 'YYYY-MM-DD') }}
|
||||
<span class="color-[#989EA6]">
|
||||
{{ formatPast(item.lastMessageTime, 'YYYY-mm-dd') }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- 最后聊天内容 -->
|
||||
@ -32,15 +31,12 @@
|
||||
v-dompurify-html="
|
||||
getConversationDisplayText(item.lastMessageContentType, item.lastMessageContent)
|
||||
"
|
||||
class="last-message flex items-center color-[var(--left-menu-text-color)]"
|
||||
>
|
||||
</div>
|
||||
class="last-message flex items-center color-[#989EA6]"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 右键,进行操作(类似微信) -->
|
||||
<ul v-show="showRightMenu" :style="rightMenuStyle" class="right-menu-ul">
|
||||
<li
|
||||
@ -77,7 +73,6 @@ import { useEmoji } from './tools/emoji'
|
||||
import { formatPast } from '@/utils/formatTime'
|
||||
import { KeFuMessageContentTypeEnum } from './tools/constants'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { getStaffToken} from '@/utils/auth'
|
||||
|
||||
defineOptions({ name: 'KeFuConversationList' })
|
||||
|
||||
@ -89,8 +84,8 @@ const activeConversationId = ref(-1) // 选中的会话
|
||||
const collapse = computed(() => appStore.getCollapse) // 折叠菜单
|
||||
|
||||
/** 加载会话列表 */
|
||||
const getConversationList = async (name: string) => {
|
||||
const list = await KeFuConversationApi.getConversationListByKefuId(getStaffToken(),name)
|
||||
const getConversationList = async () => {
|
||||
const list = await KeFuConversationApi.getConversationList()
|
||||
list.sort((a: KeFuConversationRespVO, _) => (a.adminPinned ? -1 : 1))
|
||||
conversationList.value = list
|
||||
}
|
||||
@ -184,18 +179,15 @@ watch(showRightMenu, (val) => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.kefu {
|
||||
background-color: white;
|
||||
|
||||
&-conversation {
|
||||
height: 50px;
|
||||
padding: 5px;
|
||||
//background-color: #fff;
|
||||
height: 60px;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
transition: border-left 0.05s ease-in-out; /* 设置过渡效果 */
|
||||
|
||||
.username {
|
||||
font-size: 15%;
|
||||
min-width: 0;
|
||||
max-width: 50%;
|
||||
max-width: 60%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
@ -204,8 +196,7 @@ watch(showRightMenu, (val) => {
|
||||
}
|
||||
|
||||
.last-message {
|
||||
font-size: 15px;
|
||||
width: 170px;
|
||||
width: 200px;
|
||||
overflow: hidden; // 隐藏超出的文本
|
||||
white-space: nowrap; // 禁止换行
|
||||
text-overflow: ellipsis; // 添加省略号
|
||||
@ -213,19 +204,18 @@ watch(showRightMenu, (val) => {
|
||||
}
|
||||
|
||||
.active {
|
||||
border-left: 5px #0256ff solid;
|
||||
// background-color: var(--login-bg-color);
|
||||
background-color: #409eff;
|
||||
border-left: 5px #3271ff solid;
|
||||
background-color: #eff0f1;
|
||||
}
|
||||
|
||||
.pinned {
|
||||
background-color: var(--left-menu-bg-active-color);
|
||||
background-color: #eff0f1;
|
||||
}
|
||||
|
||||
.right-menu-ul {
|
||||
position: absolute;
|
||||
background-color: var(--app-content-bg-color);
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
list-style-type: none; /* 移除默认的项目符号 */
|
||||
border-radius: 12px;
|
||||
@ -238,7 +228,7 @@ watch(showRightMenu, (val) => {
|
||||
border-radius: 12px;
|
||||
transition: background-color 0.3s; /* 平滑过渡 */
|
||||
&:hover {
|
||||
background-color: var(--left-menu-bg-active-color); /* 悬停时的背景颜色 */
|
||||
background-color: #e0e0e0; /* 悬停时的背景颜色 */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
<template>
|
||||
<div style="height: 522px ;" ref="userInfoRef" >
|
||||
<div>
|
||||
<span style="display: flex;">
|
||||
<el-avatar
|
||||
style="border: 1px solid #f8f9ee;"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/29e07b7973621a1a9679744e18f2b4efd1fd50d857fe594879e813d67be3e2db.png"
|
||||
/>
|
||||
<span style="margin-left:5px;margin-top: 9px;">Marvin</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<el-divider style="border-color: #f5f5f5;margin-top: 15px;margin-bottom:15px;" />
|
||||
<div>
|
||||
<span style="color: #5d5d59;font-size: 13px ;">手机号</span><span style="margin-left: 47px;font-size: 14px ;">暂无</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="color: #5d5d59;font-size: 13px ;">分组</span><span style="margin-left: 60px;font-size: 14px ;">D类客户</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="color: #5d5d59;font-size: 13px ;">用户标签</span><span style="margin-left: 33px;font-size: 14px ;">小客户</span>
|
||||
</div>
|
||||
<el-divider style="border-color: #f5f5f5;margin-top: 15px;margin-bottom:15px;" />
|
||||
|
||||
<div>
|
||||
<span style="color: #5d5d59;font-size: 13px ;">用户等级</span><span style="margin-left: 35px;font-size: 14px ;">暂无</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="color: #5d5d59;font-size: 13px ;">推荐人</span><span style="margin-left: 47px;font-size: 14px ;">客户</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="color: #5d5d59;font-size: 13px ;">用户类型</span><span style="margin-left: 33px;font-size: 14px ;">小客户</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: #5d5d59;font-size: 13px ;">余额</span><span style="margin-left: 60px;font-size: 14px ;">暂无</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="color: #5d5d59;font-size: 13px ;">推广员</span><span style="margin-left: 47px;font-size: 14px ;">客户</span>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="color: #5d5d59;font-size: 13px ;">生日</span><span style="margin-left: 60px;font-size: 14px ;">小客户</span>
|
||||
</div>
|
||||
<el-divider style="border-color: #f5f5f5;margin-top: 15px;margin-bottom:15px;" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script >
|
||||
import * as UserApi from '@/api/member/user'
|
||||
|
||||
|
||||
// const user = ref<UserApi.UserVO>({} as UserApi.UserVO)
|
||||
|
||||
|
||||
// const getUserId = async (id: string) => {
|
||||
// user.value = await UserApi.getUserInfo(id)
|
||||
// }
|
||||
// defineExpose({ getUserId })
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 994 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
@ -1,20 +1,13 @@
|
||||
<!-- 目录是不是叫 member 好点。然后这个组件是 MemberInfo,里面有浏览足迹 -->
|
||||
<template>
|
||||
<div v-show="!isEmpty(conversation)" class="kefu">
|
||||
<!-- <div class="header-title h-60px flex justify-center items-center">他的足迹</div> -->
|
||||
<el-tabs tab-position="top" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="足迹" name="a" />
|
||||
<el-tab-pane label="购买" name="b" />
|
||||
<div class="header-title h-60px flex justify-center items-center">他的足迹</div>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="最近浏览" name="a" />
|
||||
<el-tab-pane label="订单列表" name="b" />
|
||||
</el-tabs>
|
||||
<div >
|
||||
<el-input @input="findgoodsNameInput" v-model="goodsName" placeholder="搜索商品名称" v-if="activeName === 'a'"
|
||||
style="width: 100%;"/>
|
||||
|
||||
<el-input @input="findNoInput" v-model="no" placeholder="搜索订单编号" v-if="activeName === 'b'"
|
||||
style="width: 100%;"/>
|
||||
</div>
|
||||
<div style="margin-top: 5px;">
|
||||
<el-scrollbar ref="scrollbarRef" always height="calc(115vh - 400px)" @scroll="handleScroll">
|
||||
<div>
|
||||
<el-scrollbar ref="scrollbarRef" always height="calc(100vh - 400px)" @scroll="handleScroll">
|
||||
<!-- 最近浏览 -->
|
||||
<ProductBrowsingHistory v-if="activeName === 'a'" ref="productBrowsingHistoryRef" />
|
||||
<!-- 订单列表 -->
|
||||
@ -32,13 +25,12 @@ import OrderBrowsingHistory from './OrderBrowsingHistory.vue'
|
||||
import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
|
||||
import { isEmpty } from '@/utils/is'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar/index'
|
||||
import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar'
|
||||
|
||||
defineOptions({ name: 'MemberBrowsingHistory' })
|
||||
|
||||
const activeName = ref('a')
|
||||
const goodsName = ref('')
|
||||
const no = ref('')
|
||||
|
||||
/** tab 切换 */
|
||||
const productBrowsingHistoryRef = ref<InstanceType<typeof ProductBrowsingHistory>>()
|
||||
const orderBrowsingHistoryRef = ref<InstanceType<typeof OrderBrowsingHistory>>()
|
||||
@ -48,32 +40,21 @@ const handleClick = async (tab: TabsPaneContext) => {
|
||||
await getHistoryList()
|
||||
}
|
||||
|
||||
//查询
|
||||
const findgoodsNameInput = async () => {
|
||||
getHistoryList()
|
||||
}
|
||||
|
||||
/** 获得历史数据 */
|
||||
// TODO @puhui:不要用 a、b 哈。就订单列表、浏览列表这种噶
|
||||
const getHistoryList = async () => {
|
||||
|
||||
switch (activeName.value) {
|
||||
case 'a':
|
||||
await productBrowsingHistoryRef.value?.getHistoryList(conversation.value,goodsName.value)
|
||||
await productBrowsingHistoryRef.value?.getHistoryList(conversation.value)
|
||||
break
|
||||
case 'b':
|
||||
await orderBrowsingHistoryRef.value?.getHistoryList(conversation.value,no.value)
|
||||
await orderBrowsingHistoryRef.value?.getHistoryList(conversation.value)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
//搜索框
|
||||
const findNoInput = async () => {
|
||||
getHistoryList()
|
||||
}
|
||||
|
||||
/** 加载下一页数据 */
|
||||
const loadMore = async () => {
|
||||
switch (activeName.value) {
|
||||
|
@ -1,92 +0,0 @@
|
||||
<!-- 目录是不是叫 member 好点。然后这个组件是 MemberInfo,里面有浏览足迹 -->
|
||||
<template>
|
||||
<div v-show="!isEmpty(conversation)" class="kefu">
|
||||
<!-- <div class="header-title h-60px flex justify-center items-center">他的足迹</div> -->
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部" name="a" />
|
||||
<el-tab-pane label="未支付" name="b" />
|
||||
<el-tab-pane label="未发货" name="c" />
|
||||
<el-tab-pane label="退款中" name="d" />
|
||||
</el-tabs>
|
||||
<div>
|
||||
<el-input @input="findNoInput" v-model="no" placeholder="搜索订单编号"
|
||||
style="width: 100%;"/>
|
||||
</div>
|
||||
<div>
|
||||
<el-scrollbar ref="scrollbarRef" always height="calc(115vh - 400px)" @scroll="handleScroll">
|
||||
<OrderBrowsingHistorys ref="orderBrowsingHistorysRef" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty v-show="isEmpty(conversation)" description="请选择左侧的一个会话后开始" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { TabsPaneContext } from 'element-plus'
|
||||
import OrderBrowsingHistorys from './OrderBrowsingHistorys.vue'
|
||||
import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
|
||||
import { isEmpty } from '@/utils/is'
|
||||
import { debounce } from 'lodash-es'
|
||||
import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar/index'
|
||||
|
||||
defineOptions({ name: 'MemberBrowsingHistorys' })
|
||||
|
||||
const activeName = ref('a')
|
||||
|
||||
/** tab 切换 */
|
||||
const orderBrowsingHistorysRef = ref<InstanceType<typeof OrderBrowsingHistorys>>()
|
||||
const handleClick = async (tab: TabsPaneContext) => {
|
||||
activeName.value = tab.paneName as string
|
||||
await nextTick()
|
||||
await getHistoryList()
|
||||
}
|
||||
const no = ref('')
|
||||
|
||||
/** 获得历史数据 */
|
||||
// TODO @puhui:不要用 a、b 哈。就订单列表、浏览列表这种噶 : 我就要用abcd😈
|
||||
const getHistoryList = async () => {
|
||||
console.log('11111执行11111',activeName.value)
|
||||
|
||||
await orderBrowsingHistorysRef.value?.getHistoryList(conversation.value,activeName.value,no.value)
|
||||
|
||||
}
|
||||
|
||||
//搜索框
|
||||
const findNoInput = async () => {
|
||||
getHistoryList()
|
||||
|
||||
}
|
||||
|
||||
/** 加载下一页数据 */
|
||||
const loadMore = async () => {
|
||||
await orderBrowsingHistorysRef.value?.loadMore()
|
||||
}
|
||||
|
||||
/** 浏览历史初始化 */
|
||||
const conversation = ref<KeFuConversationRespVO>({} as KeFuConversationRespVO) // 用户会话
|
||||
const initHistory = async (val: KeFuConversationRespVO) => {
|
||||
activeName.value = 'a'
|
||||
conversation.value = val
|
||||
await nextTick()
|
||||
await getHistoryList()
|
||||
}
|
||||
defineExpose({ initHistory })
|
||||
|
||||
/** 处理消息列表滚动事件(debounce 限流) */
|
||||
const scrollbarRef = ref<InstanceType<typeof ElScrollbarType>>()
|
||||
const handleScroll = debounce(() => {
|
||||
const wrap = scrollbarRef.value?.wrapRef
|
||||
// 触底重置
|
||||
if (Math.abs(wrap!.scrollHeight - wrap!.clientHeight - wrap!.scrollTop) < 1) {
|
||||
loadMore()
|
||||
}
|
||||
}, 200)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header-title {
|
||||
border-bottom: #e4e0e0 solid 1px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
@ -15,8 +15,7 @@ const total = ref(0) // 总数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
userId: 0,
|
||||
no: '',
|
||||
userId: 0
|
||||
})
|
||||
const skipGetMessageList = computed(() => {
|
||||
// 已加载到最后一页的话则不触发新的消息获取
|
||||
@ -24,9 +23,8 @@ const skipGetMessageList = computed(() => {
|
||||
}) // 跳过消息获取
|
||||
|
||||
/** 获得浏览记录 */
|
||||
const getHistoryList = async (val: KeFuConversationRespVO,no: string) => {
|
||||
const getHistoryList = async (val: KeFuConversationRespVO) => {
|
||||
queryParams.userId = val.userId
|
||||
queryParams.no = no
|
||||
const res = await getOrderPage(queryParams)
|
||||
total.value = res.total
|
||||
list.value = res.list
|
||||
@ -40,8 +38,7 @@ const loadMore = async () => {
|
||||
queryParams.pageNo += 1
|
||||
const res = await getOrderPage(queryParams)
|
||||
total.value = res.total
|
||||
// concat(list.value, res.list)
|
||||
list.value = list.value.concat(res.list);
|
||||
concat(list.value, res.list)
|
||||
}
|
||||
defineExpose({ getHistoryList, loadMore })
|
||||
</script>
|
||||
|
@ -1,50 +0,0 @@
|
||||
<template>
|
||||
<OrderItems v-for="item in list" :key="item.id" :order="item" class="mb-10px" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import OrderItems from '@/views/mall/promotion/kefu/components/message/OrderItems.vue'
|
||||
import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
|
||||
import { getOrderPage } from '@/api/mall/trade/order'
|
||||
import { concat } from 'lodash-es'
|
||||
|
||||
defineOptions({ name: 'OrderBrowsingHistorys' })
|
||||
|
||||
const list = ref<any>([]) // 列表
|
||||
const total = ref(0) // 总数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
userId: 0,
|
||||
activeName: 'a',
|
||||
no: '',
|
||||
})
|
||||
const skipGetMessageList = computed(() => {
|
||||
// 已加载到最后一页的话则不触发新的消息获取
|
||||
return total.value > 0 && Math.ceil(total.value / queryParams.pageSize) === queryParams.pageNo
|
||||
}) // 跳过消息获取
|
||||
|
||||
/** 获得浏览记录 */
|
||||
const getHistoryList = async (val: KeFuConversationRespVO,activeName: string,no: string) => {
|
||||
queryParams.userId = val.userId
|
||||
queryParams.activeName = activeName
|
||||
queryParams.no = no
|
||||
queryParams.pageNo = 1
|
||||
const res = await getOrderPage(queryParams)
|
||||
total.value = res.total
|
||||
list.value = res.list
|
||||
}
|
||||
|
||||
/** 加载下一页数据 */
|
||||
const loadMore = async () => {
|
||||
if (skipGetMessageList.value) {
|
||||
return
|
||||
}
|
||||
queryParams.pageNo += 1
|
||||
const res = await getOrderPage(queryParams)
|
||||
total.value = res.total
|
||||
// concat(list.value, res.list)
|
||||
list.value = list.value.concat(res.list);
|
||||
}
|
||||
defineExpose({ getHistoryList, loadMore })
|
||||
</script>
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<ProductItem
|
||||
v-for="item in list"
|
||||
:spu-id="item.spuId"
|
||||
:key="item.id"
|
||||
:picUrl="item.picUrl"
|
||||
:price="item.price"
|
||||
@ -27,8 +26,7 @@ const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
userId: 0,
|
||||
userDeleted: false,
|
||||
goodsName: ''
|
||||
userDeleted: false
|
||||
})
|
||||
const skipGetMessageList = computed(() => {
|
||||
// 已加载到最后一页的话则不触发新的消息获取
|
||||
@ -36,9 +34,8 @@ const skipGetMessageList = computed(() => {
|
||||
}) // 跳过消息获取
|
||||
|
||||
/** 获得浏览记录 */
|
||||
const getHistoryList = async (val: KeFuConversationRespVO,goodsName: string) => {
|
||||
const getHistoryList = async (val: KeFuConversationRespVO) => {
|
||||
queryParams.userId = val.userId
|
||||
queryParams.goodsName = goodsName
|
||||
const res = await getBrowseHistoryPage(queryParams)
|
||||
total.value = res.total
|
||||
list.value = res.list
|
||||
@ -52,8 +49,7 @@ const loadMore = async () => {
|
||||
queryParams.pageNo += 1
|
||||
const res = await getBrowseHistoryPage(queryParams)
|
||||
total.value = res.total
|
||||
// concat(list.value, res.list)
|
||||
list.value = list.value.concat(res.list);
|
||||
concat(list.value, res.list)
|
||||
}
|
||||
defineExpose({ getHistoryList, loadMore })
|
||||
</script>
|
||||
|
@ -1,6 +1,5 @@
|
||||
import KeFuConversationList from './KeFuConversationList.vue'
|
||||
import KeFuMessageList from './KeFuMessageList.vue'
|
||||
import MemberBrowsingHistory from './history/MemberBrowsingHistory.vue'
|
||||
import MemberBrowsingHistorys from './history/MemberBrowsingHistorys.vue'
|
||||
|
||||
export { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory ,MemberBrowsingHistorys}
|
||||
export { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory }
|
||||
|
@ -1,20 +1,14 @@
|
||||
<template>
|
||||
<div v-if="isObject(getMessageContent)">
|
||||
<div :key="getMessageContent.id" class="order-list-card-box mt-14px">
|
||||
<div class="order-card-header flex items-center justify-between p-x-5px">
|
||||
<div class="order-no">
|
||||
订单号:
|
||||
<span style="cursor: pointer" @click="openDetail(getMessageContent.id)">
|
||||
{{ getMessageContent.no }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="order-card-header flex items-center justify-between p-x-20px">
|
||||
<div class="order-no">订单号:{{ getMessageContent.no }}</div>
|
||||
<div :class="formatOrderColor(getMessageContent)" class="order-state font-16">
|
||||
{{ formatOrderStatus(getMessageContent) }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="item in getMessageContent.items" :key="item.id" class="border-bottom">
|
||||
<ProductItem
|
||||
:spu-id="item.spuId"
|
||||
:num="item.count"
|
||||
:picUrl="item.picUrl"
|
||||
:price="item.price"
|
||||
@ -22,7 +16,7 @@
|
||||
:title="item.spuName"
|
||||
/>
|
||||
</div>
|
||||
<div class="pay-box flex justify-end pr-5px">
|
||||
<div class="pay-box flex justify-end pr-20px">
|
||||
<div class="flex items-center">
|
||||
<div class="discounts-title pay-color"
|
||||
>共 {{ getMessageContent?.productCount }} 件商品,总金额:
|
||||
@ -42,8 +36,6 @@ import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message'
|
||||
import { isObject } from '@/utils/is'
|
||||
import ProductItem from '@/views/mall/promotion/kefu/components/message/ProductItem.vue'
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
defineOptions({ name: 'OrderItem' })
|
||||
const props = defineProps<{
|
||||
message?: KeFuMessageRespVO
|
||||
@ -54,12 +46,6 @@ const getMessageContent = computed(() =>
|
||||
typeof props.message !== 'undefined' ? jsonParse(props!.message!.content) : props.order
|
||||
)
|
||||
|
||||
/** 查看订单详情 */
|
||||
const openDetail = (id: number) => {
|
||||
console.log(getMessageContent)
|
||||
push({ name: 'TradeOrderDetail', params: { id } })
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化订单状态的颜色
|
||||
*
|
||||
@ -111,28 +97,18 @@ function formatOrderStatus(order: any) {
|
||||
.order-list-card-box {
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
border: 1px var(--el-border-color) solid;
|
||||
background-color: var(--app-content-bg-color);
|
||||
background-color: #e2e2e2;
|
||||
|
||||
.order-card-header {
|
||||
height: 28px;
|
||||
|
||||
.order-no {
|
||||
font-size: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
|
||||
span {
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
color: var(--left-menu-bg-active-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pay-box {
|
||||
padding-top: 10px;
|
||||
|
||||
.discounts-title {
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
@ -147,33 +123,24 @@ function formatOrderStatus(order: any) {
|
||||
}
|
||||
|
||||
.pay-color {
|
||||
font-size: 13px;
|
||||
color: var(--left-menu-text-color);
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warning-color {
|
||||
color: #faad14;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.danger-color {
|
||||
color: #ff3000;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.success-color {
|
||||
color: #52c41a;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-color {
|
||||
color: #999999;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,182 +0,0 @@
|
||||
<template>
|
||||
<div v-if="isObject(getMessageContent)">
|
||||
<div :key="getMessageContent.id" class="order-list-card-box mt-14px">
|
||||
<div class="order-card-header flex items-center justify-between p-x-5px">
|
||||
<div class="order-no">
|
||||
订单号:
|
||||
<span style="cursor: pointer" @click="openDetail(getMessageContent.id)">
|
||||
{{ getMessageContent.no }}
|
||||
</span>
|
||||
</div>
|
||||
<div :class="formatOrderColor(getMessageContent)" class="order-state font-16">
|
||||
{{ formatOrderStatus(getMessageContent) }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="item in getMessageContent.items" :key="item.id" class="border-bottom">
|
||||
<ProductItem
|
||||
:spu-id="item.spuId"
|
||||
:num="item.count"
|
||||
:picUrl="item.picUrl"
|
||||
:price="item.price"
|
||||
:skuText="item.properties.map((property: any) => property.valueName).join(' ')"
|
||||
:title="item.spuName"
|
||||
/>
|
||||
</div>
|
||||
<div class="pay-box flex justify-end pr-5px">
|
||||
<div class="flex items-center">
|
||||
<div class="discounts-title pay-color"
|
||||
>共 {{ getMessageContent?.productCount }} 件商品,总金额:
|
||||
</div>
|
||||
<div class="discounts-money pay-color">
|
||||
¥{{ fenToYuan(getMessageContent?.payPrice) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { fenToYuan, jsonParse } from '@/utils'
|
||||
import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message'
|
||||
import { isObject } from '@/utils/is'
|
||||
import ProductItem from '@/views/mall/promotion/kefu/components/message/ProductItem.vue'
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
defineOptions({ name: 'OrderItems' })
|
||||
const props = defineProps<{
|
||||
message?: KeFuMessageRespVO
|
||||
order?: any
|
||||
}>()
|
||||
|
||||
const getMessageContent = computed(() =>
|
||||
typeof props.message !== 'undefined' ? jsonParse(props!.message!.content) : props.order
|
||||
)
|
||||
|
||||
/** 查看订单详情 */
|
||||
const openDetail = (id: number) => {
|
||||
console.log(getMessageContent)
|
||||
push({ name: 'TradeOrderDetail', params: { id } })
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化订单状态的颜色
|
||||
*
|
||||
* @param order 订单
|
||||
* @return {string} 颜色的 class 名称
|
||||
*/
|
||||
function formatOrderColor(order: any) {
|
||||
if (order.status === 0) {
|
||||
return 'info-color'
|
||||
}
|
||||
if (order.status === 10 || order.status === 20 || (order.status === 30 && !order.commentStatus)) {
|
||||
return 'warning-color'
|
||||
}
|
||||
if (order.status === 30 && order.commentStatus) {
|
||||
return 'success-color'
|
||||
}
|
||||
return 'danger-color'
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化订单状态
|
||||
*
|
||||
* @param order 订单
|
||||
*/
|
||||
function formatOrderStatus(order: any) {
|
||||
if (order.status === 0) {
|
||||
return '待付款'
|
||||
}
|
||||
if (order.status === 10 && order.deliveryType === 1) {
|
||||
return '待发货'
|
||||
}
|
||||
if (order.status === 10 && order.deliveryType === 2) {
|
||||
return '待核销'
|
||||
}
|
||||
if (order.status === 20) {
|
||||
return '待收货'
|
||||
}
|
||||
if (order.status === 30 && !order.commentStatus) {
|
||||
return '待评价'
|
||||
}
|
||||
if (order.status === 30 && order.commentStatus) {
|
||||
return '已完成'
|
||||
}
|
||||
if (order.status === 100) {
|
||||
return '退款中'
|
||||
}
|
||||
return '已关闭'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.order-list-card-box {
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
border: 1px var(--el-border-color) solid;
|
||||
background-color: var(--app-content-bg-color);
|
||||
|
||||
.order-card-header {
|
||||
height: 28px;
|
||||
|
||||
.order-no {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
|
||||
span {
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
color: var(--left-menu-bg-active-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pay-box {
|
||||
padding-top: 10px;
|
||||
|
||||
.discounts-title {
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.discounts-money {
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
color: #999;
|
||||
font-family: OPPOSANS;
|
||||
}
|
||||
|
||||
.pay-color {
|
||||
font-size: 13px;
|
||||
color: var(--left-menu-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warning-color {
|
||||
color: #faad14;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.danger-color {
|
||||
color: #ff3000;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.success-color {
|
||||
color: #52c41a;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-color {
|
||||
color: #999999;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div @click.stop="openDetail(props.spuId)" style="cursor: pointer;">
|
||||
<div>
|
||||
<div>
|
||||
<slot name="top"></slot>
|
||||
</div>
|
||||
@ -15,7 +15,6 @@
|
||||
class="order-img"
|
||||
fit="contain"
|
||||
preview-teleported
|
||||
@click.stop
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -54,14 +53,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { fenToYuan } from '@/utils'
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
defineOptions({ name: 'ProductItem' })
|
||||
const props = defineProps({
|
||||
spuId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
picUrl: {
|
||||
type: String,
|
||||
default: 'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto'
|
||||
@ -114,20 +107,13 @@ const skuString = computed(() => {
|
||||
}
|
||||
return props.skuText
|
||||
})
|
||||
|
||||
/** 查看商品详情 */
|
||||
const openDetail = (spuId: number) => {
|
||||
console.log(props.spuId)
|
||||
push({ name: 'ProductSpuDetail', params: { id: spuId } })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ss-order-card-warp {
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
border: 1px var(--el-border-color) solid;
|
||||
background-color: var(--app-content-bg-color);
|
||||
background-color: #e2e2e2;
|
||||
|
||||
.img-box {
|
||||
width: 80px;
|
||||
@ -147,26 +133,19 @@ const openDetail = (spuId: number) => {
|
||||
|
||||
.tool-box {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
right: 0px;
|
||||
bottom: -10px;
|
||||
}
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 20px;
|
||||
display: -webkit-box; /* 对于支持的浏览器 */
|
||||
-webkit-box-orient: vertical; /* 垂直排列 */
|
||||
overflow: hidden; /* 隐藏超出部分 */
|
||||
-webkit-line-clamp: 2; /* 限制为2行 */
|
||||
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
||||
line-height: 1.5; /* 行高,可以根据需要调整 */
|
||||
max-height: 3rem; /* 根据行高和行数设置最大高度,2行 * 行高 */
|
||||
}
|
||||
|
||||
.spec-text {
|
||||
font-size: 10px;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
min-width: 0;
|
||||
@ -178,13 +157,13 @@ const openDetail = (spuId: number) => {
|
||||
}
|
||||
|
||||
.price-text {
|
||||
font-size: 11px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-family: OPPOSANS;
|
||||
}
|
||||
|
||||
.total-text {
|
||||
font-size: 10px;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
color: #999999;
|
||||
|
@ -2,8 +2,7 @@
|
||||
<template>
|
||||
<el-popover :width="500" placement="top" trigger="click">
|
||||
<template #reference>
|
||||
<!-- <Icon :size="30" class="ml-10px cursor-pointer" icon="twemoji:grinning-face" /> -->
|
||||
<img :src="biaoqing" class="w-23px h-25px" />
|
||||
<Icon :size="30" class="ml-10px cursor-pointer" icon="twemoji:grinning-face" />
|
||||
</template>
|
||||
<ElScrollbar height="300px">
|
||||
<ul class="ml-2 flex flex-wrap px-2">
|
||||
@ -27,10 +26,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
defineOptions({ name: 'EmojiSelectPopover' })
|
||||
import biaoqing from '@/views/mall/promotion/kefu/components/asserts/biaoqing.png'
|
||||
import { Emoji, useEmoji } from './emoji'
|
||||
|
||||
|
||||
const { getEmojiList } = useEmoji()
|
||||
const emojiList = computed(() => getEmojiList())
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!-- 图片选择 -->
|
||||
<template>
|
||||
<div>
|
||||
<img :src="tupian" class="w-23px h-23px" @click="selectAndUpload" />
|
||||
<img :src="Picture" class="w-35px h-35px" @click="selectAndUpload" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import tupian from '@/views/mall/promotion/kefu/components/asserts/tupian.png'
|
||||
import Picture from '@/views/mall/promotion/kefu/components/asserts/picture.svg'
|
||||
import * as FileApi from '@/api/infra/file'
|
||||
|
||||
defineOptions({ name: 'PictureSelectUpload' })
|
||||
|