update: 修复测试短信发送成功后弹窗不关闭的问题

This commit is contained in:
puhui999 2023-03-21 16:46:16 +08:00
parent 6e90bbe2e1
commit 16c4bb5dca
3 changed files with 12 additions and 14 deletions

View File

@ -1,7 +1,5 @@
/* eslint-disable */ // generated by unplugin-vue-components
/* prettier-ignore */ // We suggest you to commit this file into source control
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core' import '@vue/runtime-core'
@ -23,8 +21,6 @@ declare module '@vue/runtime-core' {
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default'] DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElBadge: typeof import('element-plus/es')['ElBadge'] ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
@ -54,7 +50,6 @@ declare module '@vue/runtime-core' {
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
@ -69,15 +64,12 @@ declare module '@vue/runtime-core' {
ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs'] ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag'] ElTag: typeof import('element-plus/es')['ElTag']
ElTimeline: typeof import('element-plus/es')['ElTimeline']
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTransfer: typeof import('element-plus/es')['ElTransfer']
ElTree: typeof import('element-plus/es')['ElTree'] ElTree: typeof import('element-plus/es')['ElTree']
@ -105,6 +97,7 @@ declare module '@vue/runtime-core' {
ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default'] ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default']
Search: typeof import('./../components/Search/src/Search.vue')['default'] Search: typeof import('./../components/Search/src/Search.vue')['default']
SignalAndMessage: typeof import('./../components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue')['default'] SignalAndMessage: typeof import('./../components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue')['default']
Src: typeof import('./../components/RightToolbar/src/index.vue')['default']
Sticky: typeof import('./../components/Sticky/src/Sticky.vue')['default'] Sticky: typeof import('./../components/Sticky/src/Sticky.vue')['default']
Table: typeof import('./../components/Table/src/Table.vue')['default'] Table: typeof import('./../components/Table/src/Table.vue')['default']
Tooltip: typeof import('./../components/Tooltip/src/Tooltip.vue')['default'] Tooltip: typeof import('./../components/Tooltip/src/Tooltip.vue')['default']

View File

@ -1,5 +1,6 @@
<template> <template>
<Dialog :title="modelTitle" v-model="modelVisible"> <Dialog :title="modelTitle" v-model="modelVisible">
<!-- 修改/新增 -->
<el-form <el-form
v-if="['template.addTitle', 'template.updtaeTitle'].includes(formType)" v-if="['template.addTitle', 'template.updtaeTitle'].includes(formType)"
ref="formRef" ref="formRef"
@ -55,6 +56,7 @@
<el-input v-model="formData.remark" placeholder="请输入备注" /> <el-input v-model="formData.remark" placeholder="请输入备注" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 短信测试 -->
<el-form <el-form
v-if="formType === 'template.sendSms'" v-if="formType === 'template.sendSms'"
ref="sendSmsFormRef" ref="sendSmsFormRef"
@ -152,7 +154,9 @@ const sendSmsFormRef = ref()
/** 打开弹窗 */ /** 打开弹窗 */
interface openModalOption { interface openModalOption {
type: string type: string
// id
id?: '' id?: ''
// row
row?: any row?: any
} }
const openModal = async (option: openModalOption) => { const openModal = async (option: openModalOption) => {
@ -188,16 +192,16 @@ const openModal = async (option: openModalOption) => {
} }
defineExpose({ openModal }) // openModal defineExpose({ openModal }) // openModal
/** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
/** 提交表单 */
const submitForm = async () => { const submitForm = async () => {
formLoading.value = true
//
if (['template.addTitle', 'template.updtaeTitle'].includes(formType.value)) { if (['template.addTitle', 'template.updtaeTitle'].includes(formType.value)) {
// //
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
//
formLoading.value = true
try { try {
const data = formData.value as templateApi.SmsTemplateVO const data = formData.value as templateApi.SmsTemplateVO
if (formType.value === 'template.addTitle') { if (formType.value === 'template.addTitle') {
@ -258,5 +262,6 @@ const sendSmsTest = async () => {
message.success('提交发送成功!发送结果,见发送日志编号:' + res) message.success('提交发送成功!发送结果,见发送日志编号:' + res)
} }
formLoading.value = false formLoading.value = false
modelVisible.value = false
} }
</script> </script>