perf: 完善类型

pull/2/head
xingyu 2022-11-29 22:26:50 +08:00
parent 7e41b763f6
commit 4e860eb254
30 changed files with 217 additions and 91 deletions

View File

@ -9,6 +9,7 @@ export interface DeptVO {
leaderUserId: number
phone: string
email: string
createTime: Date
}
export interface DeptPageReqVO {

View File

@ -4,21 +4,21 @@ export type DictTypeVO = {
type: string
status: number
remark: string
createTime: string
createTime: Date
}
export type DictTypePageReqVO = {
name: string
type: string
status: number
createTime: []
createTime: Date[]
}
export type DictTypeExportReqVO = {
name: string
type: string
status: number
createTime: []
createTime: Date[]
}
export type DictDataVO = {
@ -31,7 +31,7 @@ export type DictDataVO = {
colorType: string
cssClass: string
remark: string
createTime: string
createTime: Date
}
export type DictDataPageReqVO = {
label: string

View File

@ -7,7 +7,7 @@ export interface ErrorCodeVO {
code: number
message: string
memo: string
createTime: string
createTime: Date
}
export interface ErrorCodePageReqVO extends PageParam {
@ -15,7 +15,7 @@ export interface ErrorCodePageReqVO extends PageParam {
applicationName?: string
code?: number
message?: string
createTime?: string[]
createTime?: Date[]
}
// 查询错误码列表

View File

@ -4,19 +4,20 @@ export interface LoginLogVO {
id: number
logType: number
traceId: number
userId: number
userType: number
username: string
status: number
userIp: string
userAgent: string
createTime: string
createTime: Date
}
export interface LoginLogReqVO extends PageParam {
userIp?: string
username?: string
status?: boolean
createTime?: string[]
createTime?: Date[]
}
// 查询登录日志列表

View File

@ -13,7 +13,7 @@ export interface MenuVO {
status: number
visible: boolean
keepAlive: boolean
createTime: string
createTime: Date
}
export interface MenuPageReqVO {

View File

@ -8,9 +8,7 @@ export interface NoticeVO {
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
createTime: Date
}
export interface NoticePageReqVO extends PageParam {

View File

@ -18,11 +18,15 @@ export interface OAuth2ClientVO {
resourceIds: string[]
additionalInformation: string
isAdditionalInformationJson: boolean
createTime: string
createTime: Date
}
export interface OAuth2ClientPageReqVO extends PageParam {
name?: string
status?: number
}
// 查询 OAuth2列表
export const getOAuth2ClientPageApi = (params) => {
export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => {
return request.get({ url: '/system/oauth2-client/page', params })
}

View File

@ -7,14 +7,14 @@ export interface OAuth2TokenVO {
userId: number
userType: number
clientId: string
createTime: string
expiresTime: string
createTime: Date
expiresTime: Date
}
export interface OAuth2TokenPageReqVO extends PageParam {
code?: string
name?: string
status?: number
userId?: number
userType?: number
clientId?: string
}
// 查询 token列表

View File

@ -9,14 +9,14 @@ export type OperateLogVO = {
name: string
type: number
content: string
exts: object
exts: Map<String, Object>
requestMethod: string
requestUrl: string
userIp: string
userAgent: string
javaMethod: string
javaMethodArgs: string
startTime: string
startTime: Date
duration: number
resultCode: number
resultMsg: string
@ -28,7 +28,7 @@ export interface OperateLogPageReqVO extends PageParam {
userNickname?: string
type?: number
success?: boolean
startTime?: string[]
startTime?: Date[]
}
// 查询操作日志列表

View File

@ -7,7 +7,7 @@ export interface PostVO {
sort: number
status: number
remark: string
createTime?: string
createTime?: Date
}
export interface PostPageReqVO extends PageParam {

View File

@ -7,14 +7,19 @@ export interface RoleVO {
sort: number
status: number
type: number
createTime: string
createTime: Date
}
export interface RolePageReqVO extends PageParam {
name?: string
code?: string
status?: number
createTime?: string[]
createTime?: Date[]
}
export interface UpdateStatusReqVO {
id: number
status: number
}
// 查询角色列表
@ -43,7 +48,7 @@ export const updateRoleApi = async (data: RoleVO) => {
}
// 修改角色状态
export const updateRoleStatusApi = async (data: RoleVO) => {
export const updateRoleStatusApi = async (data: UpdateStatusReqVO) => {
return await request.put({ url: '/system/role/update-status', data })
}

View File

@ -5,19 +5,22 @@ export interface SensitiveWordVO {
name: string
status: number
description: string
tags: string
type: number
createTime: string
tags: string[]
createTime: Date
}
export interface SensitiveWordPageReqVO extends PageParam {
name?: string
tag?: string
status?: number
createTime?: Date[]
}
export interface SensitiveWordExportReqVO {
name?: string
tag?: string
status?: number
createTime?: Date[]
}
// 查询敏感词列表

View File

@ -2,19 +2,21 @@ import request from '@/config/axios'
export interface SmsChannelVO {
id: number
code: string
status: number
signature: string
remark: string
apiKey: string
apiSecret: string
callbackUrl: string
createTime: string
createTime: Date
}
export interface SmsChannelPageReqVO extends PageParam {
signature?: string
code?: string
status?: number
createTime?: Date[]
}
// 查询短信渠道列表

View File

@ -2,30 +2,48 @@ import request from '@/config/axios'
export interface SmsLogVO {
id: number
idchannelId: number
channelId: number
channelCode: string
templateId: number
templateCode: string
templateType: number
templateContent: string
templateParams: Map<string, object>
mobile: string
userId: number
userType: number
sendStatus: number
sendTime: Date
sendCode: number
sendMsg: string
apiSendCode: string
apiSendMsg: string
apiRequestId: string
apiSerialNo: string
receiveStatus: number
templateType: number
templateContent: string
templateParams: Map<string, object>
apiTemplateId: string
sendTime: string
createTime: string
receiveTime: Date
apiReceiveCode: string
apiReceiveMsg: string
createTime: Date
}
export interface SmsLogPageReqVO extends PageParam {
signature?: string
code?: string
status?: number
channelId?: number
templateId?: number
mobile?: string
sendStatus?: number
sendTime?: Date[]
receiveStatus?: number
receiveTime?: Date[]
}
export interface SmsLogExportReqVO {
code?: string
name?: string
status?: number
channelId?: number
templateId?: number
mobile?: string
sendStatus?: number
sendTime?: Date[]
receiveStatus?: number
receiveTime?: Date[]
}
// 查询短信日志列表

View File

@ -11,17 +11,38 @@ export interface SmsTemplateVO {
apiTemplateId: string
channelId: number
channelCode: string
createTime: string
params: string[]
createTime: Date
}
export type SmsSendVO = {
export interface SendSmsReqVO {
mobile: string
templateCode: string
templateParams: string
templateParams: Map<String, Object>
}
export interface SmsTemplatePageReqVO {
type?: number
status?: number
code?: string
content?: string
apiTemplateId?: string
channelId?: number
createTime?: Date[]
}
export interface SmsTemplateExportReqVO {
type?: number
status?: number
code?: string
content?: string
apiTemplateId?: string
channelId?: number
createTime?: Date[]
}
// 查询短信模板列表
export const getSmsTemplatePageApi = (params) => {
export const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => {
return request.get({ url: '/system/sms-template/page', params })
}
@ -46,12 +67,12 @@ export const deleteSmsTemplateApi = (id: number) => {
}
// 发送短信
export const sendSmsApi = (data) => {
export const sendSmsApi = (data: SendSmsReqVO) => {
return request.post({ url: '/system/sms-template/send-sms', data })
}
// 导出短信模板
export const exportPostApi = (params) => {
export const exportPostApi = (params: SmsTemplateExportReqVO) => {
return request.download({
url: '/system/sms-template/export-excel',
params

View File

@ -3,16 +3,16 @@ import request from '@/config/axios'
export interface TenantVO {
id: number
name: string
packageId: number
contactName: string
contactMobile: string
status: number
domain: string
packageId: number
username: string
password: string
expireTime: Date
accountCount: number
expireTime: string
domain: string
status: number
createTime: string
createTime: Date
}
export interface TenantPageReqVO extends PageParam {
@ -20,6 +20,7 @@ export interface TenantPageReqVO extends PageParam {
contactName?: string
contactMobile?: string
status?: number
createTime?: Date[]
}
export interface TenantExportReqVO {
@ -27,6 +28,7 @@ export interface TenantExportReqVO {
contactName?: string
contactMobile?: string
status?: number
createTime?: Date[]
}
// 查询租户列表

View File

@ -6,17 +6,17 @@ export interface TenantPackageVO {
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
menuIds: string[]
menuIds: number[]
createTime: Date
}
export interface TenantPackagePageReqVO extends PageParam {
name?: string
contactName?: string
contactMobile?: string
status?: number
remark?: string
createTime?: Date[]
}
// 查询租户套餐列表

View File

@ -13,8 +13,8 @@ export interface UserVO {
loginIp: string
status: number
remark: string
loginDate: string
createTime: string
loginDate: Date
createTime: Date
}
export interface UserPageReqVO extends PageParam {
@ -22,14 +22,14 @@ export interface UserPageReqVO extends PageParam {
username?: string
mobile?: string
status?: number
createTime?: string[]
createTime?: Date[]
}
export interface UserExportReqVO {
code?: string
name?: string
status?: number
createTime?: string[]
createTime?: Date[]
}
// 查询用户管理列表

View File

@ -150,7 +150,7 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => {
const searchSchemaItem = {
// 默认为 input
folding: searchSchema.length > spanLength,
folding: searchSchema.length > spanLength - 1,
itemRender: schemaItem.itemRender ? schemaItem.itemRender : itemRender,
field: schemaItem.field,
title: schemaItem.search?.title || schemaItem.title,
@ -165,7 +165,7 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => {
const buttons: VxeFormItemProps = {
span: 24,
align: 'center',
collapseNode: searchSchema.length > spanLength + 1,
collapseNode: searchSchema.length > spanLength,
itemRender: {
name: '$buttons',
children: [

View File

@ -55,7 +55,8 @@ const crudSchemas = reactive<VxeCrudSchema>({
},
{
title: '邮箱',
field: 'email'
field: 'email',
isTable: false
},
{
title: '显示排序',
@ -67,6 +68,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
dictType: DICT_TYPE.COMMON_STATUS,
dictClass: 'number',
isSearch: true
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
isForm: false
}
]
})

View File

@ -43,6 +43,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
isForm: false,
table: {
width: 150
},
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
},
{

View File

@ -22,6 +22,11 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '刷新令牌',
field: 'refreshToken'
},
{
title: '客户端编号',
field: 'clientId',
isSearch: true
},
{
title: '用户类型',
field: 'userType',

View File

@ -23,6 +23,14 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: 'name',
isSearch: true
},
{
title: '标签',
field: 'tag',
isTable: false,
isForm: false,
isDetail: false,
isSearch: true
},
{
title: '标签',
field: 'tags',
@ -57,7 +65,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
isForm: false
isForm: false,
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
}
]
})

View File

@ -54,7 +54,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
isForm: false
isForm: false,
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
}
]
})

View File

@ -20,6 +20,11 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '短信内容',
field: 'templateContent'
},
{
title: '模板编号',
field: 'templateId',
isSearch: true
},
{
title: '短信渠道',
field: 'channelId',
@ -35,16 +40,15 @@ const crudSchemas = reactive<VxeCrudSchema>({
isSearch: true
},
{
title: '接收状态',
field: 'receiveStatus',
dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
dictClass: 'number',
isSearch: true
},
{
title: '模板编号',
field: 'templateId',
isSearch: true
title: '发送时间',
field: 'sendTime',
formatter: 'formatDate',
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
},
{
title: '短信类型',
@ -54,12 +58,15 @@ const crudSchemas = reactive<VxeCrudSchema>({
isSearch: true
},
{
title: '接收时间',
field: 'receiveTime'
title: '接收状态',
field: 'receiveStatus',
dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
dictClass: 'number',
isSearch: true
},
{
title: t('common.createTime'),
field: 'createTime',
title: '接收时间',
field: 'receiveTime',
formatter: 'formatDate',
search: {
show: true,
@ -67,6 +74,11 @@ const crudSchemas = reactive<VxeCrudSchema>({
name: 'XDataTimePicker'
}
}
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate'
}
]
})

View File

@ -104,7 +104,7 @@
:loading="actionLoading"
@click="sendSmsTest()"
/>
<XButton :title="t('dialog.close')" @click="dialogVisible = false" />
<XButton :title="t('dialog.close')" @click="sendVisible = false" />
</template>
</XModal>
</template>
@ -204,7 +204,7 @@ const submitForm = async () => {
const sendSmsForm = ref({
content: '',
params: {},
mobile: '141',
mobile: '',
templateCode: '',
templateParams: {}
})
@ -230,14 +230,16 @@ const handleSendSms = (row: any) => {
sendVisible.value = true
}
const sendSmsTest = () => {
const data = {
const sendSmsTest = async () => {
const data: SmsTemplateApi.SendSmsReqVO = {
mobile: sendSmsForm.value.mobile,
templateCode: sendSmsForm.value.templateCode,
templateParams: sendSmsForm.value.templateParams
templateParams: sendSmsForm.value.templateParams as unknown as Map<string, Object>
}
const res = await SmsTemplateApi.sendSmsApi(data)
if (res) {
message.success('发送成功')
}
SmsTemplateApi.sendSmsApi(data)
message.info('发送成功')
sendVisible.value = false
}
</script>

View File

@ -48,6 +48,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: 'type',
dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
dictClass: 'number',
isSearch: true,
table: {
width: 80
}
@ -57,6 +58,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictClass: 'number',
isSearch: true,
table: {
width: 80
}

View File

@ -123,7 +123,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('table.createTime'),
field: 'createTime',
formatter: 'formatDate',
isForm: false
isForm: false,
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
}
]
})

View File

@ -43,6 +43,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('form.remark'),
field: 'remark',
isTable: false,
isSearch: true,
form: {
component: 'Input',
componentProps: {
@ -58,7 +59,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '创建时间',
field: 'createTime',
formatter: 'formatDate',
isForm: false
isForm: false,
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
}
]
})

View File

@ -6,6 +6,9 @@
<el-form-item label="用户编号" prop="userId">
<el-input v-model="queryParams.userId" placeholder="请输入用户编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="客户端编号" prop="clientId">
<el-input v-model="queryParams.clientId" placeholder="请输入客户端编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="用户类型" prop="userType">
<el-select v-model="queryParams.userType" placeholder="请选择用户类型" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.USER_TYPE)"
@ -68,7 +71,8 @@ export default {
pageNo: 1,
pageSize: 10,
userId: undefined,
userType: undefined
userType: undefined,
clientId: undefined
}
};
},