fix: 通知管理优化

This commit is contained in:
JiangQiming 2023-02-21 20:06:13 +08:00
parent ee89ea27b0
commit 7a220d2c1e
6 changed files with 54 additions and 14 deletions

View File

@ -12,6 +12,7 @@
<a-select
v-model:value="formData.type"
placeholder="请选择通知方式"
:disabled="!!formData.id"
>
<a-select-option
v-for="(item, index) in NOTICE_METHOD"
@ -437,7 +438,8 @@ getDetail();
*/
const btnLoading = ref<boolean>(false);
const handleSubmit = () => {
validate()
const form = useForm(formData.value, formRules.value);
form.validate()
.then(async () => {
// console.log('formData.value: ', formData.value);
btnLoading.value = true;

View File

@ -94,7 +94,7 @@ const columns = [
search: {
type: 'date',
handleValue: (v: any) => {
return '123';
return v;
},
},
},
@ -110,7 +110,7 @@ const columns = [
{ label: '失败', value: 'error' },
],
handleValue: (v: any) => {
return '123';
return v;
},
},
},
@ -139,7 +139,16 @@ const handleSearch = (e: any) => {
const handleError = (e: any) => {
Modal.info({
title: '错误信息',
content: JSON.stringify(e),
content: h(
'p',
{
style: {
maxHeight: '300px',
overflowY: 'auto',
},
},
JSON.stringify(e),
),
});
};
/**
@ -148,7 +157,16 @@ const handleError = (e: any) => {
const handleDetail = (e: any) => {
Modal.info({
title: '详情信息',
content: JSON.stringify(e),
content: h(
'p',
{
style: {
maxHeight: '300px',
overflowY: 'auto',
},
},
JSON.stringify(e),
),
});
};
</script>

View File

@ -209,7 +209,7 @@ const columns = [
type: 'select',
options: NOTICE_METHOD,
handleValue: (v: any) => {
return '123';
return v;
},
},
},
@ -222,7 +222,7 @@ const columns = [
type: 'select',
options: providerList,
handleValue: (v: any) => {
return '123';
return v;
},
},
},

View File

@ -12,6 +12,7 @@
<a-select
v-model:value="formData.type"
placeholder="请选择通知方式"
:disabled="!!formData.id"
>
<a-select-option
v-for="(item, index) in NOTICE_METHOD"
@ -700,7 +701,8 @@ const handleSubmit = () => {
if (formData.value.template.messageType === 'markdown') delete formData.value.template.link
if (formData.value.template.messageType === 'link') delete formData.value.template.markdown
// console.log('formData.value: ', formData.value);
validate()
const form = useForm(formData.value, formRules.value);
form.validate()
.then(async () => {
formData.value.template.ttsCode =
formData.value.template.templateCode;

View File

@ -94,7 +94,7 @@ const columns = [
search: {
type: 'date',
handleValue: (v: any) => {
return '123';
return v;
},
},
},
@ -110,7 +110,7 @@ const columns = [
{ label: '失败', value: 'error' },
],
handleValue: (v: any) => {
return '123';
return v;
},
},
},
@ -139,7 +139,16 @@ const handleSearch = (e: any) => {
const handleError = (e: any) => {
Modal.info({
title: '错误信息',
content: JSON.stringify(e),
content: h(
'p',
{
style: {
maxHeight: '300px',
overflowY: 'auto',
},
},
JSON.stringify(e),
),
});
};
/**
@ -148,7 +157,16 @@ const handleError = (e: any) => {
const handleDetail = (e: any) => {
Modal.info({
title: '详情信息',
content: JSON.stringify(e),
content: h(
'p',
{
style: {
maxHeight: '300px',
overflowY: 'auto',
},
},
JSON.stringify(e),
),
});
};
</script>

View File

@ -196,7 +196,7 @@ const columns = [
type: 'select',
options: NOTICE_METHOD,
handleValue: (v: any) => {
return '123';
return v;
},
},
},
@ -209,7 +209,7 @@ const columns = [
type: 'select',
options: providerList,
handleValue: (v: any) => {
return '123';
return v;
},
},
},