Commit c3c429aef7ba46d29498ac83bda245672b599b2f
Merge branch 'perf/wechat-message' into 'main_dev'
perf:告警联系人微信添加提示 See merge request yunteng/thingskit-front!1042
Showing
7 changed files
with
36 additions
and
7 deletions
... | ... | @@ -8,6 +8,7 @@ import { |
8 | 8 | enum MessageRecordsApi { |
9 | 9 | SMS_RECORDS = '/sms_log', |
10 | 10 | EMAIL_RECORDS = '/mail_log', |
11 | + MESSAGE_RECORDS = '/message_log', | |
11 | 12 | } |
12 | 13 | |
13 | 14 | /** |
... | ... | @@ -16,7 +17,7 @@ enum MessageRecordsApi { |
16 | 17 | */ |
17 | 18 | export const smsLogPage = (params: MessageRecordsParams) => { |
18 | 19 | return defHttp.get<SmsLogModelResult>({ |
19 | - url: MessageRecordsApi.SMS_RECORDS, | |
20 | + url: MessageRecordsApi.MESSAGE_RECORDS, | |
20 | 21 | params, |
21 | 22 | }); |
22 | 23 | }; |
... | ... | @@ -49,7 +50,7 @@ export const deleteMailLog = (ids: string[]) => |
49 | 50 | */ |
50 | 51 | export const deleteSmsLog = (ids: string[]) => |
51 | 52 | defHttp.delete({ |
52 | - url: MessageRecordsApi.SMS_RECORDS, | |
53 | + url: MessageRecordsApi.MESSAGE_RECORDS, | |
53 | 54 | data: { |
54 | 55 | ids: ids, |
55 | 56 | }, | ... | ... |
... | ... | @@ -7,7 +7,19 @@ |
7 | 7 | width="30%" |
8 | 8 | @ok="handleSubmit" |
9 | 9 | > |
10 | - <BasicForm @register="registerForm" /> | |
10 | + <BasicForm @register="registerForm"> | |
11 | + <template #wechatMessage> | |
12 | + <div> | |
13 | + <Typography> | |
14 | + <TypographyParagraph | |
15 | + class="w-99/100" | |
16 | + :ellipsis="{ rows: 1, expandable: true, symbol: '展开' }" | |
17 | + content="注意事项:微信通知人必须在thingskit小程序中绑定使用账号,未绑定则接收不到通知" | |
18 | + /> | |
19 | + </Typography> | |
20 | + </div> | |
21 | + </template> | |
22 | + </BasicForm> | |
11 | 23 | </BasicDrawer> |
12 | 24 | </template> |
13 | 25 | <script lang="ts"> |
... | ... | @@ -17,10 +29,11 @@ |
17 | 29 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
18 | 30 | import { saveOrEditAlarmContact } from '/@/api/alarm/contact/alarmContact'; |
19 | 31 | import { useMessage } from '/@/hooks/web/useMessage'; |
32 | + import { TypographyParagraph, Typography } from 'ant-design-vue'; | |
20 | 33 | |
21 | 34 | export default defineComponent({ |
22 | 35 | name: 'ContactDrawer', |
23 | - components: { BasicDrawer, BasicForm }, | |
36 | + components: { BasicDrawer, BasicForm, TypographyParagraph, Typography }, | |
24 | 37 | emits: ['success', 'register'], |
25 | 38 | setup(_, { emit }) { |
26 | 39 | const isUpdate = ref(true); |
... | ... | @@ -74,3 +87,10 @@ |
74 | 87 | }, |
75 | 88 | }); |
76 | 89 | </script> |
90 | + | |
91 | +<style lang="less" scoped> | |
92 | + :deep(.ant-typography-single-line) { | |
93 | + white-space: normal; | |
94 | + margin-bottom: 0 !important; | |
95 | + } | |
96 | +</style> | ... | ... |
... | ... | @@ -114,6 +114,13 @@ export const formSchema: FormSchema[] = [ |
114 | 114 | }, |
115 | 115 | }, |
116 | 116 | { |
117 | + field: 'wechatMessage', | |
118 | + label: ' ', | |
119 | + slot: 'wechatMessage', | |
120 | + component: 'Input', | |
121 | + ifShow: ({ model }) => model.wechat, | |
122 | + }, | |
123 | + { | |
117 | 124 | field: 'dingtalk', |
118 | 125 | label: '钉钉', |
119 | 126 | component: 'Input', | ... | ... |
... | ... | @@ -25,7 +25,6 @@ |
25 | 25 | const recordInfo = ref<any>({}); |
26 | 26 | |
27 | 27 | const [register, { closeModal, setModalProps }] = useModalInner(async (data) => { |
28 | - console.log(123131, data); | |
29 | 28 | setModalProps({ confirmLoading: false, loading: true }); |
30 | 29 | isUpdate.value = data?.isUpdate; |
31 | 30 | recordInfo.value = data?.record; | ... | ... |
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | </template> |
79 | 79 | <template #action="{ record }"> |
80 | 80 | <Button type="link" :disabled="categoryId === record.id" @click="handleChecked(record)">{{ |
81 | - categoryId === record.id ? '已选择' : '选择' | |
81 | + categoryId === record?.id ? '已选择' : '选择' | |
82 | 82 | }}</Button> |
83 | 83 | </template> |
84 | 84 | </BasicTable> | ... | ... |
... | ... | @@ -58,7 +58,6 @@ |
58 | 58 | importCsvDeviceProfileId, |
59 | 59 | excelExport, |
60 | 60 | } from '/@/api/device/modelOfMatter'; |
61 | - // import XLSX, { CellObject } from 'xlsx'; | |
62 | 61 | import { useLoading } from '/@/components/Loading'; |
63 | 62 | import JSONImage from '/@/assets/svg/JSON.svg'; |
64 | 63 | import CSVImage from '/@/assets/svg/excel.svg'; | ... | ... |