diff --git a/apps/web-antd/src/api/core/mail.ts b/apps/web-antd/src/api/core/mail.ts index 8234c93..d6dcf82 100644 --- a/apps/web-antd/src/api/core/mail.ts +++ b/apps/web-antd/src/api/core/mail.ts @@ -9,6 +9,8 @@ export interface MailData { mail_id?: number; title: string; content: string; + title_en: string; + content_en: string; items : string; start_time: number; end_time: number; diff --git a/apps/web-antd/src/api/core/user.ts b/apps/web-antd/src/api/core/user.ts index a8aa980..bbe0ab8 100644 --- a/apps/web-antd/src/api/core/user.ts +++ b/apps/web-antd/src/api/core/user.ts @@ -9,6 +9,7 @@ export interface UserData { } export interface UserListParam { Id: number; + Uid?: number; ServerId: number; pageSize: number; currentPage: number; diff --git a/apps/web-antd/src/views/operation/mail/mail-detail.vue b/apps/web-antd/src/views/operation/mail/mail-detail.vue index a9872f1..65f2cda 100644 --- a/apps/web-antd/src/views/operation/mail/mail-detail.vue +++ b/apps/web-antd/src/views/operation/mail/mail-detail.vue @@ -35,6 +35,22 @@ const [Form, FormApi] = useVbenForm({ }, rules: "required", }, + { + component: 'Input', + fieldName: 'TitleEN', + label: '英文邮件标题', + rules: "required", + }, + { + component: 'Textarea', + fieldName: 'ContentEN', + label: '英文邮件内容', + componentProps: { + type: 'textarea', + rows: 8, + }, + rules: "required", + }, { component: 'Textarea', fieldName: 'Items', @@ -103,7 +119,7 @@ const [Form, FormApi] = useVbenForm({ }, dependencies: { componentProps(values) { - if(values.mail_type === 2) { + if(values.send_type === 2) { return { disabled: false, rules: "required", @@ -113,7 +129,7 @@ const [Form, FormApi] = useVbenForm({ disabled: true, } }, - triggerFields: ['mail_type'], + triggerFields: ['send_type'], }, }, ], @@ -126,6 +142,8 @@ const [Modal, modalApi] = useVbenModal({ FormApi.setValues({ Title: modalData.title, Content: modalData.content, + TitleEN: modalData.title_en, + ContentEN: modalData.content_en, Items: modalData.items, start_time: 0 , register_time: modalData.register_time , @@ -143,6 +161,16 @@ const [Modal, modalApi] = useVbenModal({ disabled: true, fieldName: 'Content', }, + { + component: 'Input', + disabled: true, + fieldName: 'TitleEN', + }, + { + component: 'Textarea', + disabled: true, + fieldName: 'ContentEN', + }, { component: 'Input', disabled: true, diff --git a/apps/web-antd/src/views/operation/mail/mail-info.vue b/apps/web-antd/src/views/operation/mail/mail-info.vue index f8ca256..cb48d21 100644 --- a/apps/web-antd/src/views/operation/mail/mail-info.vue +++ b/apps/web-antd/src/views/operation/mail/mail-info.vue @@ -37,6 +37,22 @@ const [Form, FormApi] = useVbenForm({ }, rules: "required", }, + { + component: 'Input', + fieldName: 'TitleEN', + label: '英文邮件标题', + rules: "required", + }, + { + component: 'Textarea', + fieldName: 'ContentEN', + label: '英文邮件内容', + componentProps: { + type: 'textarea', + rows: 8, + }, + rules: "required", + }, { component: 'Textarea', fieldName: 'Items', @@ -133,6 +149,8 @@ const [Modal, modalApi] = useVbenModal({ const send_type = values.send_type; const Title = values.Title; const Content = values.Content; + const TitleEN = values.TitleEN; + const ContentEN = values.ContentEN; const Items = values.Items; const ToUids = values.ToUids; const modalData = modalApi.getData(); @@ -148,6 +166,8 @@ const [Modal, modalApi] = useVbenModal({ register_time:register_time, mail_type:mail_type, send_type:send_type, + title_en:TitleEN, + content_en:ContentEN, } await addMailApi(param); modalApi.close(); diff --git a/apps/web-antd/src/views/userlog/eventlog/event-table.vue b/apps/web-antd/src/views/userlog/eventlog/event-table.vue index 082515b..7232f00 100644 --- a/apps/web-antd/src/views/userlog/eventlog/event-table.vue +++ b/apps/web-antd/src/views/userlog/eventlog/event-table.vue @@ -90,7 +90,7 @@ const formOptions: VbenFormProps = { submitOnChange: false, // 按下回车时是否提交表单 submitOnEnter: false, - wrapperClass: 'grid-cols-1 md:grid-cols-4', + wrapperClass: 'grid-cols-1 md:grid-cols-5', } const gridOptions: VxeGridProps = { columns: [ diff --git a/apps/web-antd/src/views/userlog/userlist/userlist.vue b/apps/web-antd/src/views/userlog/userlist/userlist.vue index 73d242f..6c4001f 100644 --- a/apps/web-antd/src/views/userlog/userlist/userlist.vue +++ b/apps/web-antd/src/views/userlog/userlist/userlist.vue @@ -55,6 +55,7 @@ const formOptions: VbenFormProps = { fieldName: 'ServerId', }, ]); + GridApi.formApi.setValues({ ServerId: 1 }); }, filterOption: true, options: [ @@ -79,6 +80,19 @@ const formOptions: VbenFormProps = { }, fieldName: 'ServerId', label: 'ServerId:', + }, + { + component: 'Input', + componentProps: { + filterOption: true, + options: [ + + ], + placeholder: '请选择', + showSearch: true, + }, + fieldName: 'Uid', + label: 'Uid:', } ], // 控制表单是否显示折叠按钮 @@ -86,8 +100,9 @@ const formOptions: VbenFormProps = { submitButtonOptions: { content: '查询', }, + wrapperClass: 'grid-cols-1 md:grid-cols-5', // 是否在字段值改变时提交表单 - submitOnChange: false, + submitOnChange: true, // 按下回车时是否提交表单 submitOnEnter: false, } @@ -96,6 +111,7 @@ const gridEvents: VxeGridListeners = { const value = await GridApi.formApi.getValues(); userModalApi.setData({ uid: row.Uid, AppId: value.AppId, ServerId: value.ServerId }); userModalApi.open(); + await navigator.clipboard.writeText(row.Uid.toString()); }, }; @@ -132,7 +148,8 @@ const gridOptions: VxeGridProps = { query: async ({ page }, formValues) => { let Id = parseInt(formValues.AppId, 10); let ServerId = parseInt(formValues.ServerId, 10); - let r = await getUserListApi({ Id: Id, ServerId:ServerId, pageSize: page.pageSize, currentPage: page.currentPage }); + let Uid = parseInt(formValues.Uid, 10); + let r = await getUserListApi({ Id: Id, ServerId:ServerId, pageSize: page.pageSize, currentPage: page.currentPage, Uid: Uid }); return r; }, }, @@ -205,4 +222,4 @@ function getTagColor(online: string): string { .broder-bottom-1 { border-bottom: 0.5px solid rgb(136, 134, 134); } - \ No newline at end of file +