Commit 7e36de1fa41ed449d7f40a9505f3d47caf0dfc43

Authored by dev001
2 parents 0fa72b53 1ad469d7

Merge branch 'perf/message-log' of http://git.yunteng.com/yunteng/thingskit-fron…

…t into feat/alarm-add-dingtalk
... ... @@ -170,7 +170,6 @@ export const formSchema: FormSchema[] = [
170 170 label: 'secretKey',
171 171 required: true,
172 172 componentProps: {
173   - maxLength: 36,
174 173 placeholder: '请输入secretKey',
175 174 },
176 175
... ...
... ... @@ -6,7 +6,7 @@ export interface TabItem {
6 6 export const achieveList: TabItem[] = [
7 7 {
8 8 key: '1',
9   - name: '短信发送记录',
  9 + name: '消息发送记录',
10 10 component: 'SmsLog',
11 11 },
12 12 {
... ...
... ... @@ -61,7 +61,7 @@
61 61 components: { BasicTable, TableAction, Authority, Popconfirm, Tooltip },
62 62 setup() {
63 63 const [registerTable, { reload, setProps }] = useTable({
64   - title: '短信发送列表',
  64 + title: '消息发送列表',
65 65 api: smsLogPage,
66 66 columns,
67 67 formConfig: {
... ...
... ... @@ -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',
... ...