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
| ... | ... | @@ -4,6 +4,7 @@ import { h } from 'vue'; |
| 4 | 4 | import { Tag } from 'ant-design-vue'; |
| 5 | 5 | import { useI18n } from '/@/hooks/web/useI18n'; |
| 6 | 6 | import moment from 'moment'; |
| 7 | +import { findDictItemByCode } from '/@/api/system/dict'; | |
| 7 | 8 | const { t } = useI18n(); |
| 8 | 9 | export const columns: BasicColumn[] = [ |
| 9 | 10 | { |
| ... | ... | @@ -12,7 +13,7 @@ export const columns: BasicColumn[] = [ |
| 12 | 13 | width: 160, |
| 13 | 14 | }, |
| 14 | 15 | { |
| 15 | - title: '短信平台', | |
| 16 | + title: '消息平台', | |
| 16 | 17 | dataIndex: 'typeDictText', |
| 17 | 18 | width: 160, |
| 18 | 19 | }, |
| ... | ... | @@ -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 | 79 | field: 'sendTime', |
| 65 | 80 | label: '发送时间', |
| 66 | 81 | component: 'RangePicker', | ... | ... |
| ... | ... | @@ -2,7 +2,7 @@ import { BasicColumn } from '/@/components/Table'; |
| 2 | 2 | import { FormSchema } from '/@/components/Table'; |
| 3 | 3 | import { findDictItemByCode } from '/@/api/system/dict'; |
| 4 | 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 | 7 | export enum PlateFormTypeEnum { |
| 8 | 8 | ali_cound = 'ALI_CLOUD', |
| ... | ... | @@ -172,6 +172,7 @@ export const formSchema: FormSchema[] = [ |
| 172 | 172 | const record = await findMessageConfig(params); |
| 173 | 173 | return record.filter((item) => item.status === 1); |
| 174 | 174 | } catch (error) { |
| 175 | + // eslint-disable-next-line no-console | |
| 175 | 176 | console.log(error); |
| 176 | 177 | return []; |
| 177 | 178 | } |
| ... | ... | @@ -218,7 +219,9 @@ export const formSchema: FormSchema[] = [ |
| 218 | 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 | 227 | field: 'templatePurpose', | ... | ... |