Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
af6f78ebb2
|
@ -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 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}`);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
/>
|
||||
</j-form-item>
|
||||
<j-form-item
|
||||
name='configId'
|
||||
:name="formData.provider === 'dingTalkRobotWebHook'? '':'configId'"
|
||||
v-if="formData.type !== 'email'"
|
||||
>
|
||||
<template #label>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<AIcon
|
||||
type="ExclamationCircleOutlined"
|
||||
style="color: #1d39c4; cursor: pointer"
|
||||
@click="handleDetail(slotProps.context)"
|
||||
@click="handleDetail(slotProps.context,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';
|
||||
type Emits = {
|
||||
(e: 'update:visible', data: boolean): void;
|
||||
};
|
||||
|
@ -127,6 +127,31 @@ 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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看错误信息
|
||||
*/
|
||||
|
@ -148,18 +173,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({
|
||||
title: '详情信息',
|
||||
content: h(
|
||||
'p',
|
||||
JsonViewer,
|
||||
{
|
||||
value:JSON.stringify(e,null,1),
|
||||
expanded:"true",
|
||||
expandDepth:"4",
|
||||
style: {
|
||||
maxHeight: '300px',
|
||||
overflowY: 'auto',
|
||||
},
|
||||
},
|
||||
JSON.stringify(e),
|
||||
),
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue