Compare commits
5 Commits
salary
...
9d006fe6a5
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d006fe6a5 | |||
| f4231a13e5 | |||
| 2c2ffcd104 | |||
| 028883975d | |||
| acc59c3a9e |
13
.env.base
13
.env.base
@@ -1,21 +1,20 @@
|
||||
# 本地开发环境
|
||||
VITE_NODE_ENV=development
|
||||
NODE_ENV=development
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||
#VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
# VITE_UPLOAD_URL='http://114.55.169.15:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=/dev-api
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/crm/
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
6
.env.dev
6
.env.dev
@@ -7,16 +7,16 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=/dev-api
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/crm/
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 是否删除debugger
|
||||
VITE_DROP_DEBUGGER=false
|
||||
|
||||
@@ -7,16 +7,16 @@ VITE_DEV=true
|
||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=/dev-api
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/crm/
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 项目本地运行端口号, 与.vscode/launch.json配合
|
||||
VITE_PORT=80
|
||||
|
||||
8
.env.pro
8
.env.pro
@@ -4,13 +4,13 @@ VITE_NODE_ENV=production
|
||||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='/crm-api'
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='/crm-api/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/crm/
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-pro
|
||||
|
||||
@@ -7,10 +7,10 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH='/crm'
|
||||
VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-stage
|
||||
|
||||
@@ -7,10 +7,10 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=true
|
||||
VITE_SOURCEMAP=false
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/crm/
|
||||
VITE_BASE_PATH=/admin-ui-vue3/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-dev
|
||||
|
||||
@@ -7,10 +7,10 @@ VITE_DEV=false
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
VITE_API_BASEPATH=/crm-api
|
||||
VITE_API_BASEPATH=
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=false
|
||||
VITE_SOURCEMAP=true
|
||||
|
||||
# 打包路径
|
||||
VITE_BASE_PATH=/crm/
|
||||
VITE_BASE_PATH=/
|
||||
|
||||
# 输出路径
|
||||
VITE_OUT_DIR=dist-test
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
<script type="text/javascript">
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: 'f653df5a2c5f44ae68faaab6f6a6b8ab' // 你的密钥
|
||||
securityJsCode: 'a2f0d14a4c5c1e387f9271b1045a781d' // 你的密钥
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -1,39 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getAfterSaleList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/list', params })
|
||||
}
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getAfterSalePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/page', params })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createAfterSale = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sign-after-sale/create',
|
||||
data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 审核
|
||||
export const auditAfterSale = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-after-sale/check', data })
|
||||
}
|
||||
|
||||
export const batchAuditAfterSale = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-after-sale/batch/check', data })
|
||||
}
|
||||
|
||||
// 撤销
|
||||
export const cancelApplyAfterSale = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-after-sale/revoke', params: data })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getAfterSaleDetail = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-after-sale/get', params })
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询用户配置
|
||||
export const getClueCache = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/param-user-setting/get-by-user', params })
|
||||
}
|
||||
|
||||
// 保存用户配置
|
||||
export const setClueCache = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/param-user-setting/save', data })
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 创建
|
||||
export const createField = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/param/create', data: { ...data, module: 1 } })
|
||||
}
|
||||
|
||||
// 更新
|
||||
export const updateField = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/param/update', data })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得
|
||||
export const getField = (id) => {
|
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => {
|
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 1 } })
|
||||
}
|
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => {
|
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 1 } })
|
||||
}
|
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => {
|
||||
const data = {
|
||||
signParamId,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data })
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 线索获取规则
|
||||
export const getClueGainRuleList = () => {
|
||||
return request.get({ url: '/admin-api/crm/sch-clue-gain-rule/list' })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteClueGainRule = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 线索获取规则保存
|
||||
export const saveClueGainRule = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/sch-clue-gain-rule/batchUpdate', data })
|
||||
}
|
||||
|
||||
// 线索规则
|
||||
export const getClueDistributeRuleByUser = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/sch-clue-distribution-rule/queryByUserId', params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteClueDistributeRule = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/sch-clue-gain-rule/delete?id=${id}` })
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getDeliveryList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-send/list', params })
|
||||
}
|
||||
|
||||
// 查询分页列表
|
||||
export const getDeliveryPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-send/page', params })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createDelivery = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-send/create', data, isSubmitForm: true })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getDeliveryDetail = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-send/get', params })
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getFollowList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/clue-follow-record/list', params })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createFollow = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/clue-follow-record/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteFollow = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/clue-follow-record/delete?id=' + id })
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getSimpleClueList = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
export const getCluePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/page', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getClue = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createClue = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sch-clue/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateClue = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-clue/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteClue = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/sch-clue/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 释放
|
||||
export const releaseClue = async (data) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-clue/public/save', data })
|
||||
}
|
||||
|
||||
// 通用查询数量
|
||||
export const getClueCount = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get-clue-num' })
|
||||
}
|
||||
|
||||
// 获取操作记录
|
||||
export const getOpearateRecord = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/clue-operate-record/list', params })
|
||||
}
|
||||
|
||||
// 获取公海线索
|
||||
export const getPublicClue = async (data) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-clue/public/save', data })
|
||||
}
|
||||
|
||||
// 获得线索跟进用户信息
|
||||
export const getFollowUserList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-clue/get-follow-user', params })
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 创建
|
||||
export const createField = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/param/create', data: { ...data, module: 2 } })
|
||||
}
|
||||
|
||||
// 更新
|
||||
export const updateField = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/param/update', data })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得
|
||||
export const getField = (id) => {
|
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => {
|
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 2 } })
|
||||
}
|
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => {
|
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 2 } })
|
||||
}
|
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => {
|
||||
const data = {
|
||||
signParamId,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data })
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getPaymentList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params })
|
||||
}
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getPaymentPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createPayment = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sign-pay-record/create',
|
||||
data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 审核
|
||||
export const auditPayment = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/check', data })
|
||||
}
|
||||
|
||||
export const batchAuditPayment = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/batch/check', data })
|
||||
}
|
||||
|
||||
// 撤销
|
||||
export const cancelApplyPayment = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/revoke', params: data })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getPaymentDetail = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/get', params })
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询招生结算列表
|
||||
export const getSchoolSettlePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/sch/page', params })
|
||||
}
|
||||
|
||||
// 查询招生结算详情
|
||||
export const getSchoolSettleDetail = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/sch/get?id=' + id })
|
||||
}
|
||||
|
||||
// 查询进销存结算列表
|
||||
export const getMallSettlePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/erp/page', params })
|
||||
}
|
||||
|
||||
// 查询进销存结算详情
|
||||
export const getMallSettleDetail = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/erp/get?id=' + id })
|
||||
}
|
||||
|
||||
// 批量结算
|
||||
export const batchSaveSettle = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', data })
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询列表
|
||||
export const getSignPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign/page', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getSign = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createSign = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign/create', data: data, isSubmitForm: true })
|
||||
}
|
||||
|
||||
// 取消登记
|
||||
export const cancelDeal = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/sign/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 新增支出
|
||||
export const signAddPay = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/sign/extra-pay/save', data: data })
|
||||
}
|
||||
|
||||
// 查询支出
|
||||
export const getSignExtraPayList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sign/extra-pay/get', params })
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得列表
|
||||
export const getSkillPage = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/skill/page', params })
|
||||
}
|
||||
|
||||
// 创建
|
||||
export const createSkill = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/skill/create', data, isSubmitForm: true })
|
||||
}
|
||||
|
||||
// 更新
|
||||
export const updateSkill = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/skill/update', data })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteSkill = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/skill/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得
|
||||
export const getSkill = (id) => {
|
||||
return request.get({ url: `/admin-api/crm/skill/get?id=${id}` })
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询(精简)列表
|
||||
export const getSimpleSourceList = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/source/list' })
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
export const getSourcePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/source/list', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getSource = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/source/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createSource = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/source/create', data: data, isSubmitForm: true })
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateSource = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/source/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteSource = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/source/delete?id=' + id })
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
// 线索情况
|
||||
export const getUserClueCount = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/home/get-user-count', params })
|
||||
}
|
||||
|
||||
// 成交率
|
||||
export const getClueSignSignRate = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/home/get-sign-rate', params })
|
||||
}
|
||||
|
||||
// 成交率
|
||||
export const getClueSignSignRank = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/home/get-sign-top10', params })
|
||||
}
|
||||
|
||||
// 成交率
|
||||
export const getClueFollowRank = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/home/get-follow-top10', params })
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ConfigVO {
|
||||
id: number | undefined
|
||||
category: string
|
||||
name: string
|
||||
key: string
|
||||
value: string
|
||||
type: number
|
||||
visible: boolean
|
||||
remark: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询参数列表
|
||||
export const getConfigPage = (params: PageParam) => {
|
||||
return request.get({ url: '/admin-api/infra/config/page', params })
|
||||
}
|
||||
|
||||
// 查询参数详情
|
||||
export const getConfig = (id: number) => {
|
||||
return request.get({ url: '/admin-api/infra/config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export const getConfigKey = (configKey: string) => {
|
||||
return request.get({ url: '/admin-api/infra/config/get-value-by-key?key=' + configKey })
|
||||
}
|
||||
|
||||
// 新增参数
|
||||
export const createConfig = (data: ConfigVO) => {
|
||||
return request.post({ url: '/admin-api/infra/config/create', data })
|
||||
}
|
||||
|
||||
// 修改参数
|
||||
export const updateConfig = (data: ConfigVO) => {
|
||||
return request.put({ url: '/admin-api/infra/config/update', data })
|
||||
}
|
||||
|
||||
// 删除参数
|
||||
export const deleteConfig = (id: number) => {
|
||||
return request.delete({ url: '/admin-api/infra/config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export const exportConfig = (params) => {
|
||||
return request.download({ url: '/admin-api/infra/config/export', params })
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface FilePageReqVO extends PageParam {
|
||||
path?: string
|
||||
type?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 文件预签名地址 Response VO
|
||||
export interface FilePresignedUrlRespVO {
|
||||
// 文件配置编号
|
||||
configId: number
|
||||
// 文件上传 URL
|
||||
uploadUrl: string
|
||||
// 文件 URL
|
||||
url: string
|
||||
}
|
||||
|
||||
// 查询文件列表
|
||||
export const getFilePage = (params: FilePageReqVO) => {
|
||||
return request.get({ url: '/infra/file/page', params })
|
||||
}
|
||||
|
||||
// 删除文件
|
||||
export const deleteFile = (id: number) => {
|
||||
return request.delete({ url: '/infra/file/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获取文件预签名地址
|
||||
export const getFilePresignedUrl = (path: string) => {
|
||||
return request.get<FilePresignedUrlRespVO>({
|
||||
url: '/infra/file/presigned-url',
|
||||
params: { path }
|
||||
})
|
||||
}
|
||||
|
||||
// 创建文件
|
||||
export const createFile = (data: any) => {
|
||||
return request.post({ url: '/infra/file/create', data })
|
||||
}
|
||||
|
||||
// 上传文件
|
||||
export const updateFile = (data: any) => {
|
||||
return request.upload({ url: '/admin-api/system/file/upload', data })
|
||||
}
|
||||
@@ -35,8 +35,8 @@ export const loginOut = () => {
|
||||
}
|
||||
|
||||
// 获取用户权限信息
|
||||
export const getInfo = (params) => {
|
||||
return request.get({ url: '/admin-api/system/auth/get-permission-info', params })
|
||||
export const getInfo = (data) => {
|
||||
return request.get({ url: '/admin-api/system/auth/get-permission-info', data })
|
||||
}
|
||||
|
||||
//获取登录验证码
|
||||
|
||||
@@ -32,30 +32,30 @@ export interface BrandVO {
|
||||
|
||||
// 创建商品品牌
|
||||
export const createBrand = (data: BrandVO) => {
|
||||
return request.post({ url: '/admin-api/crm/erp-product-brand/create', data, isSubmitForm: true })
|
||||
return request.post({ url: '/product/brand/create', data })
|
||||
}
|
||||
|
||||
// 更新商品品牌
|
||||
export const updateBrand = (data: BrandVO) => {
|
||||
return request.put({ url: '/admin-api/crm/erp-product-brand/update', data })
|
||||
return request.put({ url: '/product/brand/update', data })
|
||||
}
|
||||
|
||||
// 删除商品品牌
|
||||
export const deleteBrand = (id: number) => {
|
||||
return request.delete({ url: `/admin-api/crm/erp-product-brand/delete?id=${id}` })
|
||||
return request.delete({ url: `/product/brand/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品品牌
|
||||
export const getBrand = (id: number) => {
|
||||
return request.get({ url: `/admin-api/crm/erp-product-brand/get?id=${id}` })
|
||||
return request.get({ url: `/product/brand/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品品牌列表
|
||||
export const getBrandParam = (params: PageParam) => {
|
||||
return request.get({ url: '/admin-api/crm/erp-product-brand/page', params })
|
||||
return request.get({ url: '/product/brand/page', params })
|
||||
}
|
||||
|
||||
// 获得商品品牌精简信息列表
|
||||
export const getSimpleBrandList = () => {
|
||||
return request.get({ url: '/admin-api/crm/erp-product-brand/simple-list' })
|
||||
return request.get({ url: '/product/brand/list-all-simple' })
|
||||
}
|
||||
|
||||
@@ -36,34 +36,25 @@ export interface CategoryVO {
|
||||
|
||||
// 创建商品分类
|
||||
export const createCategory = (data: CategoryVO) => {
|
||||
return request.post({
|
||||
url: '/admin-api/crm/erp-product-category/create',
|
||||
data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
return request.post({ url: '/product/category/create', data })
|
||||
}
|
||||
|
||||
// 更新商品分类
|
||||
export const updateCategory = (data: CategoryVO) => {
|
||||
return request.put({ url: '/admin-api/crm/erp-product-category/update', data })
|
||||
return request.put({ url: '/product/category/update', data })
|
||||
}
|
||||
|
||||
// 删除商品分类
|
||||
export const deleteCategory = (id: number) => {
|
||||
return request.delete({ url: `/admin-api/crm/erp-product-category/delete?id=${id}` })
|
||||
return request.delete({ url: `/product/category/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品分类
|
||||
export const getCategory = (id: number) => {
|
||||
return request.get({ url: `/admin-api/crm/erp-product-category/get?id=${id}` })
|
||||
return request.get({ url: `/product/category/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品分类列表
|
||||
export const getCategoryList = (params: any) => {
|
||||
return request.get({ url: '/admin-api/crm/erp-product-category/list', params })
|
||||
}
|
||||
|
||||
// 获得商品分类列表
|
||||
export const getCategorySimpleList = (params: any) => {
|
||||
return request.get({ url: '/admin-api/crm/erp-product-category/simple-list', params })
|
||||
return request.get({ url: '/product/category/list', params })
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
// 查询列表
|
||||
export const getProductPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-product/page', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getProduct = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-product/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createProduct = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/erp-product/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateProduct = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/erp-product/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteProduct = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/erp-product/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const getSimpleProductList = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-product/simple-list' })
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 创建
|
||||
export const createField = (data) => {
|
||||
return request.post({
|
||||
url: '/admin-api/crm/param/create',
|
||||
data: { ...data, module: 3 },
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 更新
|
||||
export const updateField = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/param/update', data })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => {
|
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得
|
||||
export const getField = (id) => {
|
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => {
|
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 3 } })
|
||||
}
|
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => {
|
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 3 } })
|
||||
}
|
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => {
|
||||
const data = {
|
||||
signParamId,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data })
|
||||
}
|
||||
@@ -42,11 +42,7 @@ export interface PropertyValueDetailVO {
|
||||
|
||||
// 创建属性项
|
||||
export const createProperty = (data: PropertyVO) => {
|
||||
return request.post({
|
||||
url: '/admin-api/crm/erp-product-property/create',
|
||||
data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
return request.post({ url: '/product/property/create', data })
|
||||
}
|
||||
|
||||
// 更新属性项
|
||||
@@ -93,7 +89,7 @@ export const getPropertyValue = (id: number): Promise<PropertyValueVO> => {
|
||||
|
||||
// 创建属性值
|
||||
export const createPropertyValue = (data: PropertyValueVO) => {
|
||||
return request.post({ url: '/admin-api/crm/erp-product-property-value/create', data })
|
||||
return request.post({ url: '/product/property/value/create', data })
|
||||
}
|
||||
|
||||
// 更新属性值
|
||||
|
||||
92
src/api/mall/product/spu.ts
Normal file
92
src/api/mall/product/spu.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface Property {
|
||||
propertyId?: number // 属性编号
|
||||
propertyName?: string // 属性名称
|
||||
valueId?: number // 属性值编号
|
||||
valueName?: string // 属性值名称
|
||||
}
|
||||
|
||||
// TODO puhui999:是不是直接叫 Sku 更简洁一点哈。type 待后面,总感觉有个类型?
|
||||
export interface SkuType {
|
||||
id?: number // 商品 SKU 编号
|
||||
spuId?: number // SPU 编号
|
||||
properties?: Property[] // 属性数组
|
||||
price?: number // 商品价格
|
||||
marketPrice?: number // 市场价
|
||||
costPrice?: number // 成本价
|
||||
barCode?: string // 商品条码
|
||||
picUrl?: string // 图片地址
|
||||
stock?: number // 库存
|
||||
weight?: number // 商品重量,单位:kg 千克
|
||||
volume?: number // 商品体积,单位:m^3 平米
|
||||
subCommissionFirstPrice?: number // 一级分销的佣金
|
||||
subCommissionSecondPrice?: number // 二级分销的佣金
|
||||
salesCount?: number // 商品销量
|
||||
}
|
||||
|
||||
// TODO puhui999:是不是直接叫 Spu 更简洁一点哈。type 待后面,总感觉有个类型?
|
||||
export interface SpuType {
|
||||
id?: number
|
||||
name?: string // 商品名称
|
||||
categoryId?: number | null // 商品分类
|
||||
keyword?: string // 关键字
|
||||
unit?: number | null // 单位
|
||||
picUrl?: string // 商品封面图
|
||||
sliderPicUrls?: string[] // 商品轮播图
|
||||
introduction?: string // 商品简介
|
||||
deliveryTemplateId?: number | null // 运费模版
|
||||
brandId?: number | null // 商品品牌编号
|
||||
specType?: boolean // 商品规格
|
||||
subCommissionType?: boolean // 分销类型
|
||||
skus: SkuType[] // sku数组
|
||||
description?: string // 商品详情
|
||||
sort?: string // 商品排序
|
||||
giveIntegral?: number // 赠送积分
|
||||
virtualSalesCount?: number // 虚拟销量
|
||||
recommendHot?: boolean // 是否热卖
|
||||
recommendBenefit?: boolean // 是否优惠
|
||||
recommendBest?: boolean // 是否精品
|
||||
recommendNew?: boolean // 是否新品
|
||||
recommendGood?: boolean // 是否优品
|
||||
}
|
||||
|
||||
// 获得 Spu 列表
|
||||
export const getSpuPage = (params: PageParam) => {
|
||||
return request.get({ url: '/product/spu/page', params })
|
||||
}
|
||||
|
||||
// 获得 Spu 列表 tabsCount
|
||||
export const getTabsCount = () => {
|
||||
return request.get({ url: '/product/spu/get-count' })
|
||||
}
|
||||
|
||||
// 创建商品 Spu
|
||||
export const createSpu = (data: SpuType) => {
|
||||
return request.post({ url: '/product/spu/create', data })
|
||||
}
|
||||
|
||||
// 更新商品 Spu
|
||||
export const updateSpu = (data: SpuType) => {
|
||||
return request.put({ url: '/product/spu/update', data })
|
||||
}
|
||||
|
||||
// 更新商品 Spu status
|
||||
export const updateStatus = (data: { id: number; status: number }) => {
|
||||
return request.put({ url: '/product/spu/update-status', data })
|
||||
}
|
||||
|
||||
// 获得商品 Spu
|
||||
export const getSpu = (id: number) => {
|
||||
return request.get({ url: `/product/spu/get-detail?id=${id}` })
|
||||
}
|
||||
|
||||
// 删除商品 Spu
|
||||
export const deleteSpu = (id: number) => {
|
||||
return request.delete({ url: `/product/spu/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 导出商品 Spu Excel
|
||||
export const exportSpu = async (params) => {
|
||||
return await request.download({ url: '/product/spu/export', params })
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
// 查询列表
|
||||
export const getPurchasePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-purchase/page', params })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createPurchase = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/erp-purchase/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updatePurchase = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/erp-purchase/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deletePurchase = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/erp-purchase/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 审核
|
||||
export const auditPurchase = async (data) => {
|
||||
return await request.post({ url: '/admin-api/crm/erp-purchase/audit', data })
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
// 查询列表
|
||||
export const getWarehousePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-warehouse/page', params })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createWarehouse = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/erp-warehouse/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateWarehouse = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/erp-warehouse/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteWarehouse = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/erp-warehouse/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获取仓库
|
||||
export const getWarehouse = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-warehouse/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获取仓库列表
|
||||
export const getSimpleWarehouseList = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-warehouse/simple-list' })
|
||||
}
|
||||
|
||||
// 获取库存
|
||||
export const getInventoryList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-inventory/page', params })
|
||||
}
|
||||
|
||||
// 获取库存变动记录
|
||||
export const getInventoryRecord = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-inventory-record/page', params })
|
||||
}
|
||||
|
||||
// 获取剩余库存
|
||||
export const getRemainInventoryList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/erp-inventory-detail/list', params })
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询列表-分页
|
||||
export const getClassTypePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/page', params })
|
||||
}
|
||||
|
||||
export const getClassTypeList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/list', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getClassType = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createClassType = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sch-class-type/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateClassType = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-class-type/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteClassType = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/sch-class-type/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 修改状态
|
||||
export const updateClassTypeStatus = async (data) => {
|
||||
return request.put({ url: '/admin-api/crm/sch-class-type/status/update', data })
|
||||
}
|
||||
|
||||
// 批量修改状态
|
||||
export const batchUpdateClassTypeStatus = async (data) => {
|
||||
return request.put({ url: '/admin-api/crm/sch-class-type/status/batch-update', data })
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
export const batchDeleteClassType = async (ids) => {
|
||||
return await request.delete({ url: '/admin-api/crm/sch-class-type/batch-delete?ids=' + ids })
|
||||
}
|
||||
|
||||
// 获取提成结算参数
|
||||
export const getCommissionParams = async () => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-class-type/get-percentage-param' })
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询列表-分页
|
||||
export const getPlacePage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-place/page', params })
|
||||
}
|
||||
|
||||
// 查询列表-不分页
|
||||
export const getPlaceList = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-place/list', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getPlace = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-place/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createPlace = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sch-place/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updatePlace = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-place/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deletePlace = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/sch-place/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const updatePlaceStatus = async (placeId, status) => {
|
||||
const data = {
|
||||
placeId,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/admin-api/crm/sch-place/status/update', data: data })
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
// 查询列表
|
||||
export const getSchoolPage = async (params) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-school/page', params })
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
export const getSchool = async (id) => {
|
||||
return await request.get({ url: '/admin-api/crm/sch-school/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增
|
||||
export const createSchool = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/crm/sch-school/create',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export const updateSchool = async (params) => {
|
||||
return await request.put({ url: '/admin-api/crm/sch-school/update', data: params })
|
||||
}
|
||||
|
||||
// 删除
|
||||
export const deleteSchool = async (id) => {
|
||||
return await request.delete({ url: '/admin-api/crm/sch-school/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const updateSchoolStatus = async (schoolId, status) => {
|
||||
const data = {
|
||||
schoolId,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/admin-api/crm/sch-school/status/update', data: data })
|
||||
}
|
||||
@@ -15,35 +15,35 @@ export type DictDataVO = {
|
||||
|
||||
// 查询字典数据(精简)列表
|
||||
export const listSimpleDictData = () => {
|
||||
return request.get({ url: '/admin-api/crm/dict-data/simple-list' })
|
||||
return request.get({ url: '/admin-api/system/dict-data/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典数据列表
|
||||
export const getDictDataPage = (params: PageParam) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-data/page', params })
|
||||
return request.get({ url: '/admin-api/system/dict-data/page', params })
|
||||
}
|
||||
|
||||
// 查询字典数据详情
|
||||
export const getDictData = (id: number) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-data/get?id=' + id })
|
||||
return request.get({ url: '/admin-api/system/dict-data/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export const createDictData = (data: DictDataVO) => {
|
||||
return request.post({ url: '/admin-api/crm/dict-data/create', data })
|
||||
return request.post({ url: '/admin-api/system/dict-data/create', data })
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export const updateDictData = (data: DictDataVO) => {
|
||||
return request.put({ url: '/admin-api/crm/dict-data/update', data })
|
||||
return request.put({ url: '/admin-api/system/dict-data/update', data })
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export const deleteDictData = (id: number) => {
|
||||
return request.delete({ url: '/admin-api/crm/dict-data/delete?id=' + id })
|
||||
return request.delete({ url: '/admin-api/system/dict-data/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出字典类型数据
|
||||
export const exportDictData = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-data/export', params })
|
||||
return request.get({ url: '/admin-api/system/dict-data/export', params })
|
||||
}
|
||||
|
||||
@@ -11,34 +11,34 @@ export type DictTypeVO = {
|
||||
|
||||
// 查询字典(精简)列表
|
||||
export const getSimpleDictTypeList = () => {
|
||||
return request.get({ url: '/admin-api/crm/dict-type/list-all-simple' })
|
||||
return request.get({ url: '/admin-api/system/dict-type/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典列表
|
||||
export const getDictTypePage = (params: PageParam) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-type/page', params })
|
||||
return request.get({ url: '/admin-api/system/dict-type/page', params })
|
||||
}
|
||||
|
||||
// 查询字典详情
|
||||
export const getDictType = (id: number) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-type/get?id=' + id })
|
||||
return request.get({ url: '/admin-api/system/dict-type/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增字典
|
||||
export const createDictType = (data: DictTypeVO) => {
|
||||
return request.post({ url: '/admin-api/crm/dict-type/create', data })
|
||||
return request.post({ url: '/admin-api/system/dict-type/create', data })
|
||||
}
|
||||
|
||||
// 修改字典
|
||||
export const updateDictType = (data: DictTypeVO) => {
|
||||
return request.put({ url: '/admin-api/crm/dict-type/update', data })
|
||||
return request.put({ url: '/admin-api/system/dict-type/update', data })
|
||||
}
|
||||
|
||||
// 删除字典
|
||||
export const deleteDictType = (id: number) => {
|
||||
return request.delete({ url: '/admin-api/crm/dict-type/delete?id=' + id })
|
||||
return request.delete({ url: '/admin-api/system/dict-type/delete?id=' + id })
|
||||
}
|
||||
// 导出字典类型
|
||||
export const exportDictType = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/dict-type/export', params })
|
||||
return request.get({ url: '/admin-api/system/dict-type/export', params })
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询知识库列表
|
||||
export const getLibraryPage = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/knowledge-lib/page', params })
|
||||
}
|
||||
|
||||
// 查询知识库详情
|
||||
export const getLibrary = (id) => {
|
||||
return request.get({ url: '/admin-api/crm/knowledge-lib/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增知识库
|
||||
export const createLibrary = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/knowledge-lib/create', data })
|
||||
}
|
||||
|
||||
// 修改知识库
|
||||
export const updateLibrary = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/knowledge-lib/update', data })
|
||||
}
|
||||
|
||||
// 删除知识库
|
||||
export const deleteLibrary = (id) => {
|
||||
return request.delete({ url: '/admin-api/crm/knowledge-lib/delete?id=' + id })
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询资源列表
|
||||
export const getResourcePage = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/knowledge-lib-info/page', params })
|
||||
}
|
||||
|
||||
// 查询资源详情
|
||||
export const getResource = (id) => {
|
||||
return request.get({ url: '/admin-api/crm/knowledge-lib-info/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增资源
|
||||
export const createResource = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/knowledge-lib-info/create', data })
|
||||
}
|
||||
|
||||
// 修改资源
|
||||
export const updateResource = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/knowledge-lib-info/update', data })
|
||||
}
|
||||
|
||||
// 删除资源
|
||||
export const deleteResource = (id) => {
|
||||
return request.delete({ url: '/admin-api/crm/knowledge-lib-info/delete?id=' + id })
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 通过key,查询内容
|
||||
export const getConfigByConfigKey = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/config/getConfigByConfigKey', params })
|
||||
}
|
||||
|
||||
// 保存配置项
|
||||
export const updateConfig = (data) => {
|
||||
return request.put({ url: '/admin-api/crm/config/batchUpdateConfigValue', data })
|
||||
}
|
||||
|
||||
// 根据模块获取配置列表
|
||||
export const getConfigList = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/config/query', params })
|
||||
}
|
||||
BIN
src/assets/imgs/logo.png
Normal file
BIN
src/assets/imgs/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -27,8 +27,7 @@ const props = defineProps({
|
||||
data: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => ({})
|
||||
},
|
||||
defaultShow: propTypes.bool.def(true)
|
||||
}
|
||||
})
|
||||
|
||||
const { getPrefixCls } = useDesign()
|
||||
@@ -58,7 +57,7 @@ const getBindItemValue = (item: DescriptionsSchema) => {
|
||||
}
|
||||
|
||||
// 折叠
|
||||
const show = ref(props.defaultShow)
|
||||
const show = ref(true)
|
||||
|
||||
const toggleClick = () => {
|
||||
if (props.collapse) {
|
||||
@@ -78,7 +77,7 @@ const toggleClick = () => {
|
||||
v-if="title"
|
||||
:class="[
|
||||
`${prefixCls}-header`,
|
||||
'h-40px flex justify-between items-center border-bottom-1 border-solid border-[var(--tags-view-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]'
|
||||
'h-50px flex justify-between items-center border-bottom-1 border-solid border-[var(--tags-view-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]'
|
||||
]"
|
||||
@click="toggleClick"
|
||||
>
|
||||
@@ -132,7 +131,7 @@ const toggleClick = () => {
|
||||
<DictTag :type="item.dictType" :value="data[item.field] + ''" />
|
||||
</slot>
|
||||
<slot v-else-if="item.isEditor">
|
||||
<div v-if="data[item.field]" v-dompurify-html="data[item.field]"></div>
|
||||
<div v-dompurify-html="data[item.field]"></div>
|
||||
</slot>
|
||||
<slot v-else :name="item.field" :row="data">{{ data[item.field] }}</slot>
|
||||
</template>
|
||||
|
||||
@@ -55,8 +55,6 @@ const dialogStyle = computed(() => {
|
||||
height: unref(dialogHeight)
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -68,7 +66,6 @@ const emit = defineEmits(['close'])
|
||||
draggable
|
||||
lock-scroll
|
||||
v-bind="getBindValue"
|
||||
@close="emit('close')"
|
||||
>
|
||||
<template #header>
|
||||
<div class="flex justify-between">
|
||||
|
||||
@@ -66,7 +66,6 @@ watch(
|
||||
(options) => {
|
||||
if (echartRef) {
|
||||
echartRef?.setOption(options)
|
||||
resizeHandler()
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import { propTypes } from '@/utils/propTypes'
|
||||
import { isNumber } from '@/utils/is'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useLocaleStore } from '@/store/modules/locale'
|
||||
import { getAccessToken, getTenantId, getAppId } from '@/utils/auth'
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
|
||||
type InsertFnType = (url: string, alt: string, href: string) => void
|
||||
|
||||
@@ -103,8 +103,7 @@ const editorConfig = computed((): IEditorConfig => {
|
||||
headers: {
|
||||
Accept: '*',
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId(),
|
||||
'instance-id': getAppId()
|
||||
'tenant-id': getTenantId()
|
||||
},
|
||||
|
||||
// 跨域是否传递 cookie ,默认为 false
|
||||
@@ -141,63 +140,6 @@ const editorConfig = computed((): IEditorConfig => {
|
||||
customInsert(res: any, insertFn: InsertFnType) {
|
||||
insertFn(res.data, 'image', res.data)
|
||||
}
|
||||
},
|
||||
['uploadVideo']: {
|
||||
server: import.meta.env.VITE_UPLOAD_URL,
|
||||
// 单个文件的最大体积限制,默认为 2M
|
||||
maxFileSize: 100 * 1024 * 1024,
|
||||
// 最多可上传几个文件,默认为 100
|
||||
maxNumberOfFiles: 10,
|
||||
// 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 []
|
||||
allowedFileTypes: ['video/*'],
|
||||
|
||||
// 自定义上传参数,例如传递验证的 token 等。参数会被添加到 formData 中,一起上传到服务端。
|
||||
meta: { updateSupport: 0 },
|
||||
// 将 meta 拼接到 url 参数中,默认 false
|
||||
metaWithUrl: true,
|
||||
|
||||
// 自定义增加 http header
|
||||
headers: {
|
||||
Accept: '*',
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId(),
|
||||
'instance-id': getAppId()
|
||||
},
|
||||
|
||||
// 跨域是否传递 cookie ,默认为 false
|
||||
withCredentials: true,
|
||||
|
||||
// 超时时间,默认为 10 秒
|
||||
timeout: 10 * 1000, // 5 秒
|
||||
|
||||
// form-data fieldName,后端接口参数名称,默认值wangeditor-uploaded-image
|
||||
fieldName: 'file',
|
||||
|
||||
// 上传之前触发
|
||||
onBeforeUpload(file: File) {
|
||||
console.log(file)
|
||||
return file
|
||||
},
|
||||
// 上传进度的回调函数
|
||||
onProgress(progress: number) {
|
||||
// progress 是 0-100 的数字
|
||||
console.log('progress', progress)
|
||||
},
|
||||
onSuccess(file: File, res: any) {
|
||||
console.log('onSuccess', file, res)
|
||||
},
|
||||
onFailed(file: File, res: any) {
|
||||
alert(res.message)
|
||||
console.log('onFailed', file, res)
|
||||
},
|
||||
onError(file: File, err: any, res: any) {
|
||||
alert(err.message)
|
||||
console.error('onError', file, err, res)
|
||||
},
|
||||
// 自定义插入图片
|
||||
customInsert(res: any, insertFn: InsertFnType) {
|
||||
insertFn(res.data, 'video', res.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
uploadImgShowBase64: true
|
||||
|
||||
@@ -51,8 +51,7 @@ export default defineComponent({
|
||||
// 表单label宽度
|
||||
labelWidth: propTypes.oneOfType([String, Number]).def('auto'),
|
||||
// 是否 loading 数据中 add by 芋艿
|
||||
vLoading: propTypes.bool.def(false),
|
||||
inlineBlock: propTypes.bool.def(false)
|
||||
vLoading: propTypes.bool.def(false)
|
||||
},
|
||||
emits: ['register'],
|
||||
setup(props, { slots, expose, emit }) {
|
||||
@@ -78,10 +77,7 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
// 对表单赋值
|
||||
const setValues = (data: Recordable = {}, isReset: Boolean = false) => {
|
||||
if (isReset) {
|
||||
formModel.value = initModel(unref(getProps).schema, unref(formModel))
|
||||
}
|
||||
const setValues = (data: Recordable = {}) => {
|
||||
formModel.value = Object.assign(unref(formModel), data)
|
||||
}
|
||||
|
||||
@@ -185,7 +181,11 @@ export default defineComponent({
|
||||
const slotsMap: Recordable = {
|
||||
...setItemComponentSlots(slots, item?.componentProps?.slots, item.field)
|
||||
}
|
||||
if (item?.component !== 'SelectV2' && item?.component !== 'Cascader' && item?.options) {
|
||||
if (
|
||||
item?.component !== 'SelectV2' &&
|
||||
item?.component !== 'Cascader' &&
|
||||
item?.componentProps?.options
|
||||
) {
|
||||
slotsMap.default = () => renderOptions(item)
|
||||
}
|
||||
|
||||
@@ -236,9 +236,6 @@ export default defineComponent({
|
||||
vModel={formModel.value[item.field]}
|
||||
{...(autoSetPlaceholder && setTextPlaceholder(item))}
|
||||
{...setComponentProps(item)}
|
||||
filterable
|
||||
format={item.component == 'DatePicker' ? 'YYYY-MM-DD' : null}
|
||||
value-format={item.component == 'DatePicker' ? 'YYYY-MM-DD' : null}
|
||||
style={baseSty + item.componentProps?.style}
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
{...(notRenderOptions.includes(item?.component as string) && item?.componentProps?.options
|
||||
@@ -294,7 +291,6 @@ export default defineComponent({
|
||||
model={props.isCustom ? props.model : formModel}
|
||||
class={prefixCls}
|
||||
v-loading={props.vLoading}
|
||||
style={props.inlineBlock ? 'display: inline' : ''}
|
||||
>
|
||||
{{
|
||||
// 如果需要自定义,就什么都不渲染,而是提供默认插槽
|
||||
|
||||
@@ -5,12 +5,12 @@ import { defineComponent } from 'vue'
|
||||
export const useRenderCheckbox = () => {
|
||||
const renderCheckboxOptions = (item: FormSchema) => {
|
||||
// 如果有别名,就取别名
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField || 'id'
|
||||
const valueAlias = item?.componentProps?.optionsAlias?.valueField || 'name'
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField
|
||||
const valueAlias = item?.componentProps?.optionsAlias?.valueField
|
||||
const Com = (item.component === 'Checkbox' ? ElCheckbox : ElCheckboxButton) as ReturnType<
|
||||
typeof defineComponent
|
||||
>
|
||||
return item?.options?.map((option) => {
|
||||
return item?.componentProps?.options?.map((option) => {
|
||||
const { ...other } = option
|
||||
return (
|
||||
<Com {...other} label={option[valueAlias || 'value']}>
|
||||
|
||||
@@ -5,12 +5,12 @@ import { defineComponent } from 'vue'
|
||||
export const useRenderRadio = () => {
|
||||
const renderRadioOptions = (item: FormSchema) => {
|
||||
// 如果有别名,就取别名
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField || 'id'
|
||||
const valueAlias = item?.componentProps?.optionsAlias?.valueField || 'name'
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField
|
||||
const valueAlias = item?.componentProps?.optionsAlias?.valueField
|
||||
const Com = (item.component === 'Radio' ? ElRadio : ElRadioButton) as ReturnType<
|
||||
typeof defineComponent
|
||||
>
|
||||
return item?.options?.map((option) => {
|
||||
return item?.componentProps?.options?.map((option) => {
|
||||
const { ...other } = option
|
||||
return (
|
||||
<Com {...other} label={option[valueAlias || 'value']}>
|
||||
|
||||
@@ -9,12 +9,12 @@ export const useRenderSelect = (slots: Slots) => {
|
||||
const renderSelectOptions = (item: FormSchema) => {
|
||||
// 如果有别名,就取别名
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField
|
||||
return item?.options?.map((option) => {
|
||||
if (option?.length) {
|
||||
return item?.componentProps?.options?.map((option) => {
|
||||
if (option?.options?.length) {
|
||||
return (
|
||||
<ElOptionGroup label={option[labelAlias || 'label']}>
|
||||
{() => {
|
||||
return option?.map((v) => {
|
||||
return option?.options?.map((v) => {
|
||||
return renderSelectOptionItem(item, v)
|
||||
})
|
||||
}}
|
||||
@@ -29,8 +29,8 @@ export const useRenderSelect = (slots: Slots) => {
|
||||
// 渲染 select option item
|
||||
const renderSelectOptionItem = (item: FormSchema, option: ComponentOptions) => {
|
||||
// 如果有别名,就取别名
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField || 'id'
|
||||
const valueAlias = item?.componentProps?.optionsAlias?.valueField || 'name'
|
||||
const labelAlias = item?.componentProps?.optionsAlias?.labelField
|
||||
const valueAlias = item?.componentProps?.optionsAlias?.valueField
|
||||
|
||||
const { label, value, ...other } = option
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div v-loading="loading" style="height: 100%">
|
||||
<div v-loading="loading" :style="'height:' + height">
|
||||
<iframe
|
||||
ref="frameRef"
|
||||
:src="props.src"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
@end="onDragEnd"
|
||||
>
|
||||
<template #item="{ element: item }">
|
||||
<el-checkbox :key="item.id" :label="item.id">
|
||||
<el-checkbox :key="item.field" :label="item.field">
|
||||
{{ item.label }}
|
||||
</el-checkbox>
|
||||
</template>
|
||||
@@ -39,7 +39,7 @@
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
v-model:limit="pageSize"
|
||||
v-model:page="pageNo"
|
||||
v-model:page="currentPage"
|
||||
:total="tableObject.total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
@@ -48,8 +48,9 @@
|
||||
|
||||
<script setup>
|
||||
import draggable from 'vuedraggable'
|
||||
import * as ClueCacheApi from '@/api/clue/clueCache'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useRoute } from 'vue-router'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const props = defineProps({
|
||||
tableObject: { type: Object, default: () => ({ tableList: [] }) },
|
||||
@@ -58,21 +59,22 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['update:tableObject', 'getList', 'getCheckedColumns'])
|
||||
const route = useRoute()
|
||||
const { id: userId } = useUserStore().user //取用户ID
|
||||
|
||||
const pageNo = ref(props.tableObject?.pageNo || 1)
|
||||
const currentPage = ref(props.tableObject?.currentPage || 1)
|
||||
|
||||
const pageSize = ref(props.tableObject?.pageSize || 20)
|
||||
|
||||
const ColumnSetting = ref()
|
||||
const TableColumnPop = ref()
|
||||
// 展示在设置里的所有表格列,由于会排序,所以使用新属性,不直接修改原值
|
||||
const allColumns = ref([...props.tableColumns])
|
||||
const allColumns = ref({})
|
||||
// 已勾选的选项
|
||||
const checkedColumns = ref([])
|
||||
|
||||
// 调用获取数据的接口,分页时需要使用
|
||||
function getList({ page, limit }) {
|
||||
emit('update:tableObject', { ...props.tableObject, pageNo: page, pageSize: limit })
|
||||
emit('update:tableObject', { ...props.tableObject, currentPage: page, pageSize: limit })
|
||||
nextTick(() => {
|
||||
emit('getList')
|
||||
})
|
||||
@@ -83,50 +85,67 @@ const clickSetting = () => {
|
||||
unref(TableColumnPop).TableColumnPop?.delayHide?.()
|
||||
}
|
||||
|
||||
const routeMap = {
|
||||
CluePool: 1,
|
||||
ClueOrder: 2
|
||||
// 获取所有的表格列,注意如果本地有缓存使用缓存数据,因为用户可能已对表格列排序,并且不依赖网络请求,可更快渲染表头
|
||||
function getAllColumns() {
|
||||
// 1. 先获取缓存表头
|
||||
const localData = getColumn('TableColumnAll')[route.name] || []
|
||||
// 2. 如果有缓存的表头,直接使用,并将新增的标题加入,如果没有缓存,那就得用获取到的表头
|
||||
if (localData && localData) {
|
||||
const newColumns = props.tableColumns.filter(
|
||||
(item) => !localData.some((it) => it.field == item.field)
|
||||
)
|
||||
allColumns.value = [...localData, ...newColumns]
|
||||
} else {
|
||||
allColumns.value = [...props.tableColumns]
|
||||
}
|
||||
}
|
||||
// 获取缓存的表头
|
||||
function getColumn(name = 'shitTable') {
|
||||
return cache.local.get(`${name}-${userId}`) || {}
|
||||
}
|
||||
// 设置表头缓存
|
||||
function setColumn(val, name = 'shitTable') {
|
||||
cache.local.set(`${name}-${userId}`, val)
|
||||
}
|
||||
|
||||
// 获取用户已勾选的表头
|
||||
async function getUserCheckedColumns() {
|
||||
checkedColumns.value = await ClueCacheApi.getClueCache({
|
||||
settingType: 2,
|
||||
model: routeMap[route.name]
|
||||
})
|
||||
// 回显到表格中
|
||||
function getUserCheckedColumns() {
|
||||
// 1. 先获取缓存
|
||||
const localData = getColumn('shitTable')[route.name]
|
||||
// 2. 如果有缓存,使用缓存表头,否则使用默认的所有表头
|
||||
if (localData && localData.length) {
|
||||
checkedColumns.value = localData
|
||||
} else {
|
||||
checkedColumns.value = allColumns.value.map((it) => it.field)
|
||||
}
|
||||
// 3. 回显到表格中
|
||||
emitColumns()
|
||||
}
|
||||
|
||||
// 表格列排序
|
||||
function onDragEnd() {
|
||||
ClueCacheApi.setClueCache({
|
||||
settingType: 2,
|
||||
model: routeMap[route.name],
|
||||
clueParamId: checkedColumns.value
|
||||
})
|
||||
|
||||
// 表格回显
|
||||
const obj = getColumn('TableColumnAll')
|
||||
obj[route.name] = allColumns.value
|
||||
// 1. 设置缓存
|
||||
setColumn(obj, 'TableColumnAll')
|
||||
// 2. 表格回显
|
||||
emitColumns()
|
||||
}
|
||||
|
||||
// 勾选确认
|
||||
function confirm() {
|
||||
ClueCacheApi.setClueCache({
|
||||
settingType: 2,
|
||||
model: routeMap[route.name],
|
||||
clueParamId: checkedColumns.value
|
||||
})
|
||||
// usedSchema.value = allColumns.value.filter((it) => checkedColumns.value.includes(it.id))
|
||||
const obj = getColumn()
|
||||
obj[route.name] = checkedColumns.value
|
||||
setColumn(obj, 'shitTable')
|
||||
emitColumns()
|
||||
}
|
||||
|
||||
// 将表头数据返回至父组件
|
||||
function emitColumns() {
|
||||
const arr = allColumns.value.filter((item) => checkedColumns.value.includes(item.id))
|
||||
const arr = allColumns.value.filter((item) => checkedColumns.value.includes(item.field))
|
||||
emit('getCheckedColumns', arr)
|
||||
}
|
||||
|
||||
getAllColumns()
|
||||
getUserCheckedColumns()
|
||||
|
||||
defineExpose({ getUserCheckedColumns })
|
||||
|
||||
@@ -7,10 +7,12 @@ import { findIndex } from '@/utils'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { FormSchema } from '@/types/form'
|
||||
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useRoute } from 'vue-router'
|
||||
import * as ClueCacheApi from '@/api/clue/clueCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const route = useRoute()
|
||||
const { id: userId } = useUserStore().user //取用户ID
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -31,21 +33,20 @@ const props = defineProps({
|
||||
.validate((v: string) => ['left', 'center', 'right'].includes(v))
|
||||
.def('center'),
|
||||
showLabel: propTypes.bool.def(false),
|
||||
showSearch: propTypes.bool.def(false),
|
||||
showReset: propTypes.bool.def(false),
|
||||
showSearch: propTypes.bool.def(true),
|
||||
showReset: propTypes.bool.def(true),
|
||||
// 是否显示伸缩
|
||||
expand: propTypes.bool.def(false),
|
||||
// 伸缩的界限字段
|
||||
expandField: propTypes.string.def(''),
|
||||
inline: propTypes.bool.def(true),
|
||||
inlineBlock: propTypes.bool.def(false),
|
||||
model: {
|
||||
type: Object as PropType<Recordable>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
// const emit = defineEmits(['search', 'reset'])
|
||||
const emit = defineEmits(['search', 'reset'])
|
||||
|
||||
const visible = ref(true)
|
||||
|
||||
@@ -59,11 +60,6 @@ const usedSchema = ref([])
|
||||
|
||||
const newSchema = computed(() => {
|
||||
let schema: FormSchema[] = cloneDeep(usedSchema.value)
|
||||
schema.forEach((item: FormSchema) => {
|
||||
if (item.component == 'TreeSelect') {
|
||||
item.componentProps['check-strictly'] = true
|
||||
}
|
||||
})
|
||||
if (props.expand && props.expandField && !unref(visible)) {
|
||||
const index = findIndex(schema, (v: FormSchema) => v.field === props.expandField)
|
||||
if (index > -1) {
|
||||
@@ -84,26 +80,37 @@ const newSchema = computed(() => {
|
||||
return schema
|
||||
})
|
||||
|
||||
const routeMap = {
|
||||
CluePool: 1,
|
||||
ClueOrder: 2
|
||||
}
|
||||
async function initSearch() {
|
||||
function initSearch() {
|
||||
reset()
|
||||
checkedSchema.value = await ClueCacheApi.getClueCache({
|
||||
settingType: 1,
|
||||
model: routeMap[route.name]
|
||||
})
|
||||
usedSchema.value = props.schema.filter((it) => checkedSchema.value.includes(it.id))
|
||||
// 1. 先获取缓存
|
||||
const localData = getColumn('Schema')[route.name]
|
||||
// 2. 如果有缓存,使用缓存表头,否则使用默认的所有表头
|
||||
if (localData && localData.length) {
|
||||
usedSchema.value = localData
|
||||
} else {
|
||||
const obj = getColumn('Schema')
|
||||
obj[route.name] = [props.schema[0]]
|
||||
setSchema(obj)
|
||||
usedSchema.value = [props.schema[0]]
|
||||
}
|
||||
checkedSchema.value = usedSchema.value.map((it) => it.field)
|
||||
}
|
||||
|
||||
function changeSearch() {
|
||||
ClueCacheApi.setClueCache({
|
||||
settingType: 1,
|
||||
model: routeMap[route.name],
|
||||
clueParamId: checkedSchema.value
|
||||
})
|
||||
usedSchema.value = props.schema.filter((it) => checkedSchema.value.includes(it.id))
|
||||
const obj = getColumn('Schema')
|
||||
obj[route.name] = props.schema.filter((item) => checkedSchema.value.includes(item.field))
|
||||
setSchema(obj)
|
||||
initSearch()
|
||||
}
|
||||
|
||||
// 获取缓存的查询条件
|
||||
function getColumn(name = 'Schema') {
|
||||
return cache.local.get(`${name}-${userId}`) || {}
|
||||
}
|
||||
|
||||
// 设置查询条件缓存
|
||||
function setSchema(val: Array<Object>, name = 'Schema') {
|
||||
cache.local.set(`${name}-${userId}`, val)
|
||||
}
|
||||
|
||||
function setSearch() {
|
||||
@@ -114,34 +121,23 @@ const { register, elFormRef, methods } = useForm({
|
||||
model: props.model || {}
|
||||
})
|
||||
|
||||
// const search = async () => {
|
||||
// await unref(elFormRef)?.validate(async (isValid) => {
|
||||
// if (isValid) {
|
||||
// const { getFormData } = methods
|
||||
// const model = await getFormData()
|
||||
// emit('search', model)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
const search = async () => {
|
||||
await unref(elFormRef)?.validate(async (isValid) => {
|
||||
if (isValid) {
|
||||
const { getFormData } = methods
|
||||
const model = await getFormData()
|
||||
emit('search', model)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const reset = async () => {
|
||||
unref(elFormRef)?.resetFields()
|
||||
// const { getFormData } = methods
|
||||
// const model = await getFormData()
|
||||
// emit('reset', model)
|
||||
}
|
||||
|
||||
async function getFormModel() {
|
||||
const { getFormData } = methods
|
||||
const model = await getFormData()
|
||||
return model
|
||||
emit('reset', model)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getFormModel,
|
||||
reset
|
||||
})
|
||||
|
||||
const bottonButtonStyle = computed(() => {
|
||||
return {
|
||||
textAlign: props.buttomPosition as unknown as 'left' | 'center' | 'right'
|
||||
@@ -160,7 +156,6 @@ initSearch()
|
||||
<!-- update by 芋艿:class="-mb-15px" 用于降低和 ContentWrap 组件的底部距离,避免空隙过大 -->
|
||||
<Form
|
||||
:inline="inline"
|
||||
:inlineBlock="inlineBlock"
|
||||
:is-col="isCol"
|
||||
:is-custom="false"
|
||||
isSearch
|
||||
@@ -173,7 +168,10 @@ initSearch()
|
||||
>
|
||||
<template #action>
|
||||
<div v-if="layout === 'inline'">
|
||||
<ElButton ref="SchemaSetting" @click="setSearch"> 查询设置 </ElButton>
|
||||
<ElButton ref="SchemaSetting" @click="setSearch">
|
||||
<!-- <Icon class="mr-5px" icon="ep:setting" /> -->
|
||||
查询设置
|
||||
</ElButton>
|
||||
<el-popover
|
||||
ref="SettingPop"
|
||||
:virtual-ref="SchemaSetting"
|
||||
@@ -183,7 +181,7 @@ initSearch()
|
||||
virtual-triggering
|
||||
>
|
||||
<el-checkbox-group v-model="checkedSchema" @change="changeSearch">
|
||||
<el-checkbox v-for="item in schema" :key="item.id" :label="item.id">
|
||||
<el-checkbox v-for="item in schema" :key="item.field" :label="item.field">
|
||||
{{ item.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
@@ -201,10 +199,10 @@ initSearch()
|
||||
</ElButton>
|
||||
<!-- add by 芋艿:补充在搜索后的按钮 -->
|
||||
<slot name="actionMore"></slot>
|
||||
<!-- <ElButton v-if="expand" text @click="setVisible">
|
||||
<ElButton v-if="expand" text @click="setVisible">
|
||||
{{ t(visible ? 'common.shrink' : 'common.expand') }}
|
||||
<Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" />
|
||||
</ElButton> -->
|
||||
<!-- <Icon :icon="visible ? 'ep:arrow-up' : 'ep:arrow-down'" /> -->
|
||||
</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="name in Object.keys($slots)" :key="name" #[name]>
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
>
|
||||
<el-button type="primary"><Icon icon="ep:upload-filled" />选取文件</el-button>
|
||||
<template v-if="isShowTip" #tip>
|
||||
<div style="font-size: 12px">
|
||||
<div style="font-size: 8px">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</div>
|
||||
<div style="font-size: 12px">
|
||||
<div style="font-size: 8px">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件
|
||||
</div>
|
||||
</template>
|
||||
@@ -34,18 +34,23 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts" name="UploadFile">
|
||||
import { PropType } from 'vue'
|
||||
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getAccessToken, getTenantId, getAppId } from '@/utils/auth'
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: propTypes.oneOfType<string | string[]>([String, Array<String>]).isRequired,
|
||||
modelValue: {
|
||||
type: Array as PropType<UploadUserFile[]>,
|
||||
required: true
|
||||
},
|
||||
title: propTypes.string.def('文件上传'),
|
||||
updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL),
|
||||
// fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: propTypes.array.def([]),
|
||||
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
accept: propTypes.string.def('*'),
|
||||
fileSize: propTypes.number.def(5), // 大小限制(MB)
|
||||
limit: propTypes.number.def(5), // 数量限制
|
||||
@@ -61,10 +66,8 @@ const fileList = ref<UploadUserFile[]>(props.modelValue)
|
||||
const uploadNumber = ref<number>(0)
|
||||
const uploadHeaders = ref({
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId(),
|
||||
'instance-id': getAppId()
|
||||
'tenant-id': getTenantId()
|
||||
})
|
||||
|
||||
// 文件上传之前判断
|
||||
const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
|
||||
if (fileList.value.length >= props.limit) {
|
||||
|
||||
@@ -55,7 +55,7 @@ import type { UploadProps } from 'element-plus'
|
||||
|
||||
import { generateUUID } from '@/utils'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getAccessToken, getTenantId, getAppId } from '@/utils/auth'
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
|
||||
type FileTypes =
|
||||
| 'image/apng'
|
||||
@@ -96,8 +96,7 @@ const deleteImg = () => {
|
||||
|
||||
const uploadHeaders = ref({
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId(),
|
||||
'instance-id': getAppId()
|
||||
'tenant-id': getTenantId()
|
||||
})
|
||||
|
||||
const editImg = () => {
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
<el-upload
|
||||
v-model:file-list="fileList"
|
||||
:accept="fileType.join(',')"
|
||||
:action="uploadUrl"
|
||||
:action="updateUrl"
|
||||
:before-upload="beforeUpload"
|
||||
:class="['upload', drag ? 'no-border' : '']"
|
||||
:disabled="disabled"
|
||||
:drag="drag"
|
||||
:http-request="httpRequest"
|
||||
:headers="uploadHeaders"
|
||||
:limit="limit"
|
||||
:multiple="true"
|
||||
:on-error="uploadError"
|
||||
@@ -29,7 +28,7 @@
|
||||
<Icon icon="ep:zoom-in" />
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div v-if="!disabled" class="handle-icon" @click="handleRemove(file)">
|
||||
<div class="handle-icon" @click="handleRemove(file)">
|
||||
<Icon icon="ep:delete" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
@@ -46,14 +45,13 @@
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
<script lang="ts" name="UploadImgs" setup>
|
||||
import { PropType } from 'vue'
|
||||
import type { UploadFile, UploadProps, UploadUserFile } from 'element-plus'
|
||||
import { ElNotification } from 'element-plus'
|
||||
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { useUpload } from './useUpload'
|
||||
|
||||
defineOptions({ name: 'UploadImgs' })
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -70,7 +68,11 @@ type FileTypes =
|
||||
| 'image/x-icon'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: propTypes.oneOfType<string | string[]>([String, Array<String>]).isRequired,
|
||||
modelValue: {
|
||||
type: Array as PropType<UploadUserFile[]>,
|
||||
required: true
|
||||
},
|
||||
updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL),
|
||||
drag: propTypes.bool.def(true), // 是否支持拖拽上传 ==> 非必传(默认为 true)
|
||||
disabled: propTypes.bool.def(false), // 是否禁用上传组件 ==> 非必传(默认为 false)
|
||||
limit: propTypes.number.def(5), // 最大图片上传数 ==> 非必传(默认为 5张)
|
||||
@@ -78,14 +80,27 @@ const props = defineProps({
|
||||
fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
|
||||
height: propTypes.string.def('150px'), // 组件高度 ==> 非必传(默认为 150px)
|
||||
width: propTypes.string.def('150px'), // 组件宽度 ==> 非必传(默认为 150px)
|
||||
borderradius: propTypes.string.def('8px') // 组件边框圆角 ==> 非必传(默认为 8px)
|
||||
borderRadius: propTypes.string.def('8px') // 组件边框圆角 ==> 非必传(默认为 8px)
|
||||
})
|
||||
|
||||
const { uploadUrl, httpRequest } = useUpload()
|
||||
const uploadHeaders = ref({
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
})
|
||||
|
||||
const fileList = ref<UploadUserFile[]>([])
|
||||
const uploadNumber = ref<number>(0)
|
||||
const uploadList = ref<UploadUserFile[]>([])
|
||||
const fileList = ref<UploadUserFile[]>()
|
||||
// fix: 改为动态监听赋值解决图片回显问题
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(data) => {
|
||||
if (!data) return
|
||||
fileList.value = data
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
/**
|
||||
* @description 文件上传之前判断
|
||||
* @param rawFile 上传的文件
|
||||
@@ -105,60 +120,29 @@ const beforeUpload: UploadProps['beforeUpload'] = (rawFile) => {
|
||||
message: `上传图片大小不能超过 ${props.fileSize}M!`,
|
||||
type: 'warning'
|
||||
})
|
||||
uploadNumber.value++
|
||||
return imgType.includes(rawFile.type as FileTypes) && imgSize
|
||||
}
|
||||
|
||||
// 图片上传成功
|
||||
interface UploadEmits {
|
||||
(e: 'update:modelValue', value: string[]): void
|
||||
(e: 'update:modelValue', value: UploadUserFile[]): void
|
||||
}
|
||||
|
||||
const emit = defineEmits<UploadEmits>()
|
||||
const uploadSuccess: UploadProps['onSuccess'] = (res: any): void => {
|
||||
const uploadSuccess = (response, uploadFile: UploadFile) => {
|
||||
if (!response) return
|
||||
// TODO 多图上传组件成功后只是把保存成功后的url替换掉组件选图时的文件路径,所以返回的fileList包含的是一个包含文件信息的对象列表
|
||||
uploadFile.url = response.data
|
||||
emit('update:modelValue', fileList.value)
|
||||
message.success('上传成功')
|
||||
// 删除自身
|
||||
const index = fileList.value.findIndex((item) => item.response?.data === res.data)
|
||||
fileList.value.splice(index, 1)
|
||||
uploadList.value.push({ name: res.data, url: res.data })
|
||||
if (uploadList.value.length == uploadNumber.value) {
|
||||
fileList.value.push(...uploadList.value)
|
||||
uploadList.value = []
|
||||
uploadNumber.value = 0
|
||||
emitUpdateModelValue()
|
||||
}
|
||||
}
|
||||
|
||||
// 监听模型绑定值变动
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val: string | string[]) => {
|
||||
if (!val) {
|
||||
fileList.value = [] // fix:处理掉缓存,表单重置后上传组件的内容并没有重置
|
||||
return
|
||||
}
|
||||
|
||||
fileList.value = [] // 保障数据为空
|
||||
fileList.value.push(
|
||||
...(val as string[]).map((url) => ({ name: url.substring(url.lastIndexOf('/') + 1), url }))
|
||||
)
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
)
|
||||
// 发送图片链接列表更新
|
||||
const emitUpdateModelValue = () => {
|
||||
let result: string[] = fileList.value.map((file) => file.url!)
|
||||
emit('update:modelValue', result)
|
||||
}
|
||||
// 删除图片
|
||||
const handleRemove = (uploadFile: UploadFile) => {
|
||||
fileList.value = fileList.value.filter(
|
||||
(item) => item.url !== uploadFile.url || item.name !== uploadFile.name
|
||||
)
|
||||
emit(
|
||||
'update:modelValue',
|
||||
fileList.value.map((file) => file.url!)
|
||||
)
|
||||
emit('update:modelValue', fileList.value)
|
||||
}
|
||||
|
||||
// 图片上传错误提示
|
||||
@@ -232,7 +216,7 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border: 1px dashed var(--el-border-color-darker);
|
||||
border-radius: v-bind(borderradius);
|
||||
border-radius: v-bind(borderRadius);
|
||||
|
||||
&:hover {
|
||||
border: 1px dashed var(--el-color-primary);
|
||||
@@ -249,7 +233,7 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
||||
width: v-bind(width);
|
||||
height: v-bind(height);
|
||||
background-color: transparent;
|
||||
border-radius: v-bind(borderradius);
|
||||
border-radius: v-bind(borderRadius);
|
||||
}
|
||||
|
||||
.upload-image {
|
||||
@@ -262,16 +246,16 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
background: rgb(0 0 0 / 60%);
|
||||
opacity: 0;
|
||||
box-sizing: border-box;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.handle-icon {
|
||||
display: flex;
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
import * as FileApi from '@/api/infra/file'
|
||||
import CryptoJS from 'crypto-js'
|
||||
import { UploadRawFile, UploadRequestOptions } from 'element-plus/es/components/upload/src/upload'
|
||||
import axios from 'axios'
|
||||
|
||||
export const useUpload = () => {
|
||||
// 后端上传地址
|
||||
const uploadUrl = import.meta.env.VITE_UPLOAD_URL
|
||||
// 是否使用前端直连上传
|
||||
const isClientUpload = UPLOAD_TYPE.CLIENT === import.meta.env.VITE_UPLOAD_TYPE
|
||||
// 重写ElUpload上传方法
|
||||
const httpRequest = async (options: UploadRequestOptions) => {
|
||||
// 模式一:前端上传
|
||||
if (isClientUpload) {
|
||||
// 1.1 生成文件名称
|
||||
const fileName = await generateFileName(options.file)
|
||||
// 1.2 获取文件预签名地址
|
||||
const presignedInfo = await FileApi.getFilePresignedUrl(fileName)
|
||||
// 1.3 上传文件(不能使用 ElUpload 的 ajaxUpload 方法的原因:其使用的是 FormData 上传,Minio 不支持)
|
||||
return axios.put(presignedInfo.uploadUrl, options.file).then(() => {
|
||||
// 1.4. 记录文件信息到后端(异步)
|
||||
createFile(presignedInfo, fileName, options.file)
|
||||
// 通知成功,数据格式保持与后端上传的返回结果一致
|
||||
return { data: presignedInfo.url }
|
||||
})
|
||||
} else {
|
||||
// 模式二:后端上传
|
||||
// 重写 el-upload httpRequest 文件上传成功会走成功的钩子,失败走失败的钩子
|
||||
return new Promise((resolve, reject) => {
|
||||
FileApi.updateFile({ file: options.file })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res)
|
||||
} else {
|
||||
reject(res)
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
reject(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
uploadUrl,
|
||||
httpRequest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建文件信息
|
||||
* @param vo 文件预签名信息
|
||||
* @param name 文件名称
|
||||
* @param file 文件
|
||||
*/
|
||||
function createFile(vo: FileApi.FilePresignedUrlRespVO, name: string, file: UploadRawFile) {
|
||||
const fileVo = {
|
||||
configId: vo.configId,
|
||||
url: vo.url,
|
||||
path: name,
|
||||
name: file.name,
|
||||
type: file.type,
|
||||
size: file.size
|
||||
}
|
||||
FileApi.createFile(fileVo)
|
||||
return fileVo
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成文件名称(使用算法SHA256)
|
||||
* @param file 要上传的文件
|
||||
*/
|
||||
async function generateFileName(file: UploadRawFile) {
|
||||
// 读取文件内容
|
||||
const data = await file.arrayBuffer()
|
||||
const wordArray = CryptoJS.lib.WordArray.create(data)
|
||||
// 计算SHA256
|
||||
const sha256 = CryptoJS.SHA256(wordArray).toString()
|
||||
// 拼接后缀
|
||||
const ext = file.name.substring(file.name.lastIndexOf('.'))
|
||||
return `${sha256}${ext}`
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传类型
|
||||
*/
|
||||
enum UPLOAD_TYPE {
|
||||
// 客户端直接上传(只支持S3服务)
|
||||
CLIENT = 'client',
|
||||
// 客户端发送到后端上传
|
||||
SERVER = 'server'
|
||||
}
|
||||
@@ -7,7 +7,7 @@ const config: {
|
||||
/**
|
||||
* api请求基础路径
|
||||
*/
|
||||
base_url: import.meta.env.VITE_API_BASEPATH,
|
||||
base_url: 'http://localhost' + import.meta.env.VITE_API_BASEPATH,
|
||||
/**
|
||||
* 接口成功返回状态码
|
||||
*/
|
||||
|
||||
@@ -5,11 +5,10 @@ import { config } from './config'
|
||||
const { default_headers } = config
|
||||
|
||||
const request = (option: any) => {
|
||||
const { url, method, params, data, headersType, responseType, isSubmitForm } = option
|
||||
const { url, method, params, data, headersType, responseType } = option
|
||||
return service({
|
||||
url: url,
|
||||
method,
|
||||
isSubmitForm,
|
||||
params,
|
||||
data,
|
||||
responseType: responseType,
|
||||
|
||||
@@ -21,7 +21,6 @@ import errorCode from './errorCode'
|
||||
|
||||
import { resetRouter } from '@/router'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import cache from '@/plugins/cache'
|
||||
|
||||
const { result_code, base_url, request_timeout } = config
|
||||
|
||||
@@ -63,11 +62,15 @@ service.interceptors.request.use(
|
||||
}
|
||||
// 设置租户
|
||||
const tenantId = getTenantId()
|
||||
if (tenantId) (config as Recordable).headers['tenant-id'] = tenantId
|
||||
if (tenantId) {
|
||||
;(config as Recordable).headers['tenant-id'] = tenantId
|
||||
}
|
||||
|
||||
// 设置实例
|
||||
const appId = getAppId()
|
||||
if (appId) (config as Recordable).headers['instance-id'] = appId
|
||||
if (appId) {
|
||||
;(config as Recordable).headers['instance-id'] = appId
|
||||
}
|
||||
|
||||
const params = config.params || {}
|
||||
const data = config.data || false
|
||||
@@ -80,39 +83,27 @@ service.interceptors.request.use(
|
||||
}
|
||||
// get参数编码
|
||||
if (config.method?.toUpperCase() === 'GET' && params) {
|
||||
config.params = {}
|
||||
const paramsStr = qs.stringify(params, { allowDots: true })
|
||||
if (paramsStr) {
|
||||
config.url = config.url + '?' + paramsStr
|
||||
}
|
||||
}
|
||||
// 是否提交表单型的接口,如果是,不要频繁调接口
|
||||
if (config?.isSubmitForm) {
|
||||
const requestObj = {
|
||||
url: config.url,
|
||||
data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
|
||||
time: new Date().getTime()
|
||||
}
|
||||
const sessionObj = cache.session.get('sessionObj')
|
||||
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
|
||||
cache.session.set('sessionObj', requestObj)
|
||||
} else {
|
||||
const s_url = sessionObj.url // 请求地址
|
||||
const s_data = sessionObj.data // 请求数据
|
||||
const s_time = sessionObj.time // 请求时间
|
||||
const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交
|
||||
if (
|
||||
s_data === requestObj.data &&
|
||||
requestObj.time - s_time < interval &&
|
||||
s_url === requestObj.url
|
||||
) {
|
||||
const message = '数据正在处理,请勿重复提交'
|
||||
console.warn(`[${s_url}]: ` + message)
|
||||
return Promise.reject(new Error(message))
|
||||
} else {
|
||||
cache.session.set('sessionObj', requestObj)
|
||||
let url = config.url + '?'
|
||||
for (const propName of Object.keys(params)) {
|
||||
const value = params[propName]
|
||||
if (value !== void 0 && value !== null && typeof value !== 'undefined') {
|
||||
if (typeof value === 'object') {
|
||||
for (const val of Object.keys(value)) {
|
||||
const params = propName + '[' + val + ']'
|
||||
const subPart = encodeURIComponent(params) + '='
|
||||
url += subPart + encodeURIComponent(value[val]) + '&'
|
||||
}
|
||||
} else {
|
||||
url += `${propName}=${encodeURIComponent(value)}&`
|
||||
}
|
||||
}
|
||||
}
|
||||
// 给 get 请求加上时间戳参数,避免从缓存中拿数据
|
||||
// const now = new Date().getTime()
|
||||
// params = params.substring(0, url.length - 1) + `?_t=${now}`
|
||||
url = url.slice(0, -1)
|
||||
config.params = {}
|
||||
config.url = url
|
||||
}
|
||||
return config
|
||||
},
|
||||
@@ -188,7 +179,7 @@ service.interceptors.response.use(
|
||||
})
|
||||
}
|
||||
} else if (code === 500) {
|
||||
ElMessage.error(t(msg || 'sys.api.errMsg500'))
|
||||
ElMessage.error(t('sys.api.errMsg500'))
|
||||
return Promise.reject(new Error(msg))
|
||||
} else if (code === 901) {
|
||||
ElMessage.error({
|
||||
@@ -199,6 +190,8 @@ service.interceptors.response.use(
|
||||
t('sys.api.errMsg901') +
|
||||
'</div>' +
|
||||
'<div> </div>' +
|
||||
'<div>参考 https://doc.iocoder.cn/ 教程</div>' +
|
||||
'<div> </div>' +
|
||||
'<div>5 分钟搭建本地环境</div>'
|
||||
})
|
||||
return Promise.reject(new Error(msg))
|
||||
@@ -208,20 +201,6 @@ service.interceptors.response.use(
|
||||
console.log(msg)
|
||||
} else {
|
||||
ElNotification.error({ title: msg })
|
||||
if (code == 403) {
|
||||
ElMessageBox.confirm(`${msg},是否重新登陆`, '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 无访问权限,退出登录
|
||||
const { wsCache } = useCache()
|
||||
const tenantId = wsCache.get('TENANT_ID')
|
||||
const appId = wsCache.get('App_ID')
|
||||
resetRouter() // 重置静态路由表
|
||||
wsCache.clear()
|
||||
removeToken()
|
||||
window.location.href = `/crm/login?tenantId=${tenantId}&appId=${appId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
return Promise.reject('error')
|
||||
} else {
|
||||
@@ -268,7 +247,7 @@ const handleAuthorized = () => {
|
||||
isRelogin.show = false
|
||||
// 干掉token后再走一次路由让它过router.beforeEach的校验
|
||||
// window.location.href = window.location.href
|
||||
window.location.href = `/crm/login?tenantId=${tenantId}&appId=${appId}`
|
||||
window.location.href = `/login?tenantId=${tenantId}&appId=${appId}`
|
||||
})
|
||||
}
|
||||
return Promise.reject(t('sys.api.timeoutMessage'))
|
||||
|
||||
@@ -119,8 +119,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): F
|
||||
componentProps: comonentProps,
|
||||
...schemaItem.search,
|
||||
field: schemaItem.field,
|
||||
label: schemaItem.search?.label || schemaItem.label,
|
||||
id: schemaItem.clueParamId
|
||||
label: schemaItem.search?.label || schemaItem.label
|
||||
}
|
||||
if (searchSchemaItem.api) {
|
||||
searchRequestTask.push(async () => {
|
||||
@@ -166,8 +165,7 @@ const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
|
||||
}
|
||||
return {
|
||||
...schema.table,
|
||||
...schema,
|
||||
id: schema.clueParamId
|
||||
...schema
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@ export function useWatermark(appendEl: HTMLElement | null = document.body) {
|
||||
clear()
|
||||
|
||||
const can = document.createElement('canvas')
|
||||
can.width = 500
|
||||
can.width = 300
|
||||
can.height = 240
|
||||
|
||||
const cans = can.getContext('2d')
|
||||
if (cans) {
|
||||
cans.rotate((-20 * Math.PI) / 120)
|
||||
cans.font = '15px Vedana'
|
||||
cans.fillStyle = 'rgba(0, 0, 0, 0.05)'
|
||||
cans.fillStyle = 'rgba(0, 0, 0, 0.15)'
|
||||
cans.textAlign = 'left'
|
||||
cans.textBaseline = 'middle'
|
||||
cans.fillText(str, can.width / 20, can.height)
|
||||
|
||||
@@ -11,8 +11,7 @@ const appStore = useAppStore()
|
||||
|
||||
const show = ref(true)
|
||||
|
||||
const title = computed(() => appStore.getAppInfo?.instanceName)
|
||||
const logoUrl = computed(() => appStore.getAppInfo?.instanceIcon)
|
||||
const title = computed(() => appStore.getAppInfo.instanceName)
|
||||
|
||||
const layout = computed(() => appStore.getLayout)
|
||||
|
||||
@@ -68,12 +67,12 @@ watch(
|
||||
>
|
||||
<img
|
||||
class="w-[calc(var(--logo-height)-10px)] h-[calc(var(--logo-height)-10px)]"
|
||||
:src="logoUrl"
|
||||
src="@/assets/imgs/logo.png"
|
||||
/>
|
||||
<div
|
||||
v-if="show"
|
||||
:class="[
|
||||
'ml-10px text-14px font-700',
|
||||
'ml-10px text-16px font-700',
|
||||
{
|
||||
'text-[var(--logo-title-text-color)]': layout === 'classic',
|
||||
'text-[var(--top-header-text-color)]':
|
||||
|
||||
@@ -24,23 +24,18 @@ const getUnreadCount = async () => {
|
||||
// 跳转我的站内信
|
||||
const goMyList = () => {
|
||||
push({
|
||||
name: 'NotifyMessage'
|
||||
name: 'MyNotifyMessage'
|
||||
})
|
||||
}
|
||||
|
||||
// ========== 初始化 =========
|
||||
const msgInterval = ref<any>(null)
|
||||
onMounted(() => {
|
||||
// 首次加载小红点
|
||||
getUnreadCount()
|
||||
// 轮询刷新小红点
|
||||
// msgInterval.value = setInterval(() => {
|
||||
// getUnreadCount()
|
||||
// }, 1000 * 60 * 2)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(msgInterval.value)
|
||||
setInterval(() => {
|
||||
getUnreadCount()
|
||||
}, 1000 * 60 * 2)
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
|
||||
@@ -13,12 +13,10 @@ const userStore = useUserStore()
|
||||
const options = computed(() => {
|
||||
return userStore.getRoles
|
||||
})
|
||||
const roleId = ref(userStore.getUser.currentRole)
|
||||
const roleId = ref(1)
|
||||
|
||||
function handleChangeRole(val) {
|
||||
getInfo({ roleId: val }).then(() => {
|
||||
userStore.refresh()
|
||||
})
|
||||
getInfo({ params: { roleId: val } })
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -12,13 +12,6 @@ import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
|
||||
import ColorRadioPicker from './components/ColorRadioPicker.vue'
|
||||
// import InterfaceDisplay from './components/InterfaceDisplay.vue'
|
||||
// import LayoutRadioPicker from './components/LayoutRadioPicker.vue'
|
||||
import { useWatermark } from '@/hooks/web/useWatermark'
|
||||
|
||||
const { setWatermark } = useWatermark()
|
||||
|
||||
nextTick(() => {
|
||||
setWatermark('安徽莳松科技有限公司')
|
||||
})
|
||||
|
||||
const { t } = useI18n()
|
||||
const appStore = useAppStore()
|
||||
@@ -205,7 +198,6 @@ const clear = () => {
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="false"
|
||||
:class="prefixCls"
|
||||
class="fixed top-[45%] right-0 w-40px h-40px text-center leading-40px bg-[var(--el-color-primary)] cursor-pointer"
|
||||
@click="drawer = true"
|
||||
@@ -213,9 +205,7 @@ const clear = () => {
|
||||
<Icon color="#fff" icon="ep:setting" />
|
||||
</div>
|
||||
|
||||
<div @click="drawer = true">主题配置</div>
|
||||
|
||||
<ElDrawer v-model="drawer" :z-index="4000" append-to-body direction="rtl" size="350px">
|
||||
<ElDrawer v-model="drawer" :z-index="4000" direction="rtl" size="350px">
|
||||
<template #header>
|
||||
<span class="text-16px font-700">{{ t('setting.projectSetting') }}</span>
|
||||
</template>
|
||||
|
||||
@@ -124,6 +124,7 @@ const fixedMenuChange = (show: boolean) => {
|
||||
const setWater = () => {
|
||||
setWatermark(water.value)
|
||||
}
|
||||
setWater()
|
||||
|
||||
const layout = computed(() => appStore.getLayout)
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import { useUserStore } from '@/store/modules/user'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import { getTenantId, getAppId } from '@/utils/auth'
|
||||
|
||||
import { Setting } from '@/layout/components/Setting'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const { wsCache } = useCache()
|
||||
@@ -54,16 +52,18 @@ const toProfile = async () => {
|
||||
<ElDropdown :class="prefixCls" trigger="click">
|
||||
<div class="flex items-center">
|
||||
<img :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" />
|
||||
<span class="<lg:hidden text-14px pl-[5px] text-[var(--top-header-text-color)]">
|
||||
<span
|
||||
v-if="userName"
|
||||
class="<lg:hidden text-14px pl-[5px] text-[var(--top-header-text-color)]"
|
||||
>
|
||||
莳松科技管理员
|
||||
</span>
|
||||
<span v-else class="<lg:hidden text-14px pl-[5px] text-[var(--top-header-text-color)]">
|
||||
{{ userName }}
|
||||
</span>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<ElDropdownMenu>
|
||||
<ElDropdownItem>
|
||||
<Icon icon="ep:tools" />
|
||||
<Setting />
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem>
|
||||
<Icon icon="ep:tools" />
|
||||
<div @click="toProfile">{{ t('common.profile') }}</div>
|
||||
|
||||
@@ -13,7 +13,7 @@ const { start, done } = useNProgress()
|
||||
|
||||
const { loadStart, loadDone } = usePageLoading()
|
||||
// 路由不重定向白名单
|
||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/swagger']
|
||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register']
|
||||
|
||||
// 路由加载前
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
@@ -54,9 +54,9 @@ router.beforeEach(async (to, from, next) => {
|
||||
const tenantId = getTenantId()
|
||||
const appId = getAppId()
|
||||
if (tenantId && appId) {
|
||||
next(`/crm/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
} else {
|
||||
next(`/crm/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import remainingRouter from './modules/remaining'
|
||||
|
||||
// 创建路由实例
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带#
|
||||
history: createWebHistory(), // createWebHashHistory URL带#,createWebHistory URL不带#
|
||||
strict: true,
|
||||
routes: remainingRouter as RouteRecordRaw[],
|
||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
||||
|
||||
@@ -54,24 +54,11 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: '/Home/index',
|
||||
name: '',
|
||||
meta: {
|
||||
title: '首页',
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/swagger',
|
||||
component: () => import('@/views/Basic/Swagger/index.vue'),
|
||||
name: 'swagger',
|
||||
meta: {
|
||||
title: '接口文档',
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
icon: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
@@ -94,8 +81,8 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
},
|
||||
{
|
||||
path: 'notify-message',
|
||||
component: () => import('@/views/Profile/NotifyMessage.vue'),
|
||||
name: 'NotifyMessage',
|
||||
component: () => import('@/views/system/notify/my/index.vue'),
|
||||
name: 'MyNotifyMessage',
|
||||
meta: {
|
||||
canTo: true,
|
||||
hidden: true,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { store } from '../index'
|
||||
import { DictDataVO } from '@/api/system/dict/types'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
const { wsCache } = useCache('sessionStorage')
|
||||
import { listSimpleDictData } from '@/api/system/dict/dict.data'
|
||||
// import { listSimpleDictData } from '@/api/system/dict/dict.data'
|
||||
|
||||
export interface DictValueType {
|
||||
value: any
|
||||
@@ -45,7 +45,8 @@ export const useDictStore = defineStore('dict', {
|
||||
this.dictMap = dictMap
|
||||
this.isSetDict = true
|
||||
} else {
|
||||
const res = await listSimpleDictData()
|
||||
// const res = await listSimpleDictData()
|
||||
const res = []
|
||||
// 设置数据
|
||||
const dictDataMap = new Map<string, any>()
|
||||
res.forEach((dictData: DictDataVO) => {
|
||||
@@ -75,7 +76,8 @@ export const useDictStore = defineStore('dict', {
|
||||
},
|
||||
async resetDict() {
|
||||
wsCache.delete(CACHE_KEY.DICT_CACHE)
|
||||
const res = await listSimpleDictData()
|
||||
// const res = await listSimpleDictData()
|
||||
const res = []
|
||||
// 设置数据
|
||||
const dictDataMap = new Map<string, any>()
|
||||
res.forEach((dictData: DictDataVO) => {
|
||||
|
||||
@@ -51,7 +51,7 @@ export const useUserStore = defineStore('admin-user', {
|
||||
}
|
||||
let userInfo = wsCache.get(CACHE_KEY.USER)
|
||||
if (!userInfo) {
|
||||
userInfo = await getInfo({})
|
||||
userInfo = await getInfo()
|
||||
}
|
||||
this.permissions = userInfo.permissions
|
||||
this.roles = userInfo.roles
|
||||
@@ -75,11 +75,6 @@ export const useUserStore = defineStore('admin-user', {
|
||||
avatar: '',
|
||||
nickname: ''
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
wsCache.delete(CACHE_KEY.USER)
|
||||
this.resetState()
|
||||
window.location.href = ''
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -64,8 +64,7 @@
|
||||
.el-row .el-form-item {
|
||||
.el-input,
|
||||
.el-select,
|
||||
.el-input-number,
|
||||
.el-input__wrapper {
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/* left menu end */
|
||||
|
||||
/* logo start */
|
||||
--logo-height: 40px;
|
||||
--logo-height: 50px;
|
||||
|
||||
--logo-title-text-color: #fff;
|
||||
|
||||
|
||||
@@ -110,9 +110,45 @@ export enum DICT_TYPE {
|
||||
SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status',
|
||||
SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type',
|
||||
|
||||
// ========== INFRA 模块 ==========
|
||||
INFRA_BOOLEAN_STRING = 'infra_boolean_string',
|
||||
INFRA_JOB_STATUS = 'infra_job_status',
|
||||
INFRA_JOB_LOG_STATUS = 'infra_job_log_status',
|
||||
INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status',
|
||||
INFRA_CONFIG_TYPE = 'infra_config_type',
|
||||
INFRA_CODEGEN_TEMPLATE_TYPE = 'infra_codegen_template_type',
|
||||
INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type',
|
||||
INFRA_CODEGEN_SCENE = 'infra_codegen_scene',
|
||||
INFRA_FILE_STORAGE = 'infra_file_storage',
|
||||
|
||||
// ========== BPM 模块 ==========
|
||||
BPM_MODEL_CATEGORY = 'bpm_model_category',
|
||||
BPM_MODEL_FORM_TYPE = 'bpm_model_form_type',
|
||||
BPM_TASK_ASSIGN_RULE_TYPE = 'bpm_task_assign_rule_type',
|
||||
BPM_PROCESS_INSTANCE_STATUS = 'bpm_process_instance_status',
|
||||
BPM_PROCESS_INSTANCE_RESULT = 'bpm_process_instance_result',
|
||||
BPM_TASK_ASSIGN_SCRIPT = 'bpm_task_assign_script',
|
||||
BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type',
|
||||
|
||||
// ========== PAY 模块 ==========
|
||||
PAY_CHANNEL_WECHAT_VERSION = 'pay_channel_wechat_version', // 微信渠道版本
|
||||
PAY_CHANNEL_ALIPAY_SIGN_TYPE = 'pay_channel_alipay_sign_type', // 支付渠道支付宝算法类型
|
||||
PAY_CHANNEL_ALIPAY_MODE = 'pay_channel_alipay_mode', // 支付宝公钥类型
|
||||
PAY_CHANNEL_ALIPAY_SERVER_TYPE = 'pay_channel_alipay_server_type', // 支付宝网关地址
|
||||
PAY_CHANNEL_CODE_TYPE = 'pay_channel_code_type', // 支付渠道编码类型
|
||||
PAY_ORDER_NOTIFY_STATUS = 'pay_order_notify_status', // 商户支付订单回调状态
|
||||
PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态
|
||||
PAY_ORDER_REFUND_STATUS = 'pay_order_refund_status', // 商户支付订单退款状态
|
||||
PAY_REFUND_ORDER_STATUS = 'pay_refund_order_status', // 退款订单状态
|
||||
PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type', // 退款订单类别
|
||||
|
||||
// ========== MP 模块 ==========
|
||||
MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型
|
||||
MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型
|
||||
|
||||
// ========== MALL 模块 ==========
|
||||
PRODUCT_UNIT = 'product_unit', // 商品单位
|
||||
PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态
|
||||
// ========== 驾校管理 ==========
|
||||
LINCENSE_TYPE = 'license_type' //驾照类型
|
||||
// ========== MALL 交易模块 ==========
|
||||
EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode' //快递的计费方式
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export function formatDate(date: Date, format?: string): string {
|
||||
}
|
||||
// 日期存在,则进行格式化
|
||||
if (format === undefined) {
|
||||
format = 'YYYY-MM-DD'
|
||||
format = 'YYYY-MM-DD HH:mm:ss'
|
||||
}
|
||||
return dayjs(date).format(format)
|
||||
}
|
||||
@@ -142,7 +142,7 @@ export function formatPast2(ms) {
|
||||
* @param cellValue 字段值
|
||||
*/
|
||||
// @ts-ignore
|
||||
export const dateFormatter = (row: any, column: any, cellValue: any) => {
|
||||
export const dateFormatter = (row, column, cellValue) => {
|
||||
if (!cellValue) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -209,14 +209,3 @@ export const yuanToFen = (amount: string | number): number => {
|
||||
export const fenToYuan = (amount: string | number): number => {
|
||||
return Number((Number(amount) / 100).toFixed(2))
|
||||
}
|
||||
|
||||
export const removeNullField = (obj: Object) => {
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
if (obj[key] === '') {
|
||||
delete obj[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -49,16 +49,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number v-model="formData.sort" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-form-item label="状态" prop="remark">
|
||||
<Editor v-model:modelValue="formData.remark" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -85,14 +78,16 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
title: '',
|
||||
parentId: undefined,
|
||||
name: undefined,
|
||||
sort: 1,
|
||||
sort: undefined,
|
||||
leaderUserId: undefined,
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
remark: undefined
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
status: CommonStatusEnum.ENABLE
|
||||
})
|
||||
const formRules = reactive<any>({
|
||||
const formRules = reactive({
|
||||
parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }],
|
||||
@@ -158,12 +153,14 @@ const submitForm = async () => {
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
title: '',
|
||||
parentId: undefined,
|
||||
name: undefined,
|
||||
sort: 1,
|
||||
sort: undefined,
|
||||
leaderUserId: undefined,
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
remark: undefined
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
status: CommonStatusEnum.ENABLE
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
@@ -10,11 +10,9 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery" v-hasPermi="['basic:dept:search']"> 搜索</el-button>
|
||||
<el-button @click="resetQuery" v-hasPermi="['basic:dept:reset']"> 重置</el-button>
|
||||
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['basic:dept:add']">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button @click="handleQuery"> 搜索</el-button>
|
||||
<el-button @click="resetQuery"> 重置</el-button>
|
||||
<el-button type="primary" plain @click="openForm('create')"> 新增 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -27,22 +25,8 @@
|
||||
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
||||
<el-table-column label="操作" class-name="fixed-width" width="160">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['basic:dept:update']"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['basic:dept:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="openForm('update', scope.row.id)"> 修改 </el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,42 +1,18 @@
|
||||
<template>
|
||||
<el-form :model="form" ref="formRef" label-width="auto">
|
||||
<el-form-item v-if="getConfig('usePhoneConfig')">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('usePhoneConfig').remark"
|
||||
:message="getConfig('usePhoneConfig').remark"
|
||||
/>
|
||||
<span>使用外呼</span>
|
||||
<Tooltip message="请联系客服开通或关闭,客服电话:15955599959" />使用外呼
|
||||
</template>
|
||||
<el-radio-group
|
||||
v-model="form.usePhoneConfig"
|
||||
:disabled="!getConfig('usePhoneConfig').modifiable"
|
||||
>
|
||||
<el-radio
|
||||
v-for="(item, index) in getConfig('usePhoneConfig').options"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
<el-radio-group v-model="form.callEnable" disabled>
|
||||
<el-radio :label="1"> 使用 </el-radio>
|
||||
<el-radio :label="0"> 不使用 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="getConfig('showFollowConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('showFollowConfig').remark"
|
||||
:message="getConfig('showFollowConfig').remark"
|
||||
/>
|
||||
<span>跟进信息</span>
|
||||
</template>
|
||||
<el-radio-group v-model="form.showFollowConfig">
|
||||
<el-radio
|
||||
v-for="(item, index) in getConfig('showFollowConfig').options"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
<el-form-item label="跟进信息">
|
||||
<el-radio-group v-model="form.followType">
|
||||
<el-radio :label="1"> 展示所有 </el-radio>
|
||||
<el-radio :label="2"> 仅展示本人 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -47,42 +23,23 @@
|
||||
</template>
|
||||
|
||||
<script setup name="BasicSettingClue">
|
||||
import * as ConfigApi from '@/api/system/set'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const form = ref({})
|
||||
|
||||
const configList = ref([])
|
||||
|
||||
function getConfig(val) {
|
||||
return configList.value.find((it) => it.configKey == val)
|
||||
}
|
||||
const form = ref({
|
||||
followType: 1,
|
||||
callEnable: 1
|
||||
})
|
||||
|
||||
function getData() {
|
||||
ConfigApi.getConfigList({ module: 100 }).then((data) => {
|
||||
configList.value = data
|
||||
// 获取所有配置项
|
||||
data.map((it) => {
|
||||
form.value[it.configKey] = it.configValue
|
||||
})
|
||||
})
|
||||
form.value = {
|
||||
followType: 1,
|
||||
callEnable: 1
|
||||
}
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
const params = configList.value.map((it) => ({
|
||||
configId: it.configId,
|
||||
configKey: it.configKey,
|
||||
configValue: form.value[it.configKey]
|
||||
}))
|
||||
ConfigApi.updateConfig(params).then(() => {
|
||||
message.success('保存成功')
|
||||
})
|
||||
message.success('保存成功')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -1,31 +1,16 @@
|
||||
<template>
|
||||
<el-form :model="form" ref="formRef" label-width="auto">
|
||||
<el-form-item v-if="getConfig('saleCommissionRelateDealConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('saleCommissionRelateDealConfig').remark"
|
||||
:message="getConfig('saleCommissionRelateDealConfig').remark"
|
||||
/>
|
||||
<span>是否关联成交率</span>
|
||||
</template>
|
||||
<el-radio-group
|
||||
v-model="form.saleCommissionRelateDealConfig"
|
||||
@change="form.saleCommissionRelateRulesConfig = []"
|
||||
>
|
||||
<el-radio
|
||||
v-for="(item, index) in getConfig('saleCommissionRelateDealConfig').options"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
<el-form-item label="是否关联成交率">
|
||||
<el-radio-group v-model="form.withSuccess">
|
||||
<el-radio :label="1"> 是 </el-radio>
|
||||
<el-radio :label="0"> 否 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联规则" v-if="form.saleCommissionRelateDealConfig == 'true'">
|
||||
<el-form-item label="关联规则" v-if="form.withSuccess">
|
||||
<div>
|
||||
<el-button @click="form.saleCommissionRelateRulesConfig.push({})">新增规则</el-button>
|
||||
<el-button @click="form.rules.push({})">新增规则</el-button>
|
||||
<div
|
||||
v-for="(item, index) in form.saleCommissionRelateRulesConfig"
|
||||
v-for="(item, index) in form.rules"
|
||||
:key="index"
|
||||
class="mt-10px flex justify-center items-center"
|
||||
>
|
||||
@@ -63,52 +48,22 @@
|
||||
</template>
|
||||
|
||||
<script setup name="BasicSettingClue">
|
||||
import * as ConfigApi from '@/api/system/set'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const form = ref({})
|
||||
const configList = ref([])
|
||||
|
||||
const jsonArr = ['saleCommissionRelateRulesConfig']
|
||||
|
||||
function getConfig(val) {
|
||||
return configList.value.find((it) => it.configKey == val)
|
||||
}
|
||||
const form = ref({
|
||||
withSuccess: 1,
|
||||
rules: []
|
||||
})
|
||||
|
||||
function getData() {
|
||||
ConfigApi.getConfigList({ module: 101 }).then((data) => {
|
||||
configList.value = data
|
||||
// 获取所有配置项
|
||||
data.map((it) => {
|
||||
form.value[it.configKey] = it.configValue
|
||||
if (it.configKey == 'saleCommissionRelateRulesConfig') {
|
||||
if (!form.value[it.configKey]) {
|
||||
form.value[it.configKey] = []
|
||||
} else {
|
||||
form.value[it.configKey] = JSON.parse(it.configValue)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
form.value = {
|
||||
withSuccess: 1
|
||||
}
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
const params = configList.value.map((it) => ({
|
||||
configId: it.configId,
|
||||
configKey: it.configKey,
|
||||
configValue: jsonArr.includes(it.configKey)
|
||||
? JSON.stringify(form.value[it.configKey])
|
||||
: form.value[it.configKey]
|
||||
}))
|
||||
ConfigApi.updateConfig(params).then(() => {
|
||||
message.success('保存成功')
|
||||
})
|
||||
message.success('保存成功')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="tabIndex" type="border-card">
|
||||
<el-tab-pane label="线索管理" :name="0" v-if="checkPermi(['basic:setting:clue'])">
|
||||
<el-tab-pane label="线索管理" :name="0">
|
||||
<BSClue v-if="tabIndex == 0" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="销售提成" :name="10" v-if="checkPermi(['basic:setting:comission'])">
|
||||
<el-tab-pane label="销售提成" :name="10">
|
||||
<BSSalerComission v-if="tabIndex == 10" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -14,7 +14,6 @@
|
||||
<script setup name="GeneralSetting">
|
||||
import BSClue from './Comp/BSClue.vue'
|
||||
import BSSalerComission from './Comp/BSSalerComission.vue'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
|
||||
const tabIndex = ref(0)
|
||||
</script>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<Dialog :title="title" v-model="dialogVisible" width="800px">
|
||||
<el-form v-loading="formLoading" :model="form" ref="formRef" :rules="rules" label-width="100px">
|
||||
<el-form-item label="知识库名称" prop="libName">
|
||||
<el-input v-model="form.libName" placeholder="请输入" />
|
||||
<el-form :model="form" ref="addForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="知识库名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资源类型" prop="libType">
|
||||
<el-radio-group v-model="form.libType">
|
||||
<el-form-item label="资源类型" prop="type">
|
||||
<el-radio-group v-model="form.type">
|
||||
<el-radio :label="1"> 文件 </el-radio>
|
||||
<el-radio :label="2"> 纯图片 </el-radio>
|
||||
<el-radio :label="3"> 自主编辑 </el-radio>
|
||||
@@ -18,71 +18,49 @@
|
||||
<template #footer>
|
||||
<span>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" :disabled="formLoading" @click="handleSave">保 存</el-button>
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as LibraryApi from '@/api/system/library'
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
|
||||
const form = ref()
|
||||
const rules = ref({
|
||||
libName: { required: true, message: '名称不可为空', trigger: 'blur' }
|
||||
name: { required: true, message: '名称不可为空', trigger: 'blur' }
|
||||
})
|
||||
|
||||
const title = ref('')
|
||||
|
||||
const formRef = ref()
|
||||
const formLoading = ref(false)
|
||||
const formType = ref('create')
|
||||
const addForm = ref()
|
||||
|
||||
const open = (type, val) => {
|
||||
const emit = defineEmits(['update'])
|
||||
|
||||
const open = (val) => {
|
||||
dialogVisible.value = true
|
||||
formType.value = type
|
||||
if (val) {
|
||||
title.value = '修改知识库'
|
||||
form.value = { ...val }
|
||||
} else {
|
||||
title.value = '新增知识库'
|
||||
form.value = {
|
||||
libName: '',
|
||||
libType: 1,
|
||||
remark: undefined,
|
||||
isDefault: false
|
||||
name: '',
|
||||
type: 1,
|
||||
remark: undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
async function handleSave() {
|
||||
// 校验表单
|
||||
if (!formRef.value) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
if (formType.value === 'create') {
|
||||
await LibraryApi.createLibrary(form.value)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await LibraryApi.updateLibrary(form.value)
|
||||
message.success(t('common.updateSuccess'))
|
||||
function handleSave() {
|
||||
addForm.value.validate((valid) => {
|
||||
if (valid) {
|
||||
emit('update', form.value)
|
||||
dialogVisible.value = false
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Dialog :title="title" v-model="show" width="800px">
|
||||
<el-form v-loading="formLoading" :model="form" ref="formRef" :rules="rules" label-width="60px">
|
||||
<el-form :model="form" ref="resourceForm" :rules="rules" label-width="60px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="标题" prop="title">
|
||||
@@ -8,19 +8,16 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="标签" prop="tags">
|
||||
<el-form-item label="标签" prop="tipList">
|
||||
<el-select
|
||||
v-model="form.tags"
|
||||
v-model="form.tipList"
|
||||
multiple
|
||||
filterable
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
placeholder="请选择标签或输入"
|
||||
clearable
|
||||
@change="tipChange"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
@@ -36,10 +33,15 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="内容" prop="content">
|
||||
<UploadFile v-if="libType == 1" v-model="form.files" :limit="1" :isShowTip="false" />
|
||||
<UploadImg
|
||||
v-else-if="libType == 2"
|
||||
v-model:modelValue="form.files"
|
||||
<UploadFile
|
||||
v-if="form.type == 1"
|
||||
v-model="form.sliderPicUrls"
|
||||
:isShowTip="false"
|
||||
:fileType="[]"
|
||||
/>
|
||||
<UploadImgs
|
||||
v-else-if="form.type == 2"
|
||||
v-model:modelValue="form.sliderPicUrls"
|
||||
width="100px"
|
||||
height="100px"
|
||||
/>
|
||||
@@ -58,107 +60,41 @@
|
||||
<template #footer>
|
||||
<span>
|
||||
<el-button @click="show = false">取 消</el-button>
|
||||
<el-button type="primary" :disabled="formLoading" @click="handleSave">保 存</el-button>
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="DialogResource">
|
||||
import * as ResourceApi from '@/api/system/library/resource'
|
||||
import { getDictOptions } from '@/utils/dict'
|
||||
import * as dictApi from '@/api/system/dict/dict.data'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
<script setup>
|
||||
const show = ref(false)
|
||||
const title = ref('')
|
||||
const formType = ref('create')
|
||||
const libType = ref(1)
|
||||
|
||||
const form = ref({})
|
||||
const formLoading = ref(false)
|
||||
const rules = ref({
|
||||
title: { required: true, message: '标题不可为空', trigger: 'blur' }
|
||||
})
|
||||
const rules = ref({})
|
||||
|
||||
const tipOptions = ref([])
|
||||
const tipOptions = ref([{ label: '绿色', value: '绿色' }])
|
||||
|
||||
function getOptions() {
|
||||
tipOptions.value = getDictOptions('knowledge_tags')
|
||||
}
|
||||
|
||||
async function open(type, info, id) {
|
||||
function open(type, val) {
|
||||
show.value = true
|
||||
title.value = type == 'update' ? '修改资源' : '新增资源'
|
||||
formType.value = type
|
||||
libType.value = info.libType
|
||||
resetForm(info.libId)
|
||||
getOptions()
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
form.value = await ResourceApi.getResource(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
if (val) {
|
||||
title.value = '修改资源'
|
||||
form.value = { ...val, type }
|
||||
} else {
|
||||
title.value = '新增资源'
|
||||
form.value = {
|
||||
type,
|
||||
title: '',
|
||||
tipList: [],
|
||||
sliderPicUrls: [],
|
||||
content: '',
|
||||
remark: null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resetForm(libId) {
|
||||
form.value = {
|
||||
libId,
|
||||
title: '',
|
||||
tags: [],
|
||||
files: '',
|
||||
content: '',
|
||||
remark: null,
|
||||
isDefault: false
|
||||
}
|
||||
}
|
||||
|
||||
async function tipChange(val) {
|
||||
const valStr = val.at(-1)
|
||||
if (!tipOptions.value.some((it) => it.value == valStr)) {
|
||||
await dictApi.createDictData({
|
||||
label: valStr,
|
||||
value: valStr,
|
||||
sort: 1,
|
||||
status: 0,
|
||||
dictType: 'knowledge_tags'
|
||||
})
|
||||
tipOptions.value.push({ label: valStr, value: valStr })
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
const formRef = ref()
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
async function handleSave() {
|
||||
// 校验表单
|
||||
if (!formRef.value) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
if (formType.value === 'create') {
|
||||
await ResourceApi.createResource(form.value)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await ResourceApi.updateResource(form.value)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
show.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
function handleSave() {
|
||||
console.log('保存成功')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<teleport v-if="show" to="#app">
|
||||
<div class="container">
|
||||
<!-- <Icon class="ep:circle-close close-icon" /> -->
|
||||
<el-icon class="close-icon" @click="show = false"><CircleClose /></el-icon>
|
||||
<el-drawer
|
||||
v-model="showDrawer"
|
||||
@@ -15,30 +16,22 @@
|
||||
<template #header>
|
||||
<span style="color: #fff">资源详情</span>
|
||||
</template>
|
||||
<div>
|
||||
<div class="flex mb-18px">
|
||||
<div class="w-80px text-light-50">标题:</div>
|
||||
<div class="flex-1 ml-10px text-light-50">{{ info.title }}</div>
|
||||
</div>
|
||||
<div class="flex mb-18px">
|
||||
<div class="w-80px text-light-50">文件名称:</div>
|
||||
<div class="flex-1 ml-10px text-light-50 w-80px" style="word-wrap: break-word">{{
|
||||
info.files
|
||||
}}</div>
|
||||
</div>
|
||||
<div class="flex mb-18px">
|
||||
<div class="w-80px text-light-50">标签:</div>
|
||||
<div class="flex-1 ml-10px w-80px">
|
||||
<el-tag class="mr-5px" v-for="(item, index) in info.tags" :key="index">
|
||||
{{ getDictLabel('knowledge_tags', item) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mb-18px">
|
||||
<div class="w-80px text-light-50">备注:</div>
|
||||
<div class="flex-1 ml-10px text-light-50">{{ info.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-form style="flex: 1" :model="info" label-width="80px" label-position="left">
|
||||
<el-form-item label="标题:">
|
||||
{{ info.title }}
|
||||
</el-form-item>
|
||||
<el-form-item label="文件名称:">
|
||||
{{ info.fileName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="标签:">
|
||||
<el-tag class="mr-5px mb-5px" v-for="(item, index) in info.tipList" :key="index">{{
|
||||
item
|
||||
}}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:">
|
||||
{{ info.remark }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="flex justify-between">
|
||||
<el-button plain :disabled="imgIndex <= 0" @click="imgIndex--">上一张</el-button>
|
||||
@@ -49,14 +42,13 @@
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
<img :src="info.files" :alt="info.files" srcset="" class="width-fit img" />
|
||||
<img :src="info.fileUrl" :alt="info.fileName" srcset="" class="width-fit img" />
|
||||
<div class="img-idx">{{ imgIndex + 1 }} / {{ imgList.length }}</div>
|
||||
</div>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDictLabel } from '@/utils/dict'
|
||||
import { ElIcon } from 'element-plus'
|
||||
import { CircleClose } from '@element-plus/icons-vue'
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
<el-card shadow="always" :body-style="{ padding: '10px' }">
|
||||
<div class="flex justify-between items-center" style="width: 400px">
|
||||
<div class="text-16px font-bold">知识库名称</div>
|
||||
<el-button type="primary" style="padding: 0px" text @click="openForm('create', null)"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button type="primary" style="padding: 0px" text @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<div class="border-top-1px mt-10px pt-10px">
|
||||
<div
|
||||
@@ -13,27 +11,24 @@
|
||||
v-for="(item, index) in libraryList"
|
||||
:key="index"
|
||||
:class="{ actived: libraryIndex == index }"
|
||||
@click="handleClickLib(index)"
|
||||
@click="libraryIndex = index"
|
||||
>
|
||||
<div class="flex-1 text-14px">{{ item.libName }}</div>
|
||||
<div class="flex-1 text-14px">{{ item.name }}</div>
|
||||
<div class="ml-10px">
|
||||
<el-button type="primary" style="padding: 0px" text @click="openForm('update', item)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button type="primary" style="padding: 0px" text @click="handleUpdate(item)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="ml-10px"
|
||||
style="padding: 0px"
|
||||
text
|
||||
@click="handleRemove(item.libId)"
|
||||
@click="handleRemove(index)"
|
||||
>删除</el-button
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<Pagination
|
||||
small
|
||||
layout="total, prev, pager, next, jumper"
|
||||
v-model:limit="pageSize"
|
||||
v-model:page="currentPage"
|
||||
:total="total"
|
||||
@@ -41,55 +36,44 @@
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card
|
||||
v-if="libraryList.length"
|
||||
class="ml-20px"
|
||||
style="flex: 1"
|
||||
shadow="always"
|
||||
:body-style="{ padding: '10px' }"
|
||||
>
|
||||
<el-card class="ml-20px" style="flex: 1" shadow="always" :body-style="{ padding: '10px' }">
|
||||
<div class="flex justify-between items-center border-bottom-1px pb-10px mb-20px">
|
||||
<div>【{{ libraryList[libraryIndex].libName }}】资源详情</div>
|
||||
<el-button type="primary" @click="openResource('create', null)">新增资源</el-button>
|
||||
<div>【{{ libraryList[libraryIndex].name }}】资源详情</div>
|
||||
<el-button type="primary" @click="handleAddResource">新增资源</el-button>
|
||||
</div>
|
||||
<div v-if="libraryList[libraryIndex].libType == 1">
|
||||
<el-table :data="tableList" border v-loading="loading">
|
||||
<div v-if="libraryList[libraryIndex].type == 1">
|
||||
<el-table :data="tableList" border>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="title" label="标题" width="200" />
|
||||
<el-table-column label="标签" width="200px">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-for="(item, index) in row.tags" :key="index" class="mr-5px">
|
||||
{{ getDictLabel('knowledge_tags', item) }}
|
||||
</el-tag>
|
||||
<el-tag v-for="(item, index) in row.tipList" :key="index" class="mr-5px">{{
|
||||
item
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="files" label="附件">
|
||||
<el-table-column prop="fileName" label="附件">
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" underline target="_blank" @click="handleDownload(row.files)">
|
||||
{{ row.files }}
|
||||
</el-link>
|
||||
<el-link type="primary" underline :href="row.fileUrl" target="_blank">{{
|
||||
row.fileName
|
||||
}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120px">
|
||||
<template #default="{ row, $index }">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
text
|
||||
@click="openResource('update', row.id)"
|
||||
<el-button type="primary" style="padding: 0" text @click="updateResource(row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button type="danger" style="padding: 0" text @click="removeResource($index)"
|
||||
>删除</el-button
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button type="danger" style="padding: 0" text @click="removeResource($index)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else-if="libraryList[libraryIndex].libType == 2" class="flex">
|
||||
<div v-else-if="libraryList[libraryIndex].type == 2" class="flex">
|
||||
<div v-for="(item, index) in tableList" :key="index" class="mr-10px">
|
||||
<el-image :src="item.files" @click="imagePreview(index)" class="w-150px h-150px" />
|
||||
<el-image :src="item.fileUrl" @click="imagePreview(index)" class="w-150px h-150px" />
|
||||
<div class="mt-5px text-center">{{ item.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,24 +83,19 @@
|
||||
<el-table-column prop="title" label="标题" />
|
||||
<el-table-column label="标签">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-for="(item, index) in row.tags" :key="index" class="mr-5px">
|
||||
{{ getDictLabel('knowledge_tags', item) }}
|
||||
</el-tag>
|
||||
<el-tag v-for="(item, index) in row.tipList" :key="index" class="mr-5px">{{
|
||||
item
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120px">
|
||||
<template #default="{ row, $index }">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
text
|
||||
@click="openResource('update', row.infoId)"
|
||||
<el-button type="primary" style="padding: 0" text @click="updateResource(row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button type="danger" style="padding: 0" text @click="removeResource($index)"
|
||||
>删除</el-button
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button type="danger" style="padding: 0" text @click="removeResource($index)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -129,31 +108,27 @@
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
<DialogLibrary ref="library" @success="getList" />
|
||||
<DialogResource ref="resourceDialog" @success="getResourceList" />
|
||||
<DialogLibrary ref="library" @update="afterSaveLibrary" />
|
||||
<DialogResource ref="resourceDialog" />
|
||||
<ImagePreview ref="imgPreview" />
|
||||
</template>
|
||||
|
||||
<script setup name="Library">
|
||||
import * as LibraryApi from '@/api/system/library/index'
|
||||
import * as ResourceApi from '@/api/system/library/resource'
|
||||
<script setup>
|
||||
import DialogLibrary from './Comp/DialogLibrary.vue'
|
||||
import DialogResource from './Comp/DialogResource.vue'
|
||||
import ImagePreview from './Comp/ImagePreview.vue'
|
||||
import { getDictLabel } from '@/utils/dict'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const libraryIndex = ref(0)
|
||||
const libraryList = ref([])
|
||||
const libraryList = ref([
|
||||
{ name: '成交案例', id: 1, type: 2 },
|
||||
{ name: '公司资质材料', id: 2, type: 1 },
|
||||
{ name: '会议纪要', id: 3, type: 3 }
|
||||
])
|
||||
|
||||
const pageSize = ref(20)
|
||||
const currentPage = ref(1)
|
||||
const total = ref(0)
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const library = ref()
|
||||
const resourceDialog = ref()
|
||||
const imgPreview = ref()
|
||||
@@ -162,80 +137,61 @@ const resourcePageSize = ref(20)
|
||||
const resourcePageNum = ref(1)
|
||||
const resourceTotal = ref(0)
|
||||
|
||||
const tableList = ref([])
|
||||
|
||||
function openForm(type, item) {
|
||||
library.value.open(type, item)
|
||||
}
|
||||
|
||||
async function handleRemove(id) {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await LibraryApi.deleteLibrary(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
async function getList() {
|
||||
const data = await LibraryApi.getLibraryPage({
|
||||
pageNo: currentPage.value,
|
||||
pageSize: pageSize.value
|
||||
})
|
||||
libraryList.value = data.list
|
||||
total.value = data.total
|
||||
handleClickLib(0)
|
||||
}
|
||||
|
||||
function handleClickLib(index) {
|
||||
libraryIndex.value = index
|
||||
getResourceList()
|
||||
}
|
||||
|
||||
function handleDownload(href) {
|
||||
if (href) {
|
||||
let a = document.createElement('a')
|
||||
a.download = href //指定下载的文件名
|
||||
a.href = href // URL对象
|
||||
a.click() // 模拟点击
|
||||
URL.revokeObjectURL(a.href) // 释放URL 对象
|
||||
const tableList = ref([
|
||||
{
|
||||
fileUrl:
|
||||
'https://img0.baidu.com/it/u=1033018635,7901815&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500',
|
||||
fileName: '测试图片1'
|
||||
},
|
||||
{
|
||||
tipList: ['优质材料', '无污染'],
|
||||
fileUrl:
|
||||
'https://img0.baidu.com/it/u=1610680713,975251961&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=750',
|
||||
fileName: '测试图片2'
|
||||
}
|
||||
])
|
||||
|
||||
function handleAdd() {
|
||||
// 新增知识库
|
||||
library.value.open(null)
|
||||
}
|
||||
|
||||
function openResource(type, id) {
|
||||
resourceDialog.value.open(type, libraryList.value[libraryIndex.value], id)
|
||||
function handleUpdate(item) {
|
||||
library.value.open(item)
|
||||
}
|
||||
|
||||
function handleRemove(index) {
|
||||
libraryList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
function afterSaveLibrary(val) {
|
||||
libraryList.value.push(val)
|
||||
}
|
||||
|
||||
function getList() {
|
||||
libraryList.value = []
|
||||
}
|
||||
|
||||
function handleAddResource() {
|
||||
resourceDialog.value.open(libraryList.value[libraryIndex.value].type, null)
|
||||
}
|
||||
|
||||
function updateResource(row) {
|
||||
resourceDialog.value.open(libraryList.value[libraryIndex.value].type, row)
|
||||
}
|
||||
|
||||
function removeResource(index) {
|
||||
tableList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
async function getResourceList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await ResourceApi.getResourcePage({
|
||||
libId: libraryList.value[libraryIndex.value].libId,
|
||||
pageNo: resourcePageNum.value,
|
||||
pageSize: resourcePageSize.value
|
||||
})
|
||||
tableList.value = data.list
|
||||
resourceTotal.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
function getResourceList() {
|
||||
tableList.value = []
|
||||
}
|
||||
|
||||
/** 商品图预览 */
|
||||
function imagePreview(index) {
|
||||
imgPreview.value.open(index, tableList.value)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -42,10 +42,10 @@ const pageSize = ref(20)
|
||||
const currentPage = ref(1)
|
||||
|
||||
const columns = ref([
|
||||
{ prop: 'name', label: '姓名', width: '200px' },
|
||||
{ prop: 'mobile', label: '手机号', width: '150px' },
|
||||
{ prop: 'nickname', label: '姓名' },
|
||||
{ prop: 'mobile', label: '手机号' },
|
||||
{ prop: 'deptName', label: '部门' },
|
||||
{ prop: 'roles', label: '角色' }
|
||||
{ prop: '', label: '角色', width: '300px' }
|
||||
])
|
||||
|
||||
async function getList() {
|
||||
|
||||
@@ -13,13 +13,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
:disabled="formLoading"
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-hasPermi="['basic:role:update-menu']"
|
||||
>保存权限</el-button
|
||||
>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">保存权限</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -49,13 +49,7 @@
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button
|
||||
:disabled="formLoading"
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-hasPermi="['basic:role:update-data']"
|
||||
>保存权限</el-button
|
||||
>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">保存权限</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@@ -107,14 +101,7 @@ const dataScopeOptions = [
|
||||
]
|
||||
|
||||
async function getRoleInfo(id) {
|
||||
try {
|
||||
formData.value = await RoleApi.getRole(id)
|
||||
nextTick(() => {
|
||||
treeRef.value.setCheckedKeys(formData.value.dataScopeDeptIds)
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
formData.value = await RoleApi.getRole(id)
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
|
||||
@@ -37,7 +37,7 @@ const formData = ref({
|
||||
name: ''
|
||||
})
|
||||
const formRules = reactive({
|
||||
name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }]
|
||||
name: [{ required: true, message: '岗位标题不能为空', trigger: 'blur' }]
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
<el-card shadow="always" :body-style="{ padding: '10px' }">
|
||||
<div class="flex justify-between items-center" style="width: 300px">
|
||||
<div class="text-16px font-bold">角色列表</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0px"
|
||||
text
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['basic:role:add']"
|
||||
>
|
||||
<el-button type="primary" style="padding: 0px" text @click="openForm('create')">
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -27,7 +21,6 @@
|
||||
type="primary"
|
||||
style="padding: 0px"
|
||||
text
|
||||
v-hasPermi="['basic:role:update']"
|
||||
@click="openForm('update', item.id)"
|
||||
>
|
||||
修改
|
||||
@@ -37,7 +30,6 @@
|
||||
class="ml-10px"
|
||||
style="padding: 0px"
|
||||
text
|
||||
v-hasPermi="['basic:role:delete']"
|
||||
@click="handleDelete(item.id)"
|
||||
>
|
||||
删除
|
||||
@@ -92,7 +84,7 @@ const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const total = ref(0) // 列表的总页数
|
||||
const list = ref<any>([]) // 列表的数据
|
||||
const list = ref([]) // 列表的数据
|
||||
|
||||
const libraryIndex = ref(0)
|
||||
const queryParams = reactive({
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<template>
|
||||
<IFrame :src="src" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import * as ConfigApi from '@/api/infra/config'
|
||||
|
||||
defineOptions({ name: 'InfraSwagger' })
|
||||
|
||||
const loading = ref(true) // 是否加载中
|
||||
const src = ref(import.meta.env.VITE_BASE_URL + '/doc.html') // Knife4j UI
|
||||
// const src = ref(import.meta.env.VITE_BASE_URL + '/swagger-ui') // Swagger UI
|
||||
|
||||
/** 初始化 */
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const data = await ConfigApi.getConfigKey('url.swagger')
|
||||
if (data && data.length > 0) {
|
||||
src.value = data
|
||||
}
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
94
src/views/Basic/User/UserAssignRoleForm.vue
Normal file
94
src/views/Basic/User/UserAssignRoleForm.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" title="分配角色">
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
|
||||
<el-form-item label="用户名称">
|
||||
<el-input v-model="formData.username" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户昵称">
|
||||
<el-input v-model="formData.nickname" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="角色">
|
||||
<el-select v-model="formData.roleIds" multiple placeholder="请选择角色">
|
||||
<el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemUserAssignRoleForm" setup>
|
||||
import * as PermissionApi from '@/api/system/permission'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
nickname: '',
|
||||
username: '',
|
||||
roleIds: []
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const roleList = ref([]) // 角色的列表
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (row: UserApi.UserVO) => {
|
||||
dialogVisible.value = true
|
||||
resetForm()
|
||||
// 设置数据
|
||||
formData.value.id = row.id
|
||||
formData.value.username = row.username
|
||||
formData.value.nickname = row.nickname
|
||||
// 获得角色拥有的菜单集合
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value.roleIds = await PermissionApi.getUserRoleList(row.id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
// 获得角色列表
|
||||
roleList.value = await RoleApi.getSimpleRoleList()
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
if (!formRef) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
await PermissionApi.assignUserRole({
|
||||
userId: formData.value.id,
|
||||
roleIds: formData.value.roleIds
|
||||
})
|
||||
message.success(t('common.updateSuccess'))
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success', true)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
nickname: '',
|
||||
username: '',
|
||||
roleIds: []
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle" style="width: 800px">
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
@@ -7,10 +7,10 @@
|
||||
:rules="formRules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户姓名" prop="nickname">
|
||||
<el-input v-model="formData.nickname" placeholder="请输入用户姓名" />
|
||||
<el-form-item label="用户昵称" prop="nickname">
|
||||
<el-input v-model="formData.nickname" placeholder="请输入用户昵称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -22,7 +22,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="归属部门" prop="deptId">
|
||||
<el-tree-select
|
||||
@@ -37,14 +37,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色" prop="role">
|
||||
<el-select
|
||||
v-model="formData.roleIds"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:max-collapse-tags="2"
|
||||
placeholder="请选择角色"
|
||||
>
|
||||
<el-select v-model="formData.roleIds" multiple placeholder="请选择角色">
|
||||
<el-option
|
||||
v-for="item in roleOptions"
|
||||
:key="item.id"
|
||||
@@ -55,7 +48,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号码" prop="mobile">
|
||||
<el-input v-model="formData.mobile" maxlength="11" placeholder="请输入手机号码" />
|
||||
@@ -67,10 +60,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="formData.id === undefined" label="登录账号" prop="username">
|
||||
<el-input v-model="formData.username" placeholder="请输入登录账号" />
|
||||
<el-form-item v-if="formData.id === undefined" label="用户名称" prop="username">
|
||||
<el-input v-model="formData.username" placeholder="请输入用户名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -84,20 +77,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="入职日期" prop="hireDate">
|
||||
<el-date-picker
|
||||
v-model="formData.hireDate"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="formData.remark" placeholder="请输入内容" type="textarea" />
|
||||
@@ -114,8 +94,6 @@
|
||||
<script lang="ts" name="SystemUserForm" setup>
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
@@ -138,12 +116,11 @@ const formData = ref({
|
||||
sex: 1,
|
||||
remark: '',
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
roleIds: [],
|
||||
hireDate: ''
|
||||
roleIds: []
|
||||
})
|
||||
const formRules = ref<any>({
|
||||
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
||||
nickname: [{ required: true, message: '用户姓名不能为空', trigger: 'blur' }],
|
||||
const formRules = {
|
||||
username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],
|
||||
nickname: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
||||
password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }],
|
||||
email: [
|
||||
{
|
||||
@@ -152,11 +129,17 @@ const formRules = ref<any>({
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
],
|
||||
mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }]
|
||||
})
|
||||
mobile: [
|
||||
{
|
||||
pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
const formRef = ref() // 表单 Ref
|
||||
const deptList = ref<Tree[]>([]) // 树形结构
|
||||
const roleOptions = ref<any>([])
|
||||
const roleOptions = ref([])
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
@@ -219,8 +202,7 @@ const resetForm = () => {
|
||||
sex: 1,
|
||||
remark: '',
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
roleIds: [],
|
||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD')
|
||||
roleIds: []
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<el-col :span="20" :xs="24">
|
||||
<!-- 搜索 -->
|
||||
<el-form :model="queryParams" ref="queryFormRef" inline label-width="68px">
|
||||
<el-form-item label="登录账号" prop="username">
|
||||
<el-form-item label="用户名称" prop="username">
|
||||
<el-input
|
||||
v-model="queryParams.username"
|
||||
placeholder="请输入登录账号"
|
||||
placeholder="请输入用户名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
@@ -26,22 +26,15 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery" v-hasPermi="['basic:employee:search']">搜索</el-button>
|
||||
<el-button @click="resetQuery" v-hasPermi="['basic:employee:reset']">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['basic:employee:add']"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button @click="handleQuery">搜索</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" plain @click="openForm('create')"> 新增 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="用户编号" key="id" prop="id" />
|
||||
<el-table-column label="登录账号" prop="username" />
|
||||
<el-table-column label="用户姓名" prop="nickname" />
|
||||
<el-table-column label="用户名称" prop="username" />
|
||||
<el-table-column label="用户昵称" prop="nickname" />
|
||||
<el-table-column label="部门" key="deptName" prop="deptName" />
|
||||
<el-table-column label="手机号码" prop="mobile" width="120" />
|
||||
<el-table-column label="状态" key="status">
|
||||
@@ -50,7 +43,6 @@
|
||||
v-model="scope.row.status"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
v-hasPermi="['basic:employee:update']"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
@@ -63,30 +55,11 @@
|
||||
/>
|
||||
<el-table-column label="操作" width="260">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['basic:employee:update']"
|
||||
>
|
||||
<el-button type="primary" link @click="openForm('update', scope.row.id)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['basic:employee:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleResetPwd(scope.row)"
|
||||
v-hasPermi="['basic:employee:password']"
|
||||
>
|
||||
重置密码
|
||||
</el-button>
|
||||
<el-button type="primary" link @click="handleDelete(scope.row.id)"> 删除 </el-button>
|
||||
<el-button type="primary" link @click="handleResetPwd(scope.row)"> 重置密码 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -86,7 +86,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
if (!formRef.value) return
|
||||
if (!formRef) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
|
||||
@@ -141,7 +141,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
if (!formRef.value) return
|
||||
if (!formRef) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" label-width="0" inline>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable>
|
||||
<el-option label="待审核" :value="1" />
|
||||
<el-option label="已撤销" :value="2" />
|
||||
<el-option label="已通过" :value="3" />
|
||||
<el-option label="已驳回" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="searchForm.dealDate"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="-"
|
||||
start-placeholder="成交日期"
|
||||
end-placeholder="成交日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.applyUser" placeholder="申请人" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.nickname"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="searchForm.applyTime"
|
||||
type="daterange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
range-separator="-"
|
||||
start-placeholder="申请日期"
|
||||
end-placeholder="申请日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch">查询</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
<el-button @click="batchAudit">批量审核</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" :selectable="(row) => row.state == 1" />
|
||||
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
||||
<el-table-column prop="name" label="线索名称" min-width="200px" />
|
||||
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
||||
<el-table-column prop="reason" label="售后原因" min-width="150px" />
|
||||
<el-table-column prop="refundAmount" label="退款金额" min-width="90px" />
|
||||
<el-table-column prop="isReturns" label="是否退货" min-width="90px" />
|
||||
<el-table-column prop="solution" label="解决方案" min-width="150px" />
|
||||
<el-table-column prop="signUserName" label="登记人" min-width="90px" />
|
||||
<el-table-column
|
||||
prop="dealDate"
|
||||
label="成交日期"
|
||||
min-width="120px"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column prop="applyUserName" label="申请人" min-width="90px" />
|
||||
<el-table-column
|
||||
prop="applyTime"
|
||||
label="申请时间"
|
||||
min-width="120px"
|
||||
:formatter="dateFormatter"
|
||||
/>
|
||||
<el-table-column prop="stateName" label="审核状态" fixed="right" min-width="90px" />
|
||||
<el-table-column label="操作" width="150px" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
text
|
||||
v-if="row.state == 1 && currentUserId == row.applyUser"
|
||||
v-hasPermi="['clue:order:after-sale']"
|
||||
@click="handleCancel(row.id)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="padding: 0"
|
||||
text
|
||||
v-if="row.state == 1"
|
||||
v-hasPermi="['clue:order:after-sale-audit']"
|
||||
@click="handleAudit(row)"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Pagination
|
||||
v-model:limit="searchForm.pageSize"
|
||||
v-model:page="searchForm.pageNo"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<DialogAfterSaleAudit ref="afterSaleAuditDialog" @success="getList" />
|
||||
<DialogAfterSaleDetail ref="afterSaleDetailDialog" />
|
||||
<DialogBatchAudit ref="batchAuditDialog" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="AfterSales">
|
||||
import * as AfterSaleApi from '@/api/clue/afterSale'
|
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
||||
import DialogAfterSaleAudit from './DialogAfterSaleAudit.vue'
|
||||
import DialogAfterSaleDetail from './DialogAfterSaleDetail.vue'
|
||||
import DialogBatchAudit from './DialogBatchAudit.vue'
|
||||
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
const afterSaleAuditDialog = ref()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const currentUserId = userStore.getUser.id
|
||||
|
||||
const searchForm = ref({
|
||||
signId: undefined,
|
||||
name: undefined,
|
||||
dealDate: [],
|
||||
state: undefined,
|
||||
dealUser: undefined,
|
||||
createDate: [],
|
||||
createUser: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
})
|
||||
|
||||
const userOptions = ref([])
|
||||
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
|
||||
function handleSearch() {
|
||||
searchForm.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
function handleReset() {
|
||||
searchForm.value = {
|
||||
signId: undefined,
|
||||
name: undefined,
|
||||
state: undefined,
|
||||
dealDate: [],
|
||||
dealUser: undefined,
|
||||
createDate: [],
|
||||
createUser: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
}
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await AfterSaleApi.getAfterSalePage(searchForm.value)
|
||||
tableList.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const batchIds = ref([])
|
||||
function handleSelectionChange(val) {
|
||||
batchIds.value = val.map((it) => it.id)
|
||||
}
|
||||
|
||||
const batchAuditDialog = ref()
|
||||
function batchAudit() {
|
||||
if (batchIds.value.length) {
|
||||
batchAuditDialog.value.open('aftersale', batchIds.value)
|
||||
} else {
|
||||
message.info('请选择表格中需要审核的数据')
|
||||
}
|
||||
}
|
||||
|
||||
const afterSaleDetailDialog = ref()
|
||||
function handleDetail(id) {
|
||||
afterSaleDetailDialog.value.open(id)
|
||||
}
|
||||
async function handleCancel(id) {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.confirm('是否确认撤销申请?')
|
||||
// 发起删除
|
||||
await AfterSaleApi.cancelApplyAfterSale({ id })
|
||||
message.success('撤销成功!')
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
function handleAudit(row) {
|
||||
afterSaleAuditDialog.value.open(row)
|
||||
}
|
||||
|
||||
function getOptions() {
|
||||
getUserOption().then((data) => {
|
||||
userOptions.value = data
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
getOptions()
|
||||
handleSearch()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user