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 leaderUserId: number
phone: string phone: string
email: string email: string
createTime: Date
} }
export interface DeptPageReqVO { export interface DeptPageReqVO {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,14 +7,19 @@ export interface RoleVO {
sort: number sort: number
status: number status: number
type: number type: number
createTime: string createTime: Date
} }
export interface RolePageReqVO extends PageParam { export interface RolePageReqVO extends PageParam {
name?: string name?: string
code?: string code?: string
status?: number 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 }) return await request.put({ url: '/system/role/update-status', data })
} }

View File

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

View File

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

View File

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

View File

@ -11,17 +11,38 @@ export interface SmsTemplateVO {
apiTemplateId: string apiTemplateId: string
channelId: number channelId: number
channelCode: string channelCode: string
createTime: string params: string[]
createTime: Date
} }
export type SmsSendVO = { export interface SendSmsReqVO {
mobile: string mobile: string
templateCode: 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 }) 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 }) return request.post({ url: '/system/sms-template/send-sms', data })
} }
// 导出短信模板 // 导出短信模板
export const exportPostApi = (params) => { export const exportPostApi = (params: SmsTemplateExportReqVO) => {
return request.download({ return request.download({
url: '/system/sms-template/export-excel', url: '/system/sms-template/export-excel',
params params

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -104,7 +104,7 @@
:loading="actionLoading" :loading="actionLoading"
@click="sendSmsTest()" @click="sendSmsTest()"
/> />
<XButton :title="t('dialog.close')" @click="dialogVisible = false" /> <XButton :title="t('dialog.close')" @click="sendVisible = false" />
</template> </template>
</XModal> </XModal>
</template> </template>
@ -204,7 +204,7 @@ const submitForm = async () => {
const sendSmsForm = ref({ const sendSmsForm = ref({
content: '', content: '',
params: {}, params: {},
mobile: '141', mobile: '',
templateCode: '', templateCode: '',
templateParams: {} templateParams: {}
}) })
@ -230,14 +230,16 @@ const handleSendSms = (row: any) => {
sendVisible.value = true sendVisible.value = true
} }
const sendSmsTest = () => { const sendSmsTest = async () => {
const data = { const data: SmsTemplateApi.SendSmsReqVO = {
mobile: sendSmsForm.value.mobile, mobile: sendSmsForm.value.mobile,
templateCode: sendSmsForm.value.templateCode, 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 sendVisible.value = false
} }
</script> </script>

View File

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

View File

@ -123,7 +123,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: t('table.createTime'), title: t('table.createTime'),
field: 'createTime', field: 'createTime',
formatter: 'formatDate', 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'), title: t('form.remark'),
field: 'remark', field: 'remark',
isTable: false, isTable: false,
isSearch: true,
form: { form: {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
@ -58,7 +59,13 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '创建时间', title: '创建时间',
field: 'createTime', field: 'createTime',
formatter: 'formatDate', 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-form-item label="用户编号" prop="userId">
<el-input v-model="queryParams.userId" placeholder="请输入用户编号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.userId" placeholder="请输入用户编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </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-form-item label="用户类型" prop="userType">
<el-select v-model="queryParams.userType" placeholder="请选择用户类型" clearable> <el-select v-model="queryParams.userType" placeholder="请选择用户类型" clearable>
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.USER_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.USER_TYPE)"
@ -68,7 +71,8 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
userId: undefined, userId: undefined,
userType: undefined userType: undefined,
clientId: undefined
} }
}; };
}, },