浏览代码

🎨 feat<报表管理>:通知名称修改

xinyan 9 月之前
父节点
当前提交
741e3bd1ab
共有 1 个文件被更改,包括 11 次插入8 次删除
  1. 11 8
      src/views/reportManage/TaskManage/index.vue

+ 11 - 8
src/views/reportManage/TaskManage/index.vue

@@ -404,7 +404,7 @@ function updateUserCancel() {
 }
 
 // 指定人通知
-function noticePerson() {
+async function noticePerson() {
   const $grid = xGrid.value;
   if ($grid) {
     const selectRecords = $grid.getCheckboxRecords();
@@ -414,17 +414,20 @@ function noticePerson() {
       message: noticeMessage.value,
     };
     try {
-      const resp = postNoticePerson(obj);
-      if (resp.code === 2000) {
+      const response = await postNoticePerson(obj);
+      if (response.code === 2000) {
         ElMessage.success('通知成功');
+        noticeDialogFormVisible.value = false; // 关闭弹窗
+      } else {
+        ElMessage.error('通知失败');
       }
-      noticeDialogFormVisible.value = false; // 关闭弹窗
     } catch (error) {
-      console.error('通知失败', error);
+      ElMessage.error('通知失败');
     }
   }
 }
 
+
 function noticePersonCancel() {
   noticeMessage.value = null;
   noticeDialogFormVisible.value = false; // 关闭弹窗
@@ -825,8 +828,8 @@ onMounted(() => {
         </template>
         <template #toolbar_tools>
           <div class="pr-2.5">
-            <el-tooltip content="指定任务发送通知" placement="top">
-              <vxe-button v-if="!isDeleteDisabled" plain circle type="warning" icon="vxe-icon-envelope" @click="noticeDialogFormVisible =true"></vxe-button>
+            <el-tooltip content="指定店铺发送通知" placement="top">
+              <vxe-button v-if="!isDeleteDisabled" plain circle icon="vxe-icon-envelope" @click="noticeDialogFormVisible =true"></vxe-button>
             </el-tooltip>
             <el-tooltip content="保存" placement="top">
               <vxe-button circle icon="vxe-icon-save" @click="saveEvent"></vxe-button>
@@ -1049,7 +1052,7 @@ onMounted(() => {
     </template>
   </el-dialog>
   <el-dialog v-model="noticeDialogFormVisible" align-center
-             style="border-radius: 10px;" title="指定任务发送通知" width="500">
+             style="border-radius: 10px;" title="指定店铺发送通知" width="500">
     <el-form-item align-center label="消息内容:" width="500">
       <el-input v-model="noticeMessage" type="textarea"></el-input>
     </el-form-item>