Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8aeed477a9
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<j-modal :width="'900px'" visible @cancel="emit('close')">
|
||||
<j-modal :width="'900px'" visible @cancel="emit('close')" :zIndex="1100">
|
||||
<template v-if="getType === 'notifier-dingTalk'">
|
||||
<j-spin :spinning="loading">
|
||||
<div class="code" style="height: 600px;">
|
||||
|
@ -44,6 +44,7 @@ import {
|
|||
} from '@/api/account/notificationSubscription';
|
||||
|
||||
const emit = defineEmits(['close', 'save']);
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
// 外层数据
|
||||
|
@ -103,6 +104,7 @@ const updateIframeStyle = () => {
|
|||
'#notifier_iframe',
|
||||
) as HTMLIFrameElement;
|
||||
iframe.onload = () => {
|
||||
console.log(iframe?.contentWindow)
|
||||
const currentUrl = iframe?.contentWindow?.location?.search || '';
|
||||
let authCode = '';
|
||||
if (currentUrl.startsWith('?')) {
|
||||
|
|
|
@ -75,17 +75,20 @@ const onBind = () => {
|
|||
} else {
|
||||
visible.value = true
|
||||
}
|
||||
emit('close')
|
||||
|
||||
};
|
||||
|
||||
const onSave = () => {
|
||||
editInfoVisible.value = false;
|
||||
user.getUserInfo();
|
||||
emit('save', props.current);
|
||||
emit('close')
|
||||
};
|
||||
|
||||
const onBindSave = () => {
|
||||
visible.value = false
|
||||
emit('save', props.current);
|
||||
emit('close')
|
||||
}
|
||||
|
||||
const handleSearch = async () => {
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { useUserInfo } from '@/store/userInfo';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import EditInfo from '../../EditInfo/index.vue';
|
||||
import Bind from './Bind.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;
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<template>
|
||||
<JsonViewer :value=context :expanded="true" :expandDepth="4"></JsonViewer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import JsonViewer from 'vue-json-viewer';
|
||||
import templateApi from '@/api/notice/template';
|
||||
const props = defineProps({
|
||||
data: Object
|
||||
})
|
||||
const typeObj = {
|
||||
weixin: 'wechat',
|
||||
dingTalk: 'dingtalk',
|
||||
};
|
||||
/**
|
||||
* 查看用户名
|
||||
*/
|
||||
const userList = ref([])
|
||||
const departmentList = ref([])
|
||||
const detailData = ref();
|
||||
const context = ref()
|
||||
/**
|
||||
* 改变部门和用户
|
||||
*/
|
||||
const replaceData = async (data: any) => {
|
||||
detailData.value = data
|
||||
context.value = data.context
|
||||
if (context.value.hasOwnProperty('userIdList') || context.value.hasOwnProperty('toUser')) {
|
||||
templateApi.getUser(
|
||||
typeObj[detailData.value.notifyType],
|
||||
detailData.value.notifierId,
|
||||
).then((res: any) => {
|
||||
if (res.status === 200) {
|
||||
userList.value = res.result
|
||||
userList.value.forEach((item: any) => {
|
||||
item.id === context.value?.userIdList ? context.value.userIdList = item.name : ''
|
||||
item.id === context.value?.toUser ? context.value.toUser = item.name : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (context.value.hasOwnProperty('departmentIdList')) {
|
||||
templateApi.getDept(typeObj[detailData.value.notifyType],
|
||||
detailData.value.notifierId).then((res: any) => {
|
||||
if (res.status === 200) {
|
||||
departmentList.value = res.result
|
||||
departmentList.value.forEach((item: any) => {
|
||||
item.id === context.value.departmentIdList ? context.value.departmentIdList = item.name : ''
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
replaceData(props.data)
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
|
@ -35,7 +35,7 @@
|
|||
<AIcon
|
||||
type="ExclamationCircleOutlined"
|
||||
style="color: #1d39c4; cursor: pointer"
|
||||
@click="handleDetail(slotProps.context,slotProps)"
|
||||
@click="handleDetail(slotProps)"
|
||||
/>
|
||||
</template>
|
||||
</JProTable>
|
||||
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue