联调
This commit is contained in:
5
.env
5
.env
@@ -1,6 +1,9 @@
|
||||
# 标题
|
||||
VITE_APP_TITLE=CRM管理系统
|
||||
|
||||
# 开发环境
|
||||
VITE_NODE_ENV=development
|
||||
|
||||
# 项目本地运行端口号
|
||||
VITE_PORT=80
|
||||
|
||||
@@ -8,7 +11,7 @@ VITE_PORT=80
|
||||
VITE_OPEN=true
|
||||
|
||||
# 租户开关
|
||||
VITE_APP_TENANT_ENABLE=true
|
||||
VITE_APP_TENANT_ENABLE=false
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 本地开发环境
|
||||
NODE_ENV=development
|
||||
VITE_NODE_ENV=development
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
2
.env.dev
2
.env.dev
@@ -1,5 +1,5 @@
|
||||
# 开发环境
|
||||
NODE_ENV=production
|
||||
VITE_NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 本地开发环境
|
||||
NODE_ENV=development
|
||||
VITE_NODE_ENV=development
|
||||
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
|
||||
|
||||
2
.env.pro
2
.env.pro
@@ -1,5 +1,5 @@
|
||||
# 生产环境
|
||||
NODE_ENV=production
|
||||
VITE_NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 生产环境
|
||||
NODE_ENV=production
|
||||
VITE_NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 开发环境
|
||||
NODE_ENV=production
|
||||
VITE_NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 测试环境
|
||||
NODE_ENV=production
|
||||
VITE_NODE_ENV=production
|
||||
|
||||
VITE_DEV=false
|
||||
|
||||
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -14,7 +14,7 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
|
||||
18
package.json
18
package.json
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "yudao-ui-admin-vue3",
|
||||
"version": "1.7.3-snapshot",
|
||||
"description": "基于vue3、vite4、element-plus、typesScript",
|
||||
"author": "xingyu",
|
||||
"name": "ss-crm-manage",
|
||||
"version": "1.0.0",
|
||||
"description": "莳松crm管理系统",
|
||||
"author": "ss",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"i": "pnpm install",
|
||||
@@ -137,13 +137,5 @@
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitee.com/yudaocode/yudao-ui-admin-vue3"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues"
|
||||
},
|
||||
"homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3"
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getActivityList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/activity/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getProcessDefinitionBpmnXML = async (id: number) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/get-bpmn-xml?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
export const getProcessDefinitionPage = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/page',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const getProcessDefinitionList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type FormVO = {
|
||||
id: number
|
||||
name: string
|
||||
conf: string
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建工作流的表单定义
|
||||
export const createForm = async (data: FormVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/form/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新工作流的表单定义
|
||||
export const updateForm = async (data: FormVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/form/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工作流的表单定义
|
||||
export const deleteForm = async (id: number) => {
|
||||
return await request.delete({
|
||||
url: '/bpm/form/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工作流的表单定义
|
||||
export const getForm = async (id: number) => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工作流的表单定义分页
|
||||
export const getFormPage = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/page',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获得动态表单的精简列表
|
||||
export const getSimpleFormList = async () => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/list-all-simple'
|
||||
})
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type LeaveVO = {
|
||||
id: number
|
||||
result: number
|
||||
type: number
|
||||
reason: string
|
||||
processInstanceId: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建请假申请
|
||||
export const createLeave = async (data: LeaveVO) => {
|
||||
return await request.post({ url: '/bpm/oa/leave/create', data: data })
|
||||
}
|
||||
|
||||
// 获得请假申请
|
||||
export const getLeave = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/oa/leave/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得请假申请分页
|
||||
export const getLeavePage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/bpm/oa/leave/page', params })
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type ProcessDefinitionVO = {
|
||||
id: string
|
||||
version: number
|
||||
deploymentTIme: string
|
||||
suspensionState: number
|
||||
}
|
||||
|
||||
export type ModelVO = {
|
||||
id: number
|
||||
formName: string
|
||||
key: string
|
||||
name: string
|
||||
description: string
|
||||
category: string
|
||||
formType: number
|
||||
formId: number
|
||||
formCustomCreatePath: string
|
||||
formCustomViewPath: string
|
||||
processDefinition: ProcessDefinitionVO
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
bpmnXml: string
|
||||
}
|
||||
|
||||
export const getModelPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/model/page', params })
|
||||
}
|
||||
|
||||
export const getModel = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/model/get?id=' + id })
|
||||
}
|
||||
|
||||
export const updateModel = async (data: ModelVO) => {
|
||||
return await request.put({ url: '/bpm/model/update', data: data })
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export const updateModelState = async (id: number, state: number) => {
|
||||
const data = {
|
||||
id: id,
|
||||
state: state
|
||||
}
|
||||
return await request.put({ url: '/bpm/model/update-state', data: data })
|
||||
}
|
||||
|
||||
export const createModel = async (data: ModelVO) => {
|
||||
return await request.post({ url: '/bpm/model/create', data: data })
|
||||
}
|
||||
|
||||
export const deleteModel = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/model/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const deployModel = async (id: number) => {
|
||||
return await request.post({ url: '/bpm/model/deploy?id=' + id })
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type Task = {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export type ProcessInstanceVO = {
|
||||
id: number
|
||||
name: string
|
||||
processDefinitionId: string
|
||||
category: string
|
||||
result: number
|
||||
tasks: Task[]
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
businessKey: string
|
||||
createTime: string
|
||||
endTime: string
|
||||
}
|
||||
|
||||
export const getMyProcessInstancePage = async (params) => {
|
||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||
}
|
||||
|
||||
export const createProcessInstance = async (data) => {
|
||||
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
||||
}
|
||||
|
||||
export const cancelProcessInstance = async (id: number, reason: string) => {
|
||||
const data = {
|
||||
id: id,
|
||||
reason: reason
|
||||
}
|
||||
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
|
||||
}
|
||||
|
||||
export const getProcessInstance = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type TaskVO = {
|
||||
id: number
|
||||
}
|
||||
|
||||
export const getTodoTaskPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/task/todo-page', params })
|
||||
}
|
||||
|
||||
export const getDoneTaskPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/task/done-page', params })
|
||||
}
|
||||
|
||||
export const completeTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/complete', data })
|
||||
}
|
||||
|
||||
export const approveTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/approve', data })
|
||||
}
|
||||
|
||||
export const rejectTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/reject', data })
|
||||
}
|
||||
export const backTask = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/back', data })
|
||||
}
|
||||
|
||||
export const updateTaskAssignee = async (data) => {
|
||||
return await request.put({ url: '/bpm/task/update-assignee', data })
|
||||
}
|
||||
|
||||
export const getTaskListByProcessInstanceId = async (processInstanceId) => {
|
||||
return await request.get({
|
||||
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
|
||||
})
|
||||
}
|
||||
|
||||
// 导出任务
|
||||
export const exportTask = async (params) => {
|
||||
return await request.download({ url: '/bpm/task/export', params })
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type TaskAssignVO = {
|
||||
id: number
|
||||
modelId: string
|
||||
processDefinitionId: string
|
||||
taskDefinitionKey: string
|
||||
taskDefinitionName: string
|
||||
options: string[]
|
||||
type: number
|
||||
}
|
||||
|
||||
export const getTaskAssignRuleList = async (params) => {
|
||||
return await request.get({ url: '/bpm/task-assign-rule/list', params })
|
||||
}
|
||||
|
||||
export const createTaskAssignRule = async (data: TaskAssignVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/task-assign-rule/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const updateTaskAssignRule = async (data: TaskAssignVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/task-assign-rule/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type UserGroupVO = {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
memberUserIds: number[]
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建用户组
|
||||
export const createUserGroup = async (data: UserGroupVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/user-group/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新用户组
|
||||
export const updateUserGroup = async (data: UserGroupVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/user-group/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户组
|
||||
export const deleteUserGroup = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/user-group/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获得用户组
|
||||
export const getUserGroup = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/user-group/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得用户组分页
|
||||
export const getUserGroupPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/user-group/page', params })
|
||||
}
|
||||
|
||||
// 获取用户组精简信息列表
|
||||
export const getSimpleUserGroupList = async (): Promise<UserGroupVO[]> => {
|
||||
return await request.get({ url: '/bpm/user-group/list-all-simple' })
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ApiAccessLogVO {
|
||||
id: number
|
||||
traceId: string
|
||||
userId: number
|
||||
userType: number
|
||||
applicationName: string
|
||||
requestMethod: string
|
||||
requestParams: string
|
||||
requestUrl: string
|
||||
userIp: string
|
||||
userAgent: string
|
||||
beginTime: Date
|
||||
endTIme: Date
|
||||
duration: number
|
||||
resultCode: number
|
||||
resultMsg: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiAccessLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/api-access-log/page', params })
|
||||
}
|
||||
|
||||
// 导出API 访问日志
|
||||
export const exportApiAccessLog = (params) => {
|
||||
return request.download({ url: '/infra/api-access-log/export-excel', params })
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ApiErrorLogVO {
|
||||
id: number
|
||||
traceId: string
|
||||
userId: number
|
||||
userType: number
|
||||
applicationName: string
|
||||
requestMethod: string
|
||||
requestParams: string
|
||||
requestUrl: string
|
||||
userIp: string
|
||||
userAgent: string
|
||||
exceptionTime: Date
|
||||
exceptionName: string
|
||||
exceptionMessage: string
|
||||
exceptionRootCauseMessage: string
|
||||
exceptionStackTrace: string
|
||||
exceptionClassName: string
|
||||
exceptionFileName: string
|
||||
exceptionMethodName: string
|
||||
exceptionLineNumber: number
|
||||
processUserId: number
|
||||
processStatus: number
|
||||
processTime: Date
|
||||
resultCode: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiErrorLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/api-error-log/page', params })
|
||||
}
|
||||
|
||||
// 更新 API 错误日志的处理状态
|
||||
export const updateApiErrorLogPage = (id: number, processStatus: number) => {
|
||||
return request.put({
|
||||
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
|
||||
})
|
||||
}
|
||||
|
||||
// 导出API 访问日志
|
||||
export const exportApiErrorLog = (params) => {
|
||||
return request.download({
|
||||
url: '/infra/api-error-log/export-excel',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type CodegenTableVO = {
|
||||
id: number
|
||||
tableId: number
|
||||
isParentMenuIdValid: boolean
|
||||
dataSourceConfigId: number
|
||||
scene: number
|
||||
tableName: string
|
||||
tableComment: string
|
||||
remark: string
|
||||
moduleName: string
|
||||
businessName: string
|
||||
className: string
|
||||
classComment: string
|
||||
author: string
|
||||
createTime: Date
|
||||
updateTime: Date
|
||||
templateType: number
|
||||
parentMenuId: number
|
||||
}
|
||||
|
||||
export type CodegenColumnVO = {
|
||||
id: number
|
||||
tableId: number
|
||||
columnName: string
|
||||
dataType: string
|
||||
columnComment: string
|
||||
nullable: number
|
||||
primaryKey: number
|
||||
autoIncrement: string
|
||||
ordinalPosition: number
|
||||
javaType: string
|
||||
javaField: string
|
||||
dictType: string
|
||||
example: string
|
||||
createOperation: number
|
||||
updateOperation: number
|
||||
listOperation: number
|
||||
listOperationCondition: string
|
||||
listOperationResult: number
|
||||
htmlType: string
|
||||
}
|
||||
|
||||
export type DatabaseTableVO = {
|
||||
name: string
|
||||
comment: string
|
||||
}
|
||||
|
||||
export type CodegenDetailVO = {
|
||||
table: CodegenTableVO
|
||||
columns: CodegenColumnVO[]
|
||||
}
|
||||
|
||||
export type CodegenPreviewVO = {
|
||||
filePath: string
|
||||
code: string
|
||||
}
|
||||
|
||||
export type CodegenUpdateReqVO = {
|
||||
table: CodegenTableVO | any
|
||||
columns: CodegenColumnVO[]
|
||||
}
|
||||
|
||||
export type CodegenCreateListReqVO = {
|
||||
dataSourceConfigId: number
|
||||
tableNames: string[]
|
||||
}
|
||||
|
||||
// 查询列表代码生成表定义
|
||||
export const getCodegenTablePage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/codegen/table/page', params })
|
||||
}
|
||||
|
||||
// 查询详情代码生成表定义
|
||||
export const getCodegenTable = (id: number) => {
|
||||
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
|
||||
}
|
||||
|
||||
// 新增代码生成表定义
|
||||
export const createCodegenTable = (data: CodegenCreateListReqVO) => {
|
||||
return request.post({ url: '/infra/codegen/create', data })
|
||||
}
|
||||
|
||||
// 修改代码生成表定义
|
||||
export const updateCodegenTable = (data: CodegenUpdateReqVO) => {
|
||||
return request.put({ url: '/infra/codegen/update', data })
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,同步数据库的表和字段定义
|
||||
export const syncCodegenFromDB = (id: number) => {
|
||||
return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
||||
}
|
||||
|
||||
// 基于 SQL 建表语句,同步数据库的表和字段定义
|
||||
export const syncCodegenFromSQL = (id: number, sql: string) => {
|
||||
return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
|
||||
}
|
||||
|
||||
// 预览生成代码
|
||||
export const previewCodegen = (id: number) => {
|
||||
return request.get({ url: '/infra/codegen/preview?tableId=' + id })
|
||||
}
|
||||
|
||||
// 下载生成代码
|
||||
export const downloadCodegen = (id: number) => {
|
||||
return request.download({ url: '/infra/codegen/download?tableId=' + id })
|
||||
}
|
||||
|
||||
// 获得表定义
|
||||
export const getSchemaTableList = (params) => {
|
||||
return request.get({ url: '/infra/codegen/db/table/list', params })
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,创建代码生成器的表定义
|
||||
export const createCodegenList = (data) => {
|
||||
return request.post({ url: '/infra/codegen/create-list', data })
|
||||
}
|
||||
|
||||
// 删除代码生成表定义
|
||||
export const deleteCodegenTable = (id: number) => {
|
||||
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||
}
|
||||
@@ -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: '/infra/config/page', params })
|
||||
}
|
||||
|
||||
// 查询参数详情
|
||||
export const getConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export const getConfigKey = (configKey: string) => {
|
||||
return request.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
|
||||
}
|
||||
|
||||
// 新增参数
|
||||
export const createConfig = (data: ConfigVO) => {
|
||||
return request.post({ url: '/infra/config/create', data })
|
||||
}
|
||||
|
||||
// 修改参数
|
||||
export const updateConfig = (data: ConfigVO) => {
|
||||
return request.put({ url: '/infra/config/update', data })
|
||||
}
|
||||
|
||||
// 删除参数
|
||||
export const deleteConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export const exportConfig = (params) => {
|
||||
return request.download({ url: '/infra/config/export', params })
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DataSourceConfigVO {
|
||||
id: number | undefined
|
||||
name: string
|
||||
url: string
|
||||
username: string
|
||||
password: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
// 新增数据源配置
|
||||
export const createDataSourceConfig = (data: DataSourceConfigVO) => {
|
||||
return request.post({ url: '/infra/data-source-config/create', data })
|
||||
}
|
||||
|
||||
// 修改数据源配置
|
||||
export const updateDataSourceConfig = (data: DataSourceConfigVO) => {
|
||||
return request.put({ url: '/infra/data-source-config/update', data })
|
||||
}
|
||||
|
||||
// 删除数据源配置
|
||||
export const deleteDataSourceConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 查询数据源配置详情
|
||||
export const getDataSourceConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/data-source-config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 查询数据源配置列表
|
||||
export const getDataSourceConfigList = () => {
|
||||
return request.get({ url: '/infra/data-source-config/list' })
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 导出Html
|
||||
export const exportHtml = () => {
|
||||
return request.download({ url: '/infra/db-doc/export-html' })
|
||||
}
|
||||
|
||||
// 导出Word
|
||||
export const exportWord = () => {
|
||||
return request.download({ url: '/infra/db-doc/export-word' })
|
||||
}
|
||||
|
||||
// 导出Markdown
|
||||
export const exportMarkdown = () => {
|
||||
return request.download({ url: '/infra/db-doc/export-markdown' })
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface FilePageReqVO extends PageParam {
|
||||
path?: string
|
||||
type?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 查询文件列表
|
||||
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 })
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface FileClientConfig {
|
||||
basePath: string
|
||||
host?: string
|
||||
port?: number
|
||||
username?: string
|
||||
password?: string
|
||||
mode?: string
|
||||
endpoint?: string
|
||||
bucket?: string
|
||||
accessKey?: string
|
||||
accessSecret?: string
|
||||
domain: string
|
||||
}
|
||||
|
||||
export interface FileConfigVO {
|
||||
id: number
|
||||
name: string
|
||||
storage: any
|
||||
master: boolean
|
||||
visible: boolean
|
||||
config: FileClientConfig
|
||||
remark: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询文件配置列表
|
||||
export const getFileConfigPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/file-config/page', params })
|
||||
}
|
||||
|
||||
// 查询文件配置详情
|
||||
export const getFileConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/file-config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 更新文件配置为主配置
|
||||
export const updateFileConfigMaster = (id: number) => {
|
||||
return request.put({ url: '/infra/file-config/update-master?id=' + id })
|
||||
}
|
||||
|
||||
// 新增文件配置
|
||||
export const createFileConfig = (data: FileConfigVO) => {
|
||||
return request.post({ url: '/infra/file-config/create', data })
|
||||
}
|
||||
|
||||
// 修改文件配置
|
||||
export const updateFileConfig = (data: FileConfigVO) => {
|
||||
return request.put({ url: '/infra/file-config/update', data })
|
||||
}
|
||||
|
||||
// 删除文件配置
|
||||
export const deleteFileConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/file-config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 测试文件配置
|
||||
export const testFileConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/file-config/test?id=' + id })
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface JobVO {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
handlerName: string
|
||||
handlerParam: string
|
||||
cronExpression: string
|
||||
retryCount: number
|
||||
retryInterval: number
|
||||
monitorTimeout: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 任务列表
|
||||
export const getJobPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/job/page', params })
|
||||
}
|
||||
|
||||
// 任务详情
|
||||
export const getJob = (id: number) => {
|
||||
return request.get({ url: '/infra/job/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增任务
|
||||
export const createJob = (data: JobVO) => {
|
||||
return request.post({ url: '/infra/job/create', data })
|
||||
}
|
||||
|
||||
// 修改定时任务调度
|
||||
export const updateJob = (data: JobVO) => {
|
||||
return request.put({ url: '/infra/job/update', data })
|
||||
}
|
||||
|
||||
// 删除定时任务调度
|
||||
export const deleteJob = (id: number) => {
|
||||
return request.delete({ url: '/infra/job/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出定时任务调度
|
||||
export const exportJob = (params) => {
|
||||
return request.download({ url: '/infra/job/export-excel', params })
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export const updateJobStatus = (id: number, status: number) => {
|
||||
const params = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/infra/job/update-status', params })
|
||||
}
|
||||
|
||||
// 定时任务立即执行一次
|
||||
export const runJob = (id: number) => {
|
||||
return request.put({ url: '/infra/job/trigger?id=' + id })
|
||||
}
|
||||
|
||||
// 获得定时任务的下 n 次执行时间
|
||||
export const getJobNextTimes = (id: number) => {
|
||||
return request.get({ url: '/infra/job/get_next_times?id=' + id })
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface JobLogVO {
|
||||
id: number
|
||||
jobId: number
|
||||
handlerName: string
|
||||
handlerParam: string
|
||||
cronExpression: string
|
||||
executeIndex: string
|
||||
beginTime: string
|
||||
endTime: string
|
||||
duration: string
|
||||
status: number
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 任务日志列表
|
||||
export const getJobLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/infra/job-log/page', params })
|
||||
}
|
||||
|
||||
// 任务日志详情
|
||||
export const getJobLog = (id: number) => {
|
||||
return request.get({ url: '/infra/job-log/get?id=' + id })
|
||||
}
|
||||
|
||||
// 导出定时任务日志
|
||||
export const exportJobLog = (params) => {
|
||||
return request.download({
|
||||
url: '/infra/job-log/export-excel',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 获取redis 监控信息
|
||||
*/
|
||||
export const getCache = () => {
|
||||
return request.get({ url: '/infra/redis/get-monitor-info' })
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
export interface RedisMonitorInfoVO {
|
||||
info: RedisInfoVO
|
||||
dbSize: number
|
||||
commandStats: RedisCommandStatsVO[]
|
||||
}
|
||||
|
||||
export interface RedisInfoVO {
|
||||
io_threaded_reads_processed: string
|
||||
tracking_clients: string
|
||||
uptime_in_seconds: string
|
||||
cluster_connections: string
|
||||
current_cow_size: string
|
||||
maxmemory_human: string
|
||||
aof_last_cow_size: string
|
||||
master_replid2: string
|
||||
mem_replication_backlog: string
|
||||
aof_rewrite_scheduled: string
|
||||
total_net_input_bytes: string
|
||||
rss_overhead_ratio: string
|
||||
hz: string
|
||||
current_cow_size_age: string
|
||||
redis_build_id: string
|
||||
errorstat_BUSYGROUP: string
|
||||
aof_last_bgrewrite_status: string
|
||||
multiplexing_api: string
|
||||
client_recent_max_output_buffer: string
|
||||
allocator_resident: string
|
||||
mem_fragmentation_bytes: string
|
||||
aof_current_size: string
|
||||
repl_backlog_first_byte_offset: string
|
||||
tracking_total_prefixes: string
|
||||
redis_mode: string
|
||||
redis_git_dirty: string
|
||||
aof_delayed_fsync: string
|
||||
allocator_rss_bytes: string
|
||||
repl_backlog_histlen: string
|
||||
io_threads_active: string
|
||||
rss_overhead_bytes: string
|
||||
total_system_memory: string
|
||||
loading: string
|
||||
evicted_keys: string
|
||||
maxclients: string
|
||||
cluster_enabled: string
|
||||
redis_version: string
|
||||
repl_backlog_active: string
|
||||
mem_aof_buffer: string
|
||||
allocator_frag_bytes: string
|
||||
io_threaded_writes_processed: string
|
||||
instantaneous_ops_per_sec: string
|
||||
used_memory_human: string
|
||||
total_error_replies: string
|
||||
role: string
|
||||
maxmemory: string
|
||||
used_memory_lua: string
|
||||
rdb_current_bgsave_time_sec: string
|
||||
used_memory_startup: string
|
||||
used_cpu_sys_main_thread: string
|
||||
lazyfree_pending_objects: string
|
||||
aof_pending_bio_fsync: string
|
||||
used_memory_dataset_perc: string
|
||||
allocator_frag_ratio: string
|
||||
arch_bits: string
|
||||
used_cpu_user_main_thread: string
|
||||
mem_clients_normal: string
|
||||
expired_time_cap_reached_count: string
|
||||
unexpected_error_replies: string
|
||||
mem_fragmentation_ratio: string
|
||||
aof_last_rewrite_time_sec: string
|
||||
master_replid: string
|
||||
aof_rewrite_in_progress: string
|
||||
lru_clock: string
|
||||
maxmemory_policy: string
|
||||
run_id: string
|
||||
latest_fork_usec: string
|
||||
tracking_total_items: string
|
||||
total_commands_processed: string
|
||||
expired_keys: string
|
||||
errorstat_ERR: string
|
||||
used_memory: string
|
||||
module_fork_in_progress: string
|
||||
errorstat_WRONGPASS: string
|
||||
aof_buffer_length: string
|
||||
dump_payload_sanitizations: string
|
||||
mem_clients_slaves: string
|
||||
keyspace_misses: string
|
||||
server_time_usec: string
|
||||
executable: string
|
||||
lazyfreed_objects: string
|
||||
db0: string
|
||||
used_memory_peak_human: string
|
||||
keyspace_hits: string
|
||||
rdb_last_cow_size: string
|
||||
aof_pending_rewrite: string
|
||||
used_memory_overhead: string
|
||||
active_defrag_hits: string
|
||||
tcp_port: string
|
||||
uptime_in_days: string
|
||||
used_memory_peak_perc: string
|
||||
current_save_keys_processed: string
|
||||
blocked_clients: string
|
||||
total_reads_processed: string
|
||||
expire_cycle_cpu_milliseconds: string
|
||||
sync_partial_err: string
|
||||
used_memory_scripts_human: string
|
||||
aof_current_rewrite_time_sec: string
|
||||
aof_enabled: string
|
||||
process_supervised: string
|
||||
master_repl_offset: string
|
||||
used_memory_dataset: string
|
||||
used_cpu_user: string
|
||||
rdb_last_bgsave_status: string
|
||||
tracking_total_keys: string
|
||||
atomicvar_api: string
|
||||
allocator_rss_ratio: string
|
||||
client_recent_max_input_buffer: string
|
||||
clients_in_timeout_table: string
|
||||
aof_last_write_status: string
|
||||
mem_allocator: string
|
||||
used_memory_scripts: string
|
||||
used_memory_peak: string
|
||||
process_id: string
|
||||
master_failover_state: string
|
||||
errorstat_NOAUTH: string
|
||||
used_cpu_sys: string
|
||||
repl_backlog_size: string
|
||||
connected_slaves: string
|
||||
current_save_keys_total: string
|
||||
gcc_version: string
|
||||
total_system_memory_human: string
|
||||
sync_full: string
|
||||
connected_clients: string
|
||||
module_fork_last_cow_size: string
|
||||
total_writes_processed: string
|
||||
allocator_active: string
|
||||
total_net_output_bytes: string
|
||||
pubsub_channels: string
|
||||
current_fork_perc: string
|
||||
active_defrag_key_hits: string
|
||||
rdb_changes_since_last_save: string
|
||||
instantaneous_input_kbps: string
|
||||
used_memory_rss_human: string
|
||||
configured_hz: string
|
||||
expired_stale_perc: string
|
||||
active_defrag_misses: string
|
||||
used_cpu_sys_children: string
|
||||
number_of_cached_scripts: string
|
||||
sync_partial_ok: string
|
||||
used_memory_lua_human: string
|
||||
rdb_last_save_time: string
|
||||
pubsub_patterns: string
|
||||
slave_expires_tracked_keys: string
|
||||
redis_git_sha1: string
|
||||
used_memory_rss: string
|
||||
rdb_last_bgsave_time_sec: string
|
||||
os: string
|
||||
mem_not_counted_for_evict: string
|
||||
active_defrag_running: string
|
||||
rejected_connections: string
|
||||
aof_rewrite_buffer_length: string
|
||||
total_forks: string
|
||||
active_defrag_key_misses: string
|
||||
allocator_allocated: string
|
||||
aof_base_size: string
|
||||
instantaneous_output_kbps: string
|
||||
second_repl_offset: string
|
||||
rdb_bgsave_in_progress: string
|
||||
used_cpu_user_children: string
|
||||
total_connections_received: string
|
||||
migrate_cached_sockets: string
|
||||
}
|
||||
|
||||
export interface RedisCommandStatsVO {
|
||||
command: string
|
||||
calls: number
|
||||
usec: number
|
||||
}
|
||||
@@ -37,11 +37,6 @@ export const getInfo = () => {
|
||||
return request.get({ url: '/system/auth/get-permission-info' })
|
||||
}
|
||||
|
||||
// 路由
|
||||
export const getAsyncRoutes = () => {
|
||||
return request.get({ url: '/system/auth/list-menus' })
|
||||
}
|
||||
|
||||
//获取登录验证码
|
||||
export const sendSmsCode = (data: SmsCodeVO) => {
|
||||
return request.post({ url: '/system/auth/send-sms-code', data })
|
||||
@@ -67,3 +62,8 @@ export const getCode = (data) => {
|
||||
export const reqCheck = (data) => {
|
||||
return request.postOriginal({ url: 'system/captcha/check', data })
|
||||
}
|
||||
|
||||
// 获取应用信息
|
||||
export const getAppInfo = (instanceId: number) => {
|
||||
return request.get({ url: 'system/serviceInstance/getInstanceInfo?instanceId=' + instanceId })
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface AccountVO {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
|
||||
// 创建公众号账号
|
||||
export const createAccount = async (data) => {
|
||||
return await request.post({ url: '/mp/account/create', data })
|
||||
}
|
||||
|
||||
// 更新公众号账号
|
||||
export const updateAccount = async (data) => {
|
||||
return request.put({ url: '/mp/account/update', data: data })
|
||||
}
|
||||
|
||||
// 删除公众号账号
|
||||
export const deleteAccount = async (id) => {
|
||||
return request.delete({ url: '/mp/account/delete?id=' + id, method: 'delete' })
|
||||
}
|
||||
|
||||
// 获得公众号账号
|
||||
export const getAccount = async (id) => {
|
||||
return request.get({ url: '/mp/account/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得公众号账号分页
|
||||
export const getAccountPage = async (query) => {
|
||||
return request.get({ url: '/mp/account/page', params: query })
|
||||
}
|
||||
|
||||
// 获取公众号账号精简信息列表
|
||||
export const getSimpleAccountList = async () => {
|
||||
return request.get({ url: '/mp/account/list-all-simple' })
|
||||
}
|
||||
|
||||
// 生成公众号二维码
|
||||
export const generateAccountQrCode = async (id) => {
|
||||
return request.put({ url: '/mp/account/generate-qr-code?id=' + id })
|
||||
}
|
||||
|
||||
// 清空公众号 API 配额
|
||||
export const clearAccountQuota = async (id) => {
|
||||
return request.put({ url: '/mp/account/clear-quota?id=' + id })
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 创建公众号的自动回复
|
||||
export const createAutoReply = (data) => {
|
||||
return request.post({
|
||||
url: '/mp/auto-reply/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新公众号的自动回复
|
||||
export const updateAutoReply = (data) => {
|
||||
return request.put({
|
||||
url: '/mp/auto-reply/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号的自动回复
|
||||
export const deleteAutoReply = (id) => {
|
||||
return request.delete({
|
||||
url: '/mp/auto-reply/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得公众号的自动回复
|
||||
export const getAutoReply = (id) => {
|
||||
return request.get({
|
||||
url: '/mp/auto-reply/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得公众号的自动回复分页
|
||||
export const getAutoReplyPage = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/auto-reply/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得公众号草稿分页
|
||||
export const getDraftPage = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/draft/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 创建公众号草稿
|
||||
export const createDraft = (accountId, articles) => {
|
||||
return request.post({
|
||||
url: '/mp/draft/create?accountId=' + accountId,
|
||||
data: {
|
||||
articles
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 更新公众号草稿
|
||||
export const updateDraft = (accountId, mediaId, articles) => {
|
||||
return request.put({
|
||||
url: '/mp/draft/update?accountId=' + accountId + '&mediaId=' + mediaId,
|
||||
method: 'put',
|
||||
data: articles
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号草稿
|
||||
export const deleteDraft = (accountId, mediaId) => {
|
||||
return request.delete({
|
||||
url: '/mp/draft/delete?accountId=' + accountId + '&mediaId=' + mediaId
|
||||
})
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得公众号素材分页
|
||||
export const getFreePublishPage = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/free-publish/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号素材
|
||||
export const deleteFreePublish = (accountId, articleId) => {
|
||||
return request.delete({
|
||||
url: '/mp/free-publish/delete?accountId=' + accountId + '&articleId=' + articleId
|
||||
})
|
||||
}
|
||||
|
||||
// 发布公众号素材
|
||||
export const submitFreePublish = (accountId, mediaId) => {
|
||||
return request.post({
|
||||
url: '/mp/free-publish/submit?accountId=' + accountId + '&mediaId=' + mediaId
|
||||
})
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得公众号素材分页
|
||||
export const getMaterialPage = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/material/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号永久素材
|
||||
export const deletePermanentMaterial = (id) => {
|
||||
return request.delete({
|
||||
url: '/mp/material/delete-permanent?id=' + id
|
||||
})
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得公众号菜单列表
|
||||
export const getMenuList = (accountId) => {
|
||||
return request.get({
|
||||
url: '/mp/menu/list?accountId=' + accountId
|
||||
})
|
||||
}
|
||||
|
||||
// 保存公众号菜单
|
||||
export const saveMenu = (accountId, menus) => {
|
||||
return request.post({
|
||||
url: '/mp/menu/save',
|
||||
data: {
|
||||
accountId,
|
||||
menus
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号菜单
|
||||
export const deleteMenu = (accountId) => {
|
||||
return request.delete({
|
||||
url: '/mp/menu/delete?accountId=' + accountId
|
||||
})
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得公众号消息分页
|
||||
export const getMessagePage = (query: PageParam) => {
|
||||
return request.get({
|
||||
url: '/mp/message/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 给粉丝发送消息
|
||||
export const sendMessage = (data) => {
|
||||
return request.post({
|
||||
url: '/mp/message/send',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获取消息发送概况数据
|
||||
export const getUpstreamMessage = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/statistics/upstream-message',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 用户增减数据
|
||||
export const getUserSummary = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/statistics/user-summary',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得用户累计数据
|
||||
export const getUserCumulate = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/statistics/user-cumulate',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得接口分析数据
|
||||
export const getInterfaceSummary = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/statistics/interface-summary',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface TagVO {
|
||||
id?: number
|
||||
name: string
|
||||
accountId: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 创建公众号标签
|
||||
export const createTag = (data: TagVO) => {
|
||||
return request.post({
|
||||
url: '/mp/tag/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新公众号标签
|
||||
export const updateTag = (data: TagVO) => {
|
||||
return request.put({
|
||||
url: '/mp/tag/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号标签
|
||||
export const deleteTag = (id: number) => {
|
||||
return request.delete({
|
||||
url: '/mp/tag/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得公众号标签
|
||||
export const getTag = (id: number) => {
|
||||
return request.get({
|
||||
url: '/mp/tag/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得公众号标签分页
|
||||
export const getTagPage = (query: PageParam) => {
|
||||
return request.get({
|
||||
url: '/mp/tag/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取公众号标签精简信息列表
|
||||
export const getSimpleTagList = () => {
|
||||
return request.get({
|
||||
url: '/mp/tag/list-all-simple'
|
||||
})
|
||||
}
|
||||
|
||||
// 同步公众号标签
|
||||
export const syncTag = (accountId: number) => {
|
||||
return request.post({
|
||||
url: '/mp/tag/sync?accountId=' + accountId
|
||||
})
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 更新公众号粉丝
|
||||
export const updateUser = (data) => {
|
||||
return request.put({
|
||||
url: '/mp/user/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得公众号粉丝
|
||||
export const getUser = (id) => {
|
||||
return request.get({
|
||||
url: '/mp/user/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得公众号粉丝分页
|
||||
export const getUserPage = (query) => {
|
||||
return request.get({
|
||||
url: '/mp/user/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 同步公众号粉丝
|
||||
export const syncUser = (accountId) => {
|
||||
return request.post({
|
||||
url: '/mp/tag/sync?accountId=' + accountId
|
||||
})
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface AppVO {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
remark: string
|
||||
payNotifyUrl: string
|
||||
refundNotifyUrl: string
|
||||
merchantId: number
|
||||
merchantName: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface AppPageReqVO extends PageParam {
|
||||
name?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
payNotifyUrl?: string
|
||||
refundNotifyUrl?: string
|
||||
merchantName?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface AppExportReqVO {
|
||||
name?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
payNotifyUrl?: string
|
||||
refundNotifyUrl?: string
|
||||
merchantName?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface AppUpdateStatusReqVO {
|
||||
id: number
|
||||
status: number
|
||||
}
|
||||
|
||||
// 查询列表支付应用
|
||||
export const getAppPage = (params: AppPageReqVO) => {
|
||||
return request.get({ url: '/pay/app/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付应用
|
||||
export const getApp = (id: number) => {
|
||||
return request.get({ url: '/pay/app/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增支付应用
|
||||
export const createApp = (data: AppVO) => {
|
||||
return request.post({ url: '/pay/app/create', data })
|
||||
}
|
||||
|
||||
// 修改支付应用
|
||||
export const updateApp = (data: AppVO) => {
|
||||
return request.put({ url: '/pay/app/update', data })
|
||||
}
|
||||
|
||||
// 支付应用信息状态修改
|
||||
export const changeAppStatus = (data: AppUpdateStatusReqVO) => {
|
||||
return request.put({ url: '/pay/app/update-status', data: data })
|
||||
}
|
||||
|
||||
// 删除支付应用
|
||||
export const deleteApp = (id: number) => {
|
||||
return request.delete({ url: '/pay/app/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付应用
|
||||
export const exportApp = (params: AppExportReqVO) => {
|
||||
return request.download({ url: '/pay/app/export-excel', params })
|
||||
}
|
||||
|
||||
// 根据商ID称搜索应用列表
|
||||
export const getAppListByMerchantId = (merchantId: number) => {
|
||||
return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ChannelVO {
|
||||
id: number
|
||||
code: string
|
||||
config: string
|
||||
status: number
|
||||
remark: string
|
||||
feeRate: number
|
||||
merchantId: number
|
||||
appId: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询列表支付渠道
|
||||
export const getChannelPage = (params: PageParam) => {
|
||||
return request.get({ url: '/pay/channel/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付渠道
|
||||
export const getChannel = (merchantId: number, appId: string, code: string) => {
|
||||
const params = {
|
||||
merchantId: merchantId,
|
||||
appId: appId,
|
||||
code: code
|
||||
}
|
||||
return request.get({ url: '/pay/channel/get-channel', params: params })
|
||||
}
|
||||
|
||||
// 新增支付渠道
|
||||
export const createChannel = (data: ChannelVO) => {
|
||||
return request.post({ url: '/pay/channel/create', data })
|
||||
}
|
||||
|
||||
// 修改支付渠道
|
||||
export const updateChannel = (data: ChannelVO) => {
|
||||
return request.put({ url: '/pay/channel/update', data })
|
||||
}
|
||||
|
||||
// 删除支付渠道
|
||||
export const deleteChannel = (id: number) => {
|
||||
return request.delete({ url: '/pay/channel/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付渠道
|
||||
export const exportChannel = (params) => {
|
||||
return request.download({ url: '/pay/channel/export-excel', params })
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface MerchantVO {
|
||||
id: number
|
||||
no: string
|
||||
name: string
|
||||
shortName: string
|
||||
status: number
|
||||
remark: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface MerchantPageReqVO extends PageParam {
|
||||
no?: string
|
||||
name?: string
|
||||
shortName?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface MerchantExportReqVO {
|
||||
no?: string
|
||||
name?: string
|
||||
shortName?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 查询列表支付商户
|
||||
export const getMerchantPage = (params: MerchantPageReqVO) => {
|
||||
return request.get({ url: '/pay/merchant/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付商户
|
||||
export const getMerchant = (id: number) => {
|
||||
return request.get({ url: '/pay/merchant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据商户名称搜索商户列表
|
||||
export const getMerchantListByName = (name?: string) => {
|
||||
return request.get({
|
||||
url: '/pay/merchant/list-by-name',
|
||||
params: {
|
||||
name: name
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增支付商户
|
||||
export const createMerchant = (data: MerchantVO) => {
|
||||
return request.post({ url: '/pay/merchant/create', data })
|
||||
}
|
||||
|
||||
// 修改支付商户
|
||||
export const updateMerchant = (data: MerchantVO) => {
|
||||
return request.put({ url: '/pay/merchant/update', data })
|
||||
}
|
||||
|
||||
// 删除支付商户
|
||||
export const deleteMerchant = (id: number) => {
|
||||
return request.delete({ url: '/pay/merchant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付商户
|
||||
export const exportMerchant = (params: MerchantExportReqVO) => {
|
||||
return request.download({ url: '/pay/merchant/export-excel', params })
|
||||
}
|
||||
|
||||
// 支付商户状态修改
|
||||
export const updateMerchantStatus = (id: number, status: number) => {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/pay/merchant/update-status', data: data })
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OrderVO {
|
||||
id: number
|
||||
merchantId: number
|
||||
appId: number
|
||||
channelId: number
|
||||
channelCode: string
|
||||
merchantOrderId: string
|
||||
subject: string
|
||||
body: string
|
||||
notifyUrl: string
|
||||
notifyStatus: number
|
||||
amount: number
|
||||
channelFeeRate: number
|
||||
channelFeeAmount: number
|
||||
status: number
|
||||
userIp: string
|
||||
expireTime: Date
|
||||
successTime: Date
|
||||
notifyTime: Date
|
||||
successExtensionId: number
|
||||
refundStatus: number
|
||||
refundTimes: number
|
||||
refundAmount: number
|
||||
channelUserId: string
|
||||
channelOrderNo: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface OrderPageReqVO extends PageParam {
|
||||
merchantId?: number
|
||||
appId?: number
|
||||
channelId?: number
|
||||
channelCode?: string
|
||||
merchantOrderId?: string
|
||||
subject?: string
|
||||
body?: string
|
||||
notifyUrl?: string
|
||||
notifyStatus?: number
|
||||
amount?: number
|
||||
channelFeeRate?: number
|
||||
channelFeeAmount?: number
|
||||
status?: number
|
||||
expireTime?: Date[]
|
||||
successTime?: Date[]
|
||||
notifyTime?: Date[]
|
||||
successExtensionId?: number
|
||||
refundStatus?: number
|
||||
refundTimes?: number
|
||||
channelUserId?: string
|
||||
channelOrderNo?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface OrderExportReqVO {
|
||||
merchantId?: number
|
||||
appId?: number
|
||||
channelId?: number
|
||||
channelCode?: string
|
||||
merchantOrderId?: string
|
||||
subject?: string
|
||||
body?: string
|
||||
notifyUrl?: string
|
||||
notifyStatus?: number
|
||||
amount?: number
|
||||
channelFeeRate?: number
|
||||
channelFeeAmount?: number
|
||||
status?: number
|
||||
expireTime?: Date[]
|
||||
successTime?: Date[]
|
||||
notifyTime?: Date[]
|
||||
successExtensionId?: number
|
||||
refundStatus?: number
|
||||
refundTimes?: number
|
||||
channelUserId?: string
|
||||
channelOrderNo?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 查询列表支付订单
|
||||
export const getOrderPage = async (params: OrderPageReqVO) => {
|
||||
return await request.get({ url: '/pay/order/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付订单
|
||||
export const getOrder = async (id: number) => {
|
||||
return await request.get({ url: '/pay/order/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得支付订单的明细
|
||||
export const getOrderDetail = async (id: number) => {
|
||||
return await request.get({ url: '/pay/order/get-detail?id=' + id })
|
||||
}
|
||||
|
||||
// 新增支付订单
|
||||
export const createOrder = async (data: OrderVO) => {
|
||||
return await request.post({ url: '/pay/order/create', data })
|
||||
}
|
||||
|
||||
// 修改支付订单
|
||||
export const updateOrder = async (data: OrderVO) => {
|
||||
return await request.put({ url: '/pay/order/update', data })
|
||||
}
|
||||
|
||||
// 删除支付订单
|
||||
export const deleteOrder = async (id: number) => {
|
||||
return await request.delete({ url: '/pay/order/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付订单
|
||||
export const exportOrder = async (params: OrderExportReqVO) => {
|
||||
return await request.download({ url: '/pay/order/export-excel', params })
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface RefundVO {
|
||||
id: number
|
||||
merchantId: number
|
||||
appId: number
|
||||
channelId: number
|
||||
channelCode: string
|
||||
orderId: string
|
||||
tradeNo: string
|
||||
merchantOrderId: string
|
||||
merchantRefundNo: string
|
||||
notifyUrl: string
|
||||
notifyStatus: number
|
||||
status: number
|
||||
type: number
|
||||
payAmount: number
|
||||
refundAmount: number
|
||||
reason: string
|
||||
userIp: string
|
||||
channelOrderNo: string
|
||||
channelRefundNo: string
|
||||
channelErrorCode: string
|
||||
channelErrorMsg: string
|
||||
channelExtras: string
|
||||
expireTime: Date
|
||||
successTime: Date
|
||||
notifyTime: Date
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface RefundPageReqVO extends PageParam {
|
||||
merchantId?: number
|
||||
appId?: number
|
||||
channelId?: number
|
||||
channelCode?: string
|
||||
orderId?: string
|
||||
tradeNo?: string
|
||||
merchantOrderId?: string
|
||||
merchantRefundNo?: string
|
||||
notifyUrl?: string
|
||||
notifyStatus?: number
|
||||
status?: number
|
||||
type?: number
|
||||
payAmount?: number
|
||||
refundAmount?: number
|
||||
reason?: string
|
||||
userIp?: string
|
||||
channelOrderNo?: string
|
||||
channelRefundNo?: string
|
||||
channelErrorCode?: string
|
||||
channelErrorMsg?: string
|
||||
channelExtras?: string
|
||||
expireTime?: Date[]
|
||||
successTime?: Date[]
|
||||
notifyTime?: Date[]
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface PayRefundExportReqVO {
|
||||
merchantId?: number
|
||||
appId?: number
|
||||
channelId?: number
|
||||
channelCode?: string
|
||||
orderId?: string
|
||||
tradeNo?: string
|
||||
merchantOrderId?: string
|
||||
merchantRefundNo?: string
|
||||
notifyUrl?: string
|
||||
notifyStatus?: number
|
||||
status?: number
|
||||
type?: number
|
||||
payAmount?: number
|
||||
refundAmount?: number
|
||||
reason?: string
|
||||
userIp?: string
|
||||
channelOrderNo?: string
|
||||
channelRefundNo?: string
|
||||
channelErrorCode?: string
|
||||
channelErrorMsg?: string
|
||||
channelExtras?: string
|
||||
expireTime?: Date[]
|
||||
successTime?: Date[]
|
||||
notifyTime?: Date[]
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 查询列表退款订单
|
||||
export const getRefundPage = (params: RefundPageReqVO) => {
|
||||
return request.get({ url: '/pay/refund/page', params })
|
||||
}
|
||||
|
||||
// 查询详情退款订单
|
||||
export const getRefund = (id: number) => {
|
||||
return request.get({ url: '/pay/refund/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增退款订单
|
||||
export const createRefund = (data: RefundVO) => {
|
||||
return request.post({ url: '/pay/refund/create', data })
|
||||
}
|
||||
|
||||
// 修改退款订单
|
||||
export const updateRefund = (data: RefundVO) => {
|
||||
return request.put({ url: '/pay/refund/update', data })
|
||||
}
|
||||
|
||||
// 删除退款订单
|
||||
export const deleteRefund = (id: number) => {
|
||||
return request.delete({ url: '/pay/refund/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出退款订单
|
||||
export const exportRefund = (params: PayRefundExportReqVO) => {
|
||||
return request.download({ url: '/pay/refund/export-excel', params })
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得地区树
|
||||
export const getAreaTree = async () => {
|
||||
return await request.get({ url: '/system/area/tree' })
|
||||
}
|
||||
|
||||
export const getChildrenArea = async (id: number) => {
|
||||
return await request.get({ url: '/system/area/get-children?id=' + id })
|
||||
}
|
||||
|
||||
export const getAreaListByIds = async (ids) => {
|
||||
return await request.get({ url: '/system/area/get-by-ids?ids=' + ids })
|
||||
}
|
||||
|
||||
// 获得 IP 对应的地区名
|
||||
export const getAreaByIp = async (ip: string) => {
|
||||
return await request.get({ url: '/system/area/get-by-ip?ip=' + ip })
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ErrorCodeVO {
|
||||
id: number | undefined
|
||||
type: number
|
||||
applicationName: string
|
||||
code: number | undefined
|
||||
message: string
|
||||
memo: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询错误码列表
|
||||
export const getErrorCodePage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/error-code/page', params })
|
||||
}
|
||||
|
||||
// 查询错误码详情
|
||||
export const getErrorCode = (id: number) => {
|
||||
return request.get({ url: '/system/error-code/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增错误码
|
||||
export const createErrorCode = (data: ErrorCodeVO) => {
|
||||
return request.post({ url: '/system/error-code/create', data })
|
||||
}
|
||||
|
||||
// 修改错误码
|
||||
export const updateErrorCode = (data: ErrorCodeVO) => {
|
||||
return request.put({ url: '/system/error-code/update', data })
|
||||
}
|
||||
|
||||
// 删除错误码
|
||||
export const deleteErrorCode = (id: number) => {
|
||||
return request.delete({ url: '/system/error-code/delete?id=' + id })
|
||||
}
|
||||
// 导出错误码
|
||||
export const excelErrorCode = (params) => {
|
||||
return request.download({ url: '/system/error-code/export-excel', params })
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface LoginLogVO {
|
||||
id: number
|
||||
logType: number
|
||||
traceId: number
|
||||
userId: number
|
||||
userType: number
|
||||
username: string
|
||||
status: number
|
||||
userIp: string
|
||||
userAgent: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询登录日志列表
|
||||
export const getLoginLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/login-log/page', params })
|
||||
}
|
||||
|
||||
// 导出登录日志
|
||||
export const exportLoginLog = (params) => {
|
||||
return request.download({ url: '/system/login-log/export', params })
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface MailAccountVO {
|
||||
id: number
|
||||
mail: string
|
||||
username: string
|
||||
password: string
|
||||
host: string
|
||||
port: number
|
||||
sslEnable: boolean
|
||||
}
|
||||
|
||||
// 查询邮箱账号列表
|
||||
export const getMailAccountPage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/system/mail-account/page', params })
|
||||
}
|
||||
|
||||
// 查询邮箱账号详情
|
||||
export const getMailAccount = async (id: number) => {
|
||||
return await request.get({ url: '/system/mail-account/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增邮箱账号
|
||||
export const createMailAccount = async (data: MailAccountVO) => {
|
||||
return await request.post({ url: '/system/mail-account/create', data })
|
||||
}
|
||||
|
||||
// 修改邮箱账号
|
||||
export const updateMailAccount = async (data: MailAccountVO) => {
|
||||
return await request.put({ url: '/system/mail-account/update', data })
|
||||
}
|
||||
|
||||
// 删除邮箱账号
|
||||
export const deleteMailAccount = async (id: number) => {
|
||||
return await request.delete({ url: '/system/mail-account/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获得邮箱账号精简列表
|
||||
export const getSimpleMailAccountList = async () => {
|
||||
return request.get({ url: '/system/mail-account/list-all-simple' })
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface MailLogVO {
|
||||
id: number
|
||||
userId: number
|
||||
userType: number
|
||||
toMail: string
|
||||
accountId: number
|
||||
fromMail: string
|
||||
templateId: number
|
||||
templateCode: string
|
||||
templateNickname: string
|
||||
templateTitle: string
|
||||
templateContent: string
|
||||
templateParams: string
|
||||
sendStatus: number
|
||||
sendTime: Date
|
||||
sendMessageId: string
|
||||
sendException: string
|
||||
}
|
||||
|
||||
// 查询邮件日志列表
|
||||
export const getMailLogPage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/system/mail-log/page', params })
|
||||
}
|
||||
|
||||
// 查询邮件日志详情
|
||||
export const getMailLog = async (id: number) => {
|
||||
return await request.get({ url: '/system/mail-log/get?id=' + id })
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface MailTemplateVO {
|
||||
id: number
|
||||
name: string
|
||||
code: string
|
||||
accountId: number
|
||||
nickname: string
|
||||
title: string
|
||||
content: string
|
||||
params: string
|
||||
status: number
|
||||
remark: string
|
||||
}
|
||||
|
||||
export interface MailSendReqVO {
|
||||
mail: string
|
||||
templateCode: string
|
||||
templateParams: Map<String, Object>
|
||||
}
|
||||
|
||||
// 查询邮件模版列表
|
||||
export const getMailTemplatePage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/system/mail-template/page', params })
|
||||
}
|
||||
|
||||
// 查询邮件模版详情
|
||||
export const getMailTemplate = async (id: number) => {
|
||||
return await request.get({ url: '/system/mail-template/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增邮件模版
|
||||
export const createMailTemplate = async (data: MailTemplateVO) => {
|
||||
return await request.post({ url: '/system/mail-template/create', data })
|
||||
}
|
||||
|
||||
// 修改邮件模版
|
||||
export const updateMailTemplate = async (data: MailTemplateVO) => {
|
||||
return await request.put({ url: '/system/mail-template/update', data })
|
||||
}
|
||||
|
||||
// 删除邮件模版
|
||||
export const deleteMailTemplate = async (id: number) => {
|
||||
return await request.delete({ url: '/system/mail-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 发送邮件
|
||||
export const sendMail = (data: MailSendReqVO) => {
|
||||
return request.post({ url: '/system/mail-template/send-mail', data })
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface NoticeVO {
|
||||
id: number | undefined
|
||||
title: string
|
||||
type: number
|
||||
content: string
|
||||
status: number
|
||||
remark: string
|
||||
creator: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询公告列表
|
||||
export const getNoticePage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/notice/page', params })
|
||||
}
|
||||
|
||||
// 查询公告详情
|
||||
export const getNotice = (id: number) => {
|
||||
return request.get({ url: '/system/notice/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增公告
|
||||
export const createNotice = (data: NoticeVO) => {
|
||||
return request.post({ url: '/system/notice/create', data })
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export const updateNotice = (data: NoticeVO) => {
|
||||
return request.put({ url: '/system/notice/update', data })
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export const deleteNotice = (id: number) => {
|
||||
return request.delete({ url: '/system/notice/delete?id=' + id })
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OAuth2ClientVO {
|
||||
id: number
|
||||
clientId: string
|
||||
secret: string
|
||||
name: string
|
||||
logo: string
|
||||
description: string
|
||||
status: number
|
||||
accessTokenValiditySeconds: number
|
||||
refreshTokenValiditySeconds: number
|
||||
redirectUris: string[]
|
||||
autoApprove: boolean
|
||||
authorizedGrantTypes: string[]
|
||||
scopes: string[]
|
||||
authorities: string[]
|
||||
resourceIds: string[]
|
||||
additionalInformation: string
|
||||
isAdditionalInformationJson: boolean
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询 OAuth2 客户端的列表
|
||||
export const getOAuth2ClientPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/oauth2-client/page', params })
|
||||
}
|
||||
|
||||
// 查询 OAuth2 客户端的详情
|
||||
export const getOAuth2Client = (id: number) => {
|
||||
return request.get({ url: '/system/oauth2-client/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增 OAuth2 客户端
|
||||
export const createOAuth2Client = (data: OAuth2ClientVO) => {
|
||||
return request.post({ url: '/system/oauth2-client/create', data })
|
||||
}
|
||||
|
||||
// 修改 OAuth2 客户端
|
||||
export const updateOAuth2Client = (data: OAuth2ClientVO) => {
|
||||
return request.put({ url: '/system/oauth2-client/update', data })
|
||||
}
|
||||
|
||||
// 删除 OAuth2
|
||||
export const deleteOAuth2Client = (id: number) => {
|
||||
return request.delete({ url: '/system/oauth2-client/delete?id=' + id })
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface OAuth2TokenVO {
|
||||
id: number
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
userType: number
|
||||
clientId: string
|
||||
createTime: Date
|
||||
expiresTime: Date
|
||||
}
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/oauth2-token/page', params })
|
||||
}
|
||||
|
||||
// 删除 token
|
||||
export const deleteAccessToken = (accessToken: string) => {
|
||||
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type OperateLogVO = {
|
||||
id: number
|
||||
userNickname: string
|
||||
traceId: string
|
||||
userId: number
|
||||
module: string
|
||||
name: string
|
||||
type: number
|
||||
content: string
|
||||
exts: Map<String, Object>
|
||||
requestMethod: string
|
||||
requestUrl: string
|
||||
userIp: string
|
||||
userAgent: string
|
||||
javaMethod: string
|
||||
javaMethodArgs: string
|
||||
startTime: Date
|
||||
duration: number
|
||||
resultCode: number
|
||||
resultMsg: string
|
||||
resultData: string
|
||||
}
|
||||
|
||||
// 查询操作日志列表
|
||||
export const getOperateLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/operate-log/page', params })
|
||||
}
|
||||
// 导出操作日志
|
||||
export const exportOperateLog = (params) => {
|
||||
return request.download({ url: '/system/operate-log/export', params })
|
||||
}
|
||||
@@ -18,7 +18,7 @@ export interface PermissionAssignRoleDataScopeReqVO {
|
||||
|
||||
// 查询角色拥有的菜单权限
|
||||
export const getRoleMenuList = async (roleId: number) => {
|
||||
return await request.get({ url: '/system/permission/list-role-resources?roleId=' + roleId })
|
||||
return await request.get({ url: '/system/permission/list-role-menus?roleId=' + roleId })
|
||||
}
|
||||
|
||||
// 赋予角色菜单权限
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface PostVO {
|
||||
id?: number
|
||||
name: string
|
||||
code: string
|
||||
sort: number
|
||||
status: number
|
||||
remark: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
// 查询岗位列表
|
||||
export const getPostPage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/system/post/page', params })
|
||||
}
|
||||
|
||||
// 获取岗位精简信息列表
|
||||
export const getSimplePostList = async (): Promise<PostVO[]> => {
|
||||
return await request.get({ url: '/system/post/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询岗位详情
|
||||
export const getPost = async (id: number) => {
|
||||
return await request.get({ url: '/system/post/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export const createPost = async (data: PostVO) => {
|
||||
return await request.post({ url: '/system/post/create', data })
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export const updatePost = async (data: PostVO) => {
|
||||
return await request.put({ url: '/system/post/update', data })
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export const deletePost = async (id: number) => {
|
||||
return await request.delete({ url: '/system/post/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出岗位
|
||||
export const exportPost = async (params) => {
|
||||
return await request.download({ url: '/system/post/export', params })
|
||||
}
|
||||
@@ -42,20 +42,7 @@ export const updateRole = async (data: RoleVO) => {
|
||||
return await request.put({ url: '/system/role/update', data })
|
||||
}
|
||||
|
||||
// 修改角色状态
|
||||
export const updateRoleStatus = async (data: UpdateStatusReqVO) => {
|
||||
return await request.put({ url: '/system/role/update-status', data })
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export const deleteRole = async (id: number) => {
|
||||
return await request.delete({ url: '/system/role/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出角色
|
||||
export const exportRole = (params) => {
|
||||
return request.download({
|
||||
url: '/system/role/export-excel',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
import qs from 'qs'
|
||||
|
||||
export interface SensitiveWordVO {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
description: string
|
||||
tags: string[]
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface SensitiveWordTestReqVO {
|
||||
text: string
|
||||
tag: string[]
|
||||
}
|
||||
|
||||
// 查询敏感词列表
|
||||
export const getSensitiveWordPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/sensitive-word/page', params })
|
||||
}
|
||||
|
||||
// 查询敏感词详情
|
||||
export const getSensitiveWord = (id: number) => {
|
||||
return request.get({ url: '/system/sensitive-word/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增敏感词
|
||||
export const createSensitiveWord = (data: SensitiveWordVO) => {
|
||||
return request.post({ url: '/system/sensitive-word/create', data })
|
||||
}
|
||||
|
||||
// 修改敏感词
|
||||
export const updateSensitiveWord = (data: SensitiveWordVO) => {
|
||||
return request.put({ url: '/system/sensitive-word/update', data })
|
||||
}
|
||||
|
||||
// 删除敏感词
|
||||
export const deleteSensitiveWord = (id: number) => {
|
||||
return request.delete({ url: '/system/sensitive-word/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出敏感词
|
||||
export const exportSensitiveWord = (params) => {
|
||||
return request.download({ url: '/system/sensitive-word/export-excel', params })
|
||||
}
|
||||
|
||||
// 获取所有敏感词的标签数组
|
||||
export const getSensitiveWordTagList = () => {
|
||||
return request.get({ url: '/system/sensitive-word/get-tags' })
|
||||
}
|
||||
|
||||
// 获得文本所包含的不合法的敏感词数组
|
||||
export const validateText = (query: SensitiveWordTestReqVO) => {
|
||||
return request.get({
|
||||
url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' })
|
||||
})
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface SmsChannelVO {
|
||||
id: number
|
||||
code: string
|
||||
status: number
|
||||
signature: string
|
||||
remark: string
|
||||
apiKey: string
|
||||
apiSecret: string
|
||||
callbackUrl: string
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询短信渠道列表
|
||||
export const getSmsChannelPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/sms-channel/page', params })
|
||||
}
|
||||
|
||||
// 获得短信渠道精简列表
|
||||
export function getSimpleSmsChannelList() {
|
||||
return request.get({ url: '/system/sms-channel/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询短信渠道详情
|
||||
export const getSmsChannel = (id: number) => {
|
||||
return request.get({ url: '/system/sms-channel/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增短信渠道
|
||||
export const createSmsChannel = (data: SmsChannelVO) => {
|
||||
return request.post({ url: '/system/sms-channel/create', data })
|
||||
}
|
||||
|
||||
// 修改短信渠道
|
||||
export const updateSmsChannel = (data: SmsChannelVO) => {
|
||||
return request.put({ url: '/system/sms-channel/update', data })
|
||||
}
|
||||
|
||||
// 删除短信渠道
|
||||
export const deleteSmsChannel = (id: number) => {
|
||||
return request.delete({ url: '/system/sms-channel/delete?id=' + id })
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface SmsLogVO {
|
||||
id: number | null
|
||||
channelId: number | null
|
||||
channelCode: string
|
||||
templateId: number | null
|
||||
templateCode: string
|
||||
templateType: number | null
|
||||
templateContent: string
|
||||
templateParams: Map<string, object> | null
|
||||
apiTemplateId: string
|
||||
mobile: string
|
||||
userId: number | null
|
||||
userType: number | null
|
||||
sendStatus: number | null
|
||||
sendTime: Date | null
|
||||
sendCode: number | null
|
||||
sendMsg: string
|
||||
apiSendCode: string
|
||||
apiSendMsg: string
|
||||
apiRequestId: string
|
||||
apiSerialNo: string
|
||||
receiveStatus: number | null
|
||||
receiveTime: Date | null
|
||||
apiReceiveCode: string
|
||||
apiReceiveMsg: string
|
||||
createTime: Date | null
|
||||
}
|
||||
|
||||
// 查询短信日志列表
|
||||
export const getSmsLogPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/sms-log/page', params })
|
||||
}
|
||||
|
||||
// 导出短信日志
|
||||
export const exportSmsLog = (params) => {
|
||||
return request.download({ url: '/system/sms-log/export-excel', params })
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface SmsTemplateVO {
|
||||
id: number | null
|
||||
type: number | null
|
||||
status: number
|
||||
code: string
|
||||
name: string
|
||||
content: string
|
||||
remark: string
|
||||
apiTemplateId: string
|
||||
channelId: number | null
|
||||
channelCode?: string
|
||||
params?: string[]
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
export interface SendSmsReqVO {
|
||||
mobile: string
|
||||
templateCode: string
|
||||
templateParams: Map<String, Object>
|
||||
}
|
||||
|
||||
// 查询短信模板列表
|
||||
export const getSmsTemplatePage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/sms-template/page', params })
|
||||
}
|
||||
|
||||
// 查询短信模板详情
|
||||
export const getSmsTemplate = (id: number) => {
|
||||
return request.get({ url: '/system/sms-template/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增短信模板
|
||||
export const createSmsTemplate = (data: SmsTemplateVO) => {
|
||||
return request.post({ url: '/system/sms-template/create', data })
|
||||
}
|
||||
|
||||
// 修改短信模板
|
||||
export const updateSmsTemplate = (data: SmsTemplateVO) => {
|
||||
return request.put({ url: '/system/sms-template/update', data })
|
||||
}
|
||||
|
||||
// 删除短信模板
|
||||
export const deleteSmsTemplate = (id: number) => {
|
||||
return request.delete({ url: '/system/sms-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出短信模板
|
||||
export const exportSmsTemplate = (params) => {
|
||||
return request.download({
|
||||
url: '/system/sms-template/export-excel',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 发送短信
|
||||
export const sendSms = (data: SendSmsReqVO) => {
|
||||
return request.post({ url: '/system/sms-template/send-sms', data })
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface TenantVO {
|
||||
id: number
|
||||
name: string
|
||||
contactName: string
|
||||
contactMobile: string
|
||||
status: number
|
||||
domain: string
|
||||
packageId: number
|
||||
username: string
|
||||
password: string
|
||||
expireTime: Date
|
||||
accountCount: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface TenantPageReqVO extends PageParam {
|
||||
name?: string
|
||||
contactName?: string
|
||||
contactMobile?: string
|
||||
status?: number
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface TenantExportReqVO {
|
||||
name?: string
|
||||
contactName?: string
|
||||
contactMobile?: string
|
||||
status?: number
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 查询租户列表
|
||||
export const getTenantPage = (params: TenantPageReqVO) => {
|
||||
return request.get({ url: '/system/tenant/page', params })
|
||||
}
|
||||
|
||||
// 查询租户详情
|
||||
export const getTenant = (id: number) => {
|
||||
return request.get({ url: '/system/tenant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户
|
||||
export const createTenant = (data: TenantVO) => {
|
||||
return request.post({ url: '/system/tenant/create', data })
|
||||
}
|
||||
|
||||
// 修改租户
|
||||
export const updateTenant = (data: TenantVO) => {
|
||||
return request.put({ url: '/system/tenant/update', data })
|
||||
}
|
||||
|
||||
// 删除租户
|
||||
export const deleteTenant = (id: number) => {
|
||||
return request.delete({ url: '/system/tenant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出租户
|
||||
export const exportTenant = (params: TenantExportReqVO) => {
|
||||
return request.download({ url: '/system/tenant/export-excel', params })
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface TenantPackageVO {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
remark: string
|
||||
creator: string
|
||||
updater: string
|
||||
updateTime: string
|
||||
menuIds: number[]
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询租户套餐列表
|
||||
export const getTenantPackagePage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/tenant-package/page', params })
|
||||
}
|
||||
|
||||
// 获得租户
|
||||
export const getTenantPackage = (id: number) => {
|
||||
return request.get({ url: '/system/tenant-package/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户套餐
|
||||
export const createTenantPackage = (data: TenantPackageVO) => {
|
||||
return request.post({ url: '/system/tenant-package/create', data })
|
||||
}
|
||||
|
||||
// 修改租户套餐
|
||||
export const updateTenantPackage = (data: TenantPackageVO) => {
|
||||
return request.put({ url: '/system/tenant-package/update', data })
|
||||
}
|
||||
|
||||
// 删除租户套餐
|
||||
export const deleteTenantPackage = (id: number) => {
|
||||
return request.delete({ url: '/system/tenant-package/delete?id=' + id })
|
||||
}
|
||||
// 获取租户套餐精简信息列表
|
||||
export const getTenantPackageList = () => {
|
||||
return request.get({ url: '/system/tenant-package/get-simple-list' })
|
||||
}
|
||||
@@ -59,7 +59,7 @@ const dialogStyle = computed(() => {
|
||||
|
||||
<template>
|
||||
<ElDialog
|
||||
:close-on-click-modal="true"
|
||||
:close-on-click-modal="false"
|
||||
:fullscreen="isFullscreen"
|
||||
:width="width"
|
||||
destroy-on-close
|
||||
|
||||
@@ -167,7 +167,8 @@ const toolbarConfig = ref({
|
||||
'group-indent', // 缩进
|
||||
'emotion', // 表情
|
||||
'undo', // 撤销
|
||||
'redo' // 重做
|
||||
'redo', // 重做
|
||||
'fullScreen'
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
v-show="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:small="small"
|
||||
:background="true"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
:pager-count="pagerCount"
|
||||
:total="total"
|
||||
class="float-right mt-15px mb-15px"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:layout="layout"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
@@ -38,6 +39,14 @@ const props = defineProps({
|
||||
pagerCount: {
|
||||
type: Number,
|
||||
default: document.body.clientWidth < 992 ? 5 : 7
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
default: 'total, sizes, prev, pager, next, jumper'
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import errorCode from './errorCode'
|
||||
import { resetRouter } from '@/router'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
|
||||
const tenantEnable = import.meta.env.VITE_APP_TENANT_ENABLE
|
||||
const { result_code, base_url, request_timeout } = config
|
||||
|
||||
// 需要忽略的提示。忽略后,自动 Promise.reject('error')
|
||||
@@ -55,9 +54,9 @@ service.interceptors.request.use(
|
||||
;(config as Recordable).headers.Authorization = 'Bearer ' + getAccessToken() // 让每个请求携带自定义token
|
||||
}
|
||||
// 设置租户
|
||||
if (tenantEnable && tenantEnable === 'true') {
|
||||
const tenantId = getTenantId()
|
||||
if (tenantId) (config as Recordable).headers['tenant-id'] = tenantId
|
||||
const tenantId = getTenantId()
|
||||
if (tenantId) {
|
||||
;(config as Recordable).headers['tenant-id'] = tenantId
|
||||
}
|
||||
const params = config.params || {}
|
||||
const data = config.data || false
|
||||
|
||||
@@ -11,7 +11,7 @@ const appStore = useAppStore()
|
||||
|
||||
const show = ref(true)
|
||||
|
||||
const title = computed(() => appStore.getTitle)
|
||||
const title = computed(() => appStore.getAppInfo.instanceName)
|
||||
|
||||
const layout = computed(() => appStore.getLayout)
|
||||
|
||||
|
||||
19
src/layout/components/RoleSelect/index.vue
Normal file
19
src/layout/components/RoleSelect/index.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<el-select v-model="roleId" filterable @change="handleChangeRole" style="width: 150px">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script setup name="RoleSelect">
|
||||
const options = ref([
|
||||
{ value: 1, label: '超级管理员' },
|
||||
{ value: 2, label: '销售' }
|
||||
])
|
||||
const roleId = ref(1)
|
||||
|
||||
function handleChangeRole() {
|
||||
console.log('修改角色')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" name="Setting" setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useClipboard, useCssVar } from '@vueuse/core'
|
||||
|
||||
// import { ElMessage } from 'element-plus'
|
||||
// import { useClipboard, useCssVar } from '@vueuse/core'
|
||||
import { useCssVar } from '@vueuse/core'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
|
||||
@@ -10,8 +10,8 @@ import { colorIsDark, hexToRGB, lighten } from '@/utils/color'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
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 InterfaceDisplay from './components/InterfaceDisplay.vue'
|
||||
// import LayoutRadioPicker from './components/LayoutRadioPicker.vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
const appStore = useAppStore()
|
||||
@@ -106,85 +106,85 @@ watch(
|
||||
)
|
||||
|
||||
// 拷贝
|
||||
const copyConfig = async () => {
|
||||
const { copy, copied, isSupported } = useClipboard({
|
||||
source: `
|
||||
// 面包屑
|
||||
breadcrumb: ${appStore.getBreadcrumb},
|
||||
// 面包屑图标
|
||||
breadcrumbIcon: ${appStore.getBreadcrumbIcon},
|
||||
// 折叠图标
|
||||
hamburger: ${appStore.getHamburger},
|
||||
// 全屏图标
|
||||
screenfull: ${appStore.getScreenfull},
|
||||
// 尺寸图标
|
||||
size: ${appStore.getSize},
|
||||
// 多语言图标
|
||||
locale: ${appStore.getLocale},
|
||||
// 消息图标
|
||||
message: ${appStore.getMessage},
|
||||
// 标签页
|
||||
tagsView: ${appStore.getTagsView},
|
||||
// 标签页图标
|
||||
getTagsViewIcon: ${appStore.getTagsViewIcon},
|
||||
// logo
|
||||
logo: ${appStore.getLogo},
|
||||
// 菜单手风琴
|
||||
uniqueOpened: ${appStore.getUniqueOpened},
|
||||
// 固定header
|
||||
fixedHeader: ${appStore.getFixedHeader},
|
||||
// 页脚
|
||||
footer: ${appStore.getFooter},
|
||||
// 灰色模式
|
||||
greyMode: ${appStore.getGreyMode},
|
||||
// layout布局
|
||||
layout: '${appStore.getLayout}',
|
||||
// 暗黑模式
|
||||
isDark: ${appStore.getIsDark},
|
||||
// 组件尺寸
|
||||
currentSize: '${appStore.getCurrentSize}',
|
||||
// 主题相关
|
||||
theme: {
|
||||
// 主题色
|
||||
elColorPrimary: '${appStore.getTheme.elColorPrimary}',
|
||||
// 左侧菜单边框颜色
|
||||
leftMenuBorderColor: '${appStore.getTheme.leftMenuBorderColor}',
|
||||
// 左侧菜单背景颜色
|
||||
leftMenuBgColor: '${appStore.getTheme.leftMenuBgColor}',
|
||||
// 左侧菜单浅色背景颜色
|
||||
leftMenuBgLightColor: '${appStore.getTheme.leftMenuBgLightColor}',
|
||||
// 左侧菜单选中背景颜色
|
||||
leftMenuBgActiveColor: '${appStore.getTheme.leftMenuBgActiveColor}',
|
||||
// 左侧菜单收起选中背景颜色
|
||||
leftMenuCollapseBgActiveColor: '${appStore.getTheme.leftMenuCollapseBgActiveColor}',
|
||||
// 左侧菜单字体颜色
|
||||
leftMenuTextColor: '${appStore.getTheme.leftMenuTextColor}',
|
||||
// 左侧菜单选中字体颜色
|
||||
leftMenuTextActiveColor: '${appStore.getTheme.leftMenuTextActiveColor}',
|
||||
// logo字体颜色
|
||||
logoTitleTextColor: '${appStore.getTheme.logoTitleTextColor}',
|
||||
// logo边框颜色
|
||||
logoBorderColor: '${appStore.getTheme.logoBorderColor}',
|
||||
// 头部背景颜色
|
||||
topHeaderBgColor: '${appStore.getTheme.topHeaderBgColor}',
|
||||
// 头部字体颜色
|
||||
topHeaderTextColor: '${appStore.getTheme.topHeaderTextColor}',
|
||||
// 头部悬停颜色
|
||||
topHeaderHoverColor: '${appStore.getTheme.topHeaderHoverColor}',
|
||||
// 头部边框颜色
|
||||
topToolBorderColor: '${appStore.getTheme.topToolBorderColor}'
|
||||
}
|
||||
`
|
||||
})
|
||||
if (!isSupported) {
|
||||
ElMessage.error(t('setting.copyFailed'))
|
||||
} else {
|
||||
await copy()
|
||||
if (unref(copied)) {
|
||||
ElMessage.success(t('setting.copySuccess'))
|
||||
}
|
||||
}
|
||||
}
|
||||
// const copyConfig = async () => {
|
||||
// const { copy, copied, isSupported } = useClipboard({
|
||||
// source: `
|
||||
// // 面包屑
|
||||
// breadcrumb: ${appStore.getBreadcrumb},
|
||||
// // 面包屑图标
|
||||
// breadcrumbIcon: ${appStore.getBreadcrumbIcon},
|
||||
// // 折叠图标
|
||||
// hamburger: ${appStore.getHamburger},
|
||||
// // 全屏图标
|
||||
// screenfull: ${appStore.getScreenfull},
|
||||
// // 尺寸图标
|
||||
// size: ${appStore.getSize},
|
||||
// // 多语言图标
|
||||
// locale: ${appStore.getLocale},
|
||||
// // 消息图标
|
||||
// message: ${appStore.getMessage},
|
||||
// // 标签页
|
||||
// tagsView: ${appStore.getTagsView},
|
||||
// // 标签页图标
|
||||
// getTagsViewIcon: ${appStore.getTagsViewIcon},
|
||||
// // logo
|
||||
// logo: ${appStore.getLogo},
|
||||
// // 菜单手风琴
|
||||
// uniqueOpened: ${appStore.getUniqueOpened},
|
||||
// // 固定header
|
||||
// fixedHeader: ${appStore.getFixedHeader},
|
||||
// // 页脚
|
||||
// footer: ${appStore.getFooter},
|
||||
// // 灰色模式
|
||||
// greyMode: ${appStore.getGreyMode},
|
||||
// // layout布局
|
||||
// layout: '${appStore.getLayout}',
|
||||
// // 暗黑模式
|
||||
// isDark: ${appStore.getIsDark},
|
||||
// // 组件尺寸
|
||||
// currentSize: '${appStore.getCurrentSize}',
|
||||
// // 主题相关
|
||||
// theme: {
|
||||
// // 主题色
|
||||
// elColorPrimary: '${appStore.getTheme.elColorPrimary}',
|
||||
// // 左侧菜单边框颜色
|
||||
// leftMenuBorderColor: '${appStore.getTheme.leftMenuBorderColor}',
|
||||
// // 左侧菜单背景颜色
|
||||
// leftMenuBgColor: '${appStore.getTheme.leftMenuBgColor}',
|
||||
// // 左侧菜单浅色背景颜色
|
||||
// leftMenuBgLightColor: '${appStore.getTheme.leftMenuBgLightColor}',
|
||||
// // 左侧菜单选中背景颜色
|
||||
// leftMenuBgActiveColor: '${appStore.getTheme.leftMenuBgActiveColor}',
|
||||
// // 左侧菜单收起选中背景颜色
|
||||
// leftMenuCollapseBgActiveColor: '${appStore.getTheme.leftMenuCollapseBgActiveColor}',
|
||||
// // 左侧菜单字体颜色
|
||||
// leftMenuTextColor: '${appStore.getTheme.leftMenuTextColor}',
|
||||
// // 左侧菜单选中字体颜色
|
||||
// leftMenuTextActiveColor: '${appStore.getTheme.leftMenuTextActiveColor}',
|
||||
// // logo字体颜色
|
||||
// logoTitleTextColor: '${appStore.getTheme.logoTitleTextColor}',
|
||||
// // logo边框颜色
|
||||
// logoBorderColor: '${appStore.getTheme.logoBorderColor}',
|
||||
// // 头部背景颜色
|
||||
// topHeaderBgColor: '${appStore.getTheme.topHeaderBgColor}',
|
||||
// // 头部字体颜色
|
||||
// topHeaderTextColor: '${appStore.getTheme.topHeaderTextColor}',
|
||||
// // 头部悬停颜色
|
||||
// topHeaderHoverColor: '${appStore.getTheme.topHeaderHoverColor}',
|
||||
// // 头部边框颜色
|
||||
// topToolBorderColor: '${appStore.getTheme.topToolBorderColor}'
|
||||
// }
|
||||
// `
|
||||
// })
|
||||
// if (!isSupported) {
|
||||
// ElMessage.error(t('setting.copyFailed'))
|
||||
// } else {
|
||||
// await copy()
|
||||
// if (unref(copied)) {
|
||||
// ElMessage.success(t('setting.copySuccess'))
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 清空缓存
|
||||
const clear = () => {
|
||||
@@ -216,8 +216,8 @@ const clear = () => {
|
||||
<ThemeSwitch />
|
||||
|
||||
<!-- 布局 -->
|
||||
<ElDivider>{{ t('setting.layout') }}</ElDivider>
|
||||
<LayoutRadioPicker />
|
||||
<!-- <ElDivider>{{ t('setting.layout') }}</ElDivider> -->
|
||||
<!-- <LayoutRadioPicker /> -->
|
||||
|
||||
<!-- 系统主题 -->
|
||||
<ElDivider>{{ t('setting.systemTheme') }}</ElDivider>
|
||||
@@ -274,13 +274,13 @@ const clear = () => {
|
||||
</div>
|
||||
|
||||
<!-- 界面显示 -->
|
||||
<ElDivider>{{ t('setting.interfaceDisplay') }}</ElDivider>
|
||||
<InterfaceDisplay />
|
||||
<!-- <ElDivider>{{ t('setting.interfaceDisplay') }}</ElDivider>
|
||||
<InterfaceDisplay /> -->
|
||||
|
||||
<ElDivider />
|
||||
<div>
|
||||
<!-- <div>
|
||||
<ElButton class="w-full" type="primary" @click="copyConfig">{{ t('setting.copy') }}</ElButton>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="mt-5px">
|
||||
<ElButton class="w-full" type="danger" @click="clear">
|
||||
{{ t('setting.clearAndReset') }}
|
||||
|
||||
@@ -11,7 +11,7 @@ const { setWatermark } = useWatermark()
|
||||
const prefixCls = getPrefixCls('interface-display')
|
||||
const appStore = useAppStore()
|
||||
|
||||
const water = ref()
|
||||
const water = ref('安徽莳松科技有限公司')
|
||||
|
||||
// 面包屑
|
||||
const breadcrumb = ref(appStore.getBreadcrumb)
|
||||
@@ -124,6 +124,7 @@ const fixedMenuChange = (show: boolean) => {
|
||||
const setWater = () => {
|
||||
setWatermark(water.value)
|
||||
}
|
||||
setWater()
|
||||
|
||||
const layout = computed(() => appStore.getLayout)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Screenfull } from '@/layout/components/Screenfull'
|
||||
import { Breadcrumb } from '@/layout/components/Breadcrumb'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import RoleSelect from './RoleSelect/index.vue'
|
||||
|
||||
const { getPrefixCls, variables } = useDesign()
|
||||
|
||||
@@ -50,6 +51,7 @@ export default defineComponent({
|
||||
</div>
|
||||
) : undefined}
|
||||
<div class="h-full flex items-center">
|
||||
<RoleSelect />
|
||||
{screenfull.value ? (
|
||||
<Screenfull class="hover-trigger" color="var(--top-header-text-color)"></Screenfull>
|
||||
) : undefined}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useDesign } from '@/hooks/web/useDesign'
|
||||
import avatarImg from '@/assets/imgs/avatar.gif'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import { getTenantId, getAppId } from '@/utils/auth'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -34,18 +35,17 @@ const loginOut = () => {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(async () => {
|
||||
const tenantId = getTenantId()
|
||||
const appId = getAppId()
|
||||
await userStore.loginOut()
|
||||
tagsViewStore.delAllViews()
|
||||
replace('/login?redirect=/index')
|
||||
replace(`/login?tenantId=${tenantId}&appId=${appId}`)
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
const toProfile = async () => {
|
||||
push('/user/profile')
|
||||
}
|
||||
const toDocument = () => {
|
||||
window.open('https://doc.iocoder.cn/')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -68,10 +68,6 @@ const toDocument = () => {
|
||||
<Icon icon="ep:tools" />
|
||||
<div @click="toProfile">{{ t('common.profile') }}</div>
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem>
|
||||
<Icon icon="ep:menu" />
|
||||
<div @click="toDocument">{{ t('common.document') }}</div>
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem divided @click="loginOut">
|
||||
<Icon icon="ep:switch-button" />
|
||||
<div>{{ t('common.loginOut') }}</div>
|
||||
|
||||
@@ -67,7 +67,7 @@ export default {
|
||||
hasRole: `请设置角色权限标签值`
|
||||
},
|
||||
setting: {
|
||||
projectSetting: '项目配置',
|
||||
projectSetting: '主题配置',
|
||||
theme: '主题',
|
||||
layout: '布局',
|
||||
systemTheme: '系统主题',
|
||||
|
||||
@@ -12,14 +12,7 @@ const { start, done } = useNProgress()
|
||||
|
||||
const { loadStart, loadDone } = usePageLoading()
|
||||
// 路由不重定向白名单
|
||||
const whiteList = [
|
||||
'/login',
|
||||
'/social-login',
|
||||
'/auth-redirect',
|
||||
'/bind',
|
||||
'/register',
|
||||
'/oauthLogin/gitee'
|
||||
]
|
||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register']
|
||||
|
||||
// 路由加载前
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
|
||||
2
src/plugins/cache/index.js
vendored
2
src/plugins/cache/index.js
vendored
@@ -1,7 +1,7 @@
|
||||
import router from '@/router'
|
||||
import { name as appName } from '../../../package.json'
|
||||
|
||||
let name = `${appName}-${import.meta.env.VITE_APP_ENV}`
|
||||
let name = `${appName}-${import.meta.env.VITE_NODE_ENV}`
|
||||
|
||||
const sessionCache = {
|
||||
set(key, value) {
|
||||
|
||||
@@ -50,309 +50,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
name: 'Home',
|
||||
meta: { title: '统计报表' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/Home/Index.vue'),
|
||||
name: 'Index',
|
||||
meta: {
|
||||
title: t('router.home'),
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'channel',
|
||||
component: () => import('@/views/Home/channel.vue'),
|
||||
name: 'ChannelStatistics',
|
||||
meta: {
|
||||
title: '渠道统计',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'status',
|
||||
component: () => import('@/views/Home/status.vue'),
|
||||
name: 'StatusStatistics',
|
||||
meta: {
|
||||
title: '线索状态统计',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/clue',
|
||||
component: Layout,
|
||||
redirect: '/clue',
|
||||
name: 'Clue',
|
||||
meta: { title: '线索管理' },
|
||||
children: [
|
||||
{
|
||||
path: 'pool',
|
||||
component: () => import('@/views/Clue/Pool/index.vue'),
|
||||
name: 'CluePool',
|
||||
meta: {
|
||||
title: '线索池',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order',
|
||||
component: () => import('@/views/Clue/Order/index.vue'),
|
||||
name: 'ClueOrder',
|
||||
meta: {
|
||||
title: '成交管理',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'skill',
|
||||
component: () => import('@/views/Clue/Skill/index.vue'),
|
||||
name: 'Skill',
|
||||
meta: {
|
||||
title: '关键话术',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'setting',
|
||||
component: () => import('@/views/Clue/Set/index.vue'),
|
||||
name: 'ClueSetting',
|
||||
meta: {
|
||||
title: '通用配置',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/schoolManagement',
|
||||
component: Layout,
|
||||
redirect: '/schoolManagement',
|
||||
name: 'SchoolManagement',
|
||||
meta: { title: '驾校管理' },
|
||||
children: [
|
||||
{
|
||||
path: 'school',
|
||||
component: () => import('@/views/SchoolManagement/School/index.vue'),
|
||||
name: 'School',
|
||||
meta: {
|
||||
title: '驾校',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'place',
|
||||
component: () => import('@/views/SchoolManagement/Place/index.vue'),
|
||||
name: 'Place',
|
||||
meta: {
|
||||
title: '场地',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'class',
|
||||
component: () => import('@/views/SchoolManagement/Class/index.vue'),
|
||||
name: 'Class',
|
||||
meta: {
|
||||
title: '班型',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/miniMall',
|
||||
component: Layout,
|
||||
redirect: '/miniMall/product',
|
||||
name: 'MiniMall',
|
||||
meta: { title: '进销存' },
|
||||
children: [
|
||||
{
|
||||
path: 'product',
|
||||
component: () => import('@/views/MiniMall/Product/index.vue'),
|
||||
name: 'Product',
|
||||
meta: {
|
||||
title: '产品列表',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'purchase',
|
||||
component: () => import('@/views/MiniMall/Purchase/index.vue'),
|
||||
name: 'Purchase',
|
||||
meta: {
|
||||
title: '采购列表',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'inventory',
|
||||
component: () => import('@/views/MiniMall/Inventory/index.vue'),
|
||||
name: 'Inventory',
|
||||
meta: {
|
||||
title: '库存管理',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'mallSet',
|
||||
component: () => import('@/views/MiniMall/MallSet/index.vue'),
|
||||
name: 'MallSet',
|
||||
meta: {
|
||||
title: '通用配置',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'productAdd',
|
||||
component: () => import('@/views/MiniMall/Product/add.vue'),
|
||||
name: 'ProductAdd',
|
||||
meta: {
|
||||
title: '产品新增',
|
||||
icon: 'ep:home-filled',
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'productEdit',
|
||||
component: () => import('@/views/MiniMall/Product/add.vue'),
|
||||
name: 'ProductEdit',
|
||||
meta: {
|
||||
title: '产品修改',
|
||||
icon: 'ep:home-filled',
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/basic',
|
||||
component: Layout,
|
||||
redirect: '/basic/',
|
||||
name: 'Basic',
|
||||
meta: { title: '基础设置' },
|
||||
children: [
|
||||
{
|
||||
path: 'library',
|
||||
component: () => import('@/views/Basic/Library/index.vue'),
|
||||
name: 'Library',
|
||||
meta: {
|
||||
title: '知识库',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'wxRobot',
|
||||
component: () => import('@/views/Basic/WxRobot/index.vue'),
|
||||
name: 'WxRobot',
|
||||
meta: {
|
||||
title: '微信机器人',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dept',
|
||||
component: () => import('@/views/Basic/Dept/index.vue'),
|
||||
name: 'Dept',
|
||||
meta: {
|
||||
title: '部门',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'role',
|
||||
component: () => import('@/views/Basic/Role/index.vue'),
|
||||
name: 'Role',
|
||||
meta: {
|
||||
title: '角色',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'employee',
|
||||
component: () => import('@/views/Basic/User/index.vue'),
|
||||
name: 'Employee',
|
||||
meta: {
|
||||
title: '员工',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'generalSet',
|
||||
component: () => import('@/views/Basic/GeneralSet/index.vue'),
|
||||
name: 'GeneralSet',
|
||||
meta: {
|
||||
title: '通用配置',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'menu',
|
||||
component: () => import('@/views/Basic/Menu/index.vue'),
|
||||
name: 'menu',
|
||||
meta: {
|
||||
title: '菜单管理',
|
||||
icon: 'ep:home-filled',
|
||||
noCache: false,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/user',
|
||||
|
||||
@@ -6,6 +6,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { ElementPlusSize } from '@/types/elementPlus'
|
||||
import { LayoutType } from '@/types/layout'
|
||||
import { ThemeTypes } from '@/types/theme'
|
||||
import { getAppInfo } from '@/api/login'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
|
||||
@@ -35,6 +36,7 @@ interface AppState {
|
||||
footer: boolean
|
||||
theme: ThemeTypes
|
||||
fixedMenu: boolean
|
||||
appInfo: any
|
||||
}
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
@@ -44,19 +46,20 @@ export const useAppStore = defineStore('app', {
|
||||
sizeMap: ['default', 'large', 'small'],
|
||||
mobile: false, // 是否是移动端
|
||||
title: import.meta.env.VITE_APP_TITLE, // 标题
|
||||
appInfo: wsCache.get('appInfo'),
|
||||
pageLoading: false, // 路由跳转loading
|
||||
|
||||
breadcrumb: true, // 面包屑
|
||||
breadcrumbIcon: true, // 面包屑图标
|
||||
breadcrumbIcon: false, // 面包屑图标
|
||||
collapse: false, // 折叠菜单
|
||||
uniqueOpened: true, // 是否只保持一个子菜单的展开
|
||||
hamburger: true, // 折叠图标
|
||||
screenfull: true, // 全屏图标
|
||||
size: true, // 尺寸图标
|
||||
locale: true, // 多语言图标
|
||||
size: false, // 尺寸图标
|
||||
locale: false, // 多语言图标
|
||||
message: true, // 消息图标
|
||||
tagsView: true, // 标签页
|
||||
tagsViewIcon: true, // 是否显示标签图标
|
||||
tagsViewIcon: false, // 是否显示标签图标
|
||||
logo: true, // logo
|
||||
fixedHeader: true, // 固定toolheader
|
||||
footer: false, // 显示页脚
|
||||
@@ -173,6 +176,9 @@ export const useAppStore = defineStore('app', {
|
||||
},
|
||||
getFooter(): boolean {
|
||||
return this.footer
|
||||
},
|
||||
getAppInfo(): any {
|
||||
return this.appInfo
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@@ -265,6 +271,12 @@ export const useAppStore = defineStore('app', {
|
||||
},
|
||||
setFooter(footer: boolean) {
|
||||
this.footer = footer
|
||||
},
|
||||
async setAppInfo(appId: number) {
|
||||
const appInfo = await getAppInfo(appId)
|
||||
wsCache.set('appInfo', appInfo)
|
||||
this.appInfo = appInfo
|
||||
return appInfo
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,7 +3,6 @@ import { store } from '../index'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import remainingRouter from '@/router/modules/remaining'
|
||||
import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper'
|
||||
// import { getAsyncRoutes } from '@/api/login'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
@@ -34,15 +33,11 @@ export const usePermissionStore = defineStore('permission', {
|
||||
actions: {
|
||||
async generateRoutes(): Promise<unknown> {
|
||||
return new Promise<void>(async (resolve) => {
|
||||
let res: AppCustomRouteRecordRaw[]
|
||||
let res: AppCustomRouteRecordRaw[] = []
|
||||
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||
} else {
|
||||
res = []
|
||||
// res = await getAsyncRoutes()
|
||||
wsCache.set(CACHE_KEY.ROLE_ROUTERS, res)
|
||||
}
|
||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res as AppCustomRouteRecordRaw[])
|
||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
|
||||
// 动态路由,404一定要放到最后面
|
||||
this.addRouters = routerMap.concat([
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ export const useUserStore = defineStore('admin-user', {
|
||||
this.user = userInfo.user
|
||||
this.isSetUser = true
|
||||
wsCache.set(CACHE_KEY.USER, userInfo)
|
||||
wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus)
|
||||
},
|
||||
async loginOut() {
|
||||
await loginOut()
|
||||
|
||||
@@ -39,7 +39,8 @@ export const formatToken = (token: string): string => {
|
||||
const LoginFormKey = 'LOGINFORM'
|
||||
|
||||
export type LoginFormType = {
|
||||
tenantName: string
|
||||
tenantId: number
|
||||
appId: number
|
||||
username: string
|
||||
password: string
|
||||
rememberMe: boolean
|
||||
@@ -90,3 +91,30 @@ export const setTenantId = (username: string) => {
|
||||
export const removeTenantId = () => {
|
||||
wsCache.delete(TenantIdKey)
|
||||
}
|
||||
|
||||
const AppIdKey = 'App_ID'
|
||||
const AppNameKey = 'App_NAME'
|
||||
|
||||
export const getAPPName = () => {
|
||||
return wsCache.get(AppNameKey)
|
||||
}
|
||||
|
||||
export const setAppName = (name: string) => {
|
||||
wsCache.set(AppNameKey, name, { exp: 30 * 24 * 60 * 60 })
|
||||
}
|
||||
|
||||
export const removeAppName = () => {
|
||||
wsCache.delete(AppNameKey)
|
||||
}
|
||||
|
||||
export const getAppId = () => {
|
||||
return wsCache.get(AppIdKey)
|
||||
}
|
||||
|
||||
export const setAppId = (id: number) => {
|
||||
wsCache.set(AppIdKey, id)
|
||||
}
|
||||
|
||||
export const removeAppId = () => {
|
||||
wsCache.delete(AppIdKey)
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
// 全局通用状态枚举
|
||||
export const CommonStatusEnum = {
|
||||
ENABLE: 1, // 开启
|
||||
DISABLE: 0 // 禁用
|
||||
ENABLE: 0, // 开启
|
||||
DISABLE: 1 // 禁用
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="800px">
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle" width="800px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
@@ -61,7 +61,7 @@
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemDeptForm" setup>
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" v-model="dialogVisible" width="800px">
|
||||
<Dialog :title="title" v-model="dialogVisible" width="800px">
|
||||
<el-form :model="form" ref="addForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="知识库名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" />
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" v-model="show" width="800px">
|
||||
<Dialog :title="title" v-model="show" width="800px">
|
||||
<el-form :model="form" ref="resourceForm" :rules="rules" label-width="60px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
@@ -63,7 +63,7 @@
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle" width="500px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
@@ -59,8 +59,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1"> 启用 </el-radio>
|
||||
<el-radio :label="0"> 禁用 </el-radio>
|
||||
<el-radio :label="0"> 启用 </el-radio>
|
||||
<el-radio :label="1"> 禁用 </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.type !== 3" label="显示状态" prop="visible">
|
||||
@@ -105,7 +105,7 @@
|
||||
</template>
|
||||
<script lang="ts" name="SystemMenuForm" setup>
|
||||
// import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
// import * as MenuApi from '@/api/system/menu'
|
||||
import * as MenuApi from '@/api/system/menu'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { CommonStatusEnum, SystemMenuTypeEnum } from '@/utils/constants'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
@@ -155,7 +155,7 @@ const open = async (type: string, id?: number, parentId?: number) => {
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
// formData.value = await MenuApi.getMenu(id)
|
||||
formData.value = await MenuApi.getMenu(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@@ -189,12 +189,12 @@ const submitForm = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
// const data = formData.value as unknown as MenuApi.MenuVO
|
||||
const data = formData.value as unknown as MenuApi.MenuVO
|
||||
if (formType.value === 'create') {
|
||||
// await MenuApi.createMenu(data)
|
||||
await MenuApi.createMenu(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
// await MenuApi.updateMenu(data)
|
||||
await MenuApi.updateMenu(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
@@ -211,8 +211,7 @@ const submitForm = async () => {
|
||||
const menuTree = ref<Tree[]>([]) // 树形结构
|
||||
const getTree = async () => {
|
||||
menuTree.value = []
|
||||
// const res = await MenuApi.getSimpleMenusList()
|
||||
const res = []
|
||||
const res = await MenuApi.getSimpleMenusList()
|
||||
let menu: Tree = { id: 0, name: '主类目', children: [] }
|
||||
menu.children = handleTree(res)
|
||||
menuTree.value.push(menu)
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
<MenuForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
<script lang="ts" name="SystemMenu" setup>
|
||||
// import { handleTree } from '@/utils/tree'
|
||||
// import * as MenuApi from '@/api/system/menu'
|
||||
import { handleTree } from '@/utils/tree'
|
||||
import * as MenuApi from '@/api/system/menu'
|
||||
import MenuForm from './MenuForm.vue'
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
const { wsCache } = useCache()
|
||||
@@ -102,9 +102,8 @@ const refreshTable = ref(true) // 重新渲染表格状态
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
// const data = await MenuApi.getMenuList(queryParams)
|
||||
// list.value = handleTree(data)
|
||||
list.value = []
|
||||
const data = await MenuApi.getMenuList(queryParams)
|
||||
list.value = handleTree(data)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -154,7 +153,7 @@ const handleDelete = async (id: number) => {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
// await MenuApi.deleteMenu(id)
|
||||
await MenuApi.deleteMenu(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
|
||||
@@ -20,6 +20,21 @@
|
||||
</template>
|
||||
|
||||
<script setup name="RoleEmployee">
|
||||
import * as UserApi from '@/api/system/user'
|
||||
|
||||
const props = defineProps({
|
||||
roleId: {
|
||||
type: Number
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.roleId,
|
||||
(newValue) => {
|
||||
getList(newValue)
|
||||
}
|
||||
)
|
||||
|
||||
const loading = ref(false)
|
||||
const tableList = ref([])
|
||||
const total = ref(0)
|
||||
@@ -27,15 +42,25 @@ const pageSize = ref(20)
|
||||
const currentPage = ref(1)
|
||||
|
||||
const columns = ref([
|
||||
{ prop: 'userName', label: '姓名' },
|
||||
{ prop: '', label: '手机号' },
|
||||
{ prop: '', label: '部门' },
|
||||
{ prop: '', label: '角色', width: '300px' },
|
||||
{ prop: '', label: '性别' }
|
||||
{ prop: 'nickname', label: '姓名' },
|
||||
{ prop: 'mobile', label: '手机号' },
|
||||
{ prop: 'deptName', label: '部门' },
|
||||
{ prop: '', label: '角色', width: '300px' }
|
||||
])
|
||||
|
||||
function getList() {
|
||||
tableList.value = [{ userName: '测试', phone: '18899998888' }]
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await UserApi.getUserPage({
|
||||
pageNo: currentPage.value,
|
||||
pageSize: pageSize.value,
|
||||
roleId: props.roleId
|
||||
})
|
||||
tableList.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="0px">
|
||||
<el-form ref="formRef" v-loading="formLoading" label-width="0px">
|
||||
<el-form-item>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
@@ -19,41 +19,45 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" name="RoleAssignMenuForm" setup>
|
||||
import { defaultProps } from '@/utils/tree'
|
||||
// import * as MenuApi from '@/api/system/menu'
|
||||
// import * as PermissionApi from '@/api/system/permission'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import * as MenuApi from '@/api/system/menu'
|
||||
import * as PermissionApi from '@/api/system/permission'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const props = defineProps({
|
||||
roleId: {
|
||||
type: Number
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.roleId,
|
||||
(newValue) => {
|
||||
getCheckedMenu(newValue)
|
||||
}
|
||||
)
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = reactive({
|
||||
id: 0,
|
||||
name: '',
|
||||
menuIds: []
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const menuOptions = ref<any[]>([]) // 菜单树形结构
|
||||
const treeRef = ref() // 菜单树组件 Ref
|
||||
|
||||
/** 提交表单 */
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
if (!formRef.value) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
// const data = {
|
||||
// roleId: formData.id,
|
||||
// menuIds: [
|
||||
// ...(treeRef.value.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点
|
||||
// ...(treeRef.value.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点
|
||||
// ]
|
||||
// }
|
||||
// await PermissionApi.assignRoleMenu(data)
|
||||
const data = {
|
||||
roleId: props.roleId,
|
||||
menuIds: [
|
||||
...(treeRef.value.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点
|
||||
...(treeRef.value.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点
|
||||
]
|
||||
}
|
||||
await PermissionApi.assignRoleMenu(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
dialogVisible.value = false
|
||||
} finally {
|
||||
@@ -61,25 +65,29 @@ const submitForm = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const checkedMenuIds = ref([])
|
||||
|
||||
async function init() {
|
||||
menuOptions.value = handleTree(await MenuApi.getSimpleMenusList())
|
||||
getCheckedMenu(props.roleId)
|
||||
}
|
||||
|
||||
async function getCheckedMenu(id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
checkedMenuIds.value = await PermissionApi.getRoleMenuList(id)
|
||||
treeRef.value.setCheckedKeys([], false)
|
||||
// 设置选中
|
||||
checkedMenuIds.value.forEach((menuId: number) => {
|
||||
treeRef.value.setChecked(menuId, true, false)
|
||||
})
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
menuOptions.value = [
|
||||
{
|
||||
name: '统计报表',
|
||||
id: '10001',
|
||||
children: [
|
||||
{ name: '首页', id: '20001' },
|
||||
{ name: 'XX统计', id: '20002' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '线索管理',
|
||||
id: '10002',
|
||||
children: [
|
||||
{ name: '线索库', id: '20002' },
|
||||
{ name: '成交管理', id: '20003' }
|
||||
]
|
||||
}
|
||||
]
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -15,36 +15,38 @@
|
||||
label="权限范围"
|
||||
style="display: flex"
|
||||
>
|
||||
<template #header>
|
||||
全选/全不选:
|
||||
<el-switch
|
||||
v-model="treeNodeAll"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
inline-prompt
|
||||
@change="handleCheckedTreeNodeAll()"
|
||||
<el-card class="card" shadow="never">
|
||||
<template #header>
|
||||
全选/全不选:
|
||||
<el-switch
|
||||
v-model="treeNodeAll"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
inline-prompt
|
||||
@change="handleCheckedTreeNodeAll()"
|
||||
/>
|
||||
全部展开/折叠:
|
||||
<el-switch
|
||||
v-model="deptExpand"
|
||||
active-text="展开"
|
||||
inactive-text="折叠"
|
||||
inline-prompt
|
||||
@change="handleCheckedTreeExpand"
|
||||
/>
|
||||
父子联动(选中父节点,自动选择子节点):
|
||||
<el-switch v-model="checkStrictly" active-text="是" inactive-text="否" inline-prompt />
|
||||
</template>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:check-strictly="!checkStrictly"
|
||||
:data="deptOptions"
|
||||
:props="defaultProps"
|
||||
default-expand-all
|
||||
empty-text="加载中,请稍后"
|
||||
node-key="id"
|
||||
show-checkbox
|
||||
/>
|
||||
全部展开/折叠:
|
||||
<el-switch
|
||||
v-model="deptExpand"
|
||||
active-text="展开"
|
||||
inactive-text="折叠"
|
||||
inline-prompt
|
||||
@change="handleCheckedTreeExpand"
|
||||
/>
|
||||
父子联动(选中父节点,自动选择子节点):
|
||||
<el-switch v-model="checkStrictly" active-text="是" inactive-text="否" inline-prompt />
|
||||
</template>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:check-strictly="!checkStrictly"
|
||||
:data="deptOptions"
|
||||
:props="defaultProps"
|
||||
default-expand-all
|
||||
empty-text="加载中,请稍后"
|
||||
node-key="id"
|
||||
show-checkbox
|
||||
/>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">保存权限</el-button>
|
||||
@@ -52,15 +54,31 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<script lang="ts" name="RoleDataPermissionForm" setup>
|
||||
// import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import { SystemDataScopeEnum } from '@/utils/constants'
|
||||
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as PermissionApi from '@/api/system/permission'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const props = defineProps({
|
||||
roleId: {
|
||||
type: Number
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.roleId,
|
||||
(newValue) => {
|
||||
getRoleInfo(newValue)
|
||||
}
|
||||
)
|
||||
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = reactive({
|
||||
const formData = ref({
|
||||
id: 0,
|
||||
name: '',
|
||||
dataScope: undefined,
|
||||
@@ -82,12 +100,24 @@ const dataScopeOptions = [
|
||||
{ label: '仅本人数据权限', value: 5 }
|
||||
]
|
||||
|
||||
async function getRoleInfo(id) {
|
||||
formData.value = await RoleApi.getRole(id)
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
// await PermissionApi.assignRoleDataScope(data)
|
||||
const data = {
|
||||
roleId: formData.value.id,
|
||||
dataScope: formData.value.dataScope,
|
||||
dataScopeDeptIds:
|
||||
formData.value.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM
|
||||
? []
|
||||
: treeRef.value.getCheckedKeys(false)
|
||||
}
|
||||
await PermissionApi.assignRoleDataScope(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
@@ -112,56 +142,12 @@ const handleCheckedTreeExpand = () => {
|
||||
}
|
||||
}
|
||||
|
||||
deptOptions.value = handleTree([
|
||||
{
|
||||
id: 100,
|
||||
name: '芋道源码',
|
||||
parentId: 0
|
||||
},
|
||||
{
|
||||
id: 101,
|
||||
name: '深圳总公司',
|
||||
parentId: 100
|
||||
},
|
||||
{
|
||||
id: 103,
|
||||
name: '研发部门',
|
||||
parentId: 101
|
||||
},
|
||||
{
|
||||
id: 108,
|
||||
name: '市场部门',
|
||||
parentId: 102
|
||||
},
|
||||
{
|
||||
id: 102,
|
||||
name: '长沙分公司',
|
||||
parentId: 100
|
||||
},
|
||||
{
|
||||
id: 104,
|
||||
name: '市场部门',
|
||||
parentId: 101
|
||||
},
|
||||
{
|
||||
id: 109,
|
||||
name: '财务部门',
|
||||
parentId: 102
|
||||
},
|
||||
{
|
||||
id: 105,
|
||||
name: '测试部门',
|
||||
parentId: 101
|
||||
},
|
||||
{
|
||||
id: 106,
|
||||
name: '财务部门',
|
||||
parentId: 101
|
||||
},
|
||||
{
|
||||
id: 107,
|
||||
name: '运维部门',
|
||||
parentId: 101
|
||||
}
|
||||
])
|
||||
async function init() {
|
||||
getRoleInfo(props.roleId)
|
||||
deptOptions.value = handleTree(await DeptApi.getSimpleDeptList())
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="400px">
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle" width="400px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
@@ -19,11 +19,11 @@
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" name="SystemRoleForm" setup>
|
||||
// import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
// import * as RoleApi from '@/api/system/role'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
@@ -51,11 +51,7 @@ const open = async (type: string, id?: number) => {
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
// formData.value = await RoleApi.getRole(id)
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
name: ''
|
||||
}
|
||||
formData.value = await RoleApi.getRole(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@@ -82,12 +78,12 @@ const submitForm = async () => {
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
// const data = formData.value as unknown as RoleApi.RoleVO
|
||||
const data = formData.value as unknown as RoleApi.RoleVO
|
||||
if (formType.value === 'create') {
|
||||
// await RoleApi.createRole(data)
|
||||
await RoleApi.createRole(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
// await RoleApi.updateRole(data)
|
||||
await RoleApi.updateRole(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
class="ml-10px"
|
||||
style="padding: 0px"
|
||||
text
|
||||
@click="handleDelete(index)"
|
||||
@click="handleDelete(item.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
@@ -39,21 +39,33 @@
|
||||
<Pagination
|
||||
v-model:limit="queryParams.pageSize"
|
||||
v-model:page="queryParams.pageNo"
|
||||
layout="total, prev, pager, next"
|
||||
small
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="ml-20px" style="flex: 1" shadow="always" :body-style="{ padding: '10px' }">
|
||||
<el-tabs v-model="roleOperateIndex" type="card">
|
||||
<el-tabs v-if="list && list.length" v-model="roleOperateIndex" type="card">
|
||||
<el-tab-pane label="角色用户" :name="1">
|
||||
<RoleEmployee />
|
||||
<RoleEmployee v-if="roleOperateIndex == 1" :roleId="list[libraryIndex].id" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="菜单权限" :name="2">
|
||||
<RoleAssignMenuForm ref="assignMenuFormRef" @success="getList" />
|
||||
<RoleAssignMenuForm
|
||||
v-if="roleOperateIndex == 2"
|
||||
ref="assignMenuFormRef"
|
||||
:roleId="list[libraryIndex].id"
|
||||
@success="getList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="数据权限" :name="3">
|
||||
<RoleDataPermissionForm ref="dataPermissionFormRef" @success="getList" />
|
||||
<RoleDataPermissionForm
|
||||
v-if="roleOperateIndex == 3"
|
||||
ref="dataPermissionFormRef"
|
||||
:roleId="list[libraryIndex].id"
|
||||
@success="getList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
@@ -66,6 +78,7 @@ import RoleForm from './RoleForm.vue'
|
||||
import RoleEmployee from './Comp/RoleEmployee.vue'
|
||||
import RoleAssignMenuForm from './RoleAssignMenuForm.vue'
|
||||
import RoleDataPermissionForm from './RoleDataPermissionForm.vue'
|
||||
import * as RoleApi from '@/api/system/role'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
@@ -76,14 +89,14 @@ const list = ref([]) // 列表的数据
|
||||
const libraryIndex = ref(0)
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
pageSize: 20
|
||||
})
|
||||
|
||||
/** 查询角色列表 */
|
||||
const getList = async () => {
|
||||
// const data = await RoleApi.getRolePage(queryParams)
|
||||
list.value = [{ id: 1, name: '管理员' }]
|
||||
total.value = 0
|
||||
const data = await RoleApi.getRolePage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
@@ -101,12 +114,10 @@ const assignMenuFormRef = ref()
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
console.log(id)
|
||||
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
// await RoleApi.deleteRole(id)
|
||||
await RoleApi.deleteRole(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
@@ -121,4 +132,8 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.actived {
|
||||
background-color: var(--el-color-primary-light-9);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<el-tabs v-model="tabName">
|
||||
<el-tab-pane label="线索信息" name="info">
|
||||
<Form
|
||||
@@ -77,7 +77,7 @@
|
||||
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
|
||||
<div class="flex">
|
||||
<Form
|
||||
style="flex: 1"
|
||||
@@ -34,7 +34,7 @@
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog title="成交登记" v-model="show" width="800px">
|
||||
<Dialog title="成交登记" v-model="show" width="800px">
|
||||
<Descriptions :data="info" :schema="schema" :columns="2" />
|
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px" class="mt-20px">
|
||||
<el-row :gutter="20">
|
||||
@@ -39,7 +39,7 @@
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
@@ -29,7 +29,7 @@
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script name="DialogSource" setup>
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script name="DialogSkill" setup>
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user