fix: bug#16267
This commit is contained in:
parent
6a1badafe6
commit
8956f8eae8
|
@ -5,7 +5,7 @@ export const getTreeData_api = (data: object) => server.post(`/organization/_all
|
||||||
// 新增部门
|
// 新增部门
|
||||||
export const addDepartment_api = (data: object) => server.post(`/organization`, data);
|
export const addDepartment_api = (data: object) => server.post(`/organization`, data);
|
||||||
// 更新部门
|
// 更新部门
|
||||||
export const updateDepartment_api = (data: object) => server.patch(`/organization`, data);
|
export const updateDepartment_api = (data: any) => server.put(`/organization/${data.id}`, data);
|
||||||
// 删除部门
|
// 删除部门
|
||||||
export const delDepartment_api = (id: string) => server.remove(`/organization/${id}`);
|
export const delDepartment_api = (id: string) => server.remove(`/organization/${id}`);
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<j-form-item
|
<j-form-item
|
||||||
name='configId'
|
:name="formData.provider === 'dingTalkRobotWebHook'? '':'configId'"
|
||||||
v-if="formData.type !== 'email'"
|
v-if="formData.type !== 'email'"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<AIcon
|
<AIcon
|
||||||
type="ExclamationCircleOutlined"
|
type="ExclamationCircleOutlined"
|
||||||
style="color: #1d39c4; cursor: pointer"
|
style="color: #1d39c4; cursor: pointer"
|
||||||
@click="handleDetail(slotProps.context)"
|
@click="handleDetail(slotProps.context,slotProps)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</JProTable>
|
</JProTable>
|
||||||
|
@ -51,7 +51,7 @@ import templateApi from '@/api/notice/template';
|
||||||
import { PropType } from 'vue';
|
import { PropType } from 'vue';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Modal } from 'jetlinks-ui-components';
|
import { Modal } from 'jetlinks-ui-components';
|
||||||
|
import JsonViewer from 'vue-json-viewer';
|
||||||
type Emits = {
|
type Emits = {
|
||||||
(e: 'update:visible', data: boolean): void;
|
(e: 'update:visible', data: boolean): void;
|
||||||
};
|
};
|
||||||
|
@ -131,6 +131,31 @@ const handleSearch = (e: any) => {
|
||||||
params.value = e;
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看错误信息
|
* 查看错误信息
|
||||||
*/
|
*/
|
||||||
|
@ -152,18 +177,30 @@ const handleError = (e: any) => {
|
||||||
/**
|
/**
|
||||||
* 查看详情
|
* 查看详情
|
||||||
*/
|
*/
|
||||||
const handleDetail = (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')){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Modal.info({
|
Modal.info({
|
||||||
title: '详情信息',
|
title: '详情信息',
|
||||||
content: h(
|
content: h(
|
||||||
'p',
|
JsonViewer,
|
||||||
{
|
{
|
||||||
|
value:JSON.stringify(e,null,1),
|
||||||
|
expanded:"true",
|
||||||
|
expandDepth:"4",
|
||||||
style: {
|
style: {
|
||||||
maxHeight: '300px',
|
maxHeight: '300px',
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
JSON.stringify(e),
|
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue