diff --git a/src/views/notice/Config/Log/index.vue b/src/views/notice/Config/Log/index.vue
index 9f8e3fb8..6b151f60 100644
--- a/src/views/notice/Config/Log/index.vue
+++ b/src/views/notice/Config/Log/index.vue
@@ -38,8 +38,8 @@
@@ -51,6 +51,7 @@ import configApi from '@/api/notice/config';
import { PropType } from 'vue';
import moment from 'moment';
import { Modal } from 'ant-design-vue';
+import Record from '../../Template/Log/components/Record.vue'
type Emits = {
(e: 'update:visible', data: boolean): void;
@@ -152,19 +153,46 @@ const handleError = (e: any) => {
/**
* 查看详情
*/
-const handleDetail = (e: any) => {
- Modal.info({
+const handleDetail = (data: any) => {
+ if(Object.keys(data.context).length == 0){
+ Modal.info({
title: '详情信息',
content: h(
- 'p',
+ "p",
{
+
style: {
maxHeight: '300px',
overflowY: 'auto',
},
},
- JSON.stringify(e),
+ '模板中不存在变量'
),
});
+ }else{
+ Modal.info({
+ title: '详情信息',
+ content: h(
+ Record,
+ {
+ data:data,
+ style: {
+ maxHeight: '300px',
+ overflowY: 'auto',
+ },
+ },
+ ),
+ });
+ }
};
+
diff --git a/src/views/notice/Template/Log/components/Record.vue b/src/views/notice/Template/Log/components/Record.vue
index c217a176..f4c10fa8 100644
--- a/src/views/notice/Template/Log/components/Record.vue
+++ b/src/views/notice/Template/Log/components/Record.vue
@@ -27,7 +27,6 @@ const replaceData = async (data: any) => {
context.value = data.context
if (context.value.detailJson) {
context.value.detailJson = context.value.detailJson.replace(/\\\"/g, '\"')
-
}
if (context.value.hasOwnProperty('userIdList') || context.value.hasOwnProperty('toUser')) {
templateApi.getUser(
diff --git a/src/views/notice/Template/Log/index.vue b/src/views/notice/Template/Log/index.vue
index 53092c5b..8b66da5b 100644
--- a/src/views/notice/Template/Log/index.vue
+++ b/src/views/notice/Template/Log/index.vue
@@ -34,7 +34,7 @@
@@ -148,8 +148,24 @@ const handleError = (e: any) => {
/**
* 查看详情
*/
-const handleDetail = (data:any) => {
- Modal.info({
+ const handleDetail = (data: any) => {
+ if(Object.keys(data.context).length == 0){
+ Modal.info({
+ title: '详情信息',
+ content: h(
+ "p",
+ {
+
+ style: {
+ maxHeight: '300px',
+ overflowY: 'auto',
+ },
+ },
+ '模板中不存在变量'
+ ),
+ });
+ }else{
+ Modal.info({
title: '详情信息',
content: h(
Record,
@@ -162,5 +178,16 @@ const handleDetail = (data:any) => {
},
),
});
+ }
};
+