aI问答支持流式输出,效果非常好
This commit is contained in:
@@ -1745,6 +1745,15 @@ const _sfc_main = {
|
||||
});
|
||||
if (res.statusCode === 200 && res.data && res.data.success) {
|
||||
const mappedList = res.data.data.map((item) => {
|
||||
const extensionFromName = () => {
|
||||
const n = item.audioFileOriginalName;
|
||||
if (n && typeof n === "string") {
|
||||
const i = n.lastIndexOf(".");
|
||||
if (i !== -1 && i < n.length - 1)
|
||||
return n.slice(i + 1);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
let formattedTime = "";
|
||||
if (item.createTime) {
|
||||
const date = new Date(item.createTime);
|
||||
@@ -1764,6 +1773,9 @@ const _sfc_main = {
|
||||
customerName: item.customerName || "",
|
||||
recordingName: item.recordingName || "",
|
||||
// 记录名称
|
||||
duration: item.duration,
|
||||
audioFileExtension: item.audioFileExtension != null && item.audioFileExtension !== "" ? item.audioFileExtension : extensionFromName(),
|
||||
recordingText: item.recordingText || "",
|
||||
// 保留原始数据,用于详情页
|
||||
rawData: item
|
||||
};
|
||||
@@ -1781,7 +1793,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/furniture_customer.vue:2465", "获取服务记录失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/furniture_customer.vue:2478", "获取服务记录失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: `获取服务记录失败: ${error.errMsg || error.message || "未知错误"}`,
|
||||
icon: "none",
|
||||
@@ -1822,7 +1834,7 @@ if (!Math) {
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
var _a;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o($options.goBack),
|
||||
a: common_vendor.o($options.goBack, "66"),
|
||||
b: common_vendor.p({
|
||||
fixed: true,
|
||||
statusBar: true,
|
||||
@@ -1833,18 +1845,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
backgroundColor: "#FFFFFF"
|
||||
}),
|
||||
c: $data.activeTab === "service" ? 1 : "",
|
||||
d: common_vendor.o(($event) => $options.switchTab("service")),
|
||||
d: common_vendor.o(($event) => $options.switchTab("service"), "bc"),
|
||||
e: $data.activeTab === "customer" ? 1 : "",
|
||||
f: common_vendor.o(($event) => $options.switchTab("customer")),
|
||||
f: common_vendor.o(($event) => $options.switchTab("customer"), "80"),
|
||||
g: $options.computedNavbarTop || $data.navbarTop,
|
||||
h: $data.activeTab === "service"
|
||||
}, $data.activeTab === "service" ? {
|
||||
i: $options.computedContentTop || $data.contentTop,
|
||||
j: common_vendor.o($options.viewDetail),
|
||||
k: common_vendor.o($options.refreshServiceList),
|
||||
l: common_vendor.o($options.onServiceListReachBottom),
|
||||
m: common_vendor.o($options.handleMenuAction),
|
||||
n: common_vendor.o($options.handleUpdateItem),
|
||||
j: common_vendor.o($options.viewDetail, "11"),
|
||||
k: common_vendor.o($options.refreshServiceList, "4a"),
|
||||
l: common_vendor.o($options.onServiceListReachBottom, "9a"),
|
||||
m: common_vendor.o($options.handleMenuAction, "e2"),
|
||||
n: common_vendor.o($options.handleUpdateItem, "eb"),
|
||||
o: common_vendor.p({
|
||||
list: $data.serviceList,
|
||||
total: $data.serviceListTotal
|
||||
@@ -1853,10 +1865,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
p: $data.activeTab === "customer"
|
||||
}, $data.activeTab === "customer" ? {
|
||||
q: $options.computedContentTop || $data.contentTop,
|
||||
r: common_vendor.o($options.viewCustomerDetail)
|
||||
r: common_vendor.o($options.viewCustomerDetail, "12")
|
||||
} : {}, {
|
||||
s: common_vendor.sr("customerProfileModal", "08b6e2e0-3"),
|
||||
t: common_vendor.o($options.onCustomerProfileClose),
|
||||
t: common_vendor.o($options.onCustomerProfileClose, "8b"),
|
||||
v: common_vendor.p({
|
||||
profile: $data.currentCustomerProfile
|
||||
}),
|
||||
@@ -1865,7 +1877,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
size: "24",
|
||||
color: "#333"
|
||||
}),
|
||||
x: common_vendor.o((...args) => $options.closeAudioList && $options.closeAudioList(...args)),
|
||||
x: common_vendor.o((...args) => $options.closeAudioList && $options.closeAudioList(...args), "90"),
|
||||
y: common_vendor.t($data.audioSegmentsList.length),
|
||||
z: common_vendor.f($data.audioSegmentsList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
@@ -1909,10 +1921,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
size: "24",
|
||||
color: "#333"
|
||||
}),
|
||||
E: common_vendor.o((...args) => $options.closeTextModal && $options.closeTextModal(...args)),
|
||||
E: common_vendor.o((...args) => $options.closeTextModal && $options.closeTextModal(...args), "ba"),
|
||||
F: common_vendor.t($data.currentRecordingText || "暂无录音文本"),
|
||||
G: common_vendor.sr("textModalPopup", "08b6e2e0-6"),
|
||||
H: common_vendor.o($options.onTextModalChange),
|
||||
H: common_vendor.o($options.onTextModalChange, "5a"),
|
||||
I: common_vendor.p({
|
||||
type: "center",
|
||||
["mask-click"]: true
|
||||
@@ -1922,14 +1934,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
size: "24",
|
||||
color: "#333"
|
||||
}),
|
||||
K: common_vendor.o((...args) => $options.closeDetail && $options.closeDetail(...args)),
|
||||
K: common_vendor.o((...args) => $options.closeDetail && $options.closeDetail(...args), "ed"),
|
||||
L: common_vendor.t($data.currentServiceDetail.title),
|
||||
M: common_vendor.p({
|
||||
type: "forward",
|
||||
size: "20",
|
||||
color: "#333"
|
||||
}),
|
||||
N: common_vendor.o((...args) => $options.shareDetail && $options.shareDetail(...args)),
|
||||
N: common_vendor.o((...args) => $options.shareDetail && $options.shareDetail(...args), "f3"),
|
||||
O: common_vendor.t($data.currentServiceDetail.date),
|
||||
P: common_vendor.p({
|
||||
type: "loop",
|
||||
@@ -1941,15 +1953,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
size: "24",
|
||||
color: "#007AFF"
|
||||
}),
|
||||
R: common_vendor.o((...args) => $options.togglePlay && $options.togglePlay(...args)),
|
||||
R: common_vendor.o((...args) => $options.togglePlay && $options.togglePlay(...args), "26"),
|
||||
S: $data.activeDetailTab === "summary" ? 1 : "",
|
||||
T: common_vendor.o(($event) => $options.switchDetailTab("summary")),
|
||||
T: common_vendor.o(($event) => $options.switchDetailTab("summary"), "93"),
|
||||
U: $data.activeDetailTab === "todo" ? 1 : "",
|
||||
V: common_vendor.o(($event) => $options.switchDetailTab("todo")),
|
||||
V: common_vendor.o(($event) => $options.switchDetailTab("todo"), "db"),
|
||||
W: $data.activeDetailTab === "chapter" ? 1 : "",
|
||||
X: common_vendor.o(($event) => $options.switchDetailTab("chapter")),
|
||||
X: common_vendor.o(($event) => $options.switchDetailTab("chapter"), "98"),
|
||||
Y: $data.activeDetailTab === "performance" ? 1 : "",
|
||||
Z: common_vendor.o(($event) => $options.switchDetailTab("performance")),
|
||||
Z: common_vendor.o(($event) => $options.switchDetailTab("performance"), "b7"),
|
||||
aa: $data.activeDetailTab === "summary"
|
||||
}, $data.activeDetailTab === "summary" ? {
|
||||
ab: `summary-${$data.currentServiceDetail.id || ((_a = $data.currentServiceDetail.rawData) == null ? void 0 : _a.id) || Date.now()}`,
|
||||
@@ -2065,15 +2077,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
} : {}) : {}, {
|
||||
aj: $data.activeTodoMenuIndex !== null
|
||||
}, $data.activeTodoMenuIndex !== null ? {
|
||||
ak: common_vendor.o((...args) => $options.closeTodoMenu && $options.closeTodoMenu(...args))
|
||||
ak: common_vendor.o((...args) => $options.closeTodoMenu && $options.closeTodoMenu(...args), "b3")
|
||||
} : {}, {
|
||||
al: $data.activeTodoMenuIndex !== null
|
||||
}, $data.activeTodoMenuIndex !== null ? {
|
||||
am: common_vendor.o(($event) => $options.handleTodoComplete($data.currentTodoItem, $data.activeTodoMenuIndex)),
|
||||
an: common_vendor.o(($event) => $options.handleTodoDelay($data.currentTodoItem, $data.activeTodoMenuIndex)),
|
||||
am: common_vendor.o(($event) => $options.handleTodoComplete($data.currentTodoItem, $data.activeTodoMenuIndex), "f0"),
|
||||
an: common_vendor.o(($event) => $options.handleTodoDelay($data.currentTodoItem, $data.activeTodoMenuIndex), "57"),
|
||||
ao: common_vendor.s($data.todoMenuStyle),
|
||||
ap: common_vendor.o(() => {
|
||||
})
|
||||
}, "9c")
|
||||
} : {}, {
|
||||
aq: $data.activeDetailTab === "chapter"
|
||||
}, $data.activeDetailTab === "chapter" ? common_vendor.e({
|
||||
@@ -2109,7 +2121,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
size: "16",
|
||||
color: "#999"
|
||||
}),
|
||||
az: common_vendor.o((...args) => $options.viewCustomer && $options.viewCustomer(...args)),
|
||||
az: common_vendor.o((...args) => $options.viewCustomer && $options.viewCustomer(...args), "b3"),
|
||||
aA: common_vendor.sr("serviceDetailPopup", "08b6e2e0-8"),
|
||||
aB: common_vendor.p({
|
||||
type: "bottom",
|
||||
|
||||
Reference in New Issue
Block a user