|
@@ -9,13 +9,14 @@ import {
|
|
|
getTasks,
|
|
|
postCreateTask,
|
|
|
postDeleteTask,
|
|
|
+ postNoticePerson,
|
|
|
postSendMessage,
|
|
|
postUpdateManyTask,
|
|
|
postUpdateTask,
|
|
|
postUpdateTaskStatus
|
|
|
} from '/src/views/reportManage/TaskManage/api.ts';
|
|
|
import { ComponentSize, ElMessage, FormInstance, FormRules } from 'element-plus';
|
|
|
-import { Delete, Plus } from '@element-plus/icons-vue';
|
|
|
+import { Delete, Message, Plus } from '@element-plus/icons-vue';
|
|
|
import { dateType, requiredFields } from '/@/views/reportManage/TaskManage/utils/enum';
|
|
|
import { taskColumns } from '/@/views/reportManage/TaskManage/utils/columns';
|
|
|
|
|
@@ -84,6 +85,10 @@ const rules = reactive<FormRules>({
|
|
|
const userDialogFormVisible = ref(false);
|
|
|
const updateSelect = ref(1);
|
|
|
|
|
|
+//发送通知弹窗
|
|
|
+const noticeDialogFormVisible = ref(false);
|
|
|
+const noticeMessage = ref(null);
|
|
|
+
|
|
|
//表格
|
|
|
interface RowVO {
|
|
|
platformNumber: string;
|
|
@@ -398,6 +403,33 @@ function updateUserCancel() {
|
|
|
userDialogFormVisible.value = false;
|
|
|
}
|
|
|
|
|
|
+// 指定人通知
|
|
|
+function noticePerson() {
|
|
|
+ const $grid = xGrid.value;
|
|
|
+ if ($grid) {
|
|
|
+ const selectRecords = $grid.getCheckboxRecords();
|
|
|
+ const selectedIds = selectRecords.map(record => record.id);
|
|
|
+ const obj = {
|
|
|
+ task_list: selectedIds,
|
|
|
+ message: noticeMessage.value,
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ const resp = postNoticePerson(obj);
|
|
|
+ if (resp.code === 2000) {
|
|
|
+ ElMessage.success('通知成功');
|
|
|
+ }
|
|
|
+ noticeDialogFormVisible.value = false; // 关闭弹窗
|
|
|
+ } catch (error) {
|
|
|
+ console.error('通知失败', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function noticePersonCancel() {
|
|
|
+ noticeMessage.value = null;
|
|
|
+ noticeDialogFormVisible.value = false; // 关闭弹窗
|
|
|
+}
|
|
|
+
|
|
|
// 删除任务
|
|
|
async function deleteTask() {
|
|
|
const $grid = xGrid.value;
|
|
@@ -793,6 +825,9 @@ 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>
|
|
|
<el-tooltip content="保存" placement="top">
|
|
|
<vxe-button circle icon="vxe-icon-save" @click="saveEvent"></vxe-button>
|
|
|
</el-tooltip>
|
|
@@ -928,7 +963,6 @@ onMounted(() => {
|
|
|
<template #vatCompany_edit="{ row }">
|
|
|
<vxe-input v-model="row.vatCompany"></vxe-input>
|
|
|
</template>
|
|
|
- /
|
|
|
</vxe-grid>
|
|
|
</el-card>
|
|
|
</div>
|
|
@@ -1014,6 +1048,18 @@ onMounted(() => {
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog v-model="noticeDialogFormVisible" align-center
|
|
|
+ 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>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="noticePersonCancel">取消</el-button>
|
|
|
+ <el-button type="primary" @click="noticePerson"> 确认</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<style scoped>
|