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
| @@ -4,6 +4,9 @@ import { defHttp } from '/@/utils/http/axios'; | @@ -4,6 +4,9 @@ import { defHttp } from '/@/utils/http/axios'; | ||
| 4 | enum Api { | 4 | enum Api { |
| 5 | DEVICE_PROFILE_CATEGORY = '/device_profile/category', | 5 | DEVICE_PROFILE_CATEGORY = '/device_profile/category', |
| 6 | } | 6 | } |
| 7 | +// export enum CATEGORY_POST { | ||
| 8 | + | ||
| 9 | +// } | ||
| 7 | 10 | ||
| 8 | /** | 11 | /** |
| 9 | * 新增产品分类 | 12 | * 新增产品分类 |
| @@ -8,6 +8,7 @@ import { | @@ -8,6 +8,7 @@ import { | ||
| 8 | enum MessageRecordsApi { | 8 | enum MessageRecordsApi { |
| 9 | SMS_RECORDS = '/sms_log', | 9 | SMS_RECORDS = '/sms_log', |
| 10 | EMAIL_RECORDS = '/mail_log', | 10 | EMAIL_RECORDS = '/mail_log', |
| 11 | + MESSAGE_RECORDS = '/message_log', | ||
| 11 | } | 12 | } |
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| @@ -16,7 +17,7 @@ enum MessageRecordsApi { | @@ -16,7 +17,7 @@ enum MessageRecordsApi { | ||
| 16 | */ | 17 | */ |
| 17 | export const smsLogPage = (params: MessageRecordsParams) => { | 18 | export const smsLogPage = (params: MessageRecordsParams) => { |
| 18 | return defHttp.get<SmsLogModelResult>({ | 19 | return defHttp.get<SmsLogModelResult>({ |
| 19 | - url: MessageRecordsApi.SMS_RECORDS, | 20 | + url: MessageRecordsApi.MESSAGE_RECORDS, |
| 20 | params, | 21 | params, |
| 21 | }); | 22 | }); |
| 22 | }; | 23 | }; |
| @@ -49,7 +50,7 @@ export const deleteMailLog = (ids: string[]) => | @@ -49,7 +50,7 @@ export const deleteMailLog = (ids: string[]) => | ||
| 49 | */ | 50 | */ |
| 50 | export const deleteSmsLog = (ids: string[]) => | 51 | export const deleteSmsLog = (ids: string[]) => |
| 51 | defHttp.delete({ | 52 | defHttp.delete({ |
| 52 | - url: MessageRecordsApi.SMS_RECORDS, | 53 | + url: MessageRecordsApi.MESSAGE_RECORDS, |
| 53 | data: { | 54 | data: { |
| 54 | ids: ids, | 55 | ids: ids, |
| 55 | }, | 56 | }, |
| @@ -7,7 +7,19 @@ | @@ -7,7 +7,19 @@ | ||
| 7 | width="30%" | 7 | width="30%" |
| 8 | @ok="handleSubmit" | 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 | </BasicDrawer> | 23 | </BasicDrawer> |
| 12 | </template> | 24 | </template> |
| 13 | <script lang="ts"> | 25 | <script lang="ts"> |
| @@ -17,10 +29,11 @@ | @@ -17,10 +29,11 @@ | ||
| 17 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; | 29 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
| 18 | import { saveOrEditAlarmContact } from '/@/api/alarm/contact/alarmContact'; | 30 | import { saveOrEditAlarmContact } from '/@/api/alarm/contact/alarmContact'; |
| 19 | import { useMessage } from '/@/hooks/web/useMessage'; | 31 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 32 | + import { TypographyParagraph, Typography } from 'ant-design-vue'; | ||
| 20 | 33 | ||
| 21 | export default defineComponent({ | 34 | export default defineComponent({ |
| 22 | name: 'ContactDrawer', | 35 | name: 'ContactDrawer', |
| 23 | - components: { BasicDrawer, BasicForm }, | 36 | + components: { BasicDrawer, BasicForm, TypographyParagraph, Typography }, |
| 24 | emits: ['success', 'register'], | 37 | emits: ['success', 'register'], |
| 25 | setup(_, { emit }) { | 38 | setup(_, { emit }) { |
| 26 | const isUpdate = ref(true); | 39 | const isUpdate = ref(true); |
| @@ -74,3 +87,10 @@ | @@ -74,3 +87,10 @@ | ||
| 74 | }, | 87 | }, |
| 75 | }); | 88 | }); |
| 76 | </script> | 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,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 | field: 'dingtalk', | 124 | field: 'dingtalk', |
| 118 | label: '钉钉', | 125 | label: '钉钉', |
| 119 | component: 'Input', | 126 | component: 'Input', |
| @@ -25,7 +25,6 @@ | @@ -25,7 +25,6 @@ | ||
| 25 | const recordInfo = ref<any>({}); | 25 | const recordInfo = ref<any>({}); |
| 26 | 26 | ||
| 27 | const [register, { closeModal, setModalProps }] = useModalInner(async (data) => { | 27 | const [register, { closeModal, setModalProps }] = useModalInner(async (data) => { |
| 28 | - console.log(123131, data); | ||
| 29 | setModalProps({ confirmLoading: false, loading: true }); | 28 | setModalProps({ confirmLoading: false, loading: true }); |
| 30 | isUpdate.value = data?.isUpdate; | 29 | isUpdate.value = data?.isUpdate; |
| 31 | recordInfo.value = data?.record; | 30 | recordInfo.value = data?.record; |
| @@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
| 78 | </template> | 78 | </template> |
| 79 | <template #action="{ record }"> | 79 | <template #action="{ record }"> |
| 80 | <Button type="link" :disabled="categoryId === record.id" @click="handleChecked(record)">{{ | 80 | <Button type="link" :disabled="categoryId === record.id" @click="handleChecked(record)">{{ |
| 81 | - categoryId === record.id ? '已选择' : '选择' | 81 | + categoryId === record?.id ? '已选择' : '选择' |
| 82 | }}</Button> | 82 | }}</Button> |
| 83 | </template> | 83 | </template> |
| 84 | </BasicTable> | 84 | </BasicTable> |
| @@ -58,7 +58,6 @@ | @@ -58,7 +58,6 @@ | ||
| 58 | importCsvDeviceProfileId, | 58 | importCsvDeviceProfileId, |
| 59 | excelExport, | 59 | excelExport, |
| 60 | } from '/@/api/device/modelOfMatter'; | 60 | } from '/@/api/device/modelOfMatter'; |
| 61 | - // import XLSX, { CellObject } from 'xlsx'; | ||
| 62 | import { useLoading } from '/@/components/Loading'; | 61 | import { useLoading } from '/@/components/Loading'; |
| 63 | import JSONImage from '/@/assets/svg/JSON.svg'; | 62 | import JSONImage from '/@/assets/svg/JSON.svg'; |
| 64 | import CSVImage from '/@/assets/svg/excel.svg'; | 63 | import CSVImage from '/@/assets/svg/excel.svg'; |