diff --git a/src/components/SurveyQuestionnaire/index.vue b/src/components/SurveyQuestionnaire/index.vue
new file mode 100644
index 0000000..98ed8fb
--- /dev/null
+++ b/src/components/SurveyQuestionnaire/index.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
+ 调查问卷
+
+
+
+
+
+
+
+ 前往填写
+
+
+
+
+
+
+
+
+
+
+
@@ -99,6 +102,7 @@ import DetailCardCompontent from "../../module/DetailCardCompontent/index.vue";
import CreateServiceOrder from "@/components/CreateServiceOrder/index.vue";
import Feedback from "@/components/Feedback/index.vue";
import AddCarCrad from "@/components/AddCarCrad/index.vue";
+import SurveyQuestionnaire from "@/components/SurveyQuestionnaire/index.vue";
import { mainPageData } from "@/request/api/MainPageDataApi";
import {
conversationMsgList,
@@ -658,31 +662,31 @@ const sendWebSocketMessage = async (messageType, messageContent, options = {}) =
try {
const raw = webSocketManager.sendMessage(args);
// 兼容可能返回同步布尔或 Promise 的实现
- const result = await Promise.resolve(raw);
- if (result) {
- console.log(`WebSocket消息已发送 [类型:${messageType}]:`, args);
- return true;
- }
+ const result = await Promise.resolve(raw);
+ if (result) {
+ console.log(`WebSocket消息已发送 [类型:${messageType}]:`, args);
+ return true;
+ }
- // 若返回 false,消息可能已经被 manager 入队并触发连接流程。
- // 在这种情况下避免立即当作失败处理,而是等待短暂时间以观察连接是否建立并由 manager 发送队列。
- console.warn('webSocketManager.sendMessage 返回 false,等待连接或队列发送...', { attempt, args });
- const waitForConnectMs = typeof options.waitForConnectMs === 'number' ? options.waitForConnectMs : 5000;
- if (webSocketManager && typeof webSocketManager.isConnected === 'function' && !webSocketManager.isConnected()) {
- const startTs = Date.now();
- while (Date.now() - startTs < waitForConnectMs) {
- await sleep(200);
- if (webSocketManager.isConnected()) {
- // 给 manager 一点时间处理队列并发送
- await sleep(150);
- console.log('检测到 manager 已连接,假定队列消息已发送', args);
- return true;
- }
+ // 若返回 false,消息可能已经被 manager 入队并触发连接流程。
+ // 在这种情况下避免立即当作失败处理,而是等待短暂时间以观察连接是否建立并由 manager 发送队列。
+ console.warn('webSocketManager.sendMessage 返回 false,等待连接或队列发送...', { attempt, args });
+ const waitForConnectMs = typeof options.waitForConnectMs === 'number' ? options.waitForConnectMs : 5000;
+ if (webSocketManager && typeof webSocketManager.isConnected === 'function' && !webSocketManager.isConnected()) {
+ const startTs = Date.now();
+ while (Date.now() - startTs < waitForConnectMs) {
+ await sleep(200);
+ if (webSocketManager.isConnected()) {
+ // 给 manager 一点时间处理队列并发送
+ await sleep(150);
+ console.log('检测到 manager 已连接,假定队列消息已发送', args);
+ return true;
}
- console.warn('等待 manager 建连超时,进入重试逻辑', { waitForConnectMs, args });
- } else {
- console.warn('sendMessage 返回 false 但 manager 看起来已连接或不可用,继续重试', { args });
}
+ console.warn('等待 manager 建连超时,进入重试逻辑', { waitForConnectMs, args });
+ } else {
+ console.warn('sendMessage 返回 false 但 manager 看起来已连接或不可用,继续重试', { args });
+ }
} catch (error) {
console.error('发送WebSocket消息异常:', error, args);
}
@@ -802,11 +806,11 @@ const stopRequest = async () => {
}
if (chatMsgList.value[aiMsgIndex] &&
- chatMsgList.value[aiMsgIndex].msgType === MessageRole.AI) {
+ chatMsgList.value[aiMsgIndex].msgType === MessageRole.AI) {
chatMsgList.value[aiMsgIndex].isLoading = false;
if (chatMsgList.value[aiMsgIndex].msg &&
- chatMsgList.value[aiMsgIndex].msg.trim() &&
- !chatMsgList.value[aiMsgIndex].msg.startsWith("加载中")) {
+ chatMsgList.value[aiMsgIndex].msg.trim() &&
+ !chatMsgList.value[aiMsgIndex].msg.startsWith("加载中")) {
// 保留已显示内容
} else {
chatMsgList.value[aiMsgIndex].msg = "请求已停止";
diff --git a/src/static/scss/height.scss b/src/static/scss/height.scss
index 48d2d61..c29eaa4 100644
--- a/src/static/scss/height.scss
+++ b/src/static/scss/height.scss
@@ -21,3 +21,7 @@
.h-24 {
height: 24px;
}
+
+.h72 {
+ height: 72px;
+}
\ No newline at end of file
diff --git a/src/static/scss/width.scss b/src/static/scss/width.scss
index b96ad81..6363c17 100644
--- a/src/static/scss/width.scss
+++ b/src/static/scss/width.scss
@@ -22,6 +22,12 @@
width: 60px;
}
+
+
.w-80 {
width: 80px;
}
+
+.w-102 {
+ width: 102px;
+}
\ No newline at end of file