diff --git a/src/views/notice/Config/SyncUser/index.vue b/src/views/notice/Config/SyncUser/index.vue index 5c3b88d7..e7b91266 100644 --- a/src/views/notice/Config/SyncUser/index.vue +++ b/src/views/notice/Config/SyncUser/index.vue @@ -47,7 +47,7 @@ total: dataSource.length, current: current, pageSize: pageSize, - pageSizeOptions: ['10', '20', '50', '100'], + pageSizeOptions: ['12', '24', '48', '96'], showSizeChanger: true, hideOnSinglePage: false, showTotal: (total: number, range: number) => `第 ${range[0]} - ${range[1]} 条/总共 ${total} 条`, @@ -209,7 +209,7 @@ watch( const onTreeSelect = (keys: any) => { if (keys.length) { deptId.value = keys[0]; - pageSize.value = 10; + pageSize.value = 12; current.value = 1; } }; @@ -401,7 +401,7 @@ const getTableData = (terms?: any) => { * 前端分页 */ const current = ref(1); -const pageSize = ref(10); +const pageSize = ref(12); const handleTableChange = (pagination: any) => { current.value = pagination.current; pageSize.value = pagination.pageSize; diff --git a/src/views/notice/Template/Log/components/Record.vue b/src/views/notice/Template/Log/components/Record.vue new file mode 100644 index 00000000..6e4e10d8 --- /dev/null +++ b/src/views/notice/Template/Log/components/Record.vue @@ -0,0 +1,56 @@ + + + + \ No newline at end of file diff --git a/src/views/notice/Template/Log/index.vue b/src/views/notice/Template/Log/index.vue index 77762a71..53092c5b 100644 --- a/src/views/notice/Template/Log/index.vue +++ b/src/views/notice/Template/Log/index.vue @@ -35,7 +35,7 @@ @@ -47,7 +47,7 @@ import templateApi from '@/api/notice/template'; import { PropType } from 'vue'; import moment from 'moment'; import { Modal } from 'jetlinks-ui-components'; -import JsonViewer from 'vue-json-viewer'; +import Record from './components/Record.vue' type Emits = { (e: 'update:visible', data: boolean): void; }; @@ -127,31 +127,6 @@ const handleSearch = (e: any) => { params.value = e; }; -const typeObj = { - weixin: 'wechat', - dingTalk: 'dingtalk', -}; -/** - * 查看用户名 - */ -const userList = ref([]) -const departmentList = ref([]) -const queryUser = (id:any,notifyType:any,goal:any) =>{ - goal ==='user' ? templateApi.getUser( - typeObj[notifyType], - id, - ).then((res:any)=>{ - if(res.status === 200){ - userList.value = res.result - } - }) : templateApi.getDept(typeObj[notifyType], - id,).then((res:any)=>{ - if(res.status === 200){ - departmentList.value = res.result - } - }) -} - /** * 查看错误信息 */ @@ -173,25 +148,13 @@ const handleError = (e: any) => { /** * 查看详情 */ -const handleDetail =async (e: any,data:any) => { - if(e.hasOwnProperty('userIdList')){ - await queryUser(data.notifierId,data.notifyType,'user') - userList.value.forEach((item:any)=>{ - item.id === e.userIdList ? e.userIdList = item.name : '' - }) - } - if(e.hasOwnProperty('departmentIdList')){ - - } - +const handleDetail = (data:any) => { Modal.info({ title: '详情信息', content: h( - JsonViewer, + Record, { - value:JSON.stringify(e,null,1), - expanded:"true", - expandDepth:"4", + data:data, style: { maxHeight: '300px', overflowY: 'auto',