From a7a39872acc4de13413bfcd19b54b394bc7257b6 Mon Sep 17 00:00:00 2001
From: xzg <4727863@qq.com>
Date: Thu, 31 Oct 2024 11:48:22 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/option/aftersales/vueTvemp.js | 11 +
.../aftersales/aftersalesWorkOrderInfo.vue | 121 +++++++---
.../aftersales/aftersalesWorkOrderTemp.vue | 206 +++++++++---------
.../aftersales/aftersalesWorkOrderend.vue | 100 +++++++--
4 files changed, 283 insertions(+), 155 deletions(-)
diff --git a/src/option/aftersales/vueTvemp.js b/src/option/aftersales/vueTvemp.js
index ed80601c..eb1ba70c 100644
--- a/src/option/aftersales/vueTvemp.js
+++ b/src/option/aftersales/vueTvemp.js
@@ -340,6 +340,17 @@ export const columnList = [
sortable: true,
head: false,
},
+ {
+ prop: 'ceator',
+ label: '创建人',
+ type: 1,
+ values: '',
+ width: '150',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ head: false,
+ },
{
prop: 'remarks',
diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue
index ad5a8260..08eb1d80 100644
--- a/src/views/aftersales/aftersalesWorkOrderInfo.vue
+++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue
@@ -567,7 +567,10 @@
处理结果
- 处理结果提交
+
+
{
// appeal.value && AppealReview.value,
// 文件识别
const Fileidentifier = val => {
- const url = val;
- const fileName = url.substring(url.lastIndexOf('/') + 1);
- const extension = fileName.substring(fileName.lastIndexOf('.') + 1);
- if (extension === 'mp4') {
- return 'mp4';
- }
- if (extension === 'png') {
- return 'png';
- }
- if (extension === 'docx') {
- return 'docx';
+ if (val) {
+ const url = val;
+ // 获取文件名
+ const fileName = url.substring(url.lastIndexOf('/') + 1);
+ // 获取文件扩展名
+ const extension = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
+
+ // 判断文件类型
+ if (extension === 'mp4') {
+ return 'mp4';
+ }
+ if (extension === 'png' || extension === 'jpg' || extension === 'jpeg') {
+ return 'image'; // 可以将 'png' 改为 'image' 来统一表示图片类型
+ }
+ if (extension === 'docx') {
+ return 'docx';
+ }
+
+ // 针对其他扩展名的情况返回 undefined
+ return undefined;
}
- return undefined; // 针对其他扩展名的情况返回 undefined
};
// 聊天记录获取
const Chathistory = res => {
@@ -1023,23 +1047,55 @@ const Chathistory = res => {
})
.then(res => {
MessageContent.value = []; //先清空内容,防止内容重复叠加
+ // res.data.data.surveyRecordEntities.forEach(item => {
+ // if (item.pictureUrl) {
+ // filetype = Fileidentifier(item.pictureUrl);
+ // }
+ // MessageContent.value.push({
+ // time: item.createTime, //时间
+ // content: item.processingResults, //消息内容
+ // name: item.addDepartment, //营业部名称
+ // username: item.processorName, //用户名
+ // img: filetype == 'image' ? item.pictureUrl : '',
+ // file: filetype == 'docx' ? item.pictureUrl : '',
+ // mp4: filetype == 'mp4' ? item.pictureUrl : '',
+ // imgList: [filetype === 'png' ? item.pictureUrl : ''],
+ // difference: item.difference,
+ // identifying: false, //待回复标识
+ // });
+ // });
+
res.data.data.surveyRecordEntities.forEach(item => {
- if (item.pictureUrl) {
- filetype = Fileidentifier(item.pictureUrl);
+ const filetype = Fileidentifier(item.pictureUrl);
+ console.log(filetype, '文件类型');
+
+ // 处理图片列表,根据分隔符(假设是 ';')拆分
+ let imgList = [];
+ if (filetype === 'image') {
+ // 如果包含多个图片URL,拆分处理
+ if (item.pictureUrl.includes(',')) {
+ imgList = item.pictureUrl.split(',').filter(url => url.trim() !== '');
+ } else {
+ // 单个图片的情况
+ imgList = [item.pictureUrl];
+ }
}
+
+ // 构造消息内容
MessageContent.value.push({
- time: item.createTime, //时间
- content: item.processingResults, //消息内容
- name: item.addDepartment, //营业部名称
- username: item.processorName, //用户名
- img: filetype == 'png' ? item.pictureUrl : '',
- file: filetype == 'docx' ? item.pictureUrl : '',
- mp4: filetype == 'mp4' ? item.pictureUrl : '',
- imgList: [filetype === 'png' ? item.pictureUrl : ''],
+ time: item.createTime, // 时间
+ content: item.processingResults, // 消息内容
+ name: item.addDepartment, // 营业部名称
+ username: item.processorName, // 用户名
+ img: imgList.length > 0 ? imgList[0] : '', // 只显示第一个图片(如果有多个)
+ file: filetype === 'docx' ? item.pictureUrl : '',
+ mp4: filetype === 'mp4' ? item.pictureUrl : '',
+ imgList: imgList, // 包含所有图片的列表
difference: item.difference,
- identifying: false, //待回复标识
+ identifying: identifying, // 是否显示待回复按钮
});
});
+
setTimeout(() => {
const container = scrollContainer.value;
if (container) {
@@ -1167,10 +1223,9 @@ const onLoad = async () => {
} else {
warehouseIdState.value = false;
}
- console.log(res.data.data.createUser,'工单创建人');
- console.log(userInfo.content.user_id,'系统登录人');
-
-
+ console.log(res.data.data.createUser, '工单创建人');
+ console.log(userInfo.content.user_id, '系统登录人');
+
Indexform.value['result'] = [];
Indexform.value['processor'] = [];
Indexform.value['processorEntityList'] = []; //责任方
@@ -1236,11 +1291,11 @@ const onLoad = async () => {
console.log(res, '发现环节');
ProcessingResults.value = res.data.data;
});
- // 处理结果回显
+ // 处理结果回显
if (res.data.data.processingResultsVO.processingMoneyEntityList) {
ProcessingList.value = res.data.data.processingResultsVO.processingMoneyEntityList.map(
item => {
- Indexform.value.result.push(item.resultType);
+ Indexform.value.result.push(item.resultType);
return {
money: item.money + '元',
state: item.resultType,
@@ -1339,12 +1394,12 @@ const isProcessingResults = () => {
}
return false;
};
-const isProcessingResultssub=()=>{
+const isProcessingResultssub = () => {
if (workOrderStatus == '90') {
return true;
}
return false;
-}
+};
//完结工单权限
const isWorkOrderCompletion = () => {
diff --git a/src/views/aftersales/aftersalesWorkOrderTemp.vue b/src/views/aftersales/aftersalesWorkOrderTemp.vue
index 1d1bdce2..354b7301 100644
--- a/src/views/aftersales/aftersalesWorkOrderTemp.vue
+++ b/src/views/aftersales/aftersalesWorkOrderTemp.vue
@@ -80,9 +80,21 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -139,13 +151,17 @@
-
+ > -->