Commit 7e36de1fa41ed449d7f40a9505f3d47caf0dfc43
Merge branch 'perf/message-log' of http://git.yunteng.com/yunteng/thingskit-fron…
…t into feat/alarm-add-dingtalk
Showing
5 changed files
with
23 additions
and
6 deletions
@@ -170,7 +170,6 @@ export const formSchema: FormSchema[] = [ | @@ -170,7 +170,6 @@ export const formSchema: FormSchema[] = [ | ||
170 | label: 'secretKey', | 170 | label: 'secretKey', |
171 | required: true, | 171 | required: true, |
172 | componentProps: { | 172 | componentProps: { |
173 | - maxLength: 36, | ||
174 | placeholder: '请输入secretKey', | 173 | placeholder: '请输入secretKey', |
175 | }, | 174 | }, |
176 | 175 |
@@ -6,7 +6,7 @@ export interface TabItem { | @@ -6,7 +6,7 @@ export interface TabItem { | ||
6 | export const achieveList: TabItem[] = [ | 6 | export const achieveList: TabItem[] = [ |
7 | { | 7 | { |
8 | key: '1', | 8 | key: '1', |
9 | - name: '短信发送记录', | 9 | + name: '消息发送记录', |
10 | component: 'SmsLog', | 10 | component: 'SmsLog', |
11 | }, | 11 | }, |
12 | { | 12 | { |
@@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
61 | components: { BasicTable, TableAction, Authority, Popconfirm, Tooltip }, | 61 | components: { BasicTable, TableAction, Authority, Popconfirm, Tooltip }, |
62 | setup() { | 62 | setup() { |
63 | const [registerTable, { reload, setProps }] = useTable({ | 63 | const [registerTable, { reload, setProps }] = useTable({ |
64 | - title: '短信发送列表', | 64 | + title: '消息发送列表', |
65 | api: smsLogPage, | 65 | api: smsLogPage, |
66 | columns, | 66 | columns, |
67 | formConfig: { | 67 | formConfig: { |
@@ -4,6 +4,7 @@ import { h } from 'vue'; | @@ -4,6 +4,7 @@ import { h } from 'vue'; | ||
4 | import { Tag } from 'ant-design-vue'; | 4 | import { Tag } from 'ant-design-vue'; |
5 | import { useI18n } from '/@/hooks/web/useI18n'; | 5 | import { useI18n } from '/@/hooks/web/useI18n'; |
6 | import moment from 'moment'; | 6 | import moment from 'moment'; |
7 | +import { findDictItemByCode } from '/@/api/system/dict'; | ||
7 | const { t } = useI18n(); | 8 | const { t } = useI18n(); |
8 | export const columns: BasicColumn[] = [ | 9 | export const columns: BasicColumn[] = [ |
9 | { | 10 | { |
@@ -12,7 +13,7 @@ export const columns: BasicColumn[] = [ | @@ -12,7 +13,7 @@ export const columns: BasicColumn[] = [ | ||
12 | width: 160, | 13 | width: 160, |
13 | }, | 14 | }, |
14 | { | 15 | { |
15 | - title: '短信平台', | 16 | + title: '消息平台', |
16 | dataIndex: 'typeDictText', | 17 | dataIndex: 'typeDictText', |
17 | width: 160, | 18 | width: 160, |
18 | }, | 19 | }, |
@@ -61,6 +62,20 @@ export const searchFormSchema: FormSchema[] = [ | @@ -61,6 +62,20 @@ export const searchFormSchema: FormSchema[] = [ | ||
61 | }, | 62 | }, |
62 | }, | 63 | }, |
63 | { | 64 | { |
65 | + field: 'typeDictText', | ||
66 | + label: '消息平台', | ||
67 | + component: 'ApiSelect', | ||
68 | + colProps: { span: 6 }, | ||
69 | + componentProps: { | ||
70 | + api: findDictItemByCode, | ||
71 | + params: { | ||
72 | + dictCode: 'message_type', | ||
73 | + }, | ||
74 | + labelField: 'itemText', | ||
75 | + valueField: 'itemValue', | ||
76 | + }, | ||
77 | + }, | ||
78 | + { | ||
64 | field: 'sendTime', | 79 | field: 'sendTime', |
65 | label: '发送时间', | 80 | label: '发送时间', |
66 | component: 'RangePicker', | 81 | component: 'RangePicker', |
@@ -2,7 +2,7 @@ import { BasicColumn } from '/@/components/Table'; | @@ -2,7 +2,7 @@ import { BasicColumn } from '/@/components/Table'; | ||
2 | import { FormSchema } from '/@/components/Table'; | 2 | import { FormSchema } from '/@/components/Table'; |
3 | import { findDictItemByCode } from '/@/api/system/dict'; | 3 | import { findDictItemByCode } from '/@/api/system/dict'; |
4 | import { findMessageConfig } from '/@/api/message/config'; | 4 | import { findMessageConfig } from '/@/api/message/config'; |
5 | -import { isMessage } from '/@/views/message/config/config.data'; | 5 | +import { isDingtalk, isMessage } from '/@/views/message/config/config.data'; |
6 | 6 | ||
7 | export enum PlateFormTypeEnum { | 7 | export enum PlateFormTypeEnum { |
8 | ali_cound = 'ALI_CLOUD', | 8 | ali_cound = 'ALI_CLOUD', |
@@ -172,6 +172,7 @@ export const formSchema: FormSchema[] = [ | @@ -172,6 +172,7 @@ export const formSchema: FormSchema[] = [ | ||
172 | const record = await findMessageConfig(params); | 172 | const record = await findMessageConfig(params); |
173 | return record.filter((item) => item.status === 1); | 173 | return record.filter((item) => item.status === 1); |
174 | } catch (error) { | 174 | } catch (error) { |
175 | + // eslint-disable-next-line no-console | ||
175 | console.log(error); | 176 | console.log(error); |
176 | return []; | 177 | return []; |
177 | } | 178 | } |
@@ -218,7 +219,9 @@ export const formSchema: FormSchema[] = [ | @@ -218,7 +219,9 @@ export const formSchema: FormSchema[] = [ | ||
218 | placeholder: '请输入签名', | 219 | placeholder: '请输入签名', |
219 | }, | 220 | }, |
220 | 221 | ||
221 | - ifShow: ({ values }) => isMessage(Reflect.get(values, 'messageType')), | 222 | + ifShow: ({ values }) => |
223 | + isMessage(Reflect.get(values, 'messageType')) || | ||
224 | + isDingtalk(Reflect.get(values, 'messageType')), | ||
222 | }, | 225 | }, |
223 | { | 226 | { |
224 | field: 'templatePurpose', | 227 | field: 'templatePurpose', |