commit
cf68b1e91d
2
.env
2
.env
@ -13,3 +13,5 @@ VITE_APP_TENANT_ENABLE=true
|
|||||||
# 验证码的开关
|
# 验证码的开关
|
||||||
VITE_APP_CAPTCHA_ENABLE=true
|
VITE_APP_CAPTCHA_ENABLE=true
|
||||||
|
|
||||||
|
# 验证码的开关
|
||||||
|
VITE_APP_CAPTCHA_ENABLE=true
|
||||||
|
@ -6,11 +6,13 @@ import progress from 'vite-plugin-progress'
|
|||||||
import EslintPlugin from 'vite-plugin-eslint'
|
import EslintPlugin from 'vite-plugin-eslint'
|
||||||
import PurgeIcons from 'vite-plugin-purge-icons'
|
import PurgeIcons from 'vite-plugin-purge-icons'
|
||||||
import { ViteEjsPlugin } from 'vite-plugin-ejs'
|
import { ViteEjsPlugin } from 'vite-plugin-ejs'
|
||||||
|
// @ts-ignore
|
||||||
import ElementPlus from 'unplugin-element-plus/vite'
|
import ElementPlus from 'unplugin-element-plus/vite'
|
||||||
import AutoImport from 'unplugin-auto-import/vite'
|
import AutoImport from 'unplugin-auto-import/vite'
|
||||||
import Components from 'unplugin-vue-components/vite'
|
import Components from 'unplugin-vue-components/vite'
|
||||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||||
import viteCompression from 'vite-plugin-compression'
|
import viteCompression from 'vite-plugin-compression'
|
||||||
|
import topLevelAwait from 'vite-plugin-top-level-await'
|
||||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
||||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
@ -95,6 +97,12 @@ export function createVitePlugins() {
|
|||||||
ext: '.gz', // 生成的压缩包后缀
|
ext: '.gz', // 生成的压缩包后缀
|
||||||
deleteOriginFile: false //压缩后是否删除源文件
|
deleteOriginFile: false //压缩后是否删除源文件
|
||||||
}),
|
}),
|
||||||
ViteEjsPlugin()
|
ViteEjsPlugin(),
|
||||||
|
topLevelAwait({ // https://juejin.cn/post/7152191742513512485
|
||||||
|
// The export name of top-level await promise for each chunk module
|
||||||
|
promiseExportName: '__tla',
|
||||||
|
// The function to generate import names of top-level await promise in each chunk module
|
||||||
|
promiseImportName: (i) => `__tla_${i}`
|
||||||
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
"build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev",
|
"build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev",
|
||||||
"build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test",
|
"build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test",
|
||||||
"build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static",
|
"build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static",
|
||||||
|
"build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front",
|
||||||
"serve:pro": "vite preview --mode pro",
|
"serve:pro": "vite preview --mode pro",
|
||||||
"serve:dev": "vite preview --mode dev",
|
"serve:dev": "vite preview --mode dev",
|
||||||
"serve:test": "vite preview --mode test",
|
"serve:test": "vite preview --mode test",
|
||||||
@ -122,6 +123,7 @@
|
|||||||
"vite-plugin-progress": "^0.0.6",
|
"vite-plugin-progress": "^0.0.6",
|
||||||
"vite-plugin-purge-icons": "^0.9.2",
|
"vite-plugin-purge-icons": "^0.9.2",
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
|
"vite-plugin-top-level-await": "^1.3.0",
|
||||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||||
"vite-plugin-windicss": "^1.8.10",
|
"vite-plugin-windicss": "^1.8.10",
|
||||||
"vue-tsc": "^1.2.0",
|
"vue-tsc": "^1.2.0",
|
||||||
|
@ -12,16 +12,16 @@ export type LeaveVO = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建请假申请
|
// 创建请假申请
|
||||||
export const createLeaveApi = async (data: LeaveVO) => {
|
export const createLeave = async (data: LeaveVO) => {
|
||||||
return await request.post({ url: '/bpm/oa/leave/create', data: data })
|
return await request.post({ url: '/bpm/oa/leave/create', data: data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得请假申请
|
// 获得请假申请
|
||||||
export const getLeaveApi = async (id: number) => {
|
export const getLeave = async (id: number) => {
|
||||||
return await request.get({ url: '/bpm/oa/leave/get?id=' + id })
|
return await request.get({ url: '/bpm/oa/leave/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得请假申请分页
|
// 获得请假申请分页
|
||||||
export const getLeavePageApi = async (params) => {
|
export const getLeavePage = async (params) => {
|
||||||
return await request.get({ url: '/bpm/oa/leave/page', params })
|
return await request.get({ url: '/bpm/oa/leave/page', params })
|
||||||
}
|
}
|
||||||
|
@ -20,15 +20,15 @@ export type ProcessInstanceVO = {
|
|||||||
endTime: string
|
endTime: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getMyProcessInstancePageApi = async (params) => {
|
export const getMyProcessInstancePage = async (params) => {
|
||||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createProcessInstanceApi = async (data) => {
|
export const createProcessInstance = async (data) => {
|
||||||
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cancelProcessInstanceApi = async (id: number, reason: string) => {
|
export const cancelProcessInstance = async (id: number, reason: string) => {
|
||||||
const data = {
|
const data = {
|
||||||
id: id,
|
id: id,
|
||||||
reason: reason
|
reason: reason
|
||||||
@ -36,6 +36,6 @@ export const cancelProcessInstanceApi = async (id: number, reason: string) => {
|
|||||||
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
|
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getProcessInstanceApi = async (id: number) => {
|
export const getProcessInstance = async (id: number) => {
|
||||||
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export type TaskVO = {
|
||||||
|
id: number
|
||||||
|
}
|
||||||
|
|
||||||
export const getTodoTaskPage = async (params) => {
|
export const getTodoTaskPage = async (params) => {
|
||||||
return await request.get({ url: '/bpm/task/todo-page', params })
|
return await request.get({ url: '/bpm/task/todo-page', params })
|
||||||
}
|
}
|
||||||
@ -32,3 +36,8 @@ export const getTaskListByProcessInstanceId = async (processInstanceId) => {
|
|||||||
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
|
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出任务
|
||||||
|
export const exportTask = async (params) => {
|
||||||
|
return await request.download({ url: '/bpm/task/export', params })
|
||||||
|
}
|
||||||
|
@ -43,6 +43,6 @@ export const deleteConfig = (id: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 导出参数
|
// 导出参数
|
||||||
export const exportConfigApi = (params) => {
|
export const exportConfig = (params) => {
|
||||||
return request.download({ url: '/infra/config/export', params })
|
return request.download({ url: '/infra/config/export', params })
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 导出Html
|
// 导出Html
|
||||||
export const exportHtmlApi = () => {
|
export const exportHtml = () => {
|
||||||
return request.download({ url: '/infra/db-doc/export-html' })
|
return request.download({ url: '/infra/db-doc/export-html' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出Word
|
// 导出Word
|
||||||
export const exportWordApi = () => {
|
export const exportWord = () => {
|
||||||
return request.download({ url: '/infra/db-doc/export-word' })
|
return request.download({ url: '/infra/db-doc/export-word' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出Markdown
|
// 导出Markdown
|
||||||
export const exportMarkdownApi = () => {
|
export const exportMarkdown = () => {
|
||||||
return request.download({ url: '/infra/db-doc/export-markdown' })
|
return request.download({ url: '/infra/db-doc/export-markdown' })
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ export const updateJobStatus = (id: number, status: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 定时任务立即执行一次
|
// 定时任务立即执行一次
|
||||||
export const runJobApi = (id: number) => {
|
export const runJob = (id: number) => {
|
||||||
return request.put({ url: '/infra/job/trigger?id=' + id })
|
return request.put({ url: '/infra/job/trigger?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,17 +3,19 @@ import request from '@/config/axios'
|
|||||||
/**
|
/**
|
||||||
* 获取redis 监控信息
|
* 获取redis 监控信息
|
||||||
*/
|
*/
|
||||||
export const getCacheApi = () => {
|
export const getCache = () => {
|
||||||
return request.get({ url: '/infra/redis/get-monitor-info' })
|
return request.get({ url: '/infra/redis/get-monitor-info' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取模块
|
// 获取模块
|
||||||
export const getKeyDefineListApi = () => {
|
export const getKeyDefineList = () => {
|
||||||
return request.get({ url: '/infra/redis/get-key-define-list' })
|
return request.get({ url: '/infra/redis/get-key-define-list' })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取redis key列表
|
* 获取redis key列表
|
||||||
*/
|
*/
|
||||||
export const getKeyListApi = (keyTemplate: string) => {
|
export const getKeyList = (keyTemplate: string) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/infra/redis/get-key-list',
|
url: '/infra/redis/get-key-list',
|
||||||
params: {
|
params: {
|
||||||
@ -21,17 +23,18 @@ export const getKeyListApi = (keyTemplate: string) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取缓存内容
|
// 获取缓存内容
|
||||||
export const getKeyValueApi = (key: string) => {
|
export const getKeyValue = (key: string) => {
|
||||||
return request.get({ url: '/infra/redis/get-key-value?key=' + key })
|
return request.get({ url: '/infra/redis/get-key-value?key=' + key })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据键名删除缓存
|
// 根据键名删除缓存
|
||||||
export const deleteKeyApi = (key: string) => {
|
export const deleteKey = (key: string) => {
|
||||||
return request.delete({ url: '/infra/redis/delete-key?key=' + key })
|
return request.delete({ url: '/infra/redis/delete-key?key=' + key })
|
||||||
}
|
}
|
||||||
|
|
||||||
export const deleteKeysApi = (keyTemplate: string) => {
|
export const deleteKeys = (keyTemplate: string) => {
|
||||||
return request.delete({
|
return request.delete({
|
||||||
url: '/infra/redis/delete-keys?',
|
url: '/infra/redis/delete-keys?',
|
||||||
params: {
|
params: {
|
||||||
|
@ -17,7 +17,7 @@ export interface SmsLoginVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 登录
|
// 登录
|
||||||
export const loginApi = (data: UserLoginVO) => {
|
export const login = (data: UserLoginVO) => {
|
||||||
return request.post({ url: '/system/auth/login', data })
|
return request.post({ url: '/system/auth/login', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,47 +27,47 @@ export const refreshToken = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 使用租户名,获得租户编号
|
// 使用租户名,获得租户编号
|
||||||
export const getTenantIdByNameApi = (name: string) => {
|
export const getTenantIdByName = (name: string) => {
|
||||||
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
|
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 登出
|
// 登出
|
||||||
export const loginOutApi = () => {
|
export const loginOut = () => {
|
||||||
return request.post({ url: '/system/auth/logout' })
|
return request.post({ url: '/system/auth/logout' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取用户权限信息
|
// 获取用户权限信息
|
||||||
export const getInfoApi = () => {
|
export const getInfo = () => {
|
||||||
return request.get({ url: '/system/auth/get-permission-info' })
|
return request.get({ url: '/system/auth/get-permission-info' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 路由
|
// 路由
|
||||||
export const getAsyncRoutesApi = () => {
|
export const getAsyncRoutes = () => {
|
||||||
return request.get({ url: '/system/auth/list-menus' })
|
return request.get({ url: '/system/auth/list-menus' })
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取登录验证码
|
//获取登录验证码
|
||||||
export const sendSmsCodeApi = (data: SmsCodeVO) => {
|
export const sendSmsCode = (data: SmsCodeVO) => {
|
||||||
return request.post({ url: '/system/auth/send-sms-code', data })
|
return request.post({ url: '/system/auth/send-sms-code', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 短信验证码登录
|
// 短信验证码登录
|
||||||
export const smsLoginApi = (data: SmsLoginVO) => {
|
export const smsLogin = (data: SmsLoginVO) => {
|
||||||
return request.post({ url: '/system/auth/sms-login', data })
|
return request.post({ url: '/system/auth/sms-login', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 社交授权的跳转
|
// 社交授权的跳转
|
||||||
export const socialAuthRedirectApi = (type: number, redirectUri: string) => {
|
export const socialAuthRedirect = (type: number, redirectUri: string) => {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri
|
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取验证图片 以及token
|
// 获取验证图片以及 token
|
||||||
export const getCodeApi = (data) => {
|
export const getCode = (data) => {
|
||||||
return request.postOriginal({ url: 'system/captcha/get', data })
|
return request.postOriginal({ url: 'system/captcha/get', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 滑动或者点选验证
|
// 滑动或者点选验证
|
||||||
export const reqCheckApi = (data) => {
|
export const reqCheck = (data) => {
|
||||||
return request.postOriginal({ url: 'system/captcha/check', data })
|
return request.postOriginal({ url: 'system/captcha/check', data })
|
||||||
}
|
}
|
||||||
|
@ -38,41 +38,41 @@ export interface AppUpdateStatusReqVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表支付应用
|
// 查询列表支付应用
|
||||||
export const getAppPageApi = (params: AppPageReqVO) => {
|
export const getAppPage = (params: AppPageReqVO) => {
|
||||||
return request.get({ url: '/pay/app/page', params })
|
return request.get({ url: '/pay/app/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情支付应用
|
// 查询详情支付应用
|
||||||
export const getAppApi = (id: number) => {
|
export const getApp = (id: number) => {
|
||||||
return request.get({ url: '/pay/app/get?id=' + id })
|
return request.get({ url: '/pay/app/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增支付应用
|
// 新增支付应用
|
||||||
export const createAppApi = (data: AppVO) => {
|
export const createApp = (data: AppVO) => {
|
||||||
return request.post({ url: '/pay/app/create', data })
|
return request.post({ url: '/pay/app/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改支付应用
|
// 修改支付应用
|
||||||
export const updateAppApi = (data: AppVO) => {
|
export const updateApp = (data: AppVO) => {
|
||||||
return request.put({ url: '/pay/app/update', data })
|
return request.put({ url: '/pay/app/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 支付应用信息状态修改
|
// 支付应用信息状态修改
|
||||||
export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => {
|
export const changeAppStatus = (data: AppUpdateStatusReqVO) => {
|
||||||
return request.put({ url: '/pay/app/update-status', data: data })
|
return request.put({ url: '/pay/app/update-status', data: data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除支付应用
|
// 删除支付应用
|
||||||
export const deleteAppApi = (id: number) => {
|
export const deleteApp = (id: number) => {
|
||||||
return request.delete({ url: '/pay/app/delete?id=' + id })
|
return request.delete({ url: '/pay/app/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出支付应用
|
// 导出支付应用
|
||||||
export const exportAppApi = (params: AppExportReqVO) => {
|
export const exportApp = (params: AppExportReqVO) => {
|
||||||
return request.download({ url: '/pay/app/export-excel', params })
|
return request.download({ url: '/pay/app/export-excel', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据商ID称搜索应用列表
|
// 根据商ID称搜索应用列表
|
||||||
export const getAppListByMerchantIdApi = (merchantId: number) => {
|
export const getAppListByMerchantId = (merchantId: number) => {
|
||||||
return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
|
return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
|
||||||
}
|
}
|
||||||
|
@ -12,35 +12,13 @@ export interface ChannelVO {
|
|||||||
createTime: Date
|
createTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ChannelPageReqVO extends PageParam {
|
|
||||||
code?: string
|
|
||||||
status?: number
|
|
||||||
remark?: string
|
|
||||||
feeRate?: number
|
|
||||||
merchantId?: number
|
|
||||||
appId?: number
|
|
||||||
config?: string
|
|
||||||
createTime?: Date[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ChannelExportReqVO {
|
|
||||||
code?: string
|
|
||||||
status?: number
|
|
||||||
remark?: string
|
|
||||||
feeRate?: number
|
|
||||||
merchantId?: number
|
|
||||||
appId?: number
|
|
||||||
config?: string
|
|
||||||
createTime?: Date[]
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询列表支付渠道
|
// 查询列表支付渠道
|
||||||
export const getChannelPageApi = (params: ChannelPageReqVO) => {
|
export const getChannelPage = (params: PageParam) => {
|
||||||
return request.get({ url: '/pay/channel/page', params })
|
return request.get({ url: '/pay/channel/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情支付渠道
|
// 查询详情支付渠道
|
||||||
export const getChannelApi = (merchantId: number, appId: string, code: string) => {
|
export const getChannel = (merchantId: number, appId: string, code: string) => {
|
||||||
const params = {
|
const params = {
|
||||||
merchantId: merchantId,
|
merchantId: merchantId,
|
||||||
appId: appId,
|
appId: appId,
|
||||||
@ -50,21 +28,21 @@ export const getChannelApi = (merchantId: number, appId: string, code: string) =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 新增支付渠道
|
// 新增支付渠道
|
||||||
export const createChannelApi = (data: ChannelVO) => {
|
export const createChannel = (data: ChannelVO) => {
|
||||||
return request.post({ url: '/pay/channel/create', data })
|
return request.post({ url: '/pay/channel/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改支付渠道
|
// 修改支付渠道
|
||||||
export const updateChannelApi = (data: ChannelVO) => {
|
export const updateChannel = (data: ChannelVO) => {
|
||||||
return request.put({ url: '/pay/channel/update', data })
|
return request.put({ url: '/pay/channel/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除支付渠道
|
// 删除支付渠道
|
||||||
export const deleteChannelApi = (id: number) => {
|
export const deleteChannel = (id: number) => {
|
||||||
return request.delete({ url: '/pay/channel/delete?id=' + id })
|
return request.delete({ url: '/pay/channel/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出支付渠道
|
// 导出支付渠道
|
||||||
export const exportChannelApi = (params: ChannelExportReqVO) => {
|
export const exportChannel = (params) => {
|
||||||
return request.download({ url: '/pay/channel/export-excel', params })
|
return request.download({ url: '/pay/channel/export-excel', params })
|
||||||
}
|
}
|
||||||
|
@ -79,31 +79,31 @@ export interface OrderExportReqVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表支付订单
|
// 查询列表支付订单
|
||||||
export const getOrderPageApi = async (params: OrderPageReqVO) => {
|
export const getOrderPage = async (params: OrderPageReqVO) => {
|
||||||
return await request.get({ url: '/pay/order/page', params })
|
return await request.get({ url: '/pay/order/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情支付订单
|
// 查询详情支付订单
|
||||||
export const getOrderApi = async (id: number) => {
|
export const getOrder = async (id: number) => {
|
||||||
return await request.get({ url: '/pay/order/get?id=' + id })
|
return await request.get({ url: '/pay/order/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增支付订单
|
// 新增支付订单
|
||||||
export const createOrderApi = async (data: OrderVO) => {
|
export const createOrder = async (data: OrderVO) => {
|
||||||
return await request.post({ url: '/pay/order/create', data })
|
return await request.post({ url: '/pay/order/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改支付订单
|
// 修改支付订单
|
||||||
export const updateOrderApi = async (data: OrderVO) => {
|
export const updateOrder = async (data: OrderVO) => {
|
||||||
return await request.put({ url: '/pay/order/update', data })
|
return await request.put({ url: '/pay/order/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除支付订单
|
// 删除支付订单
|
||||||
export const deleteOrderApi = async (id: number) => {
|
export const deleteOrder = async (id: number) => {
|
||||||
return await request.delete({ url: '/pay/order/delete?id=' + id })
|
return await request.delete({ url: '/pay/order/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出支付订单
|
// 导出支付订单
|
||||||
export const exportOrderApi = async (params: OrderExportReqVO) => {
|
export const exportOrder = async (params: OrderExportReqVO) => {
|
||||||
return await request.download({ url: '/pay/order/export-excel', params })
|
return await request.download({ url: '/pay/order/export-excel', params })
|
||||||
}
|
}
|
||||||
|
@ -86,31 +86,31 @@ export interface PayRefundExportReqVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表退款订单
|
// 查询列表退款订单
|
||||||
export const getRefundPageApi = (params: RefundPageReqVO) => {
|
export const getRefundPage = (params: RefundPageReqVO) => {
|
||||||
return request.get({ url: '/pay/refund/page', params })
|
return request.get({ url: '/pay/refund/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情退款订单
|
// 查询详情退款订单
|
||||||
export const getRefundApi = (id: number) => {
|
export const getRefund = (id: number) => {
|
||||||
return request.get({ url: '/pay/refund/get?id=' + id })
|
return request.get({ url: '/pay/refund/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增退款订单
|
// 新增退款订单
|
||||||
export const createRefundApi = (data: RefundVO) => {
|
export const createRefund = (data: RefundVO) => {
|
||||||
return request.post({ url: '/pay/refund/create', data })
|
return request.post({ url: '/pay/refund/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改退款订单
|
// 修改退款订单
|
||||||
export const updateRefundApi = (data: RefundVO) => {
|
export const updateRefund = (data: RefundVO) => {
|
||||||
return request.put({ url: '/pay/refund/update', data })
|
return request.put({ url: '/pay/refund/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除退款订单
|
// 删除退款订单
|
||||||
export const deleteRefundApi = (id: number) => {
|
export const deleteRefund = (id: number) => {
|
||||||
return request.delete({ url: '/pay/refund/delete?id=' + id })
|
return request.delete({ url: '/pay/refund/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出退款订单
|
// 导出退款订单
|
||||||
export const exportRefundApi = (params: PayRefundExportReqVO) => {
|
export const exportRefund = (params: PayRefundExportReqVO) => {
|
||||||
return request.download({ url: '/pay/refund/export-excel', params })
|
return request.download({ url: '/pay/refund/export-excel', params })
|
||||||
}
|
}
|
||||||
|
@ -12,37 +12,32 @@ export interface DeptVO {
|
|||||||
createTime: Date
|
createTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeptPageReqVO {
|
|
||||||
name?: string
|
|
||||||
status?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询部门(精简)列表
|
// 查询部门(精简)列表
|
||||||
export const getSimpleDeptList = async (): Promise<DeptVO[]> => {
|
export const getSimpleDeptList = async (): Promise<DeptVO[]> => {
|
||||||
return await request.get({ url: '/system/dept/list-all-simple' })
|
return await request.get({ url: '/system/dept/list-all-simple' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询部门列表
|
// 查询部门列表
|
||||||
export const getDeptPageApi = async (params: DeptPageReqVO) => {
|
export const getDeptPage = async (params: PageParam) => {
|
||||||
return await request.get({ url: '/system/dept/list', params })
|
return await request.get({ url: '/system/dept/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询部门详情
|
// 查询部门详情
|
||||||
export const getDeptApi = async (id: number) => {
|
export const getDept = async (id: number) => {
|
||||||
return await request.get({ url: '/system/dept/get?id=' + id })
|
return await request.get({ url: '/system/dept/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增部门
|
// 新增部门
|
||||||
export const createDeptApi = async (data: DeptVO) => {
|
export const createDept = async (data: DeptVO) => {
|
||||||
return await request.post({ url: '/system/dept/create', data: data })
|
return await request.post({ url: '/system/dept/create', data: data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改部门
|
// 修改部门
|
||||||
export const updateDeptApi = async (params: DeptVO) => {
|
export const updateDept = async (params: DeptVO) => {
|
||||||
return await request.put({ url: '/system/dept/update', data: params })
|
return await request.put({ url: '/system/dept/update', data: params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除部门
|
// 删除部门
|
||||||
export const deleteDeptApi = async (id: number) => {
|
export const deleteDept = async (id: number) => {
|
||||||
return await request.delete({ url: '/system/dept/delete?id=' + id })
|
return await request.delete({ url: '/system/dept/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,6 @@ export const deleteDictData = (id: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 导出字典类型数据
|
// 导出字典类型数据
|
||||||
export const exportDictDataApi = (params) => {
|
export const exportDictData = (params) => {
|
||||||
return request.get({ url: '/system/dict-data/export', params })
|
return request.get({ url: '/system/dict-data/export', params })
|
||||||
}
|
}
|
||||||
|
@ -10,39 +10,31 @@ export interface ErrorCodeVO {
|
|||||||
createTime: Date
|
createTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ErrorCodePageReqVO extends PageParam {
|
|
||||||
type?: number
|
|
||||||
applicationName?: string
|
|
||||||
code?: number
|
|
||||||
message?: string
|
|
||||||
createTime?: Date[]
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询错误码列表
|
// 查询错误码列表
|
||||||
export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => {
|
export const getErrorCodePage = (params: PageParam) => {
|
||||||
return request.get({ url: '/system/error-code/page', params })
|
return request.get({ url: '/system/error-code/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询错误码详情
|
// 查询错误码详情
|
||||||
export const getErrorCodeApi = (id: number) => {
|
export const getErrorCode = (id: number) => {
|
||||||
return request.get({ url: '/system/error-code/get?id=' + id })
|
return request.get({ url: '/system/error-code/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增错误码
|
// 新增错误码
|
||||||
export const createErrorCodeApi = (data: ErrorCodeVO) => {
|
export const createErrorCode = (data: ErrorCodeVO) => {
|
||||||
return request.post({ url: '/system/error-code/create', data })
|
return request.post({ url: '/system/error-code/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改错误码
|
// 修改错误码
|
||||||
export const updateErrorCodeApi = (data: ErrorCodeVO) => {
|
export const updateErrorCode = (data: ErrorCodeVO) => {
|
||||||
return request.put({ url: '/system/error-code/update', data })
|
return request.put({ url: '/system/error-code/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除错误码
|
// 删除错误码
|
||||||
export const deleteErrorCodeApi = (id: number) => {
|
export const deleteErrorCode = (id: number) => {
|
||||||
return request.delete({ url: '/system/error-code/delete?id=' + id })
|
return request.delete({ url: '/system/error-code/delete?id=' + id })
|
||||||
}
|
}
|
||||||
// 导出错误码
|
// 导出错误码
|
||||||
export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => {
|
export const excelErrorCode = (params) => {
|
||||||
return request.download({ url: '/system/error-code/export-excel', params })
|
return request.download({ url: '/system/error-code/export-excel', params })
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export const getMenuList = (params) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取菜单详情
|
// 获取菜单详情
|
||||||
export const getMenuApi = (id: number) => {
|
export const getMenu = (id: number) => {
|
||||||
return request.get({ url: '/system/menu/get?id=' + id })
|
return request.get({ url: '/system/menu/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,11 +38,11 @@ export const updateAllNotifyMessageRead = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前用户的最新站内信列表
|
// 获取当前用户的最新站内信列表
|
||||||
export const getUnreadNotifyMessageListApi = async () => {
|
export const getUnreadNotifyMessageList = async () => {
|
||||||
return await request.get({ url: '/system/notify-message/get-unread-list' })
|
return await request.get({ url: '/system/notify-message/get-unread-list' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得当前用户的未读站内信数量
|
// 获得当前用户的未读站内信数量
|
||||||
export const getUnreadNotifyMessageCountApi = async () => {
|
export const getUnreadNotifyMessageCount = async () => {
|
||||||
return await request.get({ url: '/system/notify-message/get-unread-count' })
|
return await request.get({ url: '/system/notify-message/get-unread-count' })
|
||||||
}
|
}
|
||||||
|
@ -51,17 +51,17 @@ export interface UserProfileUpdateReqVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询用户个人信息
|
// 查询用户个人信息
|
||||||
export const getUserProfileApi = () => {
|
export const getUserProfile = () => {
|
||||||
return request.get({ url: '/system/user/profile/get' })
|
return request.get({ url: '/system/user/profile/get' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改用户个人信息
|
// 修改用户个人信息
|
||||||
export const updateUserProfileApi = (data: UserProfileUpdateReqVO) => {
|
export const updateUserProfile = (data: UserProfileUpdateReqVO) => {
|
||||||
return request.put({ url: '/system/user/profile/update', data })
|
return request.put({ url: '/system/user/profile/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户密码重置
|
// 用户密码重置
|
||||||
export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
|
export const updateUserPassword = (oldPassword: string, newPassword: string) => {
|
||||||
return request.put({
|
return request.put({
|
||||||
url: '/system/user/profile/update-password',
|
url: '/system/user/profile/update-password',
|
||||||
data: {
|
data: {
|
||||||
@ -72,6 +72,6 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 用户头像上传
|
// 用户头像上传
|
||||||
export const uploadAvatarApi = (data) => {
|
export const uploadAvatar = (data) => {
|
||||||
return request.upload({ url: '/system/user/profile/update-avatar', data: data })
|
return request.upload({ url: '/system/user/profile/update-avatar', data: data })
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ export default defineComponent({
|
|||||||
? dictData.value?.cssClass
|
? dictData.value?.cssClass
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
|
disableTransitions={true}
|
||||||
>
|
>
|
||||||
{dictData.value?.label}
|
{dictData.value?.label}
|
||||||
</ElTag>
|
</ElTag>
|
||||||
|
32
src/components/DocAlert/index.vue
Normal file
32
src/components/DocAlert/index.vue
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<el-alert v-if="getEnable()" type="success" show-icon>
|
||||||
|
<template #title>
|
||||||
|
<div @click="goToUrl">{{ '【' + title + '】文档地址:' + url }}</div>
|
||||||
|
</template>
|
||||||
|
</el-alert>
|
||||||
|
</template>
|
||||||
|
<script setup lang="tsx" name="DocAlert">
|
||||||
|
import { propTypes } from '@/utils/propTypes'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
title: propTypes.string,
|
||||||
|
url: propTypes.string
|
||||||
|
})
|
||||||
|
|
||||||
|
/** 跳转 URL 链接 */
|
||||||
|
const goToUrl = () => {
|
||||||
|
window.open(props.url)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 是否开启 */
|
||||||
|
const getEnable = () => {
|
||||||
|
return import.meta.env.VITE_APP_TENANT_ENABLE === 'true'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-alert--success.is-light {
|
||||||
|
border: 1px solid green;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
@ -64,7 +64,7 @@
|
|||||||
* */
|
* */
|
||||||
import { resetSize } from './../utils/util'
|
import { resetSize } from './../utils/util'
|
||||||
import { aesEncrypt } from './../utils/ase'
|
import { aesEncrypt } from './../utils/ase'
|
||||||
import { getCodeApi, reqCheckApi } from '@/api/login'
|
import { getCode, reqCheck } from '@/api/login'
|
||||||
import { onMounted, reactive, ref, nextTick, toRefs, getCurrentInstance } from 'vue'
|
import { onMounted, reactive, ref, nextTick, toRefs, getCurrentInstance } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -170,7 +170,7 @@ const canvasClick = (e) => {
|
|||||||
: JSON.stringify(checkPosArr),
|
: JSON.stringify(checkPosArr),
|
||||||
token: backToken.value
|
token: backToken.value
|
||||||
}
|
}
|
||||||
reqCheckApi(data).then((res) => {
|
reqCheck(data).then((res) => {
|
||||||
if (res.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
barAreaColor.value = '#4cae4c'
|
barAreaColor.value = '#4cae4c'
|
||||||
barAreaBorderColor.value = '#5cb85c'
|
barAreaBorderColor.value = '#5cb85c'
|
||||||
@ -227,7 +227,7 @@ const getPictrue = async () => {
|
|||||||
let data = {
|
let data = {
|
||||||
captchaType: captchaType.value
|
captchaType: captchaType.value
|
||||||
}
|
}
|
||||||
const res = await getCodeApi(data)
|
const res = await getCode(data)
|
||||||
if (res.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
pointBackImgBase.value = res.repData.originalImageBase64
|
pointBackImgBase.value = res.repData.originalImageBase64
|
||||||
backToken.value = res.repData.token
|
backToken.value = res.repData.token
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
* */
|
* */
|
||||||
import { aesEncrypt } from './../utils/ase'
|
import { aesEncrypt } from './../utils/ase'
|
||||||
import { resetSize } from './../utils/util'
|
import { resetSize } from './../utils/util'
|
||||||
import { getCodeApi, reqCheckApi } from '@/api/login'
|
import { getCode, reqCheck } from '@/api/login'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
captchaType: {
|
captchaType: {
|
||||||
@ -286,7 +286,7 @@ const end = () => {
|
|||||||
: JSON.stringify({ x: moveLeftDistance, y: 5.0 }),
|
: JSON.stringify({ x: moveLeftDistance, y: 5.0 }),
|
||||||
token: backToken.value
|
token: backToken.value
|
||||||
}
|
}
|
||||||
reqCheckApi(data).then((res) => {
|
reqCheck(data).then((res) => {
|
||||||
if (res.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
moveBlockBackgroundColor.value = '#5cb85c'
|
moveBlockBackgroundColor.value = '#5cb85c'
|
||||||
leftBarBorderColor.value = '#5cb85c'
|
leftBarBorderColor.value = '#5cb85c'
|
||||||
@ -301,7 +301,7 @@ const end = () => {
|
|||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
passFlag.value = true
|
passFlag.value = true
|
||||||
tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s
|
tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed(2)}s
|
||||||
${t('captcha.success')}`
|
${t('captcha.success')}`
|
||||||
var captchaVerification = secretKey.value
|
var captchaVerification = secretKey.value
|
||||||
? aesEncrypt(
|
? aesEncrypt(
|
||||||
@ -363,7 +363,7 @@ const getPictrue = async () => {
|
|||||||
let data = {
|
let data = {
|
||||||
captchaType: captchaType.value
|
captchaType: captchaType.value
|
||||||
}
|
}
|
||||||
const res = await getCodeApi(data)
|
const res = await getCode(data)
|
||||||
if (res.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
backImgBase.value = res.repData.originalImageBase64
|
backImgBase.value = res.repData.originalImageBase64
|
||||||
blockBackImgBase.value = res.repData.jigsawImageBase64
|
blockBackImgBase.value = res.repData.jigsawImageBase64
|
||||||
|
@ -280,7 +280,7 @@ const elementHover = (element) => {
|
|||||||
if (element.value.type === 'bpmn:StartEvent' && processInstance.value) {
|
if (element.value.type === 'bpmn:StartEvent' && processInstance.value) {
|
||||||
html = `<p>发起人:${processInstance.value.startUser.nickname}</p>
|
html = `<p>发起人:${processInstance.value.startUser.nickname}</p>
|
||||||
<p>部门:${processInstance.value.startUser.deptName}</p>
|
<p>部门:${processInstance.value.startUser.deptName}</p>
|
||||||
<p>创建时间:${parseTime(processInstance.value.createTime)}`
|
<p>创建时间:${formatDate(processInstance.value.createTime)}`
|
||||||
} else if (element.value.type === 'bpmn:UserTask') {
|
} else if (element.value.type === 'bpmn:UserTask') {
|
||||||
// debugger
|
// debugger
|
||||||
let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
|
let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
|
||||||
@ -297,26 +297,26 @@ const elementHover = (element) => {
|
|||||||
html = `<p>审批人:${task.assigneeUser.nickname}</p>
|
html = `<p>审批人:${task.assigneeUser.nickname}</p>
|
||||||
<p>部门:${task.assigneeUser.deptName}</p>
|
<p>部门:${task.assigneeUser.deptName}</p>
|
||||||
<p>结果:${dataResult}</p>
|
<p>结果:${dataResult}</p>
|
||||||
<p>创建时间:${parseTime(task.createTime)}</p>`
|
<p>创建时间:${formatDate(task.createTime)}</p>`
|
||||||
// html = `<p>审批人:${task.assigneeUser.nickname}</p>
|
// html = `<p>审批人:${task.assigneeUser.nickname}</p>
|
||||||
// <p>部门:${task.assigneeUser.deptName}</p>
|
// <p>部门:${task.assigneeUser.deptName}</p>
|
||||||
// <p>结果:${getIntDictOptions(
|
// <p>结果:${getIntDictOptions(
|
||||||
// DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
|
// DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
|
||||||
// task.result
|
// task.result
|
||||||
// )}</p>
|
// )}</p>
|
||||||
// <p>创建时间:${parseTime(task.createTime)}</p>`
|
// <p>创建时间:${formatDate(task.createTime)}</p>`
|
||||||
if (task.endTime) {
|
if (task.endTime) {
|
||||||
html += `<p>结束时间:${parseTime(task.endTime)}</p>`
|
html += `<p>结束时间:${formatDate(task.endTime)}</p>`
|
||||||
}
|
}
|
||||||
if (task.reason) {
|
if (task.reason) {
|
||||||
html += `<p>审批建议:${task.reason}</p>`
|
html += `<p>审批建议:${task.reason}</p>`
|
||||||
}
|
}
|
||||||
} else if (element.value.type === 'bpmn:ServiceTask' && processInstance.value) {
|
} else if (element.value.type === 'bpmn:ServiceTask' && processInstance.value) {
|
||||||
if (activity.startTime > 0) {
|
if (activity.startTime > 0) {
|
||||||
html = `<p>创建时间:${parseTime(activity.startTime)}</p>`
|
html = `<p>创建时间:${formatDate(activity.startTime)}</p>`
|
||||||
}
|
}
|
||||||
if (activity.endTime > 0) {
|
if (activity.endTime > 0) {
|
||||||
html += `<p>结束时间:${parseTime(activity.endTime)}</p>`
|
html += `<p>结束时间:${formatDate(activity.endTime)}</p>`
|
||||||
}
|
}
|
||||||
console.log(html)
|
console.log(html)
|
||||||
} else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) {
|
} else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) {
|
||||||
@ -333,7 +333,7 @@ const elementHover = (element) => {
|
|||||||
// processInstance.value.result
|
// processInstance.value.result
|
||||||
// )}</p>`
|
// )}</p>`
|
||||||
if (processInstance.value.endTime) {
|
if (processInstance.value.endTime) {
|
||||||
html += `<p>结束时间:${parseTime(processInstance.value.endTime)}</p>`
|
html += `<p>结束时间:${formatDate(processInstance.value.endTime)}</p>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(html, 'html111111111111111')
|
console.log(html, 'html111111111111111')
|
||||||
@ -348,50 +348,6 @@ const elementOut = (element) => {
|
|||||||
toRaw(overlays.value).remove({ element })
|
toRaw(overlays.value).remove({ element })
|
||||||
elementOverlayIds.value[element.id] = null
|
elementOverlayIds.value[element.id] = null
|
||||||
}
|
}
|
||||||
const parseTime = (time) => {
|
|
||||||
if (!time) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
const format = '{y}-{m}-{d} {h}:{i}:{s}'
|
|
||||||
let date
|
|
||||||
if (typeof time === 'object') {
|
|
||||||
date = time
|
|
||||||
} else {
|
|
||||||
if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
|
|
||||||
time = parseInt(time)
|
|
||||||
} else if (typeof time === 'string') {
|
|
||||||
time = time
|
|
||||||
.replace(new RegExp(/-/gm), '/')
|
|
||||||
.replace('T', ' ')
|
|
||||||
.replace(new RegExp(/\.[\d]{3}/gm), '')
|
|
||||||
}
|
|
||||||
if (typeof time === 'number' && time.toString().length === 10) {
|
|
||||||
time = time * 1000
|
|
||||||
}
|
|
||||||
date = new Date(time)
|
|
||||||
}
|
|
||||||
const formatObj = {
|
|
||||||
y: date.getFullYear(),
|
|
||||||
m: date.getMonth() + 1,
|
|
||||||
d: date.getDate(),
|
|
||||||
h: date.getHours(),
|
|
||||||
i: date.getMinutes(),
|
|
||||||
s: date.getSeconds(),
|
|
||||||
a: date.getDay()
|
|
||||||
}
|
|
||||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
|
||||||
let value = formatObj[key]
|
|
||||||
// Note: getDay() returns 0 on Sunday
|
|
||||||
if (key === 'a') {
|
|
||||||
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
|
||||||
}
|
|
||||||
if (result.length > 0 && value < 10) {
|
|
||||||
value = '0' + value
|
|
||||||
}
|
|
||||||
return value || 0
|
|
||||||
})
|
|
||||||
return time_str
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
xml.value = props.value
|
xml.value = props.value
|
||||||
|
@ -219,21 +219,19 @@ const handleAuthorized = () => {
|
|||||||
if (!isRelogin.show) {
|
if (!isRelogin.show) {
|
||||||
isRelogin.show = true
|
isRelogin.show = true
|
||||||
ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), {
|
ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), {
|
||||||
|
showCancelButton: false,
|
||||||
|
closeOnClickModal: false,
|
||||||
|
showClose: false,
|
||||||
confirmButtonText: t('login.relogin'),
|
confirmButtonText: t('login.relogin'),
|
||||||
cancelButtonText: t('common.cancel'),
|
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const { wsCache } = useCache()
|
||||||
|
resetRouter() // 重置静态路由表
|
||||||
|
wsCache.clear()
|
||||||
|
removeToken()
|
||||||
|
isRelogin.show = false
|
||||||
|
window.location.href = import.meta.env.VITE_BASE_PATH
|
||||||
})
|
})
|
||||||
.then(() => {
|
|
||||||
const { wsCache } = useCache()
|
|
||||||
resetRouter() // 重置静态路由表
|
|
||||||
wsCache.clear()
|
|
||||||
removeToken()
|
|
||||||
isRelogin.show = false
|
|
||||||
window.location.href = import.meta.env.VITE_BASE_PATH
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
isRelogin.show = false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
return Promise.reject(t('sys.api.timeoutMessage'))
|
return Promise.reject(t('sys.api.timeoutMessage'))
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { parseTime } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as NotifyMessageApi from '@/api/system/notify/message'
|
import * as NotifyMessageApi from '@/api/system/notify/message'
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
@ -9,14 +9,14 @@ const list = ref<any[]>([]) // 消息列表
|
|||||||
|
|
||||||
// 获得消息列表
|
// 获得消息列表
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
list.value = await NotifyMessageApi.getUnreadNotifyMessageListApi()
|
list.value = await NotifyMessageApi.getUnreadNotifyMessageList()
|
||||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||||
unreadCount.value = 0
|
unreadCount.value = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得未读消息数
|
// 获得未读消息数
|
||||||
const getUnreadCount = async () => {
|
const getUnreadCount = async () => {
|
||||||
NotifyMessageApi.getUnreadNotifyMessageCountApi().then((data) => {
|
NotifyMessageApi.getUnreadNotifyMessageCount().then((data) => {
|
||||||
unreadCount.value = data
|
unreadCount.value = data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ onMounted(() => {
|
|||||||
{{ item.templateNickname }}:{{ item.templateContent }}
|
{{ item.templateNickname }}:{{ item.templateContent }}
|
||||||
</span>
|
</span>
|
||||||
<span class="message-date">
|
<span class="message-date">
|
||||||
{{ parseTime(item.createTime) }}
|
{{ formatDate(item.createTime) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -297,8 +297,7 @@ export default {
|
|||||||
typeCreate: '字典类型新增',
|
typeCreate: '字典类型新增',
|
||||||
typeUpdate: '字典类型编辑',
|
typeUpdate: '字典类型编辑',
|
||||||
dataCreate: '字典数据新增',
|
dataCreate: '字典数据新增',
|
||||||
dataUpdate: '字典数据编辑',
|
dataUpdate: '字典数据编辑'
|
||||||
fileUpload: '上传文件'
|
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
dialog: '弹窗',
|
dialog: '弹窗',
|
||||||
|
@ -25,6 +25,7 @@ VXETable.renderer.add('XPreview', {
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
|
// @ts-ignore
|
||||||
<ElLink href={row[column.field]} target="_blank">
|
<ElLink href={row[column.field]} target="_blank">
|
||||||
{row[column.field]}
|
{row[column.field]}
|
||||||
</ElLink>
|
</ElLink>
|
||||||
|
@ -115,7 +115,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'type/data/:dictType',
|
path: 'type/data/:dictType',
|
||||||
component: () => import('@/views/system/dict/data.vue'),
|
component: () => import('@/views/system/dict/data/index.vue'),
|
||||||
name: 'data',
|
name: 'data',
|
||||||
meta: {
|
meta: {
|
||||||
title: '字典数据',
|
title: '字典数据',
|
||||||
@ -123,7 +123,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
hidden: true,
|
hidden: true,
|
||||||
canTo: true,
|
canTo: true,
|
||||||
icon: '',
|
icon: '',
|
||||||
activeMenu: 'system/dict/data'
|
activeMenu: '/system/dict'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { store } from '../index'
|
import { store } from '../index'
|
||||||
|
// @ts-ignore
|
||||||
import { DictDataVO } from '@/api/system/dict/types'
|
import { DictDataVO } from '@/api/system/dict/types'
|
||||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||||
const { wsCache } = useCache('sessionStorage')
|
const { wsCache } = useCache('sessionStorage')
|
||||||
|
@ -3,7 +3,7 @@ import { store } from '../index'
|
|||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import remainingRouter from '@/router/modules/remaining'
|
import remainingRouter from '@/router/modules/remaining'
|
||||||
import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper'
|
import { generateRoute, flatMultiLevelRoutes } from '@/utils/routerHelper'
|
||||||
import { getAsyncRoutesApi } from '@/api/login'
|
import { getAsyncRoutes } from '@/api/login'
|
||||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||||
|
|
||||||
const { wsCache } = useCache()
|
const { wsCache } = useCache()
|
||||||
@ -38,7 +38,7 @@ export const usePermissionStore = defineStore('permission', {
|
|||||||
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
|
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||||
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||||
} else {
|
} else {
|
||||||
res = await getAsyncRoutesApi()
|
res = await getAsyncRoutes()
|
||||||
wsCache.set(CACHE_KEY.ROLE_ROUTERS, res)
|
wsCache.set(CACHE_KEY.ROLE_ROUTERS, res)
|
||||||
}
|
}
|
||||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res as AppCustomRouteRecordRaw[])
|
const routerMap: AppRouteRecordRaw[] = generateRoute(res as AppCustomRouteRecordRaw[])
|
||||||
|
@ -2,7 +2,7 @@ import { store } from '../index'
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { getAccessToken, removeToken } from '@/utils/auth'
|
import { getAccessToken, removeToken } from '@/utils/auth'
|
||||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||||
import { getInfoApi, loginOutApi } from '@/api/login'
|
import { getInfo, loginOut } from '@/api/login'
|
||||||
|
|
||||||
const { wsCache } = useCache()
|
const { wsCache } = useCache()
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ export const useUserStore = defineStore('admin-user', {
|
|||||||
}
|
}
|
||||||
let userInfo = wsCache.get(CACHE_KEY.USER)
|
let userInfo = wsCache.get(CACHE_KEY.USER)
|
||||||
if (!userInfo) {
|
if (!userInfo) {
|
||||||
userInfo = await getInfoApi()
|
userInfo = await getInfo()
|
||||||
}
|
}
|
||||||
this.permissions = userInfo.permissions
|
this.permissions = userInfo.permissions
|
||||||
this.roles = userInfo.roles
|
this.roles = userInfo.roles
|
||||||
@ -60,7 +60,7 @@ export const useUserStore = defineStore('admin-user', {
|
|||||||
wsCache.set(CACHE_KEY.USER, userInfo)
|
wsCache.set(CACHE_KEY.USER, userInfo)
|
||||||
},
|
},
|
||||||
async loginOut() {
|
async loginOut() {
|
||||||
await loginOutApi()
|
await loginOut()
|
||||||
removeToken()
|
removeToken()
|
||||||
wsCache.clear()
|
wsCache.clear()
|
||||||
this.resetState()
|
this.resetState()
|
||||||
|
5
src/types/auto-components.d.ts
vendored
5
src/types/auto-components.d.ts
vendored
@ -21,9 +21,12 @@ declare module '@vue/runtime-core' {
|
|||||||
Descriptions: typeof import('./../components/Descriptions/src/Descriptions.vue')['default']
|
Descriptions: typeof import('./../components/Descriptions/src/Descriptions.vue')['default']
|
||||||
Dialog: typeof import('./../components/Dialog/src/Dialog.vue')['default']
|
Dialog: typeof import('./../components/Dialog/src/Dialog.vue')['default']
|
||||||
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
|
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
|
||||||
|
DocAlert: typeof import('./../components/DocAlert/index.vue')['default']
|
||||||
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
||||||
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
||||||
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer']
|
ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer']
|
||||||
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||||
@ -68,6 +71,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
||||||
|
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
@ -78,7 +82,6 @@ declare module '@vue/runtime-core' {
|
|||||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
|
@ -23,53 +23,6 @@ export function formatDate(date: Date, format?: string): string {
|
|||||||
return dayjs(date).format(format)
|
return dayjs(date).format(format)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 芋艿:稍后去掉
|
|
||||||
// 日期格式化
|
|
||||||
export function parseTime(time: any, pattern?: string) {
|
|
||||||
if (arguments.length === 0 || !time) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
|
||||||
let date
|
|
||||||
if (typeof time === 'object') {
|
|
||||||
date = time
|
|
||||||
} else {
|
|
||||||
if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
|
|
||||||
time = parseInt(time)
|
|
||||||
} else if (typeof time === 'string') {
|
|
||||||
time = time
|
|
||||||
.replace(new RegExp(/-/gm), '/')
|
|
||||||
.replace('T', ' ')
|
|
||||||
.replace(new RegExp(/\.\d{3}/gm), '')
|
|
||||||
}
|
|
||||||
if (typeof time === 'number' && time.toString().length === 10) {
|
|
||||||
time = time * 1000
|
|
||||||
}
|
|
||||||
date = new Date(time)
|
|
||||||
}
|
|
||||||
const formatObj = {
|
|
||||||
y: date.getFullYear(),
|
|
||||||
m: date.getMonth() + 1,
|
|
||||||
d: date.getDate(),
|
|
||||||
h: date.getHours(),
|
|
||||||
i: date.getMinutes(),
|
|
||||||
s: date.getSeconds(),
|
|
||||||
a: date.getDay()
|
|
||||||
}
|
|
||||||
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
|
|
||||||
let value = formatObj[key]
|
|
||||||
// Note: getDay() returns 0 on Sunday
|
|
||||||
if (key === 'a') {
|
|
||||||
return ['日', '一', '二', '三', '四', '五', '六'][value]
|
|
||||||
}
|
|
||||||
if (result.length > 0 && value < 10) {
|
|
||||||
value = '0' + value
|
|
||||||
}
|
|
||||||
return value || 0
|
|
||||||
})
|
|
||||||
return time_str
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前日期是第几周
|
* 获取当前日期是第几周
|
||||||
* @param dateTime 当前传入的日期值
|
* @param dateTime 当前传入的日期值
|
||||||
@ -87,8 +40,7 @@ export function getWeek(dateTime: Date): number {
|
|||||||
if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1
|
if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1
|
||||||
firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay)
|
firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay)
|
||||||
const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000)
|
const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000)
|
||||||
const result = Math.ceil(d / 7)
|
return Math.ceil(d / 7)
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -265,6 +265,7 @@ export const handleTree = (data: any[], id?: string, parentId?: string, children
|
|||||||
}
|
}
|
||||||
return tree
|
return tree
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造树型结构数据
|
* 构造树型结构数据
|
||||||
* @param {*} data 数据源
|
* @param {*} data 数据源
|
||||||
@ -273,6 +274,7 @@ export const handleTree = (data: any[], id?: string, parentId?: string, children
|
|||||||
* @param {*} children 孩子节点字段 默认 'children'
|
* @param {*} children 孩子节点字段 默认 'children'
|
||||||
* @param {*} rootId 根Id 默认 0
|
* @param {*} rootId 根Id 默认 0
|
||||||
*/
|
*/
|
||||||
|
// @ts-ignore
|
||||||
export const handleTree2 = (data, id, parentId, children, rootId) => {
|
export const handleTree2 = (data, id, parentId, children, rootId) => {
|
||||||
id = id || 'id'
|
id = id || 'id'
|
||||||
parentId = parentId || 'parentId'
|
parentId = parentId || 'parentId'
|
||||||
|
@ -195,7 +195,7 @@ const getCode = async () => {
|
|||||||
//获取租户ID
|
//获取租户ID
|
||||||
const getTenantId = async () => {
|
const getTenantId = async () => {
|
||||||
if (loginData.tenantEnable === 'true') {
|
if (loginData.tenantEnable === 'true') {
|
||||||
const res = await LoginApi.getTenantIdByNameApi(loginData.loginForm.tenantName)
|
const res = await LoginApi.getTenantIdByName(loginData.loginForm.tenantName)
|
||||||
authUtil.setTenantId(res)
|
authUtil.setTenantId(res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,7 +222,7 @@ const handleLogin = async (params) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
loginData.loginForm.captchaVerification = params.captchaVerification
|
loginData.loginForm.captchaVerification = params.captchaVerification
|
||||||
const res = await LoginApi.loginApi(loginData.loginForm)
|
const res = await LoginApi.login(loginData.loginForm)
|
||||||
if (!res) {
|
if (!res) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ const doSocialLogin = async (type: number) => {
|
|||||||
loginLoading.value = true
|
loginLoading.value = true
|
||||||
if (loginData.tenantEnable === 'true') {
|
if (loginData.tenantEnable === 'true') {
|
||||||
await message.prompt('请输入租户名称', t('common.reminder')).then(async ({ value }) => {
|
await message.prompt('请输入租户名称', t('common.reminder')).then(async ({ value }) => {
|
||||||
const res = await LoginApi.getTenantIdByNameApi(value)
|
const res = await LoginApi.getTenantIdByName(value)
|
||||||
authUtil.setTenantId(res)
|
authUtil.setTenantId(res)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ const doSocialLogin = async (type: number) => {
|
|||||||
const redirectUri =
|
const redirectUri =
|
||||||
location.origin + '/social-login?type=' + type + '&redirect=' + (redirect.value || '/')
|
location.origin + '/social-login?type=' + type + '&redirect=' + (redirect.value || '/')
|
||||||
// 进行跳转
|
// 进行跳转
|
||||||
const res = await LoginApi.socialAuthRedirectApi(type, encodeURIComponent(redirectUri))
|
const res = await LoginApi.socialAuthRedirect(type, encodeURIComponent(redirectUri))
|
||||||
window.location.href = res
|
window.location.href = res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ import { useIcon } from '@/hooks/web/useIcon'
|
|||||||
|
|
||||||
import { setTenantId, setToken } from '@/utils/auth'
|
import { setTenantId, setToken } from '@/utils/auth'
|
||||||
import { usePermissionStore } from '@/store/modules/permission'
|
import { usePermissionStore } from '@/store/modules/permission'
|
||||||
import { getTenantIdByNameApi, sendSmsCodeApi, smsLoginApi } from '@/api/login'
|
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
|
||||||
import LoginFormTitle from './LoginFormTitle.vue'
|
import LoginFormTitle from './LoginFormTitle.vue'
|
||||||
import { useLoginState, LoginStateEnum, useFormValid } from './useLogin'
|
import { useLoginState, LoginStateEnum, useFormValid } from './useLogin'
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ const redirect = ref<string>('')
|
|||||||
const getSmsCode = async () => {
|
const getSmsCode = async () => {
|
||||||
await getTenantId()
|
await getTenantId()
|
||||||
smsVO.smsCode.mobile = loginData.loginForm.mobileNumber
|
smsVO.smsCode.mobile = loginData.loginForm.mobileNumber
|
||||||
await sendSmsCodeApi(smsVO.smsCode).then(async () => {
|
await sendSmsCode(smsVO.smsCode).then(async () => {
|
||||||
message.success(t('login.SmsSendMsg'))
|
message.success(t('login.SmsSendMsg'))
|
||||||
// 设置倒计时
|
// 设置倒计时
|
||||||
mobileCodeTimer.value = 60
|
mobileCodeTimer.value = 60
|
||||||
@ -173,7 +173,7 @@ watch(
|
|||||||
// 获取租户 ID
|
// 获取租户 ID
|
||||||
const getTenantId = async () => {
|
const getTenantId = async () => {
|
||||||
if (loginData.tenantEnable === 'true') {
|
if (loginData.tenantEnable === 'true') {
|
||||||
const res = await getTenantIdByNameApi(loginData.loginForm.tenantName)
|
const res = await getTenantIdByName(loginData.loginForm.tenantName)
|
||||||
setTenantId(res)
|
setTenantId(res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ const signIn = async () => {
|
|||||||
loginLoading.value = true
|
loginLoading.value = true
|
||||||
smsVO.loginSms.mobile = loginData.loginForm.mobileNumber
|
smsVO.loginSms.mobile = loginData.loginForm.mobileNumber
|
||||||
smsVO.loginSms.code = loginData.loginForm.code
|
smsVO.loginSms.code = loginData.loginForm.code
|
||||||
await smsLoginApi(smsVO.loginSms)
|
await smsLogin(smsVO.loginSms)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
setToken(res?.token)
|
setToken(res?.token)
|
||||||
if (!redirect.value) {
|
if (!redirect.value) {
|
||||||
|
@ -17,8 +17,8 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { FormSchema } from '@/types/form'
|
import { FormSchema } from '@/types/form'
|
||||||
import type { FormExpose } from '@/components/Form'
|
import type { FormExpose } from '@/components/Form'
|
||||||
import {
|
import {
|
||||||
getUserProfileApi,
|
getUserProfile,
|
||||||
updateUserProfileApi,
|
updateUserProfile,
|
||||||
UserProfileUpdateReqVO
|
UserProfileUpdateReqVO
|
||||||
} from '@/api/system/user/profile'
|
} from '@/api/system/user/profile'
|
||||||
|
|
||||||
@ -73,14 +73,14 @@ const submit = () => {
|
|||||||
elForm.validate(async (valid) => {
|
elForm.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const data = unref(formRef)?.formModel as UserProfileUpdateReqVO
|
const data = unref(formRef)?.formModel as UserProfileUpdateReqVO
|
||||||
await updateUserProfileApi(data)
|
await updateUserProfile(data)
|
||||||
ElMessage.success(t('common.updateSuccess'))
|
ElMessage.success(t('common.updateSuccess'))
|
||||||
await init()
|
await init()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
const res = await getUserProfileApi()
|
const res = await getUserProfile()
|
||||||
unref(formRef)?.setValues(res)
|
unref(formRef)?.setValues(res)
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -34,21 +34,21 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<Icon icon="ep:calendar" class="mr-5px" />{{ t('profile.user.createTime') }}
|
<Icon icon="ep:calendar" class="mr-5px" />{{ t('profile.user.createTime') }}
|
||||||
<div class="pull-right">{{ parseTime(userInfo?.createTime) }}</div>
|
<div class="pull-right">{{ formatDate(userInfo?.createTime) }}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { parseTime } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import UserAvatar from './UserAvatar.vue'
|
import UserAvatar from './UserAvatar.vue'
|
||||||
|
|
||||||
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
|
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const userInfo = ref<ProfileVO>()
|
const userInfo = ref<ProfileVO>()
|
||||||
const getUserInfo = async () => {
|
const getUserInfo = async () => {
|
||||||
const users = await getUserProfileApi()
|
const users = await getUserProfile()
|
||||||
userInfo.value = users
|
userInfo.value = users
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
import type { FormRules, FormInstance } from 'element-plus'
|
import type { FormRules, FormInstance } from 'element-plus'
|
||||||
|
|
||||||
import { InputPassword } from '@/components/InputPassword'
|
import { InputPassword } from '@/components/InputPassword'
|
||||||
import { updateUserPwdApi } from '@/api/system/user/profile'
|
import { updateUserPassword } from '@/api/system/user/profile'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
@ -56,7 +56,7 @@ const submit = (formEl: FormInstance | undefined) => {
|
|||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
formEl.validate(async (valid) => {
|
formEl.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
await updateUserPwdApi(password.oldPassword, password.newPassword)
|
await updateUserPassword(password.oldPassword, password.newPassword)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
import { uploadAvatarApi } from '@/api/system/user/profile'
|
import { uploadAvatar } from '@/api/system/user/profile'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
img: propTypes.string.def('')
|
img: propTypes.string.def('')
|
||||||
})
|
})
|
||||||
@ -22,7 +22,7 @@ const avatar = computed(() => {
|
|||||||
|
|
||||||
const cropperRef = ref()
|
const cropperRef = ref()
|
||||||
const handelUpload = async ({ data }) => {
|
const handelUpload = async ({ data }) => {
|
||||||
await uploadAvatarApi({ avatarFile: data })
|
await uploadAvatar({ avatarFile: data })
|
||||||
cropperRef.value.close()
|
cropperRef.value.close()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { SystemUserSocialTypeEnum } from '@/utils/constants'
|
import { SystemUserSocialTypeEnum } from '@/utils/constants'
|
||||||
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
|
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
||||||
import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser'
|
import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser'
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
@ -31,7 +31,7 @@ const socialUsers = ref<any[]>([])
|
|||||||
const userInfo = ref<ProfileVO>()
|
const userInfo = ref<ProfileVO>()
|
||||||
|
|
||||||
const initSocial = async () => {
|
const initSocial = async () => {
|
||||||
const res = await getUserProfileApi()
|
const res = await getUserProfile()
|
||||||
userInfo.value = res
|
userInfo.value = res
|
||||||
for (const i in SystemUserSocialTypeEnum) {
|
for (const i in SystemUserSocialTypeEnum) {
|
||||||
const socialUser = { ...SystemUserSocialTypeEnum[i] }
|
const socialUser = { ...SystemUserSocialTypeEnum[i] }
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单保存的弹窗 -->
|
<!-- 表单保存的弹窗 -->
|
||||||
<Dialog title="保存表单" v-model="modelVisible" width="600">
|
<Dialog title="保存表单" v-model="dialogVisible" width="600">
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||||
<el-form-item label="表单名" prop="name">
|
<el-form-item label="表单名" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="请输入表单名" />
|
<el-input v-model="formData.name" placeholder="请输入表单名" />
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -48,7 +48,7 @@ const message = useMessage() // 消息
|
|||||||
const { query } = useRoute() // 路由
|
const { query } = useRoute() // 路由
|
||||||
|
|
||||||
const designer = ref() // 表单设计器
|
const designer = ref() // 表单设计器
|
||||||
const modelVisible = ref(false) // 弹窗是否展示
|
const dialogVisible = ref(false) // 弹窗是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:提交的按钮禁用
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
name: '',
|
name: '',
|
||||||
@ -63,7 +63,7 @@ const formRef = ref() // 表单 Ref
|
|||||||
|
|
||||||
/** 处理保存按钮 */
|
/** 处理保存按钮 */
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
@ -85,7 +85,7 @@ const submitForm = async () => {
|
|||||||
await FormApi.updateForm(data)
|
await FormApi.updateForm(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
@ -20,15 +20,15 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
<el-button type="primary" @click="openForm()" v-hasPermi="['bpm:form:create']">
|
<el-button type="primary" plain @click="openForm" v-hasPermi="['bpm:form:create']">
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="编号" align="center" prop="id" />
|
<el-table-column label="编号" align="center" prop="id" />
|
||||||
<el-table-column label="表单名" align="center" prop="name" />
|
<el-table-column label="表单名" align="center" prop="name" />
|
||||||
@ -75,7 +75,7 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单详情的弹窗 -->
|
<!-- 表单详情的弹窗 -->
|
||||||
<Dialog title="表单详情" v-model="detailVisible" width="800">
|
<Dialog title="表单详情" v-model="detailVisible" width="800">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -50,8 +50,8 @@ import * as UserApi from '@/api/system/user'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -72,8 +72,8 @@ const userList = ref([]) // 用户列表
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -108,7 +108,7 @@ const submitForm = async () => {
|
|||||||
await UserGroupApi.updateUserGroup(data)
|
await UserGroupApi.updateUserGroup(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
plain
|
||||||
@click="openForm('create')"
|
@click="openForm('create')"
|
||||||
v-hasPermi="['bpm:user-group:create']"
|
v-hasPermi="['bpm:user-group:create']"
|
||||||
>
|
>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible" width="600">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="600">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -117,7 +117,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -129,8 +129,8 @@ import * as FormApi from '@/api/bpm/form'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -154,8 +154,8 @@ const formList = ref([]) // 流程表单的下拉框的数据
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -203,7 +203,7 @@ const submitForm = async () => {
|
|||||||
await ModelApi.updateModel(data)
|
await ModelApi.updateModel(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="导入流程" v-model="modelVisible" width="400">
|
<Dialog title="导入流程" v-model="dialogVisible" width="400">
|
||||||
<div>
|
<div>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中
|
const formLoading = ref(false) // 表单的加载中
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
key: '',
|
key: '',
|
||||||
@ -72,7 +72,7 @@ const fileList = ref([]) // 文件列表
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async () => {
|
const open = async () => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
resetForm()
|
resetForm()
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
@ -44,7 +44,7 @@ const submitForm = async () => {
|
|||||||
data.startTime = Date.parse(new Date(data.startTime).toString()).toString()
|
data.startTime = Date.parse(new Date(data.startTime).toString()).toString()
|
||||||
data.endTime = Date.parse(new Date(data.endTime).toString()).toString()
|
data.endTime = Date.parse(new Date(data.endTime).toString()).toString()
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
await LeaveApi.createLeaveApi(data)
|
await LeaveApi.createLeave(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
// 关闭窗口
|
// 关闭窗口
|
||||||
push('/bpm/oa/leave')
|
push('/bpm/oa/leave')
|
||||||
|
@ -35,7 +35,7 @@ onMounted(() => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 获得请假信息
|
// 获得请假信息
|
||||||
LeaveApi.getLeaveApi(id.value).then((data) => {
|
LeaveApi.getLeave(id.value).then((data) => {
|
||||||
formData.value = data
|
formData.value = data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -37,7 +37,7 @@ const { push } = useRouter() // 路由
|
|||||||
|
|
||||||
const [registerTable, { reload }] = useXTable({
|
const [registerTable, { reload }] = useXTable({
|
||||||
allSchemas: allSchemas,
|
allSchemas: allSchemas,
|
||||||
getListApi: LeaveApi.getLeavePageApi
|
getListApi: LeaveApi.getLeavePage
|
||||||
})
|
})
|
||||||
|
|
||||||
// 发起请假
|
// 发起请假
|
||||||
@ -55,7 +55,7 @@ const cancelLeave = (row) => {
|
|||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
}).then(async ({ value }) => {
|
}).then(async ({ value }) => {
|
||||||
await ProcessInstanceApi.cancelProcessInstanceApi(row.id, value)
|
await ProcessInstanceApi.cancelProcessInstance(row.id, value)
|
||||||
message.success('取消成功')
|
message.success('取消成功')
|
||||||
reload()
|
reload()
|
||||||
})
|
})
|
||||||
|
@ -111,7 +111,7 @@ const submitForm = async (formData) => {
|
|||||||
// 提交请求
|
// 提交请求
|
||||||
fApi.value.btn.loading(true)
|
fApi.value.btn.loading(true)
|
||||||
try {
|
try {
|
||||||
await ProcessInstanceApi.createProcessInstanceApi({
|
await ProcessInstanceApi.createProcessInstance({
|
||||||
processDefinitionId: selectProcessInstance.value.id,
|
processDefinitionId: selectProcessInstance.value.id,
|
||||||
variables: formData
|
variables: formData
|
||||||
})
|
})
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
</label>
|
</label>
|
||||||
<label style="font-weight: normal" v-if="item.createTime">创建时间:</label>
|
<label style="font-weight: normal" v-if="item.createTime">创建时间:</label>
|
||||||
<label style="color: #8a909c; font-weight: normal">
|
<label style="color: #8a909c; font-weight: normal">
|
||||||
{{ parseTime(item?.createTime) }}
|
{{ formatDate(item?.createTime) }}
|
||||||
</label>
|
</label>
|
||||||
<label v-if="item.endTime" style="margin-left: 30px; font-weight: normal">
|
<label v-if="item.endTime" style="margin-left: 30px; font-weight: normal">
|
||||||
审批时间:
|
审批时间:
|
||||||
</label>
|
</label>
|
||||||
<label v-if="item.endTime" style="color: #8a909c; font-weight: normal">
|
<label v-if="item.endTime" style="color: #8a909c; font-weight: normal">
|
||||||
{{ parseTime(item?.endTime) }}
|
{{ formatDate(item?.endTime) }}
|
||||||
</label>
|
</label>
|
||||||
<label v-if="item.durationInMillis" style="margin-left: 30px; font-weight: normal">
|
<label v-if="item.durationInMillis" style="margin-left: 30px; font-weight: normal">
|
||||||
耗时:
|
耗时:
|
||||||
@ -45,7 +45,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { parseTime, formatPast2 } from '@/utils/formatTime'
|
import { formatDate, formatPast2 } from '@/utils/formatTime'
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="转派审批人" v-model="modelVisible" width="500">
|
<Dialog title="转派审批人" v-model="dialogVisible" width="500">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
import * as TaskApi from '@/api/bpm/task'
|
import * as TaskApi from '@/api/bpm/task'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中
|
const formLoading = ref(false) // 表单的加载中
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: '',
|
id: '',
|
||||||
@ -43,7 +43,7 @@ const userList = ref<any[]>([]) // 用户列表
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (id: string) => {
|
const open = async (id: string) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
resetForm()
|
resetForm()
|
||||||
formData.value.id = id
|
formData.value.id = id
|
||||||
// 获得用户列表
|
// 获得用户列表
|
||||||
@ -62,7 +62,7 @@ const submitForm = async () => {
|
|||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
await TaskApi.updateTaskAssignee(formData.value)
|
await TaskApi.updateTaskAssignee(formData.value)
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -189,7 +189,7 @@ const getDetail = () => {
|
|||||||
const getProcessInstance = async () => {
|
const getProcessInstance = async () => {
|
||||||
try {
|
try {
|
||||||
processInstanceLoading.value = true
|
processInstanceLoading.value = true
|
||||||
const data = await ProcessInstanceApi.getProcessInstanceApi(id)
|
const data = await ProcessInstanceApi.getProcessInstance(id)
|
||||||
if (!data) {
|
if (!data) {
|
||||||
message.error('查询不到流程信息!')
|
message.error('查询不到流程信息!')
|
||||||
return
|
return
|
||||||
|
@ -57,7 +57,7 @@ const { t } = useI18n() // 国际化
|
|||||||
// ========== 列表相关 ==========
|
// ========== 列表相关 ==========
|
||||||
const [registerTable, { reload }] = useXTable({
|
const [registerTable, { reload }] = useXTable({
|
||||||
allSchemas: allSchemas,
|
allSchemas: allSchemas,
|
||||||
getListApi: ProcessInstanceApi.getMyProcessInstancePageApi
|
getListApi: ProcessInstanceApi.getMyProcessInstancePage
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 发起流程操作 **/
|
/** 发起流程操作 **/
|
||||||
@ -85,7 +85,7 @@ const handleCancel = (row) => {
|
|||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
}).then(async ({ value }) => {
|
}).then(async ({ value }) => {
|
||||||
await ProcessInstanceApi.cancelProcessInstanceApi(row.id, value)
|
await ProcessInstanceApi.cancelProcessInstance(row.id, value)
|
||||||
message.success('取消成功')
|
message.success('取消成功')
|
||||||
reload()
|
reload()
|
||||||
})
|
})
|
||||||
|
49
src/views/bpm/task/done/TaskDetail.vue
Normal file
49
src/views/bpm/task/done/TaskDetail.vue
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500">
|
||||||
|
<el-descriptions border :column="1">
|
||||||
|
<el-descriptions-item label="任务编号" min-width="120">
|
||||||
|
{{ detailData.id }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务名称">
|
||||||
|
{{ detailData.name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="所属流程">
|
||||||
|
{{ detailData.processInstance.name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="流程发起人">
|
||||||
|
{{ detailData.processInstance.startUserNickname }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="状态">
|
||||||
|
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="detailData.result" />
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="原因">
|
||||||
|
{{ detailData.reason }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建时间">
|
||||||
|
{{ formatDate(detailData.createTime) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
import * as TaskApi from '@/api/bpm/task'
|
||||||
|
|
||||||
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
|
const detailData = ref() // 详情数据
|
||||||
|
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async (data: TaskApi.TaskVO) => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
// 设置数据
|
||||||
|
detailLoading.value = true
|
||||||
|
try {
|
||||||
|
detailData.value = data
|
||||||
|
} finally {
|
||||||
|
detailLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
</script>
|
@ -1,52 +0,0 @@
|
|||||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
|
|
||||||
// crudSchemas
|
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
|
||||||
primaryKey: 'id',
|
|
||||||
primaryType: null,
|
|
||||||
action: true,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '任务编号',
|
|
||||||
field: 'id',
|
|
||||||
table: {
|
|
||||||
width: 320
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '任务名称',
|
|
||||||
field: 'name',
|
|
||||||
isSearch: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '所属流程',
|
|
||||||
field: 'processInstance.name'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '流程发起人',
|
|
||||||
field: 'processInstance.startUserNickname'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.status'),
|
|
||||||
field: 'result',
|
|
||||||
dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
|
|
||||||
dictClass: 'number',
|
|
||||||
isSearch: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '原因',
|
|
||||||
field: 'reason'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.createTime'),
|
|
||||||
field: 'createTime',
|
|
||||||
formatter: 'formatDate',
|
|
||||||
table: {
|
|
||||||
width: 180
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
|
@ -1,31 +1,128 @@
|
|||||||
<template>
|
<template>
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<XTable @register="registerTable">
|
<!-- 搜索工作栏 -->
|
||||||
<template #suspensionState_default="{ row }">
|
<el-form
|
||||||
<el-tag type="success" v-if="row.suspensionState === 1">激活</el-tag>
|
class="-mb-15px"
|
||||||
<el-tag type="warning" v-if="row.suspensionState === 2">挂起</el-tag>
|
:model="queryParams"
|
||||||
</template>
|
ref="queryFormRef"
|
||||||
<template #actionbtns_default="{ row }">
|
:inline="true"
|
||||||
<!-- 操作: 审批进度 -->
|
label-width="68px"
|
||||||
<XTextButton preIcon="ep:view" title="详情" @click="handleAudit(row)" />
|
>
|
||||||
</template>
|
<el-form-item label="任务名称" prop="name">
|
||||||
</XTable>
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入任务名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.createTime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
// 业务相关的 import
|
|
||||||
import { allSchemas } from './done.data'
|
|
||||||
import * as TaskApi from '@/api/bpm/task'
|
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<ContentWrap>
|
||||||
|
<el-table v-loading="loading" :data="list">
|
||||||
|
<el-table-column label="任务编号" align="center" prop="id" width="300px" />
|
||||||
|
<el-table-column label="任务名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="所属流程" align="center" prop="processInstance.name" />
|
||||||
|
<el-table-column label="流程发起人" align="center" prop="processInstance.startUserNickname" />
|
||||||
|
<el-table-column label="状态" align="center" prop="result">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="scope.row.result" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="原因" align="center" prop="reason" />
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
width="180"
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" @click="openDetail(scope.row)">详情</el-button>
|
||||||
|
<el-button link type="primary" @click="handleAudit(scope.row)">流程</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<Pagination
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<!-- 表单弹窗:详情 -->
|
||||||
|
<TaskDetail ref="detailRef" @success="getList" />
|
||||||
|
</template>
|
||||||
|
<script setup lang="tsx">
|
||||||
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import * as TaskApi from '@/api/bpm/task'
|
||||||
|
import TaskDetail from './TaskDetail.vue'
|
||||||
const { push } = useRouter() // 路由
|
const { push } = useRouter() // 路由
|
||||||
|
|
||||||
const [registerTable] = useXTable({
|
const loading = ref(true) // 列表的加载中
|
||||||
allSchemas: allSchemas,
|
const total = ref(0) // 列表的总页数
|
||||||
topActionSlots: false,
|
const list = ref([]) // 列表的数据
|
||||||
getListApi: TaskApi.getDoneTaskPage
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: '',
|
||||||
|
createTime: []
|
||||||
})
|
})
|
||||||
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
// 处理审批按钮
|
/** 查询任务列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await TaskApi.getDoneTaskPage(queryParams)
|
||||||
|
list.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value.resetFields()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 详情操作 */
|
||||||
|
const detailRef = ref()
|
||||||
|
const openDetail = (row: TaskApi.TaskVO) => {
|
||||||
|
detailRef.value.open(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (row) => {
|
const handleAudit = (row) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
@ -34,4 +131,9 @@ const handleAudit = (row) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 初始化 **/
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="修改任务规则" v-model="modelVisible" width="600">
|
<Dialog title="修改任务规则" v-model="dialogVisible" width="600">
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||||
<el-form-item label="任务名称" prop="taskDefinitionName">
|
<el-form-item label="任务名称" prop="taskDefinitionName">
|
||||||
<el-input v-model="formData.taskDefinitionName" placeholder="请输入流标标识" disabled />
|
<el-input v-model="formData.taskDefinitionName" placeholder="请输入流标标识" disabled />
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -109,7 +109,7 @@ import * as UserGroupApi from '@/api/bpm/userGroup'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
type: Number(undefined),
|
type: Number(undefined),
|
||||||
@ -171,7 +171,7 @@ const open = async (modelId: string, row: TaskAssignRuleApi.TaskAssignVO) => {
|
|||||||
formData.value.scripts.push(...row.options)
|
formData.value.scripts.push(...row.options)
|
||||||
}
|
}
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|
||||||
// 获得角色列表
|
// 获得角色列表
|
||||||
roleOptions.value = await RoleApi.getSimpleRoleList()
|
roleOptions.value = await RoleApi.getSimpleRoleList()
|
||||||
@ -232,7 +232,7 @@ const submitForm = async () => {
|
|||||||
await TaskAssignRuleApi.updateTaskAssignRule(data)
|
await TaskAssignRuleApi.updateTaskAssignRule(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800">
|
<Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800">
|
||||||
<el-descriptions border :column="1">
|
<el-descriptions border :column="1">
|
||||||
<el-descriptions-item label="日志主键" min-width="120">
|
<el-descriptions-item label="日志主键" min-width="120">
|
||||||
{{ detailData.id }}
|
{{ detailData.id }}
|
||||||
@ -45,13 +45,13 @@ import { DICT_TYPE } from '@/utils/dict'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as ApiAccessLog from '@/api/infra/apiAccessLog'
|
import * as ApiAccessLog from '@/api/infra/apiAccessLog'
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const detailLoading = ref(false) // 表单地加载中
|
const detailLoading = ref(false) // 表单地加载中
|
||||||
const detailData = ref() // 详情数据
|
const detailData = ref() // 详情数据
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (data: ApiAccessLog.ApiAccessLogVO) => {
|
const open = async (data: ApiAccessLog.ApiAccessLogVO) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
// 设置数据
|
// 设置数据
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-wrap>
|
<doc-alert title="系统日志" url="https://doc.iocoder.cn/system-log/" />
|
||||||
|
|
||||||
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
@ -25,10 +27,10 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.USER_TYPE)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.USER_TYPE)"
|
||||||
:key="parseInt(dict.value)"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="parseInt(dict.value)"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -84,10 +86,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="日志编号" align="center" prop="id" />
|
<el-table-column label="日志编号" align="center" prop="id" />
|
||||||
<el-table-column label="用户编号" align="center" prop="userId" />
|
<el-table-column label="用户编号" align="center" prop="userId" />
|
||||||
@ -105,15 +107,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="执行时长" align="center" prop="duration" width="180">
|
<el-table-column label="执行时长" align="center" prop="duration" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope"> {{ scope.row.duration }} ms </template>
|
||||||
<span>{{ scope.row.duration }} ms</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作结果" align="center" prop="status">
|
<el-table-column label="操作结果" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{
|
{{ scope.row.resultCode === 0 ? '成功' : '失败(' + scope.row.resultMsg + ')' }}
|
||||||
scope.row.resultCode === 0 ? '成功' : '失败(' + scope.row.resultMsg + ')'
|
|
||||||
}}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
@ -136,19 +134,17 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:详情 -->
|
<!-- 表单弹窗:详情 -->
|
||||||
<ApiAccessLogDetail ref="detailRef" />
|
<ApiAccessLogDetail ref="detailRef" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="ApiAccessLog">
|
<script setup lang="ts" name="ApiAccessLog">
|
||||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as ApiAccessLogApi from '@/api/infra/apiAccessLog'
|
import * as ApiAccessLogApi from '@/api/infra/apiAccessLog'
|
||||||
import ApiAccessLogDetail from './ApiAccessLogDetail.vue'
|
import ApiAccessLogDetail from './ApiAccessLogDetail.vue'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800">
|
<Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800">
|
||||||
<el-descriptions border :column="1">
|
<el-descriptions border :column="1">
|
||||||
<el-descriptions-item label="日志主键" min-width="120">
|
<el-descriptions-item label="日志主键" min-width="120">
|
||||||
{{ detailData.id }}
|
{{ detailData.id }}
|
||||||
@ -60,13 +60,13 @@ import { DICT_TYPE } from '@/utils/dict'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as ApiErrorLog from '@/api/infra/apiErrorLog'
|
import * as ApiErrorLog from '@/api/infra/apiErrorLog'
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const detailData = ref() // 详情数据
|
const detailData = ref() // 详情数据
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (data: ApiErrorLog.ApiErrorLogVO) => {
|
const open = async (data: ApiErrorLog.ApiErrorLogVO) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
// 设置数据
|
// 设置数据
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="系统日志" url="https://doc.iocoder.cn/system-log/" />
|
||||||
|
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-wrap v-loading="formLoading">
|
<ContentWrap v-loading="formLoading">
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName">
|
||||||
<el-tab-pane label="基本信息" name="basicInfo">
|
<el-tab-pane label="基本信息" name="basicInfo">
|
||||||
<basic-info-form ref="basicInfoRef" :table="formData.table" />
|
<basic-info-form ref="basicInfoRef" :table="formData.table" />
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<el-button @click="close">返回</el-button>
|
<el-button @click="close">返回</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="导入表" v-model="modelVisible" width="800px">
|
<Dialog title="导入表" v-model="dialogVisible" width="800px">
|
||||||
<!-- 搜索栏 -->
|
<!-- 搜索栏 -->
|
||||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
<el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
||||||
<el-form-item label="数据源" prop="dataSourceConfigId">
|
<el-form-item label="数据源" prop="dataSourceConfigId">
|
||||||
@ -69,7 +69,7 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
|
|||||||
import { ElTable } from 'element-plus'
|
import { ElTable } from 'element-plus'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dbTableLoading = ref(true) // 数据源的加载中
|
const dbTableLoading = ref(true) // 数据源的加载中
|
||||||
const dbTableList = ref<CodegenApi.DatabaseTableVO[]>([]) // 表的列表
|
const dbTableList = ref<CodegenApi.DatabaseTableVO[]>([]) // 表的列表
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
@ -103,7 +103,7 @@ const open = async () => {
|
|||||||
// 加载数据源的列表
|
// 加载数据源的列表
|
||||||
dataSourceConfigList.value = await DataSourceConfigApi.getDataSourceConfigList()
|
dataSourceConfigList.value = await DataSourceConfigApi.getDataSourceConfigList()
|
||||||
queryParams.dataSourceConfigId = dataSourceConfigList.value[0].id as number
|
queryParams.dataSourceConfigId = dataSourceConfigList.value[0].id as number
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
// 加载表的列表
|
// 加载表的列表
|
||||||
await getList()
|
await getList()
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|||||||
|
|
||||||
/** 关闭弹窗 */
|
/** 关闭弹窗 */
|
||||||
const close = () => {
|
const close = () => {
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
tableList.value = []
|
tableList.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
title="代码预览"
|
title="代码预览"
|
||||||
v-model="modelVisible"
|
v-model="dialogVisible"
|
||||||
align-center
|
align-center
|
||||||
width="80%"
|
width="80%"
|
||||||
class="app-infra-codegen-preview-container"
|
class="app-infra-codegen-preview-container"
|
||||||
@ -61,7 +61,7 @@ import * as CodegenApi from '@/api/infra/codegen'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const loading = ref(false) // 加载中的状态
|
const loading = ref(false) // 加载中的状态
|
||||||
const preview = reactive({
|
const preview = reactive({
|
||||||
fileTree: [], // 文件树
|
fileTree: [], // 文件树
|
||||||
@ -86,7 +86,7 @@ interface filesType {
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (id: number) => {
|
const open = async (id: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
// 生成代码
|
// 生成代码
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="代码生成" url="https://doc.iocoder.cn/new-feature/" />
|
||||||
|
<doc-alert title="单元测试" url="https://doc.iocoder.cn/unit-test/" />
|
||||||
|
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -45,10 +48,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="数据源" align="center">
|
<el-table-column label="数据源" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -132,7 +135,7 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 弹窗:导入表 -->
|
<!-- 弹窗:导入表 -->
|
||||||
<ImportTable ref="importRef" success="getList" />
|
<ImportTable ref="importRef" success="getList" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -47,8 +47,8 @@ import * as ConfigApi from '@/api/infra/config'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -70,9 +70,9 @@ const formRules = reactive({
|
|||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const openModal = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -85,7 +85,7 @@ const openModal = async (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
@ -105,7 +105,7 @@ const submitForm = async () => {
|
|||||||
await ConfigApi.updateConfig(data)
|
await ConfigApi.updateConfig(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="配置中心" url="https://doc.iocoder.cn/config-center/" />
|
||||||
|
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -34,10 +36,10 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE)"
|
||||||
:key="parseInt(dict.value)"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="parseInt(dict.value)"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -55,7 +57,12 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
<el-button type="primary" @click="openModal('create')" v-hasPermi="['infra:config:create']">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="openForm('create')"
|
||||||
|
v-hasPermi="['infra:config:create']"
|
||||||
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@ -69,10 +76,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="参数主键" align="center" prop="id" />
|
<el-table-column label="参数主键" align="center" prop="id" />
|
||||||
<el-table-column label="参数分类" align="center" prop="category" />
|
<el-table-column label="参数分类" align="center" prop="category" />
|
||||||
@ -102,7 +109,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openModal('update', scope.row.id)"
|
@click="openForm('update', scope.row.id)"
|
||||||
v-hasPermi="['infra:config:update']"
|
v-hasPermi="['infra:config:update']"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
@ -125,17 +132,17 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<config-form ref="modalRef" @success="getList" />
|
<ConfigForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="Config">
|
<script setup lang="ts" name="Config">
|
||||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import * as ConfigApi from '@/api/infra/config'
|
import * as ConfigApi from '@/api/infra/config'
|
||||||
import ConfigForm from './form.vue'
|
import ConfigForm from './ConfigForm.vue'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
@ -178,9 +185,9 @@ const resetQuery = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const modalRef = ref()
|
const formRef = ref()
|
||||||
const openModal = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
modalRef.value.openModal(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
@ -203,7 +210,7 @@ const handleExport = async () => {
|
|||||||
await message.exportConfirm()
|
await message.exportConfirm()
|
||||||
// 发起导出
|
// 发起导出
|
||||||
exportLoading.value = true
|
exportLoading.value = true
|
||||||
const data = await ConfigApi.exportConfigApi(queryParams)
|
const data = await ConfigApi.exportConfig(queryParams)
|
||||||
download.excel(data, '参数配置.xls')
|
download.excel(data, '参数配置.xls')
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -32,8 +32,8 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref<DataSourceConfigApi.DataSourceConfigVO>({
|
const formData = ref<DataSourceConfigApi.DataSourceConfigVO>({
|
||||||
@ -52,9 +52,9 @@ const formRules = reactive({
|
|||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const openModal = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -67,7 +67,7 @@ const openModal = async (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
@ -87,7 +87,7 @@ const submitForm = async () => {
|
|||||||
await DataSourceConfigApi.updateDataSourceConfig(data)
|
await DataSourceConfigApi.updateDataSourceConfig(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
@ -1,22 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form class="-mb-15px" :inline="true">
|
<el-form class="-mb-15px" :inline="true">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openModal('create')"
|
plain
|
||||||
|
@click="openForm('create')"
|
||||||
v-hasPermi="['infra:data-source-config:create']"
|
v-hasPermi="['infra:data-source-config:create']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" align="center">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="主键编号" align="center" prop="id" />
|
<el-table-column label="主键编号" align="center" prop="id" />
|
||||||
<el-table-column label="数据源名称" align="center" prop="name" />
|
<el-table-column label="数据源名称" align="center" prop="name" />
|
||||||
<el-table-column label="数据源连接" align="center" prop="url" :show-overflow-tooltip="true" />
|
<el-table-column label="数据源连接" align="center" prop="url" :show-overflow-tooltip="true" />
|
||||||
@ -33,7 +34,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openModal('update', scope.row.id)"
|
@click="openForm('update', scope.row.id)"
|
||||||
v-hasPermi="['infra:data-source-config:update']"
|
v-hasPermi="['infra:data-source-config:update']"
|
||||||
:disabled="scope.row.id === 0"
|
:disabled="scope.row.id === 0"
|
||||||
>
|
>
|
||||||
@ -51,15 +52,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<data-source-config-form ref="modalRef" @success="getList" />
|
<DataSourceConfigForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="DataSourceConfig">
|
<script setup lang="ts" name="DataSourceConfig">
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
|
import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig'
|
||||||
import DataSourceConfigForm from './form.vue'
|
import DataSourceConfigForm from './DataSourceConfigForm.vue'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
@ -77,9 +78,9 @@ const getList = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const modalRef = ref()
|
const formRef = ref()
|
||||||
const openModal = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
modalRef.value.openModal(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="数据库文档" url="https://doc.iocoder.cn/db-doc/" />
|
||||||
|
|
||||||
<ContentWrap title="数据库文档">
|
<ContentWrap title="数据库文档">
|
||||||
<!-- 操作工具栏 -->
|
<!-- 操作工具栏 -->
|
||||||
<div class="mb-10px">
|
<div class="mb-10px">
|
||||||
@ -34,7 +36,7 @@ const src = ref('')
|
|||||||
const loding = ref(true)
|
const loding = ref(true)
|
||||||
/** 页面加载 */
|
/** 页面加载 */
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
const res = await DbDocApi.exportHtmlApi()
|
const res = await DbDocApi.exportHtml()
|
||||||
let blob = new Blob([res], { type: 'text/html' })
|
let blob = new Blob([res], { type: 'text/html' })
|
||||||
let blobUrl = window.URL.createObjectURL(blob)
|
let blobUrl = window.URL.createObjectURL(blob)
|
||||||
src.value = blobUrl
|
src.value = blobUrl
|
||||||
@ -43,15 +45,15 @@ const init = async () => {
|
|||||||
/** 处理导出 */
|
/** 处理导出 */
|
||||||
const handleExport = async (type: string) => {
|
const handleExport = async (type: string) => {
|
||||||
if (type === 'HTML') {
|
if (type === 'HTML') {
|
||||||
const res = await DbDocApi.exportHtmlApi()
|
const res = await DbDocApi.exportHtml()
|
||||||
download.html(res, '数据库文档.html')
|
download.html(res, '数据库文档.html')
|
||||||
}
|
}
|
||||||
if (type === 'Word') {
|
if (type === 'Word') {
|
||||||
const res = await DbDocApi.exportWordApi()
|
const res = await DbDocApi.exportWord()
|
||||||
download.word(res, '数据库文档.doc')
|
download.word(res, '数据库文档.doc')
|
||||||
}
|
}
|
||||||
if (type === 'Markdown') {
|
if (type === 'Markdown') {
|
||||||
const res = await DbDocApi.exportMarkdownApi()
|
const res = await DbDocApi.exportMarkdown()
|
||||||
download.markdown(res, '数据库文档.md')
|
download.markdown(res, '数据库文档.md')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="数据库 MyBatis" url="https://doc.iocoder.cn/mybatis/" />
|
||||||
|
<doc-alert title="多数据源(读写分离)" url="https://doc.iocoder.cn/dynamic-datasource/" />
|
||||||
|
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<IFrame :src="src" />
|
<IFrame :src="src" />
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog title="上传文件" v-model="dialogVisible">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
@ -24,20 +24,18 @@
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitFileForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitFileForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Dialog } from '@/components/Dialog'
|
import { Dialog } from '@/components/Dialog'
|
||||||
import { getAccessToken } from '@/utils/auth'
|
import { getAccessToken } from '@/utils/auth'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const url = import.meta.env.VITE_UPLOAD_URL
|
const url = import.meta.env.VITE_UPLOAD_URL
|
||||||
const headers = { Authorization: 'Bearer ' + getAccessToken() }
|
const headers = { Authorization: 'Bearer ' + getAccessToken() }
|
||||||
@ -45,11 +43,10 @@ const data = ref({ path: '' })
|
|||||||
const uploadRef = ref()
|
const uploadRef = ref()
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const openModal = async () => {
|
const open = async () => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.fileUpload')
|
|
||||||
}
|
}
|
||||||
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
@ -71,7 +68,7 @@ const submitFileForm = () => {
|
|||||||
/** 文件上传成功处理 */
|
/** 文件上传成功处理 */
|
||||||
const handleFileSuccess = () => {
|
const handleFileSuccess = () => {
|
||||||
// 清理
|
// 清理
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
unref(uploadRef)?.clearFiles()
|
unref(uploadRef)?.clearFiles()
|
||||||
// 提示成功,并刷新
|
// 提示成功,并刷新
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="上传下载" url="https://doc.iocoder.cn/file/"/>
|
||||||
|
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true">
|
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true">
|
||||||
<el-form-item label="文件路径" prop="path">
|
<el-form-item label="文件路径" prop="path">
|
||||||
<el-input
|
<el-input
|
||||||
@ -31,16 +33,16 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
<el-button type="primary" @click="openModal">
|
<el-button type="primary" @click="openForm">
|
||||||
<Icon icon="ep:upload" class="mr-5px" /> 上传文件
|
<Icon icon="ep:upload" class="mr-5px" /> 上传文件
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" align="center">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" />
|
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" />
|
<el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" />
|
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" />
|
||||||
@ -79,16 +81,16 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<file-upload-form ref="modalRef" @success="getList" />
|
<FileForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="Config">
|
<script setup lang="ts" name="Config">
|
||||||
import { fileSizeFormatter } from '@/utils'
|
import { fileSizeFormatter } from '@/utils'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as FileApi from '@/api/infra/file'
|
import * as FileApi from '@/api/infra/file'
|
||||||
import FileUploadForm from './form.vue'
|
import FileUploadForm from './FileForm.vue'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
@ -129,9 +131,9 @@ const resetQuery = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const modalRef = ref()
|
const formRef = ref()
|
||||||
const openModal = () => {
|
const openForm = () => {
|
||||||
modalRef.value.openModal()
|
formRef.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -94,19 +94,18 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||||
import * as FileConfigApi from '@/api/infra/fileConfig'
|
import * as FileConfigApi from '@/api/infra/fileConfig'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -136,9 +135,9 @@ const formRules = reactive({
|
|||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const openModal = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -151,7 +150,7 @@ const openModal = async (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
/** 提交表单 */
|
/** 提交表单 */
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
@ -171,7 +170,7 @@ const submitForm = async () => {
|
|||||||
await FileConfigApi.updateFileConfig(data)
|
await FileConfigApi.updateFileConfig(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="上传下载" url="https://doc.iocoder.cn/file/" />
|
||||||
|
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true">
|
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true">
|
||||||
<el-form-item label="配置名" prop="name">
|
<el-form-item label="配置名" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
@ -13,10 +15,10 @@
|
|||||||
<el-form-item label="存储器" prop="storage">
|
<el-form-item label="存储器" prop="storage">
|
||||||
<el-select v-model="queryParams.storage" placeholder="请选择存储器" clearable>
|
<el-select v-model="queryParams.storage" placeholder="请选择存储器" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE)"
|
||||||
:key="parseInt(dict.value)"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="parseInt(dict.value)"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -35,18 +37,19 @@
|
|||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openModal('create')"
|
plain
|
||||||
|
@click="openForm('create')"
|
||||||
v-hasPermi="['infra:file-config:create']"
|
v-hasPermi="['infra:file-config:create']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" align="center">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="编号" align="center" prop="id" />
|
<el-table-column label="编号" align="center" prop="id" />
|
||||||
<el-table-column label="配置名" align="center" prop="name" />
|
<el-table-column label="配置名" align="center" prop="name" />
|
||||||
<el-table-column label="存储器" align="center" prop="storage">
|
<el-table-column label="存储器" align="center" prop="storage">
|
||||||
@ -72,7 +75,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openModal('update', scope.row.id)"
|
@click="openForm('update', scope.row.id)"
|
||||||
v-hasPermi="['infra:file-config:update']"
|
v-hasPermi="['infra:file-config:update']"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
@ -105,15 +108,15 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<file-config-form ref="modalRef" @success="getList" />
|
<FileConfigForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="Config">
|
<script setup lang="ts" name="Config">
|
||||||
import * as FileConfigApi from '@/api/infra/fileConfig'
|
import * as FileConfigApi from '@/api/infra/fileConfig'
|
||||||
import FileConfigForm from './form.vue'
|
import FileConfigForm from './FileConfigForm.vue'
|
||||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
@ -155,9 +158,9 @@ const resetQuery = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const modalRef = ref()
|
const formRef = ref()
|
||||||
const openModal = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
modalRef.value.openModal(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="任务详细" v-model="modelVisible" width="700px">
|
<Dialog title="任务详细" v-model="dialogVisible" width="700px">
|
||||||
<el-descriptions border :column="1">
|
<el-descriptions border :column="1">
|
||||||
<el-descriptions-item label="任务编号" min-width="60">
|
<el-descriptions-item label="任务编号" min-width="60">
|
||||||
{{ detailData.id }}
|
{{ detailData.id }}
|
||||||
@ -47,14 +47,14 @@ import { DICT_TYPE } from '@/utils/dict'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as JobApi from '@/api/infra/job'
|
import * as JobApi from '@/api/infra/job'
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const detailData = ref({}) // 详情数据
|
const detailData = ref({}) // 详情数据
|
||||||
const nextTimes = ref([]) // 下一轮执行时间的数组
|
const nextTimes = ref([]) // 下一轮执行时间的数组
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (id: number) => {
|
const open = async (id: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
// 查看,设置数据
|
// 查看,设置数据
|
||||||
if (id) {
|
if (id) {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" @click="submitForm" :loading="formLoading">确 定</el-button>
|
<el-button type="primary" @click="submitForm" :loading="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -50,8 +50,8 @@ import * as JobApi from '@/api/infra/job'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -72,8 +72,8 @@ const formRef = ref() // 表单 Ref
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -106,7 +106,7 @@ const submitForm = async () => {
|
|||||||
await JobApi.updateJob(data)
|
await JobApi.updateJob(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-wrap>
|
<doc-alert title="定时任务" url="https://doc.iocoder.cn/job/" />
|
||||||
|
<doc-alert title="异步任务" url="https://doc.iocoder.cn/async-task/" />
|
||||||
|
<doc-alert title="消息队列" url="https://doc.iocoder.cn/message-queue/" />
|
||||||
|
|
||||||
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
@ -66,10 +70,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="任务编号" align="center" prop="id" />
|
<el-table-column label="任务编号" align="center" prop="id" />
|
||||||
<el-table-column label="任务名称" align="center" prop="name" />
|
<el-table-column label="任务名称" align="center" prop="name" />
|
||||||
@ -136,7 +140,7 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<JobForm ref="formRef" @success="getList" />
|
<JobForm ref="formRef" @success="getList" />
|
||||||
@ -271,7 +275,7 @@ const handleRun = async (row: JobApi.JobVO) => {
|
|||||||
// 二次确认
|
// 二次确认
|
||||||
await message.confirm('确认要立即执行一次' + row.name + '?', t('common.reminder'))
|
await message.confirm('确认要立即执行一次' + row.name + '?', t('common.reminder'))
|
||||||
// 提交执行
|
// 提交执行
|
||||||
await JobApi.runJobApi(row.id)
|
await JobApi.runJob(row.id)
|
||||||
message.success('执行成功')
|
message.success('执行成功')
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
@ -286,7 +290,7 @@ const openDetail = (id: number) => {
|
|||||||
|
|
||||||
/** 跳转执行日志 */
|
/** 跳转执行日志 */
|
||||||
const handleJobLog = (id: number) => {
|
const handleJobLog = (id: number) => {
|
||||||
if (id) {
|
if (id > 0) {
|
||||||
push('/job/job-log?id=' + id)
|
push('/job/job-log?id=' + id)
|
||||||
} else {
|
} else {
|
||||||
push('/job/job-log')
|
push('/job/job-log')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog title="任务详细" v-model="modelVisible" width="700px">
|
<Dialog title="任务详细" v-model="dialogVisible" width="700px">
|
||||||
<el-descriptions border :column="1">
|
<el-descriptions border :column="1">
|
||||||
<el-descriptions-item label="日志编号" min-width="60">
|
<el-descriptions-item label="日志编号" min-width="60">
|
||||||
{{ detailData.id }}
|
{{ detailData.id }}
|
||||||
@ -36,13 +36,13 @@ import { DICT_TYPE } from '@/utils/dict'
|
|||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import * as JobLogApi from '@/api/infra/jobLog'
|
import * as JobLogApi from '@/api/infra/jobLog'
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const detailData = ref({}) // 详情数据
|
const detailData = ref({}) // 详情数据
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (id: number) => {
|
const open = async (id: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
// 查看,设置数据
|
// 查看,设置数据
|
||||||
if (id) {
|
if (id) {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<content-wrap>
|
<doc-alert title="定时任务" url="https://doc.iocoder.cn/job/" />
|
||||||
|
<doc-alert title="异步任务" url="https://doc.iocoder.cn/async-task/" />
|
||||||
|
<doc-alert title="消息队列" url="https://doc.iocoder.cn/message-queue/" />
|
||||||
|
|
||||||
|
<ContentWrap>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
@ -67,10 +71,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="日志编号" align="center" prop="id" />
|
<el-table-column label="日志编号" align="center" prop="id" />
|
||||||
<el-table-column label="任务编号" align="center" prop="jobId" />
|
<el-table-column label="任务编号" align="center" prop="jobId" />
|
||||||
@ -112,7 +116,7 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 表单弹窗:查看 -->
|
<!-- 表单弹窗:查看 -->
|
||||||
<JobLogDetail ref="detailRef" />
|
<JobLogDetail ref="detailRef" />
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="Redis 缓存" url="https://doc.iocoder.cn/redis-cache/" />
|
||||||
|
<doc-alert title="本地缓存" url="https://doc.iocoder.cn/local-cache/" />
|
||||||
|
|
||||||
<el-scrollbar height="calc(100vh - 88px - 40px - 50px)">
|
<el-scrollbar height="calc(100vh - 88px - 40px - 50px)">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="card-box" shadow="hover">
|
<el-col :span="24" class="card-box" shadow="hover">
|
||||||
@ -130,18 +133,18 @@ import { DICT_TYPE } from '@/utils/dict'
|
|||||||
|
|
||||||
import * as RedisApi from '@/api/infra/redis'
|
import * as RedisApi from '@/api/infra/redis'
|
||||||
import { RedisKeyInfo, RedisMonitorInfoVO } from '@/api/infra/redis/types'
|
import { RedisKeyInfo, RedisMonitorInfoVO } from '@/api/infra/redis/types'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const cache = ref<RedisMonitorInfoVO>()
|
const cache = ref<RedisMonitorInfoVO>()
|
||||||
const keyListLoad = ref(true)
|
const keyListLoad = ref(true)
|
||||||
const keyList = ref<RedisKeyInfo[]>([])
|
const keyList = ref<RedisKeyInfo[]>([])
|
||||||
// 基本信息
|
// 基本信息
|
||||||
const readRedisInfo = async () => {
|
const readRedisInfo = async () => {
|
||||||
const data = await RedisApi.getCacheApi()
|
const data = await RedisApi.getCache()
|
||||||
cache.value = data
|
cache.value = data
|
||||||
loadEchartOptions(data.commandStats)
|
loadEchartOptions(data.commandStats)
|
||||||
const redisKeysInfo = await RedisApi.getKeyDefineListApi()
|
const redisKeysInfo = await RedisApi.getKeyDefineList()
|
||||||
keyList.value = redisKeysInfo
|
keyList.value = redisKeysInfo
|
||||||
keyListLoad.value = false //加载完成
|
keyListLoad.value = false //加载完成
|
||||||
}
|
}
|
||||||
@ -250,19 +253,19 @@ const cacheForm = ref<{
|
|||||||
})
|
})
|
||||||
const openKeyTemplate = async (row: RedisKeyInfo) => {
|
const openKeyTemplate = async (row: RedisKeyInfo) => {
|
||||||
keyTemplate.value = row.keyTemplate
|
keyTemplate.value = row.keyTemplate
|
||||||
cacheKeys.value = await RedisApi.getKeyListApi(row.keyTemplate)
|
cacheKeys.value = await RedisApi.getKeyList(row.keyTemplate)
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
const handleDeleteKey = async (row) => {
|
const handleDeleteKey = async (row) => {
|
||||||
RedisApi.deleteKeyApi(row)
|
RedisApi.deleteKey(row)
|
||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
}
|
}
|
||||||
const handleDeleteKeys = async (row) => {
|
const handleDeleteKeys = async (row) => {
|
||||||
RedisApi.deleteKeysApi(row)
|
RedisApi.deleteKeys(row)
|
||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
}
|
}
|
||||||
const handleKeyValue = async (row) => {
|
const handleKeyValue = async (row) => {
|
||||||
const res = await RedisApi.getKeyValueApi(row)
|
const res = await RedisApi.getKeyValue(row)
|
||||||
cacheForm.value = res
|
cacheForm.value = res
|
||||||
}
|
}
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" />
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<IFrame :src="src" />
|
<IFrame :src="src" />
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" />
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<IFrame :src="src" />
|
<IFrame :src="src" />
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="接口文档" url="https://doc.iocoder.cn/api-doc/" />
|
||||||
|
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<IFrame :src="src" />
|
<IFrame :src="src" />
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<li v-for="item in getList" class="mt-2" :key="item.time">
|
<li v-for="item in getList" class="mt-2" :key="item.time">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="mr-2 text-primary font-medium">收到消息:</span>
|
<span class="mr-2 text-primary font-medium">收到消息:</span>
|
||||||
<span>{{ parseTime(item.time) }}</span>
|
<span>{{ formatDate(item.time) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.res }}
|
{{ item.res }}
|
||||||
@ -56,7 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { parseTime } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
import { useWebSocket } from '@vueuse/core'
|
import { useWebSocket } from '@vueuse/core'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -58,8 +58,8 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -81,8 +81,8 @@ const categoryTree = ref<any[]>([]) // 分类树
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -117,7 +117,7 @@ const submitForm = async () => {
|
|||||||
await ProductCategoryApi.updateCategory(data)
|
await ProductCategoryApi.updateCategory(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -15,10 +15,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -27,8 +25,8 @@ import * as PropertyApi from '@/api/mall/product/property'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -42,8 +40,8 @@ const formRef = ref() // 表单 Ref
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -76,7 +74,7 @@ const submitForm = async () => {
|
|||||||
await PropertyApi.updateProperty(data)
|
await PropertyApi.updateProperty(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -110,7 +110,7 @@ const queryParams = reactive({
|
|||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
/** 查询参数列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -28,8 +28,8 @@ import * as PropertyApi from '@/api/mall/product/property'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -46,8 +46,8 @@ const formRef = ref() // 表单 Ref
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, propertyId: number, id?: number) => {
|
const open = async (type: string, propertyId: number, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
formData.value.propertyId = propertyId
|
formData.value.propertyId = propertyId
|
||||||
@ -81,7 +81,7 @@ const submitForm = async () => {
|
|||||||
await PropertyApi.updatePropertyValue(data)
|
await PropertyApi.updatePropertyValue(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -108,7 +108,7 @@ const queryParams = reactive({
|
|||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const propertyOptions = ref([]) // 属性项的列表
|
const propertyOptions = ref([]) // 属性项的列表
|
||||||
|
|
||||||
/** 查询参数列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="modelTitle" v-model="modelVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -64,7 +64,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
<el-button @click="modelVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -73,8 +73,8 @@ import * as AccountApi from '@/api/mp/account'
|
|||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const modelVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const modelTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@ -98,8 +98,8 @@ const formRef = ref() // 表单 Ref
|
|||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (type: string, id?: number) => {
|
const open = async (type: string, id?: number) => {
|
||||||
modelVisible.value = true
|
dialogVisible.value = true
|
||||||
modelTitle.value = t('action.' + type)
|
dialogTitle.value = t('action.' + type)
|
||||||
formType.value = type
|
formType.value = type
|
||||||
resetForm()
|
resetForm()
|
||||||
// 修改时,设置数据
|
// 修改时,设置数据
|
||||||
@ -132,7 +132,7 @@ const submitForm = async () => {
|
|||||||
await AccountApi.updateAccount(data)
|
await AccountApi.updateAccount(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
modelVisible.value = false
|
dialogVisible.value = false
|
||||||
// 发送操作成功的事件
|
// 发送操作成功的事件
|
||||||
emit('success')
|
emit('success')
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="公众号接入" url="https://doc.iocoder.cn/mp/account/" />
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -25,10 +27,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="名称" align="center" prop="name" />
|
<el-table-column label="名称" align="center" prop="name" />
|
||||||
<el-table-column label="微信号" align="center" prop="account" width="180" />
|
<el-table-column label="微信号" align="center" prop="account" width="180" />
|
||||||
@ -86,15 +88,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页 -->
|
||||||
<pagination
|
<Pagination
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
:total="total"
|
||||||
v-model:page="queryParams.pageNo"
|
v-model:page="queryParams.pageNo"
|
||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
<!-- 对话框(添加 / 修改) -->
|
||||||
<AccountForm ref="formRef" @success="getList" />
|
<AccountForm ref="formRef" @success="getList" />
|
||||||
@ -102,7 +103,6 @@
|
|||||||
<script setup lang="ts" name="MpAccount">
|
<script setup lang="ts" name="MpAccount">
|
||||||
import * as AccountApi from '@/api/mp/account'
|
import * as AccountApi from '@/api/mp/account'
|
||||||
import AccountForm from './AccountForm.vue'
|
import AccountForm from './AccountForm.vue'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上传时间" align="center" prop="createTime" width="180">
|
<el-table-column label="上传时间" align="center" prop="createTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ formatDate(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -80,7 +80,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上传时间" align="center" prop="createTime" width="180">
|
<el-table-column label="上传时间" align="center" prop="createTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ formatDate(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -136,7 +136,7 @@ import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'
|
|||||||
import { getMaterialPage } from '@/api/mp/material'
|
import { getMaterialPage } from '@/api/mp/material'
|
||||||
import { getFreePublishPage } from '@/api/mp/freePublish'
|
import { getFreePublishPage } from '@/api/mp/freePublish'
|
||||||
import { getDraftPage } from '@/api/mp/draft'
|
import { getDraftPage } from '@/api/mp/draft'
|
||||||
import { dateFormatter, parseTime } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
import { defineComponent, PropType } from 'vue'
|
import { defineComponent, PropType } from 'vue'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -238,7 +238,7 @@ export default defineComponent({
|
|||||||
selectMaterialFun,
|
selectMaterialFun,
|
||||||
getMaterialPageFun,
|
getMaterialPageFun,
|
||||||
getPage,
|
getPage,
|
||||||
parseTime,
|
formatDate,
|
||||||
newsTypeRef,
|
newsTypeRef,
|
||||||
queryParams,
|
queryParams,
|
||||||
objDataRef,
|
objDataRef,
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="avue-comment__main">
|
<div class="avue-comment__main">
|
||||||
<div class="avue-comment__header">
|
<div class="avue-comment__header">
|
||||||
<div class="avue-comment__create_time">{{ parseTime(item.createTime) }}</div>
|
<div class="avue-comment__create_time">{{ formatDate(item.createTime) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="avue-comment__body"
|
class="avue-comment__body"
|
||||||
@ -145,7 +145,7 @@ import { defineComponent } from 'vue'
|
|||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
import profile from '@/assets/imgs/profile.jpg'
|
import profile from '@/assets/imgs/profile.jpg'
|
||||||
import wechat from '@/assets/imgs/wechat.png'
|
import wechat from '@/assets/imgs/wechat.png'
|
||||||
import { parseTime } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@ -286,7 +286,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
sendMsg,
|
sendMsg,
|
||||||
loadingMore,
|
loadingMore,
|
||||||
parseTime,
|
formatDate,
|
||||||
scrollToBottom,
|
scrollToBottom,
|
||||||
objData,
|
objData,
|
||||||
mp,
|
mp,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<doc-alert title="公众号图文" url="https://doc.iocoder.cn/mp/article/" />
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<el-form
|
<el-form
|
||||||
class="-mb-15px"
|
class="-mb-15px"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -23,10 +25,10 @@
|
|||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<content-wrap>
|
<ContentWrap>
|
||||||
<div class="waterfall" v-loading="loading">
|
<div class="waterfall" v-loading="loading">
|
||||||
<div
|
<div
|
||||||
class="waterfall-item"
|
class="waterfall-item"
|
||||||
@ -54,7 +56,7 @@
|
|||||||
v-model:limit="queryParams.pageSize"
|
v-model:limit="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</content-wrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="freePublish">
|
<script setup lang="ts" name="freePublish">
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user