diff --git a/src/api/merchant.js b/src/api/merchant.js index 181f9cf..895d5c0 100644 --- a/src/api/merchant.js +++ b/src/api/merchant.js @@ -561,6 +561,20 @@ const merchant = { data: data }); }, + finshReply: async (data) => { + return request({ + url: '/index/task/finshReply', + method: Method.POST, + data: data + }); + }, + getBackinfo: async (data) => { + return request({ + url: '/index/task/getBackinfo', + method: Method.POST, + data: data + }); + }, } export default merchant; diff --git a/src/components/Chat/Information.vue b/src/components/Chat/Information.vue index 782e807..59e3398 100644 --- a/src/components/Chat/Information.vue +++ b/src/components/Chat/Information.vue @@ -19,6 +19,7 @@ const {task} = defineProps({ default: {} } }); +let tempPage = 0; const po = reactive({ id: task.id, }); @@ -38,9 +39,16 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({ callback: (data) => { if (data.rows.length === 0) { } else { + tempPage = pagination.current; vo.info = data.info; vo.total = data.total; vo.rows.push(...data.rows); + vo.rows = Array.from( + vo.rows.reduce((map, item) => { + map.set(item.id, item); + return map; + }, new Map()).values() + ) } } }); @@ -53,7 +61,7 @@ const send = async () => { Message.success(msg); form.content = null; form.images.length = 0; - await fetchData(); + pagination.current = tempPage; } const handleScroll = ({target}) => { @@ -96,6 +104,10 @@ const addIntervention = async () => { +
+ {{ v.status_text }} +
已读
@@ -220,4 +232,21 @@ const addIntervention = async () => { .chat-left { } + +.text_info { + font-size: 12px; + margin-top: 10px; +} + +.text_success { + color: rgba(0, 180, 42, 1); +} + +.text_warn { + color: rgba(255, 125, 0, 1); +} + +.text_error { + color: rgba(245, 63, 63, 1); +} diff --git a/src/components/Chat/index.vue b/src/components/Chat/index.vue index 58027d8..86ed20f 100644 --- a/src/components/Chat/index.vue +++ b/src/components/Chat/index.vue @@ -1,8 +1,12 @@