From 9abc42de68e54af8dfd3ad0479c0f63132a4095c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=95=A6C=E6=A2=A6?= <15709267061@163.com> Date: Sat, 21 Jun 2025 19:27:06 +0800 Subject: [PATCH] update --- src/api/admin.js | 63 ++++++++ src/api/merchant.js | 7 + src/components/Chat/Information.vue | 21 ++- src/components/Chat/index.vue | 14 +- src/components/Comment/index.vue | 5 +- .../PreviewTaskModal/PreviewTaskModal.vue | 137 ++++++++++++++---- .../components/RejectTaskModal.vue | 6 +- .../manage-reward-mission/subtask-review.vue | 12 +- .../exemption-from-audit-review.vue | 15 +- .../message-center/platform-intervention.vue | 48 +++++- src/pages/merchant/components/AddComment.vue | 10 +- src/pages/merchant/components/AddMaterial.vue | 9 +- .../components/look-backfill-modal.vue | 48 +++--- .../pages/communication-center/index.vue | 7 +- .../task-center/components/Settlement.vue | 61 ++++++-- .../pages/task-center/look-min-task.vue | 2 +- src/router/index.js | 4 +- 17 files changed, 370 insertions(+), 99 deletions(-) diff --git a/src/api/admin.js b/src/api/admin.js index 4a2d8ec..f03c9ca 100644 --- a/src/api/admin.js +++ b/src/api/admin.js @@ -714,6 +714,69 @@ const admin = { data: data, }); }, + addChildrenComment: async (data) => { + return request({ + url: '/admin/TaskChildren/addChildrenComment', + method: Method.POST, + data: data, + }); + }, + getChildrenComment: async (id) => { + return request({ + url: '/admin/TaskChildren/getChildrenComment', + method: Method.POST, + data: {id}, + }); + }, + delChildrenComment: async (id) => { + return request({ + url: '/admin/TaskChildren/delChildrenComment', + method: Method.POST, + data: {id}, + }); + }, + passChildrenMaterial: async (data) => { + return request({ + url: '/admin/TaskChildren/passChildrenMaterial', + method: Method.POST, + data: data, + }); + }, + getBackinfo: async (data) => { + return request({ + url: '/admin/intervention/getBackinfo', + method: Method.POST, + data: data, + }); + }, + checkSettlement: async (data) => { + return request({ + url: '/admin/intervention/checkSettlement', + method: Method.POST, + data: data, + }); + }, + settlement: async (data) => { + return request({ + url: '/admin/intervention/settlement', + method: Method.POST, + data: data, + }); + }, + editStatus: async (data) => { + return request({ + url: '/admin/intervention/editStatus', + method: Method.POST, + data: data, + }); + }, + stopTaskChildren: async (id) => { + return request({ + url: '/admin/TaskChildren/stopTaskChildren', + method: Method.POST, + data: {id}, + }); + }, } export default admin; diff --git a/src/api/merchant.js b/src/api/merchant.js index 895d5c0..1dc563a 100644 --- a/src/api/merchant.js +++ b/src/api/merchant.js @@ -575,6 +575,13 @@ const merchant = { data: data }); }, + intervention: async (data) => { + return request({ + url: '/index/task/intervention', + method: Method.POST, + data: data + }); + }, } export default merchant; diff --git a/src/components/Chat/Information.vue b/src/components/Chat/Information.vue index 59e3398..ab504a5 100644 --- a/src/components/Chat/Information.vue +++ b/src/components/Chat/Information.vue @@ -79,6 +79,13 @@ const addIntervention = async () => { await fetchData(); emits('success') } + +const intervention = async () => { + const {msg} = await Api.merchant.intervention({...form, id: task.id}); + Message.success(msg); + await fetchData(); + emits('success') +} 发送 - + diff --git a/src/components/Chat/index.vue b/src/components/Chat/index.vue index 86ed20f..62e3d3c 100644 --- a/src/components/Chat/index.vue +++ b/src/components/Chat/index.vue @@ -5,7 +5,9 @@ import Information from "./Information.vue"; import dayjs from "dayjs"; import Api from "../../api/index.js"; import {Message} from "@arco-design/web-vue"; +import {useSystemStore} from "../../pinia/SystemStore/index.js"; +const SystemStore = useSystemStore(); const InformationRef = ref(); const {task} = defineProps({ task: { @@ -57,16 +59,18 @@ const changeStatus = async () => {
-
进度管理
- - +
进度管理
创建时间
{{ dayjs(task.createtime * 1000).format('MM-DD HH:mm') }}
任务编号
-
{{ task.taskcode }}
+
{{ task?.taskcode || task.m_code }}
子任务编号
{{ task.uid }}
子任务状态
diff --git a/src/components/Comment/index.vue b/src/components/Comment/index.vue index 50469a2..9eb96fe 100644 --- a/src/components/Comment/index.vue +++ b/src/components/Comment/index.vue @@ -2,8 +2,10 @@ import {computed} from "vue"; import Api from "../../api/index.js"; import {Message} from "@arco-design/web-vue"; +import {useSystemStore} from "../../pinia/SystemStore/index.js"; const emits = defineEmits(['success']); +const SystemStore = useSystemStore(); const {data, hideDelete} = defineProps({ data: { type: Object, @@ -16,7 +18,8 @@ const {data, hideDelete} = defineProps({ }); const list = computed(() => data?.flatMap(v => v.children ? [v, ...v.children] : [v])); const del = async (id) => { - const {msg} = await Api.merchant.delChildrenComment(id); + const api = SystemStore.isRoot ? Api.admin.delChildrenComment : Api.merchant.delChildrenComment; + const {msg} = await api(id); Message.success(msg); emits('success'); } diff --git a/src/components/PreviewTaskModal/PreviewTaskModal.vue b/src/components/PreviewTaskModal/PreviewTaskModal.vue index dccbcbc..1310edd 100644 --- a/src/components/PreviewTaskModal/PreviewTaskModal.vue +++ b/src/components/PreviewTaskModal/PreviewTaskModal.vue @@ -5,8 +5,12 @@ import Api from "../../api/index.ts"; import {Message} from "@arco-design/web-vue"; import Comment from "../Comment/index.vue"; import Talk from "../Talk/index.vue"; +import AddMaterial from "../../pages/merchant/components/AddMaterial.vue"; +import AddComment from "../../pages/merchant/components/AddComment.vue"; +import RejectTaskModal from "../../pages/manage/pages/manage-reward-mission/components/RejectTaskModal.vue"; const emits = defineEmits(['success']); +const selecdKey = ref([]); const {id} = defineProps({ id: { type: Number, @@ -17,22 +21,65 @@ const visible = ref(false); const detail = reactive({}); const activeKey = ref(0); +const getData = async (update) => { + Api.admin.getTaskChildrenInfo(id).then(({data}) => { + if (update) { + detail.content.forEach((v, index) => { + v.comment = data.content[index].comment; + }); + } else { + Object.assign(detail, data); + } + }); +} + watch( () => visible.value, (val) => { - if (val) Api.admin.getTaskChildrenInfo(id).then(({data}) => { - Object.assign(detail, data); - console.log('我看看我看看', data); - }); + if (val) getData(); }, {deep: true} ) const passTaskChildren = async () => { - const {code, msg} = await Api.admin.passTaskChildren(id); - if (code === 1) Message.success(msg); - visible.value = false; - emits('success'); + console.log(selecdKey.value); + + const pro_list = []; + if (selecdKey.value.length === 0) { + pro_list.push(new Promise((reactive, reject) => { + Api.admin.passChildrenMaterial(detail.content[activeKey.value]).then((res) => { + reactive(res); + }).catch((err) => { + reject(err); + }) + })); + } + selecdKey.value.forEach(v => { + pro_list.push(new Promise((reactive, reject) => { + Api.admin.passChildrenMaterial(v).then((res) => { + reactive(res); + }).catch((err) => { + reject(err); + }) + })); + }) + + const res = await Promise.all(pro_list); + + let flag = true; + + for (const v of res) { + if (v.code !== 1) { + Message.warning(v.msg) + flag = false; + } + } + + if (flag) { + Message.success(res[0].msg); + visible.value = false; + emits('success'); + } } const refuseTaskChildren = async () => { @@ -57,41 +104,66 @@ const refuseTaskChildren = async () => { - - + + - + - - + + -
+
-
-
- 暂无素材 + +
+ +
添加
+
+
-
- +
+
+ +
+ + + +
添加评论
+
+
@@ -100,16 +172,25 @@ const refuseTaskChildren = async () => {