mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-09 02:57:35 +00:00
feat: 统一状态字段类型为字符串并重构基础类型
refactor: 重构前后端状态字段类型从布尔值改为字符串 feat: 新增基础类型定义和通用类型接口 refactor: 移除不必要的时间范围字段并统一使用created_time style: 更新前端组件以匹配新的字段命名 docs: 更新接口文档和类型定义
This commit is contained in:
@@ -25,7 +25,7 @@ class JobCreateSchema(BaseModel):
|
|||||||
start_date: Optional[str] = Field(default=None, description='开始时间')
|
start_date: Optional[str] = Field(default=None, description='开始时间')
|
||||||
end_date: Optional[str] = Field(default=None, description='结束时间')
|
end_date: Optional[str] = Field(default=None, description='结束时间')
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description='描述')
|
description: Optional[str] = Field(default=None, max_length=255, description='描述')
|
||||||
status: Optional[bool] = Field(default=False, description='任务状态:启动,停止')
|
status: Optional[str] = Field(default=False, description='任务状态:启动,停止')
|
||||||
|
|
||||||
@field_validator('trigger')
|
@field_validator('trigger')
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -77,7 +77,7 @@ class JobLogCreateSchema(BaseModel):
|
|||||||
job_trigger: Optional[str] = Field(default=None, description='任务触发器')
|
job_trigger: Optional[str] = Field(default=None, description='任务触发器')
|
||||||
job_message: Optional[str] = Field(default=None, description='日志信息')
|
job_message: Optional[str] = Field(default=None, description='日志信息')
|
||||||
exception_info: Optional[str] = Field(default=None, description='异常信息')
|
exception_info: Optional[str] = Field(default=None, description='异常信息')
|
||||||
status: Optional[bool] = Field(default=False, description='任务状态:正常,失败')
|
status: Optional[str] = Field(default=False, description='任务状态:正常,失败')
|
||||||
create_time: Optional[DateTimeStr] = Field(default=None, description='创建时间')
|
create_time: Optional[DateTimeStr] = Field(default=None, description='创建时间')
|
||||||
|
|
||||||
|
|
||||||
@@ -99,10 +99,9 @@ class JobQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="任务名称"),
|
name: Optional[str] = Query(None, description="任务名称"),
|
||||||
status: Optional[bool] = Query(None, description="状态: 启动,停止"),
|
status: Optional[str] = Query(None, description="状态: 启动,停止"),
|
||||||
creator: Optional[int] = Query(None, description="创建人"),
|
creator: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -113,8 +112,8 @@ class JobQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|
||||||
|
|
||||||
class JobLogQueryParam:
|
class JobLogQueryParam:
|
||||||
@@ -124,9 +123,8 @@ class JobLogQueryParam:
|
|||||||
self,
|
self,
|
||||||
job_id: Optional[int] = Query(None, description="定时任务ID"),
|
job_id: Optional[int] = Query(None, description="定时任务ID"),
|
||||||
job_name: Optional[str] = Query(None, description="任务名称"),
|
job_name: Optional[str] = Query(None, description="任务名称"),
|
||||||
status: Optional[bool] = Query(None, description="状态: 正常,失败"),
|
status: Optional[str] = Query(None, description="状态: 正常,失败"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
# 定时任务ID查询
|
# 定时任务ID查询
|
||||||
self.job_id = job_id
|
self.job_id = job_id
|
||||||
@@ -135,5 +133,5 @@ class JobLogQueryParam:
|
|||||||
# 精确查询字段
|
# 精确查询字段
|
||||||
self.status = status
|
self.status = status
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.create_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class ApplicationCRUD(CRUDBase[ApplicationModel, ApplicationCreateSchema, Applic
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置可用状态
|
批量设置可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class ApplicationCreateSchema(BaseModel):
|
|||||||
name: str = Field(..., max_length=64, description='应用名称')
|
name: str = Field(..., max_length=64, description='应用名称')
|
||||||
access_url: str = Field(..., max_length=255, description="访问地址")
|
access_url: str = Field(..., max_length=255, description="访问地址")
|
||||||
icon_url: Optional[str] = Field(None, max_length=300, description="应用图标URL")
|
icon_url: Optional[str] = Field(None, max_length=300, description="应用图标URL")
|
||||||
status: bool = Field(True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
|
|
||||||
@field_validator('access_url')
|
@field_validator('access_url')
|
||||||
@@ -58,10 +58,9 @@ class ApplicationQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="应用名称"),
|
name: Optional[str] = Query(None, description="应用名称"),
|
||||||
status: Optional[bool] = Query(None, description="是否启用"),
|
status: Optional[str] = Query(None, description="是否启用"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -72,5 +71,5 @@ class ApplicationQueryParam:
|
|||||||
self.created_id = created_id
|
self.created_id = created_id
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class DemoCRUD(CRUDBase[DemoModel, DemoCreateSchema, DemoUpdateSchema]):
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置可用状态
|
批量设置可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from app.core.base_schema import BaseSchema, UserBySchema, TenantSchema, Custome
|
|||||||
class DemoCreateSchema(BaseModel):
|
class DemoCreateSchema(BaseModel):
|
||||||
"""新增模型"""
|
"""新增模型"""
|
||||||
name: str = Field(..., min_length=2, max_length=50, description='名称')
|
name: str = Field(..., min_length=2, max_length=50, description='名称')
|
||||||
status: bool = Field(True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
|
|
||||||
@field_validator('name')
|
@field_validator('name')
|
||||||
@@ -56,10 +56,9 @@ class DemoQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="名称"),
|
name: Optional[str] = Query(None, description="名称"),
|
||||||
status: Optional[bool] = Query(None, description="是否启用"),
|
status: Optional[str] = Query(None, description="是否启用"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -70,7 +69,7 @@ class DemoQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship, validates
|
|||||||
from sqlalchemy.sql import expression
|
from sqlalchemy.sql import expression
|
||||||
|
|
||||||
from app.config.setting import settings
|
from app.config.setting import settings
|
||||||
from app.core.base_model import ModelMixin, UserMixin, TenantMixin
|
from app.core.base_model import ModelMixin
|
||||||
from app.utils.common_util import SqlalchemyUtil
|
from app.utils.common_util import SqlalchemyUtil
|
||||||
|
|
||||||
|
|
||||||
class GenTableModel(ModelMixin, UserMixin, TenantMixin):
|
class GenTableModel(ModelMixin):
|
||||||
"""
|
"""
|
||||||
代码生成表
|
代码生成表
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from typing import List, Optional
|
|||||||
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||||
from fastapi import Query
|
from fastapi import Query
|
||||||
|
|
||||||
from app.core.base_schema import BaseSchema, UserBySchema, TenantSchema
|
from app.core.base_schema import BaseSchema
|
||||||
|
|
||||||
|
|
||||||
class GenDBTableSchema(BaseModel):
|
class GenDBTableSchema(BaseModel):
|
||||||
@@ -52,7 +52,7 @@ class GenTableSchema(BaseModel):
|
|||||||
return v
|
return v
|
||||||
|
|
||||||
|
|
||||||
class GenTableOutSchema(GenTableSchema, BaseSchema, UserBySchema, TenantSchema):
|
class GenTableOutSchema(GenTableSchema, BaseSchema):
|
||||||
"""业务表输出模型(面向控制器/前端)。
|
"""业务表输出模型(面向控制器/前端)。
|
||||||
"""
|
"""
|
||||||
model_config = ConfigDict(from_attributes=True)
|
model_config = ConfigDict(from_attributes=True)
|
||||||
@@ -90,7 +90,7 @@ class GenTableColumnSchema(BaseModel):
|
|||||||
sort: int = Field(default=0, description='排序')
|
sort: int = Field(default=0, description='排序')
|
||||||
|
|
||||||
|
|
||||||
class GenTableColumnOutSchema(GenTableColumnSchema, BaseSchema, UserBySchema, TenantSchema):
|
class GenTableColumnOutSchema(GenTableColumnSchema, BaseSchema):
|
||||||
"""
|
"""
|
||||||
业务表字段输出模型
|
业务表字段输出模型
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class {{ class_name }}CRUD(CRUDBase[{{ class_name }}Model, {{ class_name }}Creat
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_available_{{ business_name }}_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_{{ business_name }}_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置可用状态
|
批量设置可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const {{ class_name }}API = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 批量启用/停用
|
// 批量启用/停用
|
||||||
batchAvailable{{ class_name }}(body: { ids: number[]; status: boolean }) {
|
batchAvailable{{ class_name }}(body: { ids: number[]; status: strean }) {
|
||||||
return request<ApiResponse>({
|
return request<ApiResponse>({
|
||||||
url: `${API_PATH}/available/setting`,
|
url: `${API_PATH}/available/setting`,
|
||||||
method: "patch",
|
method: "patch",
|
||||||
|
|||||||
@@ -577,7 +577,7 @@ async function handleDelete(ids: number[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 批量启用/停用
|
// 批量启用/停用
|
||||||
async function handleMoreClick(status: boolean) {
|
async function handleMoreClick(status: strean) {
|
||||||
if (selectIds.value.length) {
|
if (selectIds.value.length) {
|
||||||
ElMessageBox.confirm(`确认${status ? '启用' : '停用'}该项数据?`, '警告', {
|
ElMessageBox.confirm(`确认${status ? '启用' : '停用'}该项数据?`, '警告', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class CustomerCRUD(CRUDBase[CustomerModel, CustomerCreateSchema, CustomerUpdateS
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置可用状态
|
批量设置可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
from datetime import datetime
|
from sqlalchemy import String
|
||||||
from sqlalchemy import DateTime, String
|
|
||||||
from sqlalchemy.orm import Mapped, mapped_column, relationship, validates
|
from sqlalchemy.orm import Mapped, mapped_column, relationship, validates
|
||||||
|
|
||||||
from app.core.base_model import ModelMixin, UserMixin, TenantMixin
|
from app.core.base_model import ModelMixin, UserMixin, TenantMixin
|
||||||
@@ -32,8 +31,6 @@ class CustomerModel(ModelMixin, UserMixin, TenantMixin):
|
|||||||
|
|
||||||
name: Mapped[str] = mapped_column(String(64), nullable=False, comment='客户名称')
|
name: Mapped[str] = mapped_column(String(64), nullable=False, comment='客户名称')
|
||||||
code: Mapped[str] = mapped_column(String(20), nullable=False, index=True, comment='客户编码')
|
code: Mapped[str] = mapped_column(String(20), nullable=False, index=True, comment='客户编码')
|
||||||
start_time: Mapped[datetime | None] = mapped_column(DateTime, nullable=True, default=None, comment='开始时间')
|
|
||||||
end_time: Mapped[datetime | None] = mapped_column(DateTime, nullable=True, default=None, comment='结束时间')
|
|
||||||
|
|
||||||
users: Mapped[list["UserModel"]] = relationship(
|
users: Mapped[list["UserModel"]] = relationship(
|
||||||
back_populates="customer",
|
back_populates="customer",
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ class CustomerCreateSchema(BaseModel):
|
|||||||
"""新增模型"""
|
"""新增模型"""
|
||||||
name: str = Field(..., max_length=64, description='客户名称')
|
name: str = Field(..., max_length=64, description='客户名称')
|
||||||
code: Optional[str] = Field(default=None, max_length=20, description='客户编码')
|
code: Optional[str] = Field(default=None, max_length=20, description='客户编码')
|
||||||
start_time: Optional[DateTimeStr] = Field(default=None, description="开始时间", example="2025-01-01 00:00:00")
|
status: str = Field(True, description="是否启用(True:启用 False:禁用)")
|
||||||
end_time: Optional[DateTimeStr] = Field(default=None, description="结束时间", example="2025-12-31 23:59:59")
|
|
||||||
status: bool = Field(True, description="是否启用(True:启用 False:禁用)")
|
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
|
|
||||||
@field_validator('name')
|
@field_validator('name')
|
||||||
@@ -56,10 +54,9 @@ class CustomerQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="客户名称"),
|
name: Optional[str] = Query(None, description="客户名称"),
|
||||||
status: Optional[bool] = Query(None, description="状态用(True:启用 False:禁用)"),
|
status: Optional[str] = Query(None, description="状态用(True:启用 False:禁用)"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -70,5 +67,5 @@ class CustomerQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ class CustomerService:
|
|||||||
mapping_dict = {
|
mapping_dict = {
|
||||||
'id': '编号',
|
'id': '编号',
|
||||||
'name': '名称',
|
'name': '名称',
|
||||||
|
'code': '编码',
|
||||||
'status': '状态',
|
'status': '状态',
|
||||||
'description': '备注',
|
'description': '备注',
|
||||||
'created_time': '创建时间',
|
'created_time': '创建时间',
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class DeptCRUD(CRUDBase[DeptModel, DeptCreateSchema, DeptUpdateSchema]):
|
|||||||
"""
|
"""
|
||||||
return await self.tree_list(search=search, order_by=order_by, children_attr='children', preload=preload)
|
return await self.tree_list(search=search, order_by=order_by, children_attr='children', preload=preload)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置部门可用状态。
|
批量设置部门可用状态。
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class DeptCreateSchema(BaseModel):
|
|||||||
phone: Optional[str] = Field(default=None, max_length=11, description="手机")
|
phone: Optional[str] = Field(default=None, max_length=11, description="手机")
|
||||||
email: Optional[str] = Field(default=None, max_length=64, description="邮箱")
|
email: Optional[str] = Field(default=None, max_length=64, description="邮箱")
|
||||||
parent_id: Optional[int] = Field(default=None, ge=0, description="父部门ID")
|
parent_id: Optional[int] = Field(default=None, ge=0, description="父部门ID")
|
||||||
status: bool = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="备注说明")
|
description: Optional[str] = Field(default=None, max_length=255, description="备注说明")
|
||||||
|
|
||||||
@field_validator('name')
|
@field_validator('name')
|
||||||
@@ -58,12 +58,10 @@ class DeptQueryParam:
|
|||||||
"""部门管理查询参数"""
|
"""部门管理查询参数"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="部门名称"),
|
name: Optional[str] = Query(None, description="部门名称"),
|
||||||
status: Optional[bool] = Query(None, description="部门状态(True正常 False停用)"),
|
status: Optional[str] = Query(None, description="部门状态(True正常 False停用)"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -73,5 +71,5 @@ class DeptQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class DictTypeCRUD(CRUDBase[DictTypeModel, DictTypeCreateSchema, DictTypeUpdateS
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_obj_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_obj_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
设置数据字典类型的可用状态
|
设置数据字典类型的可用状态
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ class DictDataCRUD(CRUDBase[DictDataModel, DictDataCreateSchema, DictDataUpdateS
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_obj_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_obj_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
设置数据字典数据的可用状态
|
设置数据字典数据的可用状态
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ class DictDataCRUD(CRUDBase[DictDataModel, DictDataCreateSchema, DictDataUpdateS
|
|||||||
await self.delete(ids=ids)
|
await self.delete(ids=ids)
|
||||||
return len(ids)
|
return len(ids)
|
||||||
|
|
||||||
async def get_obj_list_by_dict_type_crud(self, dict_type: str, status: Optional[bool] = True) -> List[DictDataModel]:
|
async def get_obj_list_by_dict_type_crud(self, dict_type: str, status: Optional[str] = True) -> List[DictDataModel]:
|
||||||
"""
|
"""
|
||||||
根据字典类型获取字典数据列表
|
根据字典类型获取字典数据列表
|
||||||
|
|
||||||
|
|||||||
@@ -14,31 +14,10 @@ class DictTypeCreateSchema(BaseModel):
|
|||||||
字典类型表对应pydantic模型
|
字典类型表对应pydantic模型
|
||||||
"""
|
"""
|
||||||
|
|
||||||
dict_name: str = Field(
|
dict_name: str = Field(..., min_length=1, max_length=100, description='字典名称', example='用户状态')
|
||||||
...,
|
dict_type: str = Field(..., min_length=1, max_length=100, description='字典类型', example='sys_user_status')
|
||||||
min_length=1,
|
status: Optional[str] = Field(default=None, description='状态(1正常 0停用)', example=True)
|
||||||
max_length=100,
|
description: Optional[str] = Field(default=None, max_length=255, description="描述", example="用户账号状态管理")
|
||||||
description='字典名称',
|
|
||||||
example='用户状态'
|
|
||||||
)
|
|
||||||
dict_type: str = Field(
|
|
||||||
...,
|
|
||||||
min_length=1,
|
|
||||||
max_length=100,
|
|
||||||
description='字典类型',
|
|
||||||
example='sys_user_status'
|
|
||||||
)
|
|
||||||
status: Optional[bool] = Field(
|
|
||||||
default=None,
|
|
||||||
description='状态(1正常 0停用)',
|
|
||||||
example=True
|
|
||||||
)
|
|
||||||
description: Optional[str] = Field(
|
|
||||||
default=None,
|
|
||||||
max_length=255,
|
|
||||||
description="描述",
|
|
||||||
example="用户账号状态管理"
|
|
||||||
)
|
|
||||||
|
|
||||||
@field_validator('dict_name')
|
@field_validator('dict_name')
|
||||||
def validate_dict_name(cls, value: str):
|
def validate_dict_name(cls, value: str):
|
||||||
@@ -63,32 +42,18 @@ class DictTypeUpdateSchema(DictTypeCreateSchema):
|
|||||||
|
|
||||||
class DictTypeOutSchema(DictTypeCreateSchema, BaseSchema):
|
class DictTypeOutSchema(DictTypeCreateSchema, BaseSchema):
|
||||||
"""字典类型响应模型"""
|
"""字典类型响应模型"""
|
||||||
model_config = ConfigDict(
|
model_config = ConfigDict(from_attributes=True)
|
||||||
from_attributes=True,
|
|
||||||
json_schema_extra={
|
|
||||||
"example": {
|
|
||||||
"id": 1,
|
|
||||||
"dict_name": "用户状态",
|
|
||||||
"dict_type": "sys_user_status",
|
|
||||||
"status": True,
|
|
||||||
"description": "用户账号状态管理",
|
|
||||||
"created_at": "2024-01-01T00:00:00Z",
|
|
||||||
"updated_at": "2024-01-01T00:00:00Z"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class DictTypeQueryParam:
|
class DictTypeQueryParam:
|
||||||
"""字典类型查询参数"""
|
"""字典类型查询参数"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
dict_name: Optional[str] = Query(None, description="字典名称", max_length=100, example="用户"),
|
dict_name: Optional[str] = Query(None, description="字典名称", max_length=100, example="用户"),
|
||||||
dict_type: Optional[str] = Query(None, description="字典类型", max_length=100, example="sys_user"),
|
dict_type: Optional[str] = Query(None, description="字典类型", max_length=100, example="sys_user"),
|
||||||
status: Optional[bool] = Query(None, description="状态(1正常 0停用)", example=True),
|
status: Optional[str] = Query(None, description="状态(1正常 0停用)", example=True),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
@@ -100,71 +65,24 @@ class DictTypeQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|
||||||
|
|
||||||
class DictDataCreateSchema(BaseModel):
|
class DictDataCreateSchema(BaseModel):
|
||||||
"""
|
"""
|
||||||
字典数据表对应pydantic模型
|
字典数据表对应pydantic模型
|
||||||
"""
|
"""
|
||||||
dict_sort: int = Field(
|
dict_sort: int = Field(..., ge=1, le=999, description='字典排序', example=1)
|
||||||
...,
|
dict_label: str = Field(..., max_length=100, description='字典标签', example='正常')
|
||||||
ge=1,
|
dict_value: str = Field(..., max_length=100, description='字典键值', example='0')
|
||||||
le=999,
|
dict_type: str = Field(..., max_length=100, description='字典类型', example='sys_user_status')
|
||||||
description='字典排序',
|
dict_type_id: int = Field(..., description='字典类型ID', example=1)
|
||||||
example=1
|
css_class: Optional[str] = Field(default=None, max_length=100, description='样式属性(其他样式扩展)', example='label-success')
|
||||||
)
|
list_class: Optional[str] = Field(default=None, description='表格回显样式', example='success')
|
||||||
dict_label: str = Field(
|
is_default: Optional[bool] = Field(default=None, description='是否默认(Y是 N否)', example=True)
|
||||||
...,
|
status: Optional[str] = Field(default=None, description='状态(1正常 0停用)', example=True)
|
||||||
max_length=100,
|
description: Optional[str] = Field(default=None, max_length=255, description="描述", example="正常状态的用户")
|
||||||
description='字典标签',
|
|
||||||
example='正常'
|
|
||||||
)
|
|
||||||
dict_value: str = Field(
|
|
||||||
...,
|
|
||||||
max_length=100,
|
|
||||||
description='字典键值',
|
|
||||||
example='0'
|
|
||||||
)
|
|
||||||
dict_type: str = Field(
|
|
||||||
...,
|
|
||||||
max_length=100,
|
|
||||||
description='字典类型',
|
|
||||||
example='sys_user_status'
|
|
||||||
)
|
|
||||||
dict_type_id: int = Field(
|
|
||||||
...,
|
|
||||||
description='字典类型ID',
|
|
||||||
example=1
|
|
||||||
)
|
|
||||||
css_class: Optional[str] = Field(
|
|
||||||
default=None,
|
|
||||||
max_length=100,
|
|
||||||
description='样式属性(其他样式扩展)',
|
|
||||||
example='label-success'
|
|
||||||
)
|
|
||||||
list_class: Optional[str] = Field(
|
|
||||||
default=None,
|
|
||||||
description='表格回显样式',
|
|
||||||
example='success'
|
|
||||||
)
|
|
||||||
is_default: Optional[bool] = Field(
|
|
||||||
default=None,
|
|
||||||
description='是否默认(Y是 N否)',
|
|
||||||
example=True
|
|
||||||
)
|
|
||||||
status: Optional[bool] = Field(
|
|
||||||
default=None,
|
|
||||||
description='状态(1正常 0停用)',
|
|
||||||
example=True
|
|
||||||
)
|
|
||||||
description: Optional[str] = Field(
|
|
||||||
default=None,
|
|
||||||
max_length=255,
|
|
||||||
description="描述",
|
|
||||||
example="正常状态的用户"
|
|
||||||
)
|
|
||||||
|
|
||||||
@model_validator(mode='after')
|
@model_validator(mode='after')
|
||||||
def validate_after(self):
|
def validate_after(self):
|
||||||
@@ -192,39 +110,19 @@ class DictDataUpdateSchema(DictDataCreateSchema):
|
|||||||
|
|
||||||
class DictDataOutSchema(DictDataCreateSchema, BaseSchema):
|
class DictDataOutSchema(DictDataCreateSchema, BaseSchema):
|
||||||
"""字典数据响应模型"""
|
"""字典数据响应模型"""
|
||||||
model_config = ConfigDict(
|
model_config = ConfigDict(from_attributes=True)
|
||||||
from_attributes=True,
|
|
||||||
json_schema_extra={
|
|
||||||
"example": {
|
|
||||||
"id": 1,
|
|
||||||
"dict_sort": 1,
|
|
||||||
"dict_label": "正常",
|
|
||||||
"dict_value": "0",
|
|
||||||
"dict_type": "sys_user_status",
|
|
||||||
"dict_type_id": 1,
|
|
||||||
"css_class": "label-success",
|
|
||||||
"list_class": "success",
|
|
||||||
"is_default": True,
|
|
||||||
"status": True,
|
|
||||||
"description": "正常状态的用户",
|
|
||||||
"created_at": "2024-01-01T00:00:00Z",
|
|
||||||
"updated_at": "2024-01-01T00:00:00Z"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class DictDataQueryParam:
|
class DictDataQueryParam:
|
||||||
"""字典数据查询参数"""
|
"""字典数据查询参数"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
dict_label: Optional[str] = Query(None, description="字典标签", max_length=100, example="正常"),
|
dict_label: Optional[str] = Query(None, description="字典标签", max_length=100, example="正常"),
|
||||||
dict_type: Optional[str] = Query(None, description="字典类型", max_length=100, example="sys_user_status"),
|
dict_type: Optional[str] = Query(None, description="字典类型", max_length=100, example="sys_user_status"),
|
||||||
dict_type_id: Optional[int] = Query(None, description="字典类型ID", example=1),
|
dict_type_id: Optional[int] = Query(None, description="字典类型ID", example=1),
|
||||||
status: Optional[bool] = Query(None, description="状态(1正常 0停用)", example=True),
|
status: Optional[str] = Query(None, description="状态(1正常 0停用)", example=True),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -236,5 +134,5 @@ class DictDataQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class OperationLogCreateSchema(BaseModel):
|
|||||||
response_code: Optional[int] = Field(default=None, description="响应状态码")
|
response_code: Optional[int] = Field(default=None, description="响应状态码")
|
||||||
response_json: Optional[str] = Field(default=None, description="响应 JSON 数据")
|
response_json: Optional[str] = Field(default=None, description="响应 JSON 数据")
|
||||||
process_time: Optional[str] = Field(default=None, description="处理时间")
|
process_time: Optional[str] = Field(default=None, description="处理时间")
|
||||||
status: Optional[bool] = Field(default=True, description="是否成功")
|
status: Optional[str] = Field(default=True, description="是否成功")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
created_id: Optional[int] = Field(default=None, description="创建人ID")
|
created_id: Optional[int] = Field(default=None, description="创建人ID")
|
||||||
|
|
||||||
@@ -73,8 +73,7 @@ class OperationLogQueryParam:
|
|||||||
request_ip: Optional[str] = Query(None, description="请求IP"),
|
request_ip: Optional[str] = Query(None, description="请求IP"),
|
||||||
response_code: Optional[int] = Query(None, description="响应状态码"),
|
response_code: Optional[int] = Query(None, description="响应状态码"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -88,9 +87,5 @@ class OperationLogQueryParam:
|
|||||||
self.type = type
|
self.type = type
|
||||||
|
|
||||||
# 时间范围查询 - 增加对单个时间参数的处理
|
# 时间范围查询 - 增加对单个时间参数的处理
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
elif start_time:
|
|
||||||
self.created_time = (">=", start_time)
|
|
||||||
elif end_time:
|
|
||||||
self.created_time = ("<=", end_time)
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class MenuCRUD(CRUDBase[MenuModel, MenuCreateSchema, MenuUpdateSchema]):
|
|||||||
"""
|
"""
|
||||||
return await self.tree_list(search=search, order_by=order_by, children_attr='children', preload=preload)
|
return await self.tree_list(search=search, order_by=order_by, children_attr='children', preload=preload)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置菜单可用状态。
|
批量设置菜单可用状态。
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class MenuCreateSchema(BaseModel):
|
|||||||
params: Optional[list[dict[str, str]]] = Field(default=None, description="路由参数,格式为[{key: string, value: string}]")
|
params: Optional[list[dict[str, str]]] = Field(default=None, description="路由参数,格式为[{key: string, value: string}]")
|
||||||
affix: bool = Field(default=False, description="是否固定标签页(True:是 False:否)")
|
affix: bool = Field(default=False, description="是否固定标签页(True:是 False:否)")
|
||||||
parent_id: Optional[int] = Field(default=None, ge=1, description="父菜单ID")
|
parent_id: Optional[int] = Field(default=None, ge=1, description="父菜单ID")
|
||||||
status: bool = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
|
|
||||||
@model_validator(mode='before')
|
@model_validator(mode='before')
|
||||||
@@ -87,9 +87,8 @@ class MenuQueryParam:
|
|||||||
component_path: Optional[str] = Query(None, description="组件路径"),
|
component_path: Optional[str] = Query(None, description="组件路径"),
|
||||||
type: Optional[Literal['M', 'C', 'F']] = Query(None, description="菜单类型(M目录 C菜单 F按钮)"),
|
type: Optional[Literal['M', 'C', 'F']] = Query(None, description="菜单类型(M目录 C菜单 F按钮)"),
|
||||||
permission: Optional[str] = Query(None, description="权限标识"),
|
permission: Optional[str] = Query(None, description="权限标识"),
|
||||||
status: Optional[bool] = Query(None, description="菜单状态(True正常 False停用)"),
|
status: Optional[str] = Query(None, description="菜单状态(True正常 False停用)"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -103,5 +102,5 @@ class MenuQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -164,9 +164,7 @@ async def export_obj_list_controller(
|
|||||||
return StreamResponse(
|
return StreamResponse(
|
||||||
data=bytes2file_response(export_result),
|
data=bytes2file_response(export_result),
|
||||||
media_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
media_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
headers = {
|
headers = {'Content-Disposition': 'attachment; filename=notice.xlsx'}
|
||||||
'Content-Disposition': 'attachment; filename=notice.xlsx'
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@NoticeRouter.get("/available", summary="获取全局启用公告", description="获取全局启用公告")
|
@NoticeRouter.get("/available", summary="获取全局启用公告", description="获取全局启用公告")
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class NoticeCRUD(CRUDBase[NoticeModel, NoticeCreateSchema, NoticeUpdateSchema]):
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
设置公告的可用状态。
|
设置公告的可用状态。
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from datetime import datetime
|
|
||||||
from typing import Optional
|
|
||||||
from sqlalchemy import String, Text
|
from sqlalchemy import String, Text
|
||||||
from sqlalchemy.orm import Mapped, mapped_column
|
from sqlalchemy.orm import Mapped, mapped_column
|
||||||
|
|
||||||
@@ -38,5 +36,3 @@ class NoticeModel(ModelMixin, UserMixin, TenantMixin, CustomerMixin):
|
|||||||
notice_title: Mapped[str] = mapped_column(String(50), nullable=False, comment='公告标题')
|
notice_title: Mapped[str] = mapped_column(String(50), nullable=False, comment='公告标题')
|
||||||
notice_type: Mapped[str] = mapped_column(String(50), nullable=False, comment='公告类型(1通知 2公告)')
|
notice_type: Mapped[str] = mapped_column(String(50), nullable=False, comment='公告类型(1通知 2公告)')
|
||||||
notice_content: Mapped[str | None] = mapped_column(Text, nullable=True, comment='公告内容')
|
notice_content: Mapped[str | None] = mapped_column(Text, nullable=True, comment='公告内容')
|
||||||
start_time: Mapped[Optional[datetime]] = mapped_column(nullable=True, comment='开始时间')
|
|
||||||
end_time: Mapped[Optional[datetime]] = mapped_column(nullable=True, comment='结束时间')
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator, model_valida
|
|||||||
from fastapi import Query
|
from fastapi import Query
|
||||||
|
|
||||||
from app.core.validator import DateTimeStr
|
from app.core.validator import DateTimeStr
|
||||||
from app.core.base_schema import BaseSchema, UserBySchema, TenantSchema
|
from app.core.base_schema import BaseSchema, UserBySchema, TenantSchema, CustomerSchema
|
||||||
|
|
||||||
|
|
||||||
class NoticeCreateSchema(BaseModel):
|
class NoticeCreateSchema(BaseModel):
|
||||||
@@ -14,10 +14,8 @@ class NoticeCreateSchema(BaseModel):
|
|||||||
notice_title: str = Field(..., max_length=50, description='公告标题')
|
notice_title: str = Field(..., max_length=50, description='公告标题')
|
||||||
notice_type: str = Field(..., description='公告类型(1通知 2公告)')
|
notice_type: str = Field(..., description='公告类型(1通知 2公告)')
|
||||||
notice_content: str = Field(..., description='公告内容')
|
notice_content: str = Field(..., description='公告内容')
|
||||||
status: bool = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
start_time: Optional[datetime] = Field(default=None, description="开始时间")
|
|
||||||
end_time: Optional[datetime] = Field(default=None, description="结束时间")
|
|
||||||
|
|
||||||
@field_validator("notice_type")
|
@field_validator("notice_type")
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -44,7 +42,7 @@ class NoticeUpdateSchema(NoticeCreateSchema):
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
class NoticeOutSchema(NoticeCreateSchema, BaseSchema, UserBySchema, TenantSchema):
|
class NoticeOutSchema(NoticeCreateSchema, BaseSchema, UserBySchema, TenantSchema, CustomerSchema):
|
||||||
"""公告通知响应模型"""
|
"""公告通知响应模型"""
|
||||||
model_config = ConfigDict(from_attributes=True)
|
model_config = ConfigDict(from_attributes=True)
|
||||||
|
|
||||||
@@ -56,12 +54,9 @@ class NoticeQueryParam:
|
|||||||
self,
|
self,
|
||||||
notice_title: Optional[str] = Query(None, description="公告标题"),
|
notice_title: Optional[str] = Query(None, description="公告标题"),
|
||||||
notice_type: Optional[str] = Query(None, description="公告类型"),
|
notice_type: Optional[str] = Query(None, description="公告类型"),
|
||||||
status: Optional[bool] = Query(None, description="是否可用"),
|
status: Optional[str] = Query(None, description="是否可用"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="创建开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="创建结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
notice_start_time: Optional[DateTimeStr] = Query(None, description="公告开始时间", example="2025-01-01 00:00:00"),
|
|
||||||
notice_end_time: Optional[DateTimeStr] = Query(None, description="公告结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -73,11 +68,5 @@ class NoticeQueryParam:
|
|||||||
self.notice_type = notice_type
|
self.notice_type = notice_type
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|
||||||
# 公告有效期查询
|
|
||||||
if notice_start_time:
|
|
||||||
self.start_time = ("ge", notice_start_time)
|
|
||||||
if notice_end_time:
|
|
||||||
self.end_time = ("le", notice_end_time)
|
|
||||||
|
|||||||
@@ -44,14 +44,8 @@ class NoticeService:
|
|||||||
返回:
|
返回:
|
||||||
- List[Dict]: 可用公告详情字典列表。
|
- List[Dict]: 可用公告详情字典列表。
|
||||||
"""
|
"""
|
||||||
# 构建搜索条件,包括状态为可用和当前时间在有效期内
|
|
||||||
current_time = datetime.now()
|
|
||||||
search = {
|
search = {
|
||||||
'status': True,
|
'status': True,
|
||||||
'and': [
|
|
||||||
{'or': [{'start_time': None}, {'start_time': {'le': current_time}}]},
|
|
||||||
{'or': [{'end_time': None}, {'end_time': {'ge': current_time}}]}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notice_obj_list = await NoticeCRUD(auth).get_list_crud(search=search)
|
notice_obj_list = await NoticeCRUD(auth).get_list_crud(search=search)
|
||||||
@@ -171,8 +165,6 @@ class NoticeService:
|
|||||||
'notice_content': '公告内容',
|
'notice_content': '公告内容',
|
||||||
'status': '状态',
|
'status': '状态',
|
||||||
'description': '备注',
|
'description': '备注',
|
||||||
'start_time': '开始时间',
|
|
||||||
'end_time': '结束时间',
|
|
||||||
'created_time': '创建时间',
|
'created_time': '创建时间',
|
||||||
'updated_time': '更新时间',
|
'updated_time': '更新时间',
|
||||||
'created_id': '创建者ID',
|
'created_id': '创建者ID',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class ParamsCreateSchema(BaseModel):
|
|||||||
config_key: str = Field(..., max_length=500, description="参数键名")
|
config_key: str = Field(..., max_length=500, description="参数键名")
|
||||||
config_value: Optional[str] = Field(default=None, description="参数键值")
|
config_value: Optional[str] = Field(default=None, description="参数键值")
|
||||||
config_type: bool = Field(default=False, description="系统内置(True:是 False:否)")
|
config_type: bool = Field(default=False, description="系统内置(True:是 False:否)")
|
||||||
status: bool = Field(default=True, description="状态(True:正常 False:停用)")
|
status: str = Field(default=True, description="状态(True:正常 False:停用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=500, description="描述")
|
description: Optional[str] = Field(default=None, max_length=500, description="描述")
|
||||||
|
|
||||||
|
|
||||||
@@ -42,12 +42,11 @@ class ParamsQueryParam:
|
|||||||
"""配置管理查询参数"""
|
"""配置管理查询参数"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
config_name: Optional[str] = Query(None, description="配置名称"),
|
config_name: Optional[str] = Query(None, description="配置名称"),
|
||||||
config_key: Optional[str] = Query(None, description="配置键名"),
|
config_key: Optional[str] = Query(None, description="配置键名"),
|
||||||
config_type: Optional[bool] = Query(None, description="系统内置((True:是 False:否))"),
|
config_type: Optional[bool] = Query(None, description="系统内置((True:是 False:否))"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -58,7 +57,7 @@ class ParamsQueryParam:
|
|||||||
self.config_type = config_type
|
self.config_type = config_type
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class PositionCRUD(CRUDBase[PositionModel, PositionCreateSchema, PositionUpdateS
|
|||||||
"""
|
"""
|
||||||
return await self.list(search=search, order_by=order_by, preload=preload)
|
return await self.list(search=search, order_by=order_by, preload=preload)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置岗位可用状态。
|
批量设置岗位可用状态。
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class PositionCreateSchema(BaseModel):
|
|||||||
"""岗位创建模型"""
|
"""岗位创建模型"""
|
||||||
name: str = Field(..., max_length=40, description="岗位名称")
|
name: str = Field(..., max_length=40, description="岗位名称")
|
||||||
order: Optional[int] = Field(default=1, ge=1, description='显示排序')
|
order: Optional[int] = Field(default=1, ge=1, description='显示排序')
|
||||||
status: bool = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(default=True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
|
|
||||||
@field_validator('name')
|
@field_validator('name')
|
||||||
@@ -41,10 +41,9 @@ class PositionQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="岗位名称"),
|
name: Optional[str] = Query(None, description="岗位名称"),
|
||||||
status: Optional[bool] = Query(None, description="是否可用"),
|
status: Optional[str] = Query(None, description="是否可用"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -55,5 +54,5 @@ class PositionQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class RoleCRUD(CRUDBase[RoleModel, RoleCreateSchema, RoleUpdateSchema]):
|
|||||||
relationship.extend(depts)
|
relationship.extend(depts)
|
||||||
await self.db.flush()
|
await self.db.flush()
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
设置角色的可用状态
|
设置角色的可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class RoleCreateSchema(BaseModel):
|
|||||||
code: Optional[str] = Field(default=None, max_length=40, description="角色编码")
|
code: Optional[str] = Field(default=None, max_length=40, description="角色编码")
|
||||||
order: Optional[int] = Field(default=1, ge=1, description='显示排序')
|
order: Optional[int] = Field(default=1, ge=1, description='显示排序')
|
||||||
data_scope: Optional[int] = Field(default=1, ge=1, le=5, description='数据权限范围')
|
data_scope: Optional[int] = Field(default=1, ge=1, le=5, description='数据权限范围')
|
||||||
status: bool = Field(default=True, description="是否启用")
|
status: str = Field(default=True, description="是否启用")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
|
|
||||||
@field_validator("code")
|
@field_validator("code")
|
||||||
@@ -65,10 +65,9 @@ class RoleQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="角色名称"),
|
name: Optional[str] = Query(None, description="角色名称"),
|
||||||
status: Optional[bool] = Query(None, description="是否可用"),
|
status: Optional[str] = Query(None, description="是否可用"),
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -79,5 +78,5 @@ class RoleQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class TenantCRUD(CRUDBase[TenantModel, TenantCreateSchema, TenantUpdateSchema]):
|
|||||||
"""
|
"""
|
||||||
return await self.delete(ids=ids)
|
return await self.delete(ids=ids)
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置可用状态
|
批量设置可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class TenantCreateSchema(BaseModel):
|
|||||||
"""新增模型"""
|
"""新增模型"""
|
||||||
name: str = Field(..., max_length=64, description='租户名称')
|
name: str = Field(..., max_length=64, description='租户名称')
|
||||||
code: Optional[str] = Field(default=None, max_length=20, description='租户编码')
|
code: Optional[str] = Field(default=None, max_length=20, description='租户编码')
|
||||||
status: bool = Field(True, description="是否启用(True:启用 False:禁用)")
|
status: str = Field(True, description="是否启用(True:启用 False:禁用)")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
||||||
start_time: Optional[DateTimeStr] = Field(default=None, description="开始时间")
|
start_time: Optional[DateTimeStr] = Field(default=None, description="开始时间")
|
||||||
end_time: Optional[DateTimeStr] = Field(default=None, description="结束时间")
|
end_time: Optional[DateTimeStr] = Field(default=None, description="结束时间")
|
||||||
@@ -65,9 +65,8 @@ class TenantQueryParam:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: Optional[str] = Query(None, description="租户名称"),
|
name: Optional[str] = Query(None, description="租户名称"),
|
||||||
status: Optional[bool] = Query(None, description="状态用(True:启用 False:禁用)"),
|
status: Optional[str] = Query(None, description="状态用(True:启用 False:禁用)"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
# 模糊查询字段
|
# 模糊查询字段
|
||||||
@@ -77,6 +76,6 @@ class TenantQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class UserCRUD(CRUDBase[UserModel, UserCreateSchema, UserUpdateSchema]):
|
|||||||
"""
|
"""
|
||||||
return await self.update(id=id, data={"last_login": datetime.now()})
|
return await self.update(id=id, data={"last_login": datetime.now()})
|
||||||
|
|
||||||
async def set_available_crud(self, ids: List[int], status: bool) -> None:
|
async def set_available_crud(self, ids: List[int], status: str) -> None:
|
||||||
"""
|
"""
|
||||||
批量设置用户可用状态
|
批量设置用户可用状态
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class UserCreateSchema(CurrentUserUpdateSchema):
|
|||||||
|
|
||||||
username: Optional[str] = Field(default=None, max_length=32, description="用户名")
|
username: Optional[str] = Field(default=None, max_length=32, description="用户名")
|
||||||
password: Optional[str] = Field(default=None, max_length=128, description="密码哈希值")
|
password: Optional[str] = Field(default=None, max_length=128, description="密码哈希值")
|
||||||
status: bool = Field(default=True, description="是否可用")
|
status: str = Field(default=True, description="是否可用")
|
||||||
description: Optional[str] = Field(default=None, max_length=255, description="备注")
|
description: Optional[str] = Field(default=None, max_length=255, description="备注")
|
||||||
user_type: Optional[str] = Field(default="0", max_length=32, description="用户类型")
|
user_type: Optional[str] = Field(default="0", max_length=32, description="用户类型")
|
||||||
|
|
||||||
@@ -136,9 +136,8 @@ class UserQueryParam:
|
|||||||
mobile: Optional[str] = Query(None, description="手机号", pattern=r'^1[3-9]\d{9}$'),
|
mobile: Optional[str] = Query(None, description="手机号", pattern=r'^1[3-9]\d{9}$'),
|
||||||
email: Optional[str] = Query(None, description="邮箱", pattern=r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'),
|
email: Optional[str] = Query(None, description="邮箱", pattern=r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'),
|
||||||
dept_id: Optional[int] = Query(None, description="部门ID"),
|
dept_id: Optional[int] = Query(None, description="部门ID"),
|
||||||
status: Optional[bool] = Query(None, description="是否可用"),
|
status: Optional[str] = Query(None, description="是否可用"),
|
||||||
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2025-01-01 00:00:00"),
|
created_time: Optional[list[DateTimeStr]] = Query(None, description="创建时间范围", example=["2025-01-01 00:00:00", "2025-12-31 23:59:59"]),
|
||||||
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2025-12-31 23:59:59"),
|
|
||||||
created_id: Optional[int] = Query(None, description="创建人"),
|
created_id: Optional[int] = Query(None, description="创建人"),
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
@@ -154,5 +153,5 @@ class UserQueryParam:
|
|||||||
self.status = status
|
self.status = status
|
||||||
|
|
||||||
# 时间范围查询
|
# 时间范围查询
|
||||||
if start_time and end_time:
|
if created_time and len(created_time) == 2:
|
||||||
self.created_time = ("between", (start_time, end_time))
|
self.created_time = ("between", (created_time[0], created_time[1]))
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class BaseSchema(BaseModel):
|
|||||||
|
|
||||||
id: Optional[int] = Field(default=None, description="主键ID")
|
id: Optional[int] = Field(default=None, description="主键ID")
|
||||||
uuid: Optional[str] = Field(default=None, description="UUID")
|
uuid: Optional[str] = Field(default=None, description="UUID")
|
||||||
status: Optional[bool] = Field(default=None, description="状态")
|
status: Optional[str] = Field(default=None, description="状态")
|
||||||
description: Optional[str] = Field(default=None, description="描述")
|
description: Optional[str] = Field(default=None, description="描述")
|
||||||
created_time: Optional[DateTimeStr] = Field(default=None, description="创建时间")
|
created_time: Optional[DateTimeStr] = Field(default=None, description="创建时间")
|
||||||
updated_time: Optional[DateTimeStr] = Field(default=None, description="更新时间")
|
updated_time: Optional[DateTimeStr] = Field(default=None, description="更新时间")
|
||||||
@@ -62,7 +62,7 @@ class CustomerSchema(BaseModel):
|
|||||||
class BatchSetAvailable(BaseModel):
|
class BatchSetAvailable(BaseModel):
|
||||||
"""批量设置可用状态的请求模型"""
|
"""批量设置可用状态的请求模型"""
|
||||||
ids: List[int] = Field(default_factory=list, description="ID列表")
|
ids: List[int] = Field(default_factory=list, description="ID列表")
|
||||||
status: bool = Field(default=True, description="是否可用")
|
status: str = Field(default=True, description="是否可用")
|
||||||
|
|
||||||
|
|
||||||
class UploadResponseSchema(BaseModel):
|
class UploadResponseSchema(BaseModel):
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ def create_async_engine_and_session(
|
|||||||
engine, db_session = create_engine_and_session(settings.DB_URI)
|
engine, db_session = create_engine_and_session(settings.DB_URI)
|
||||||
async_engine, async_db_session = create_async_engine_and_session(settings.ASYNC_DB_URI)
|
async_engine, async_db_session = create_async_engine_and_session(settings.ASYNC_DB_URI)
|
||||||
|
|
||||||
async def redis_connect(app: FastAPI, status: bool) -> Redis | None:
|
async def redis_connect(app: FastAPI, status: str) -> Redis | None:
|
||||||
"""
|
"""
|
||||||
创建或关闭Redis连接。
|
创建或关闭Redis连接。
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ export default [
|
|||||||
OptionType: "readonly",
|
OptionType: "readonly",
|
||||||
ApiResponse: "readonly",
|
ApiResponse: "readonly",
|
||||||
ExcelResult: "readonly",
|
ExcelResult: "readonly",
|
||||||
|
CommonType: "readonly",
|
||||||
|
updatorType: "readonly",
|
||||||
|
creatorType: "readonly",
|
||||||
TagView: "readonly",
|
TagView: "readonly",
|
||||||
AppSettings: "readonly",
|
AppSettings: "readonly",
|
||||||
__APP_INFO__: "readonly",
|
__APP_INFO__: "readonly",
|
||||||
|
|||||||
@@ -123,23 +123,16 @@ export default JobAPI;
|
|||||||
|
|
||||||
export interface JobPageQuery extends PageQuery {
|
export interface JobPageQuery extends PageQuery {
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
created_id?: number;
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface JobLogPageQuery extends PageQuery {
|
export interface JobLogPageQuery extends PageQuery {
|
||||||
status?: boolean;
|
|
||||||
/** 开始时间 */
|
|
||||||
start_time?: string;
|
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
/** 任务ID */
|
|
||||||
job_id?: number;
|
job_id?: number;
|
||||||
|
job_name?: string;
|
||||||
|
status?: string;
|
||||||
|
created_time?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface JobOptionData {
|
export interface JobOptionData {
|
||||||
@@ -147,9 +140,7 @@ export interface JobOptionData {
|
|||||||
option?: number; //操作类型 1: 暂停 2: 恢复 3: 重启
|
option?: number; //操作类型 1: 暂停 2: 恢复 3: 重启
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface JobTable {
|
export interface JobTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id: number;
|
|
||||||
name: string;
|
name: string;
|
||||||
func?: string;
|
func?: string;
|
||||||
trigger?: string;
|
trigger?: string;
|
||||||
@@ -162,15 +153,13 @@ export interface JobTable {
|
|||||||
trigger_args?: string;
|
trigger_args?: string;
|
||||||
start_date?: string;
|
start_date?: string;
|
||||||
end_date?: string;
|
end_date?: string;
|
||||||
status?: boolean;
|
created_by?: creatorType;
|
||||||
description?: string;
|
updated_by?: updatorType;
|
||||||
created_at?: string;
|
tenant?: CommonType;
|
||||||
updated_at?: string;
|
customer?: CommonType;
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface JobForm {
|
export interface JobForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
func?: string;
|
func?: string;
|
||||||
trigger?: string;
|
trigger?: string;
|
||||||
@@ -183,13 +172,10 @@ export interface JobForm {
|
|||||||
trigger_args?: string;
|
trigger_args?: string;
|
||||||
start_date?: string;
|
start_date?: string;
|
||||||
end_date?: string;
|
end_date?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时任务运行日志接口(对应Scheduler实时状态)
|
// 定时任务运行日志接口(对应Scheduler实时状态)
|
||||||
export interface JobRunLog {
|
export interface JobRunLog extends BaseType {
|
||||||
id: string;
|
|
||||||
name: string;
|
name: string;
|
||||||
trigger: string;
|
trigger: string;
|
||||||
executor: string;
|
executor: string;
|
||||||
@@ -201,12 +187,11 @@ export interface JobRunLog {
|
|||||||
coalesce: boolean;
|
coalesce: boolean;
|
||||||
max_instances: number;
|
max_instances: number;
|
||||||
next_run_time: string;
|
next_run_time: string;
|
||||||
state: string;
|
tenant?: CommonType;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时任务日志详情接口(对应数据库日志表)
|
// 定时任务日志详情接口(对应数据库日志表)
|
||||||
export interface JobLogDetail {
|
export interface JobLogDetail extends BaseType {
|
||||||
id: number;
|
|
||||||
job_name: string;
|
job_name: string;
|
||||||
job_group: string;
|
job_group: string;
|
||||||
job_executor: string;
|
job_executor: string;
|
||||||
@@ -215,15 +200,12 @@ export interface JobLogDetail {
|
|||||||
job_kwargs?: string;
|
job_kwargs?: string;
|
||||||
job_trigger?: string;
|
job_trigger?: string;
|
||||||
job_message?: string;
|
job_message?: string;
|
||||||
status: boolean;
|
|
||||||
exception_info?: string;
|
exception_info?: string;
|
||||||
create_time: string;
|
tenant?: CommonType;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时任务日志列表接口(对应数据库日志表)
|
// 定时任务日志列表接口(对应数据库日志表)
|
||||||
export interface JobLogTable {
|
export interface JobLogTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id: number;
|
|
||||||
job_name: string;
|
job_name: string;
|
||||||
job_group: string;
|
job_group: string;
|
||||||
job_executor: string;
|
job_executor: string;
|
||||||
@@ -232,7 +214,6 @@ export interface JobLogTable {
|
|||||||
job_kwargs?: string;
|
job_kwargs?: string;
|
||||||
job_trigger?: string;
|
job_trigger?: string;
|
||||||
job_message?: string;
|
job_message?: string;
|
||||||
status: boolean;
|
|
||||||
exception_info?: string;
|
exception_info?: string;
|
||||||
create_time: string;
|
tenant?: CommonType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,58 +82,30 @@ export default ApplicationAPI;
|
|||||||
* 应用分页查询参数
|
* 应用分页查询参数
|
||||||
*/
|
*/
|
||||||
export interface ApplicationPageQuery extends PageQuery {
|
export interface ApplicationPageQuery extends PageQuery {
|
||||||
/** 应用名称 */
|
|
||||||
name?: string;
|
name?: string;
|
||||||
/** 是否启用 */
|
status?: string;
|
||||||
status?: boolean;
|
created_id?: number;
|
||||||
/** 创建人 */
|
created_time?: string[];
|
||||||
creator?: number;
|
|
||||||
/** 开始时间 */
|
|
||||||
start_time?: string;
|
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
/** 排序字段,格式:[{'field':'asc/desc'}] */
|
|
||||||
order_by?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用信息
|
* 应用信息
|
||||||
*/
|
*/
|
||||||
export interface ApplicationInfo {
|
export interface ApplicationInfo extends BaseType {
|
||||||
/** 应用ID */
|
|
||||||
id?: number;
|
|
||||||
/** 应用名称 */
|
|
||||||
name?: string;
|
name?: string;
|
||||||
/** 访问地址 */
|
|
||||||
access_url?: string;
|
access_url?: string;
|
||||||
/** 图标地址 */
|
|
||||||
icon_url?: string;
|
icon_url?: string;
|
||||||
/** 是否启用 */
|
created_by?: creatorType;
|
||||||
status?: boolean;
|
updated_by?: updatorType;
|
||||||
/** 应用描述 */
|
tenant?: CommonType;
|
||||||
description?: string;
|
customer?: CommonType;
|
||||||
/** 创建时间 */
|
|
||||||
created_at?: string;
|
|
||||||
/** 更新时间 */
|
|
||||||
updated_at?: string;
|
|
||||||
/** 创建人 */
|
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用表单
|
* 应用表单
|
||||||
*/
|
*/
|
||||||
export interface ApplicationForm {
|
export interface ApplicationForm extends BaseFormType {
|
||||||
/** 应用ID */
|
|
||||||
id?: number;
|
|
||||||
/** 应用名称 */
|
|
||||||
name: string;
|
name: string;
|
||||||
/** 访问地址 */
|
|
||||||
access_url: string;
|
access_url: string;
|
||||||
/** 图标地址 */
|
|
||||||
icon_url: string;
|
icon_url: string;
|
||||||
/** 是否启用 */
|
|
||||||
status: boolean;
|
|
||||||
/** 应用描述 */
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,29 +85,21 @@ export interface DemoPageQuery extends PageQuery {
|
|||||||
/** 示例标题 */
|
/** 示例标题 */
|
||||||
name?: string;
|
name?: string;
|
||||||
/** 示例状态 */
|
/** 示例状态 */
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
/** 创建时间 */
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
// 创建人ID
|
||||||
end_time?: string;
|
created_id?: number;
|
||||||
/** 创建人 */
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DemoTable {
|
export interface DemoTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
created_by?: creatorType;
|
||||||
description?: string;
|
updated_by?: updatorType;
|
||||||
created_at?: string;
|
tenant?: CommonType;
|
||||||
updated_at?: string;
|
customer?: CommonType;
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DemoForm {
|
export interface DemoForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
const API_PATH = "/system/customer";
|
||||||
|
|
||||||
|
const CustomerAPI = {
|
||||||
|
listCustomer(query: CustomerPageQuery) {
|
||||||
|
return request<ApiResponse<PageResult<CustomerTable[]>>>({
|
||||||
|
url: `${API_PATH}/list`,
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
detailCustomer(query: number) {
|
||||||
|
return request<ApiResponse<CustomerTable>>({
|
||||||
|
url: `${API_PATH}/detail/${query}`,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
createCustomer(body: CustomerForm) {
|
||||||
|
return request<ApiResponse>({
|
||||||
|
url: `${API_PATH}/create`,
|
||||||
|
method: "post",
|
||||||
|
data: body,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
updateCustomer(id: number, body: CustomerForm) {
|
||||||
|
return request<ApiResponse>({
|
||||||
|
url: `${API_PATH}/update/${id}`,
|
||||||
|
method: "put",
|
||||||
|
data: body,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteCustomer(body: number[]) {
|
||||||
|
return request<ApiResponse>({
|
||||||
|
url: `${API_PATH}/delete`,
|
||||||
|
method: "delete",
|
||||||
|
data: body,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
batchCustomer(body: BatchType) {
|
||||||
|
return request<ApiResponse>({
|
||||||
|
url: `${API_PATH}/available/setting`,
|
||||||
|
method: "patch",
|
||||||
|
data: body,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
exportCustomer(body: CustomerPageQuery) {
|
||||||
|
return request<Blob>({
|
||||||
|
url: `${API_PATH}/export`,
|
||||||
|
method: "post",
|
||||||
|
data: body,
|
||||||
|
responseType: "blob",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadCustomer() {
|
||||||
|
return request<ApiResponse>({
|
||||||
|
url: `${API_PATH}/download/template`,
|
||||||
|
method: "post",
|
||||||
|
responseType: "blob",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
importCustomer(body: FormData) {
|
||||||
|
return request<ApiResponse>({
|
||||||
|
url: `${API_PATH}/import`,
|
||||||
|
method: "post",
|
||||||
|
data: body,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CustomerAPI;
|
||||||
|
|
||||||
|
export interface CustomerPageQuery extends PageQuery {
|
||||||
|
name?: string;
|
||||||
|
status?: string;
|
||||||
|
created_time?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CustomerTable extends BaseType {
|
||||||
|
name?: string;
|
||||||
|
code?: string;
|
||||||
|
created_by?: creatorType;
|
||||||
|
updated_by?: updatorType;
|
||||||
|
tenant?: CommonType;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CustomerForm extends BaseFormType {
|
||||||
|
name?: string;
|
||||||
|
code?: string;
|
||||||
|
}
|
||||||
@@ -55,35 +55,31 @@ export default DeptAPI;
|
|||||||
|
|
||||||
export interface DeptPageQuery {
|
export interface DeptPageQuery {
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
created_time?: string[];
|
||||||
start_time?: string;
|
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeptTable {
|
export interface DeptTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
order?: number;
|
order?: number;
|
||||||
code?: string;
|
code?: string;
|
||||||
|
leader?: string;
|
||||||
|
phone?: string;
|
||||||
|
email?: string;
|
||||||
parent_id?: number;
|
parent_id?: number;
|
||||||
parent_name?: string;
|
parent_name?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
created_at?: string;
|
|
||||||
updated_at?: string;
|
|
||||||
children?: DeptTable[];
|
children?: DeptTable[];
|
||||||
creator?: creatorType;
|
created_by?: creatorType;
|
||||||
|
updated_by?: updatorType;
|
||||||
|
tenant?: CommonType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeptForm {
|
export interface DeptForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
order?: number;
|
order?: number;
|
||||||
code?: string;
|
code?: string;
|
||||||
|
leader?: string;
|
||||||
|
phone?: string;
|
||||||
|
email?: string;
|
||||||
parent_id?: number;
|
parent_id?: number;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,71 +138,47 @@ export interface DictPageQuery extends PageQuery {
|
|||||||
/** 通知类型 */
|
/** 通知类型 */
|
||||||
dict_type?: string;
|
dict_type?: string;
|
||||||
/** 通知状态 */
|
/** 通知状态 */
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
/** 创建时间 */
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DictDataPageQuery extends PageQuery {
|
export interface DictDataPageQuery extends PageQuery {
|
||||||
dict_label?: string;
|
dict_label?: string;
|
||||||
dict_type?: string;
|
dict_type?: string;
|
||||||
status?: boolean;
|
dict_type_id?: number;
|
||||||
start_time?: string;
|
status?: string;
|
||||||
end_time?: string;
|
created_time?: string[];
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DictTable {
|
export interface DictTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
dict_name?: string;
|
dict_name?: string;
|
||||||
dict_type?: string;
|
dict_type?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
created_at?: string;
|
|
||||||
updated_at?: string;
|
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DictForm {
|
export interface DictForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
dict_name?: string;
|
dict_name?: string;
|
||||||
dict_type?: string;
|
dict_type?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DictDataTable {
|
export interface DictDataTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
dict_sort?: number;
|
dict_sort?: number;
|
||||||
dict_label?: string;
|
dict_label?: string;
|
||||||
dict_value?: string;
|
dict_value?: string;
|
||||||
|
dict_type_id?: number;
|
||||||
dict_type?: string;
|
dict_type?: string;
|
||||||
css_class?: string;
|
css_class?: string;
|
||||||
list_class?: string;
|
list_class?: string;
|
||||||
is_default?: boolean;
|
is_default?: boolean;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
created_at?: string;
|
|
||||||
updated_at?: string;
|
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DictDataForm {
|
export interface DictDataForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
dict_sort?: number;
|
dict_sort?: number;
|
||||||
dict_label?: string;
|
dict_label?: string;
|
||||||
dict_value?: string;
|
dict_value?: string;
|
||||||
|
dict_type_id?: number;
|
||||||
dict_type?: string;
|
dict_type?: string;
|
||||||
css_class?: string;
|
css_class?: string;
|
||||||
list_class?: string;
|
list_class?: string;
|
||||||
is_default?: boolean;
|
is_default?: boolean;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,16 +42,11 @@ export interface LogPageQuery extends PageQuery {
|
|||||||
type?: number;
|
type?: number;
|
||||||
request_path?: string;
|
request_path?: string;
|
||||||
creator_name?: string;
|
creator_name?: string;
|
||||||
/** 开始时间 */
|
created_time?: string[];
|
||||||
start_time?: string;
|
created_id?: number;
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LogTable {
|
export interface LogTable extends BaseType {
|
||||||
id?: number;
|
|
||||||
type?: number; // 1 登录日志 2 操作日志
|
type?: number; // 1 登录日志 2 操作日志
|
||||||
request_path?: string;
|
request_path?: string;
|
||||||
request_method?: string;
|
request_method?: string;
|
||||||
@@ -63,8 +58,8 @@ export interface LogTable {
|
|||||||
request_payload?: string;
|
request_payload?: string;
|
||||||
response_json?: string;
|
response_json?: string;
|
||||||
process_time?: string;
|
process_time?: string;
|
||||||
description?: string;
|
created_by?: creatorType;
|
||||||
created_at?: string;
|
updated_by?: updatorType;
|
||||||
updated_at?: string;
|
tenant?: CommonType;
|
||||||
creator?: creatorType;
|
customer?: CommonType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,16 +55,12 @@ export default MenuAPI;
|
|||||||
|
|
||||||
export interface MenuPageQuery {
|
export interface MenuPageQuery {
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
/** 创建时间 */
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MenuTable {
|
export interface MenuTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
type?: number;
|
type?: number;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
@@ -82,15 +78,10 @@ export interface MenuTable {
|
|||||||
title?: string;
|
title?: string;
|
||||||
params?: { key: string; value: string }[];
|
params?: { key: string; value: string }[];
|
||||||
affix?: boolean;
|
affix?: boolean;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
created_at?: string;
|
|
||||||
updated_at?: string;
|
|
||||||
children?: MenuTable[];
|
children?: MenuTable[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MenuForm {
|
export interface MenuForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
type?: number;
|
type?: number;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
@@ -107,8 +98,6 @@ export interface MenuForm {
|
|||||||
title?: string;
|
title?: string;
|
||||||
params?: KeyValue[];
|
params?: KeyValue[];
|
||||||
affix?: boolean;
|
affix?: boolean;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KeyValue {
|
export interface KeyValue {
|
||||||
|
|||||||
@@ -70,38 +70,25 @@ const NoticeAPI = {
|
|||||||
export default NoticeAPI;
|
export default NoticeAPI;
|
||||||
|
|
||||||
export interface NoticePageQuery extends PageQuery {
|
export interface NoticePageQuery extends PageQuery {
|
||||||
/** 通知标题 */
|
|
||||||
notice_title?: string;
|
notice_title?: string;
|
||||||
/** 通知类型 */
|
|
||||||
notice_type?: string;
|
notice_type?: string;
|
||||||
/** 通知状态 */
|
status?: string;
|
||||||
status?: boolean;
|
created_time?: string[];
|
||||||
/** 开始时间 */
|
created_id?: number;
|
||||||
start_time?: string;
|
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NoticeTable {
|
export interface NoticeTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
notice_title?: string;
|
notice_title?: string;
|
||||||
notice_type?: string;
|
notice_type?: string;
|
||||||
notice_content?: string;
|
notice_content?: string;
|
||||||
status?: boolean;
|
created_by?: creatorType;
|
||||||
description?: string;
|
updated_by?: updatorType;
|
||||||
created_at?: string;
|
tenant?: CommonType;
|
||||||
updated_at?: string;
|
customer?: CommonType;
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NoticeForm {
|
export interface NoticeForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
notice_title?: string;
|
notice_title?: string;
|
||||||
notice_type?: string;
|
notice_type?: string;
|
||||||
notice_content?: string;
|
notice_content?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,31 +77,20 @@ export interface ConfigPageQuery extends PageQuery {
|
|||||||
config_key?: string;
|
config_key?: string;
|
||||||
/** 配置类型 */
|
/** 配置类型 */
|
||||||
config_type?: boolean;
|
config_type?: boolean;
|
||||||
/** 开始时间 */
|
/** 创建时间 */
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConfigTable {
|
export interface ConfigTable extends BaseType {
|
||||||
id?: number;
|
|
||||||
config_name?: string;
|
config_name?: string;
|
||||||
config_key?: string;
|
config_key?: string;
|
||||||
config_value?: string;
|
config_value?: string;
|
||||||
config_type?: boolean;
|
config_type?: boolean;
|
||||||
description?: string;
|
|
||||||
created_at?: string;
|
|
||||||
updated_at?: string;
|
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConfigForm {
|
export interface ConfigForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
config_name?: string;
|
config_name?: string;
|
||||||
config_key?: string;
|
config_key?: string;
|
||||||
config_value?: string;
|
config_value?: string;
|
||||||
config_type?: boolean;
|
config_type?: boolean;
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,31 +64,20 @@ export default PositionAPI;
|
|||||||
|
|
||||||
export interface PositionPageQuery extends PageQuery {
|
export interface PositionPageQuery extends PageQuery {
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
created_id?: number;
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PositionTable {
|
export interface PositionTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
order?: number;
|
order?: number;
|
||||||
status?: boolean;
|
created_by?: creatorType;
|
||||||
description?: string;
|
updated_by?: updatorType;
|
||||||
created_at?: string;
|
tenant?: CommonType;
|
||||||
updated_at?: string;
|
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PositionForm {
|
export interface PositionForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
order?: number;
|
order?: number;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,49 +72,33 @@ export default RoleAPI;
|
|||||||
|
|
||||||
export interface TablePageQuery extends PageQuery {
|
export interface TablePageQuery extends PageQuery {
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
/** 开始时间 */
|
created_id?: number;
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RoleTable {
|
export interface RoleTable extends BaseType {
|
||||||
index?: number;
|
|
||||||
id: number;
|
|
||||||
name: string;
|
name: string;
|
||||||
order?: number;
|
order?: number;
|
||||||
code?: string;
|
code?: string;
|
||||||
data_scope?: number;
|
data_scope?: number;
|
||||||
status?: boolean;
|
|
||||||
menus?: permissionMenuType[];
|
menus?: permissionMenuType[];
|
||||||
depts?: permissionDeptType[];
|
depts?: permissionDeptType[];
|
||||||
description?: string;
|
created_by?: creatorType;
|
||||||
created_at?: string;
|
updated_by?: updatorType;
|
||||||
updated_at?: string;
|
tenant?: CommonType;
|
||||||
creator?: creatorType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RoleForm {
|
export interface RoleForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
order?: number;
|
order?: number;
|
||||||
code?: string;
|
code?: string;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
created_at?: string;
|
|
||||||
updated_at?: string;
|
|
||||||
creator?: creatorType;
|
|
||||||
menus?: permissionMenuType[];
|
|
||||||
depts?: permissionDeptType[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface permissionDataType {
|
export interface permissionDataType {
|
||||||
|
data_scope: number;
|
||||||
role_ids: RoleTable["id"][];
|
role_ids: RoleTable["id"][];
|
||||||
menu_ids: permissionMenuType["id"][];
|
menu_ids: permissionMenuType["id"][];
|
||||||
data_scope: number;
|
|
||||||
dept_ids: permissionDeptType["id"][];
|
dept_ids: permissionDeptType["id"][];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,34 +82,26 @@ const TenantAPI = {
|
|||||||
export default TenantAPI;
|
export default TenantAPI;
|
||||||
|
|
||||||
export interface TenantPageQuery extends PageQuery {
|
export interface TenantPageQuery extends PageQuery {
|
||||||
/** 示例标题 */
|
|
||||||
name?: string;
|
name?: string;
|
||||||
/** 示例状态 */
|
status?: string;
|
||||||
status?: boolean;
|
created_time?: string[];
|
||||||
/** 开始时间 */
|
}
|
||||||
|
|
||||||
|
export interface TenantTable extends BaseType {
|
||||||
|
name?: string;
|
||||||
|
code?: string;
|
||||||
start_time?: string;
|
start_time?: string;
|
||||||
/** 结束时间 */
|
|
||||||
end_time?: string;
|
end_time?: string;
|
||||||
/** 创建人 */
|
max_user_count?: number;
|
||||||
creator?: number;
|
enable_quota_limit?: boolean;
|
||||||
|
current_user_count?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TenantTable {
|
export interface TenantForm extends BaseFormType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
name?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
status?: boolean;
|
start_time?: string;
|
||||||
description?: string;
|
end_time?: string;
|
||||||
created_at?: string;
|
max_user_count?: number;
|
||||||
updated_at?: string;
|
enable_quota_limit?: boolean;
|
||||||
// creator?: creatorType;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TenantForm {
|
|
||||||
id?: number;
|
|
||||||
name?: string;
|
|
||||||
code?: string;
|
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,26 +141,31 @@ export default UserAPI;
|
|||||||
export interface ForgetPasswordForm {
|
export interface ForgetPasswordForm {
|
||||||
username: string;
|
username: string;
|
||||||
new_password: string;
|
new_password: string;
|
||||||
|
mobile?: string;
|
||||||
confirmPassword: string;
|
confirmPassword: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RegisterForm {
|
export interface RegisterForm {
|
||||||
|
name: string;
|
||||||
|
mobile?: string;
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
role_ids?: number[];
|
||||||
|
customer_id?: number;
|
||||||
|
description?: string;
|
||||||
|
user_type?: string;
|
||||||
confirmPassword: string;
|
confirmPassword: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserPageQuery extends PageQuery {
|
export interface UserPageQuery extends PageQuery {
|
||||||
username?: string;
|
username?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
mobile?: string;
|
||||||
|
email?: string;
|
||||||
dept_id?: number;
|
dept_id?: number;
|
||||||
/** 开始时间 */
|
status?: string;
|
||||||
start_time?: string;
|
created_time?: string[];
|
||||||
/** 结束时间 */
|
created_id?: number;
|
||||||
end_time?: string;
|
|
||||||
// 创建人ID
|
|
||||||
creator?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface searchSelectDataType {
|
export interface searchSelectDataType {
|
||||||
@@ -168,9 +173,7 @@ export interface searchSelectDataType {
|
|||||||
status?: string;
|
status?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserInfo {
|
export interface UserInfo extends BaseType {
|
||||||
index?: number;
|
|
||||||
id?: number;
|
|
||||||
username?: string;
|
username?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
@@ -189,12 +192,11 @@ export interface UserInfo {
|
|||||||
position_names?: positionSelectorType["name"][];
|
position_names?: positionSelectorType["name"][];
|
||||||
position_ids?: positionSelectorType["id"][];
|
position_ids?: positionSelectorType["id"][];
|
||||||
is_superuser?: boolean;
|
is_superuser?: boolean;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
last_login?: string;
|
last_login?: string;
|
||||||
created_at?: string;
|
created_by?: creatorType;
|
||||||
updated_at?: string;
|
updated_by?: updatorType;
|
||||||
creator?: creatorType;
|
tenant?: CommonType;
|
||||||
|
customer?: CommonType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface deptTreeType {
|
export interface deptTreeType {
|
||||||
@@ -208,7 +210,7 @@ export interface roleSelectorType {
|
|||||||
id?: number;
|
id?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
menus?: MenuForm[];
|
menus?: MenuForm[];
|
||||||
}
|
}
|
||||||
@@ -216,7 +218,7 @@ export interface roleSelectorType {
|
|||||||
export interface positionSelectorType {
|
export interface positionSelectorType {
|
||||||
id?: number;
|
id?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +234,8 @@ export interface InfoFormState {
|
|||||||
positions?: positionSelectorType[];
|
positions?: positionSelectorType[];
|
||||||
roles?: roleSelectorType[];
|
roles?: roleSelectorType[];
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
created_at?: string;
|
created_time?: string;
|
||||||
|
updated_time?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PasswordFormState {
|
export interface PasswordFormState {
|
||||||
@@ -246,8 +249,7 @@ export interface ResetPasswordForm {
|
|||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserForm {
|
export interface UserForm extends BaseFormType {
|
||||||
id?: number;
|
|
||||||
username?: string;
|
username?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
dept_id?: number;
|
dept_id?: number;
|
||||||
@@ -261,8 +263,6 @@ export interface UserForm {
|
|||||||
email?: string;
|
email?: string;
|
||||||
mobile?: string;
|
mobile?: string;
|
||||||
is_superuser?: boolean;
|
is_superuser?: boolean;
|
||||||
status?: boolean;
|
|
||||||
description?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CurrentUserFormState {
|
export interface CurrentUserFormState {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<!-- 时间 -->
|
<!-- 时间 -->
|
||||||
<div class="text-xs text-gray">
|
<div class="text-xs text-gray">
|
||||||
{{ item.created_at }}
|
{{ item.created_time }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,13 +67,13 @@
|
|||||||
<el-icon>
|
<el-icon>
|
||||||
<User />
|
<User />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
{{ noticeDetail.creator?.username }}
|
{{ noticeDetail.created_by?.username }}
|
||||||
</span>
|
</span>
|
||||||
<span class="ml-2 flex-y-center">
|
<span class="ml-2 flex-y-center">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Timer />
|
<Timer />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
{{ noticeDetail.created_at }}
|
{{ noticeDetail.created_time }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Vendored
+40
-1
@@ -126,6 +126,14 @@ declare global {
|
|||||||
messageList: Array<string>;
|
messageList: Array<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
interface CommonType {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@@ -135,6 +143,37 @@ declare global {
|
|||||||
username?: string;
|
username?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
interface updatorType {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
username?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础类型
|
||||||
|
*/
|
||||||
|
interface BaseType {
|
||||||
|
index?: number;
|
||||||
|
id?: number;
|
||||||
|
uuid?: string;
|
||||||
|
status?: string;
|
||||||
|
description?: string;
|
||||||
|
created_time?: string;
|
||||||
|
updated_time?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础类型
|
||||||
|
*/
|
||||||
|
interface BaseFormType {
|
||||||
|
id?: number;
|
||||||
|
status?: string;
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件返回
|
* 上传文件返回
|
||||||
*/
|
*/
|
||||||
@@ -150,7 +189,7 @@ declare global {
|
|||||||
*/
|
*/
|
||||||
export interface BatchType {
|
export interface BatchType {
|
||||||
ids?: number[];
|
ids?: number[];
|
||||||
status?: boolean;
|
status?: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
<span>加入时间</span>
|
<span>加入时间</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<span>{{ infoFormState.created_at }}</span>
|
<span>{{ infoFormState.created_time }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -340,7 +340,7 @@ const infoFormState = reactive<InfoFormState>({
|
|||||||
positions: [],
|
positions: [],
|
||||||
roles: [],
|
roles: [],
|
||||||
avatar: undefined,
|
avatar: undefined,
|
||||||
created_at: undefined,
|
created_time: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 修改密码表单
|
// 修改密码表单
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<span class="text-xs text-[var(--el-text-color-regular)]">
|
<span class="text-xs text-[var(--el-text-color-regular)]">
|
||||||
{{ formatTime(item.created_at) }}
|
{{ formatTime(item.created_time) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-[var(--el-text-color-regular)] mb-3 line-clamp-2">
|
<div class="text-sm text-[var(--el-text-color-regular)] mb-3 line-clamp-2">
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between items-center text-xs">
|
<div class="flex justify-between items-center text-xs">
|
||||||
<span class="text-[var(--el-text-color-regular)]">
|
<span class="text-[var(--el-text-color-regular)]">
|
||||||
{{ item.creator?.name }} 发布
|
{{ item.created_by?.name }} 发布
|
||||||
</span>
|
</span>
|
||||||
<el-tooltip placement="top" :content="item.description || item.notice_content">
|
<el-tooltip placement="top" :content="item.description || item.notice_content">
|
||||||
<ElButton target="_blank" type="primary" link @click="goToNotice()">
|
<ElButton target="_blank" type="primary" link @click="goToNotice()">
|
||||||
|
|||||||
@@ -205,8 +205,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="描述" prop="description" min-width="100" />
|
<el-table-column label="描述" prop="description" min-width="100" />
|
||||||
<el-table-column label="创建时间" prop="created_at" min-width="200" sortable />
|
<el-table-column label="创建时间" prop="created_time" min-width="200" sortable />
|
||||||
<el-table-column label="更新时间" prop="updated_at" min-width="200" sortable />
|
<el-table-column label="更新时间" prop="updated_time" min-width="200" sortable />
|
||||||
|
|
||||||
<OperationColumn :list-data-length="pageTableData.length">
|
<OperationColumn :list-data-length="pageTableData.length">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -362,13 +362,13 @@
|
|||||||
{{ detailFormData.end_date }}
|
{{ detailFormData.end_date }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="4">
|
<el-descriptions-item label="描述" :span="4">
|
||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
@@ -944,8 +944,8 @@ const exportColumns = [
|
|||||||
{ prop: "coalesce", label: "并发执行" },
|
{ prop: "coalesce", label: "并发执行" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导出配置(用于导出弹窗)
|
// 导出配置(用于导出弹窗)
|
||||||
|
|||||||
@@ -150,11 +150,11 @@
|
|||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<div class="footer-item">
|
<div class="footer-item">
|
||||||
<el-icon size="14" class="footer-icon"><User /></el-icon>
|
<el-icon size="14" class="footer-icon"><User /></el-icon>
|
||||||
<span class="footer-text">{{ app.creator?.name || "未知" }}</span>
|
<span class="footer-text">{{ app.created_by?.name || "未知" }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-item">
|
<div class="footer-item">
|
||||||
<el-icon size="14" class="footer-icon"><Clock /></el-icon>
|
<el-icon size="14" class="footer-icon"><Clock /></el-icon>
|
||||||
<span class="footer-text">{{ formatTime(app.created_at) }}</span>
|
<span class="footer-text">{{ formatTime(app.created_time) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -178,16 +178,16 @@
|
|||||||
min-width="140"
|
min-width="140"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -276,13 +276,13 @@
|
|||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -361,8 +361,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "name", label: "名称", show: true },
|
{ prop: "name", label: "名称", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -245,15 +245,15 @@
|
|||||||
min-width="140"
|
min-width="140"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag>{{ scope.row.creator?.name }}</el-tag>
|
<el-tag>{{ scope.row.created_by?.name }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -340,13 +340,13 @@
|
|||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -449,8 +449,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "name", label: "名称", show: true },
|
{ prop: "name", label: "名称", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
@@ -460,8 +460,8 @@ const exportColumns = [
|
|||||||
{ prop: "name", label: "名称" },
|
{ prop: "name", label: "名称" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置
|
// 导入/导出配置
|
||||||
|
|||||||
@@ -194,14 +194,14 @@
|
|||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'operation')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'operation')?.show"
|
||||||
@@ -1006,8 +1006,8 @@ const tableColumns = ref<TableColumn[]>([
|
|||||||
{ prop: "table_name", label: "表名称", show: true },
|
{ prop: "table_name", label: "表名称", show: true },
|
||||||
{ prop: "table_comment", label: "表描述", show: true },
|
{ prop: "table_comment", label: "表描述", show: true },
|
||||||
{ prop: "class_name", label: "实体", show: true },
|
{ prop: "class_name", label: "实体", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -1410,8 +1410,8 @@ function loadExampleMysql(): void {
|
|||||||
\`creator_id\` int DEFAULT NULL COMMENT '创建人ID',
|
\`creator_id\` int DEFAULT NULL COMMENT '创建人ID',
|
||||||
\`id\` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
\`id\` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
\`description\` text COLLATE utf8mb4_unicode_ci COMMENT '备注/描述',
|
\`description\` text COLLATE utf8mb4_unicode_ci COMMENT '备注/描述',
|
||||||
\`created_at\` datetime DEFAULT NULL COMMENT '创建时间',
|
\`created_time\` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
\`updated_at\` datetime DEFAULT NULL COMMENT '更新时间',
|
\`updated_time\` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
PRIMARY KEY (\`id\`),
|
PRIMARY KEY (\`id\`),
|
||||||
KEY \`ix_gen_demo01_creator_id\` (\`creator_id\`),
|
KEY \`ix_gen_demo01_creator_id\` (\`creator_id\`),
|
||||||
CONSTRAINT \`gen_demo01_ibfk_1\` FOREIGN KEY (\`creator_id\`) REFERENCES \`system_users\` (\`id\`) ON DELETE SET NULL ON UPDATE CASCADE
|
CONSTRAINT \`gen_demo01_ibfk_1\` FOREIGN KEY (\`creator_id\`) REFERENCES \`system_users\` (\`id\`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||||
@@ -1427,8 +1427,8 @@ function loadExamplePostgres(): void {
|
|||||||
creator_id integer,
|
creator_id integer,
|
||||||
id SERIAL NOT NULL,
|
id SERIAL NOT NULL,
|
||||||
description text,
|
description text,
|
||||||
created_at timestamp without time zone,
|
created_time timestamp without time zone,
|
||||||
updated_at timestamp without time zone,
|
updated_time timestamp without time zone,
|
||||||
PRIMARY KEY(id),
|
PRIMARY KEY(id),
|
||||||
CONSTRAINT gen_demo01_creator_id_fkey FOREIGN key(creator_id) REFERENCES system_users(id)
|
CONSTRAINT gen_demo01_creator_id_fkey FOREIGN key(creator_id) REFERENCES system_users(id)
|
||||||
);
|
);
|
||||||
@@ -1439,8 +1439,8 @@ function loadExamplePostgres(): void {
|
|||||||
COMMENT ON COLUMN gen_demo01.creator_id IS '创建人ID';
|
COMMENT ON COLUMN gen_demo01.creator_id IS '创建人ID';
|
||||||
COMMENT ON COLUMN gen_demo01.id IS '主键ID';
|
COMMENT ON COLUMN gen_demo01.id IS '主键ID';
|
||||||
COMMENT ON COLUMN gen_demo01.description IS '备注/描述';
|
COMMENT ON COLUMN gen_demo01.description IS '备注/描述';
|
||||||
COMMENT ON COLUMN gen_demo01.created_at IS '创建时间';
|
COMMENT ON COLUMN gen_demo01.created_time IS '创建时间';
|
||||||
COMMENT ON COLUMN gen_demo01.updated_at IS '更新时间';`;
|
COMMENT ON COLUMN gen_demo01.updated_time IS '更新时间';`;
|
||||||
|
|
||||||
createContent.value = exampleSql;
|
createContent.value = exampleSql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,18 +217,18 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
key="created_at"
|
key="created_time"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
key="updated_at"
|
key="updated_time"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -313,10 +313,10 @@
|
|||||||
{{ detailFormData.order }}
|
{{ detailFormData.order }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="4">
|
<el-descriptions-item label="描述" :span="4">
|
||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
@@ -424,8 +424,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "order", label: "排序", show: true },
|
{ prop: "order", label: "排序", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -190,11 +190,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="描述" prop="description" min-width="100" show-overflow-tooltip />
|
<el-table-column label="描述" prop="description" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column label="创建时间" prop="created_at" min-width="200" sortable />
|
<el-table-column label="创建时间" prop="created_time" min-width="200" sortable />
|
||||||
<el-table-column label="更新时间" prop="updated_at" min-width="200" sortable />
|
<el-table-column label="更新时间" prop="updated_time" min-width="200" sortable />
|
||||||
<el-table-column label="创建人" prop="creator" min-width="100">
|
<el-table-column label="创建人" prop="creator" min-width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" align="center" min-width="200">
|
<el-table-column fixed="right" label="操作" align="center" min-width="200">
|
||||||
@@ -283,13 +283,13 @@
|
|||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -708,8 +708,8 @@ const exportColumns = [
|
|||||||
{ prop: "is_default", label: "是否默认" },
|
{ prop: "is_default", label: "是否默认" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导出配置(用于导出弹窗)
|
// 导出配置(用于导出弹窗)
|
||||||
|
|||||||
@@ -243,18 +243,18 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
key="created_at"
|
key="created_time"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
key="updated_at"
|
key="updated_time"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -354,13 +354,13 @@
|
|||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -465,8 +465,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -724,8 +724,8 @@ const exportColumns = [
|
|||||||
{ prop: "dict_type", label: "字典类型" },
|
{ prop: "dict_type", label: "字典类型" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导出配置(用于导出弹窗)
|
// 导出配置(用于导出弹窗)
|
||||||
|
|||||||
@@ -195,10 +195,10 @@
|
|||||||
/>
|
/>
|
||||||
<el-table-column label="系统" prop="request_os" min-width="100" />
|
<el-table-column label="系统" prop="request_os" min-width="100" />
|
||||||
<el-table-column label="描述" prop="description" min-width="120" show-overflow-tooltip />
|
<el-table-column label="描述" prop="description" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column label="创建时间" prop="created_at" min-width="200" sortable />
|
<el-table-column label="创建时间" prop="created_time" min-width="200" sortable />
|
||||||
<el-table-column label="创建人" prop="creator" min-width="120">
|
<el-table-column label="创建人" prop="creator" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" min-width="150">
|
<el-table-column label="操作" fixed="right" align="center" min-width="150">
|
||||||
@@ -287,13 +287,13 @@
|
|||||||
{{ formData.login_location }}
|
{{ formData.login_location }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="4">
|
<el-descriptions-item label="创建人" :span="4">
|
||||||
{{ formData.creator?.name }}
|
{{ formData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="4">
|
<el-descriptions-item label="创建时间" :span="4">
|
||||||
{{ formData.created_at }}
|
{{ formData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="4">
|
<el-descriptions-item label="更新时间" :span="4">
|
||||||
{{ formData.updated_at }}
|
{{ formData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="8">
|
<el-descriptions-item label="描述" :span="8">
|
||||||
{{ formData.description }}
|
{{ formData.description }}
|
||||||
@@ -540,8 +540,8 @@ const exportColumns = [
|
|||||||
{ prop: "request_browser", label: "浏览器" },
|
{ prop: "request_browser", label: "浏览器" },
|
||||||
{ prop: "request_os", label: "系统" },
|
{ prop: "request_os", label: "系统" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置(用于导出弹窗)
|
// 导入/导出配置(用于导出弹窗)
|
||||||
|
|||||||
@@ -221,8 +221,8 @@
|
|||||||
<el-table-column label="组件路径" prop="component_path" min-width="200" />
|
<el-table-column label="组件路径" prop="component_path" min-width="200" />
|
||||||
<el-table-column label="路由参数" prop="params" min-width="100" />
|
<el-table-column label="路由参数" prop="params" min-width="100" />
|
||||||
<el-table-column label="描述" prop="description" min-width="200" />
|
<el-table-column label="描述" prop="description" min-width="200" />
|
||||||
<el-table-column label="创建时间" prop="created_at" min-width="200" sortable />
|
<el-table-column label="创建时间" prop="created_time" min-width="200" sortable />
|
||||||
<el-table-column label="更新时间" prop="updated_at" min-width="200" sortable />
|
<el-table-column label="更新时间" prop="updated_time" min-width="200" sortable />
|
||||||
|
|
||||||
<el-table-column fixed="right" label="操作" align="center" min-width="260">
|
<el-table-column fixed="right" label="操作" align="center" min-width="260">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -365,10 +365,10 @@
|
|||||||
{{ detailFormData.order }}
|
{{ detailFormData.order }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="4">
|
<el-descriptions-item label="描述" :span="4">
|
||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
|
|||||||
@@ -264,16 +264,16 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -284,7 +284,7 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -375,13 +375,13 @@
|
|||||||
<WangEditor v-model="detailFormData.notice_content" :readonly="true" />
|
<WangEditor v-model="detailFormData.notice_content" :readonly="true" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -490,8 +490,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "notice_content", label: "内容", show: true },
|
{ prop: "notice_content", label: "内容", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
@@ -741,8 +741,8 @@ const exportColumns = [
|
|||||||
{ prop: "notice_type", label: "类型" },
|
{ prop: "notice_type", label: "类型" },
|
||||||
{ prop: "notice_content", label: "内容" },
|
{ prop: "notice_content", label: "内容" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置(用于导出弹窗)
|
// 导入/导出配置(用于导出弹窗)
|
||||||
|
|||||||
@@ -230,18 +230,18 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
key="created_at"
|
key="created_time"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
key="updated_at"
|
key="updated_time"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -334,13 +334,13 @@
|
|||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -451,8 +451,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "config_value", label: "配置值", show: true },
|
{ prop: "config_value", label: "配置值", show: true },
|
||||||
{ prop: "config_type", label: "系统内置", show: true },
|
{ prop: "config_type", label: "系统内置", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
@@ -675,8 +675,8 @@ const exportColumns = [
|
|||||||
{ prop: "config_value", label: "配置值" },
|
{ prop: "config_value", label: "配置值" },
|
||||||
{ prop: "config_type", label: "系统内置" },
|
{ prop: "config_type", label: "系统内置" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置(用于导出弹窗)
|
// 导入/导出配置(用于导出弹窗)
|
||||||
|
|||||||
@@ -235,18 +235,18 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
key="created_at"
|
key="created_time"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
key="updated_at"
|
key="updated_time"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -334,13 +334,13 @@
|
|||||||
<el-tag v-else type="danger">停用</el-tag>
|
<el-tag v-else type="danger">停用</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="4">
|
<el-descriptions-item label="描述" :span="4">
|
||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
@@ -443,8 +443,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "order", label: "岗位排序", show: true },
|
{ prop: "order", label: "岗位排序", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
@@ -680,8 +680,8 @@ const exportColumns = [
|
|||||||
{ prop: "order", label: "岗位排序" },
|
{ prop: "order", label: "岗位排序" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置(用于导出)
|
// 导入/导出配置(用于导出)
|
||||||
@@ -717,7 +717,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
// 导出字段 const exportColumns = [ { prop: 'name', label: '岗位名称' }, { prop: 'order', label:
|
// 导出字段 const exportColumns = [ { prop: 'name', label: '岗位名称' }, { prop: 'order', label:
|
||||||
'岗位排序' }, { prop: 'status', label: '状态' }, { prop: 'description', label: '描述' }, { prop:
|
'岗位排序' }, { prop: 'status', label: '状态' }, { prop: 'description', label: '描述' }, { prop:
|
||||||
'created_at', label: '创建时间' }, { prop: 'updated_at', label: '更新时间' }, ]; //
|
'created_time', label: '创建时间' }, { prop: 'updated_time', label: '更新时间' }, ]; //
|
||||||
导入/导出配置(仅用于导出) const curdContentConfig = { permPrefix: 'module_system:position', cols:
|
导入/导出配置(仅用于导出) const curdContentConfig = { permPrefix: 'module_system:position', cols:
|
||||||
exportColumns as any, exportsAction: async (params: any) => { const query: any = { ...params }; if
|
exportColumns as any, exportsAction: async (params: any) => { const query: any = { ...params }; if
|
||||||
(typeof query.status === 'string') { query.status = query.status === 'true'; } query.page_no = 1;
|
(typeof query.status === 'string') { query.status = query.status === 'true'; } query.page_no = 1;
|
||||||
|
|||||||
@@ -258,18 +258,18 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
key="created_at"
|
key="created_time"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
key="updated_at"
|
key="updated_time"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
sortable
|
sortable
|
||||||
/>
|
/>
|
||||||
@@ -280,7 +280,7 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -395,13 +395,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="4">
|
<el-descriptions-item label="描述" :span="4">
|
||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
@@ -521,8 +521,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "code", label: "角色编码", show: true },
|
{ prop: "code", label: "角色编码", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
@@ -777,8 +777,8 @@ const exportColumns = [
|
|||||||
{ prop: "order", label: "排序" },
|
{ prop: "order", label: "排序" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置
|
// 导入/导出配置
|
||||||
|
|||||||
@@ -251,20 +251,20 @@
|
|||||||
min-width="140"
|
min-width="140"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="created_at"
|
prop="created_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
|
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="updated_at"
|
prop="updated_time"
|
||||||
min-width="180"
|
min-width="180"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column v-if="tableColumns.find((col) => col.prop === 'creator')?.show" label="创建人" prop="creator" min-width="120">
|
<!-- <el-table-column v-if="tableColumns.find((col) => col.prop === 'creator')?.show" label="创建人" prop="creator" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag>{{ scope.row.creator?.name }}</el-tag>
|
<el-tag>{{ scope.row.created_by?.name }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -344,13 +344,13 @@
|
|||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="创建人" :span="2">
|
<!-- <el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item> -->
|
</el-descriptions-item> -->
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
@@ -457,8 +457,8 @@ const tableColumns = ref([
|
|||||||
{ prop: "code", label: "编码", show: true },
|
{ prop: "code", label: "编码", show: true },
|
||||||
{ prop: "status", label: "状态", show: true },
|
{ prop: "status", label: "状态", show: true },
|
||||||
{ prop: "description", label: "描述", show: true },
|
{ prop: "description", label: "描述", show: true },
|
||||||
{ prop: "created_at", label: "创建时间", show: true },
|
{ prop: "created_time", label: "创建时间", show: true },
|
||||||
{ prop: "updated_at", label: "更新时间", show: true },
|
{ prop: "updated_time", label: "更新时间", show: true },
|
||||||
{ prop: "creator", label: "创建人", show: true },
|
{ prop: "creator", label: "创建人", show: true },
|
||||||
{ prop: "operation", label: "操作", show: true },
|
{ prop: "operation", label: "操作", show: true },
|
||||||
]);
|
]);
|
||||||
@@ -469,8 +469,8 @@ const exportColumns = [
|
|||||||
{ prop: "code", label: "编码" },
|
{ prop: "code", label: "编码" },
|
||||||
{ prop: "status", label: "状态" },
|
{ prop: "status", label: "状态" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置
|
// 导入/导出配置
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ interface IUser {
|
|||||||
gender?: string;
|
gender?: string;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
email?: string | null;
|
email?: string | null;
|
||||||
status?: boolean;
|
status?: string;
|
||||||
dept_name?: string;
|
dept_name?: string;
|
||||||
role_names?: string[];
|
role_names?: string[];
|
||||||
created_at?: string;
|
created_time?: string;
|
||||||
}
|
}
|
||||||
const selectedUser = ref<IUser>();
|
const selectedUser = ref<IUser>();
|
||||||
function handleConfirm(data: IUser[]) {
|
function handleConfirm(data: IUser[]) {
|
||||||
|
|||||||
@@ -244,11 +244,11 @@
|
|||||||
|
|
||||||
<el-table-column label="手机号" prop="mobile" min-width="160" />
|
<el-table-column label="手机号" prop="mobile" min-width="160" />
|
||||||
<el-table-column label="邮箱" prop="email" min-width="160" />
|
<el-table-column label="邮箱" prop="email" min-width="160" />
|
||||||
<el-table-column label="创建时间" prop="created_at" min-width="200" />
|
<el-table-column label="创建时间" prop="created_time" min-width="200" />
|
||||||
<el-table-column label="更新时间" prop="updated_at" min-width="200" />
|
<el-table-column label="更新时间" prop="updated_time" min-width="200" />
|
||||||
<el-table-column label="创建人" prop="creator" min-width="120">
|
<el-table-column label="创建人" prop="creator" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.creator?.name }}
|
{{ scope.row.created_by?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" align="center" min-width="280">
|
<el-table-column fixed="right" label="操作" align="center" min-width="280">
|
||||||
@@ -393,13 +393,13 @@
|
|||||||
{{ detailFormData.last_login }}
|
{{ detailFormData.last_login }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建人" :span="2">
|
<el-descriptions-item label="创建人" :span="2">
|
||||||
{{ detailFormData.creator?.name }}
|
{{ detailFormData.created_by?.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="创建时间" :span="2">
|
<el-descriptions-item label="创建时间" :span="2">
|
||||||
{{ detailFormData.created_at }}
|
{{ detailFormData.created_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新时间" :span="2">
|
<el-descriptions-item label="更新时间" :span="2">
|
||||||
{{ detailFormData.updated_at }}
|
{{ detailFormData.updated_time }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="描述" :span="4">
|
<el-descriptions-item label="描述" :span="4">
|
||||||
{{ detailFormData.description }}
|
{{ detailFormData.description }}
|
||||||
@@ -682,8 +682,8 @@ const exportColumns = [
|
|||||||
{ prop: "mobile", label: "手机号" },
|
{ prop: "mobile", label: "手机号" },
|
||||||
{ prop: "is_superuser", label: "是否超管" },
|
{ prop: "is_superuser", label: "是否超管" },
|
||||||
{ prop: "description", label: "描述" },
|
{ prop: "description", label: "描述" },
|
||||||
{ prop: "created_at", label: "创建时间" },
|
{ prop: "created_time", label: "创建时间" },
|
||||||
{ prop: "updated_at", label: "更新时间" },
|
{ prop: "updated_time", label: "更新时间" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导入/导出配置
|
// 导入/导出配置
|
||||||
|
|||||||
Reference in New Issue
Block a user