完善录音时长功能
This commit is contained in:
@@ -89,7 +89,7 @@ const _sfc_main = {
|
||||
tenantId = common_vendor.index.getStorageSync("backend-tenant-id") || "";
|
||||
token = common_vendor.index.getStorageSync("backend-token") || "";
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/components/ServiceList.vue:197", "获取认证信息失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/components/ServiceList.vue:196", "获取认证信息失败:", e);
|
||||
}
|
||||
const headers = {
|
||||
"Content-Type": "application/json"
|
||||
@@ -138,7 +138,7 @@ const _sfc_main = {
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/components/ServiceList.vue:258", "AI分析失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/components/ServiceList.vue:257", "AI分析失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: `AI分析失败: ${error.errMsg || error.message || "未知错误"}`,
|
||||
icon: "none",
|
||||
@@ -160,17 +160,6 @@ const _sfc_main = {
|
||||
return;
|
||||
}
|
||||
this.$emit("itemClick", item);
|
||||
},
|
||||
// 格式化时长(分钟转换为时分秒格式)
|
||||
formatDuration(minutes) {
|
||||
const numMinutes = Number(minutes);
|
||||
if (isNaN(numMinutes) || numMinutes < 0)
|
||||
return "00:00:00";
|
||||
const totalSeconds = Math.floor(numMinutes * 60);
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
const mins = Math.floor(totalSeconds % 3600 / 60);
|
||||
const secs = totalSeconds % 60;
|
||||
return `${String(hours).padStart(2, "0")}:${String(mins).padStart(2, "0")}:${String(secs).padStart(2, "0")}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -203,29 +192,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
b: "0284e0ab-1-" + i0,
|
||||
c: common_vendor.o(($event) => $options.onMenuButtonClick(item), index),
|
||||
d: common_vendor.t(item.date),
|
||||
e: item.duration != null && item.duration > 0
|
||||
}, item.duration != null && item.duration > 0 ? {
|
||||
f: common_vendor.t($options.formatDuration(item.duration))
|
||||
} : {}, {
|
||||
g: item.recordingName
|
||||
e: item.recordingName
|
||||
}, item.recordingName ? {
|
||||
h: common_vendor.t(item.recordingName)
|
||||
f: common_vendor.t(item.recordingName)
|
||||
} : {}, {
|
||||
i: common_vendor.t(item.description),
|
||||
j: common_vendor.t(item.customerName.charAt(0)),
|
||||
k: common_vendor.t(item.customerName),
|
||||
l: $data.selectedServiceItem && $data.selectedServiceItem.id === item.id && $data.showServiceActionMenu
|
||||
g: common_vendor.t(item.description),
|
||||
h: common_vendor.t(item.customerName.charAt(0)),
|
||||
i: common_vendor.t(item.customerName),
|
||||
j: $data.selectedServiceItem && $data.selectedServiceItem.id === item.id && $data.showServiceActionMenu
|
||||
}, $data.selectedServiceItem && $data.selectedServiceItem.id === item.id && $data.showServiceActionMenu ? {
|
||||
m: common_vendor.o(($event) => $options.handleDelete(item), index),
|
||||
n: common_vendor.o(($event) => $options.handleView(item), index),
|
||||
o: common_vendor.o(($event) => $options.handleAnalysis(item), index),
|
||||
p: common_vendor.o(($event) => $options.handleAudio(item), index),
|
||||
q: common_vendor.o(() => {
|
||||
k: common_vendor.o(($event) => $options.handleDelete(item), index),
|
||||
l: common_vendor.o(($event) => $options.handleView(item), index),
|
||||
m: common_vendor.o(($event) => $options.handleAnalysis(item), index),
|
||||
n: common_vendor.o(($event) => $options.handleAudio(item), index),
|
||||
o: common_vendor.o(() => {
|
||||
}, index)
|
||||
} : {}, {
|
||||
r: index,
|
||||
s: $data.selectedServiceItem && $data.selectedServiceItem.id === item.id ? 1 : "",
|
||||
t: common_vendor.o(($event) => $options.handleItemClick(item), index)
|
||||
p: index,
|
||||
q: $data.selectedServiceItem && $data.selectedServiceItem.id === item.id ? 1 : "",
|
||||
r: common_vendor.o(($event) => $options.handleItemClick(item), index)
|
||||
});
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="service-list-container data-v-0284e0ab"><view class="service-status-toolbar data-v-0284e0ab"><text class="toolbar-total data-v-0284e0ab">共{{a}}条</text><input class="toolbar-input data-v-0284e0ab" placeholder="所属销售姓名" placeholder-style="color: #b0b0b0" confirm-type="search" bindconfirm="{{b}}" bindinput="{{c}}" value="{{d}}"/><input class="toolbar-input data-v-0284e0ab" placeholder="客户姓名" placeholder-style="color: #b0b0b0" confirm-type="search" bindconfirm="{{e}}" bindinput="{{f}}" value="{{g}}"/><view class="toolbar-actions data-v-0284e0ab"><view class="toolbar-btn toolbar-btn--refresh data-v-0284e0ab" bindtap="{{i}}"><uni-icons wx:if="{{h}}" class="data-v-0284e0ab" u-i="0284e0ab-0" bind:__l="__l" u-p="{{h}}"></uni-icons><text class="data-v-0284e0ab">刷新</text></view></view></view><scroll-view class="service-list data-v-0284e0ab" scroll-y bindscrolltolower="{{l}}"><view wx:for="{{j}}" wx:for-item="item" wx:key="r" class="{{['service-item', 'data-v-0284e0ab', item.s && 'service-item--active']}}" bindtap="{{item.t}}"><view class="service-header data-v-0284e0ab"><text class="service-title data-v-0284e0ab">{{item.a}}</text><view class="service-menu-button data-v-0284e0ab" catchtap="{{item.c}}"><uni-icons wx:if="{{k}}" class="data-v-0284e0ab" u-i="{{item.b}}" bind:__l="__l" u-p="{{k}}"></uni-icons></view></view><view class="service-meta data-v-0284e0ab"><text class="service-date data-v-0284e0ab">{{item.d}}</text><text wx:if="{{item.e}}" class="service-duration data-v-0284e0ab">录音时长:{{item.f}}</text></view><view wx:if="{{item.g}}" class="service-recording-name data-v-0284e0ab"><text class="recording-name-label data-v-0284e0ab">记录名称:</text><text class="recording-name-value data-v-0284e0ab">{{item.h}}</text></view><view class="service-content data-v-0284e0ab"><text class="service-desc data-v-0284e0ab">{{item.i}}</text></view><view class="service-customer data-v-0284e0ab"><view class="customer-avatar data-v-0284e0ab"><text class="avatar-text data-v-0284e0ab">{{item.j}}</text></view><text class="customer-name data-v-0284e0ab">{{item.k}}</text></view><view wx:if="{{item.l}}" class="service-action-menu data-v-0284e0ab" catchtap="{{item.q}}"><view class="service-action-menu-item service-action-menu-item--danger data-v-0284e0ab" bindtap="{{item.m}}"><text class="data-v-0284e0ab">删除</text></view><view class="service-action-menu-divider data-v-0284e0ab"></view><view class="service-action-menu-item data-v-0284e0ab" bindtap="{{item.n}}"><text class="data-v-0284e0ab">查看</text></view><view class="service-action-menu-divider data-v-0284e0ab"></view><view class="service-action-menu-item data-v-0284e0ab" bindtap="{{item.o}}"><text class="data-v-0284e0ab">AI分析</text></view><view class="service-action-menu-divider data-v-0284e0ab"></view><view class="service-action-menu-item data-v-0284e0ab" bindtap="{{item.p}}"><text class="data-v-0284e0ab">录音</text></view></view></view></scroll-view><view wx:if="{{m}}" class="service-action-menu-mask data-v-0284e0ab" bindtap="{{n}}"></view></view>
|
||||
<view class="service-list-container data-v-0284e0ab"><view class="service-status-toolbar data-v-0284e0ab"><text class="toolbar-total data-v-0284e0ab">共{{a}}条</text><input class="toolbar-input data-v-0284e0ab" placeholder="所属销售姓名" placeholder-style="color: #b0b0b0" confirm-type="search" bindconfirm="{{b}}" bindinput="{{c}}" value="{{d}}"/><input class="toolbar-input data-v-0284e0ab" placeholder="客户姓名" placeholder-style="color: #b0b0b0" confirm-type="search" bindconfirm="{{e}}" bindinput="{{f}}" value="{{g}}"/><view class="toolbar-actions data-v-0284e0ab"><view class="toolbar-btn toolbar-btn--refresh data-v-0284e0ab" bindtap="{{i}}"><uni-icons wx:if="{{h}}" class="data-v-0284e0ab" u-i="0284e0ab-0" bind:__l="__l" u-p="{{h}}"></uni-icons><text class="data-v-0284e0ab">刷新</text></view></view></view><scroll-view class="service-list data-v-0284e0ab" scroll-y bindscrolltolower="{{l}}"><view wx:for="{{j}}" wx:for-item="item" wx:key="p" class="{{['service-item', 'data-v-0284e0ab', item.q && 'service-item--active']}}" bindtap="{{item.r}}"><view class="service-header data-v-0284e0ab"><text class="service-title data-v-0284e0ab">{{item.a}}</text><view class="service-menu-button data-v-0284e0ab" catchtap="{{item.c}}"><uni-icons wx:if="{{k}}" class="data-v-0284e0ab" u-i="{{item.b}}" bind:__l="__l" u-p="{{k}}"></uni-icons></view></view><view class="service-meta data-v-0284e0ab"><text class="service-date data-v-0284e0ab">{{item.d}}</text></view><view wx:if="{{item.e}}" class="service-recording-name data-v-0284e0ab"><text class="recording-name-label data-v-0284e0ab">记录名称:</text><text class="recording-name-value data-v-0284e0ab">{{item.f}}</text></view><view class="service-content data-v-0284e0ab"><text class="service-desc data-v-0284e0ab">{{item.g}}</text></view><view class="service-customer data-v-0284e0ab"><view class="customer-avatar data-v-0284e0ab"><text class="avatar-text data-v-0284e0ab">{{item.h}}</text></view><text class="customer-name data-v-0284e0ab">{{item.i}}</text></view><view wx:if="{{item.j}}" class="service-action-menu data-v-0284e0ab" catchtap="{{item.o}}"><view class="service-action-menu-item service-action-menu-item--danger data-v-0284e0ab" bindtap="{{item.k}}"><text class="data-v-0284e0ab">删除</text></view><view class="service-action-menu-divider data-v-0284e0ab"></view><view class="service-action-menu-item data-v-0284e0ab" bindtap="{{item.l}}"><text class="data-v-0284e0ab">查看</text></view><view class="service-action-menu-divider data-v-0284e0ab"></view><view class="service-action-menu-item data-v-0284e0ab" bindtap="{{item.m}}"><text class="data-v-0284e0ab">AI分析</text></view><view class="service-action-menu-divider data-v-0284e0ab"></view><view class="service-action-menu-item data-v-0284e0ab" bindtap="{{item.n}}"><text class="data-v-0284e0ab">录音</text></view></view></view></scroll-view><view wx:if="{{m}}" class="service-action-menu-mask data-v-0284e0ab" bindtap="{{n}}"></view></view>
|
||||
@@ -1756,11 +1756,6 @@ const _sfc_main = {
|
||||
const seconds = String(date.getSeconds()).padStart(2, "0");
|
||||
formattedTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
let durationValue = null;
|
||||
if (item.duration !== null && item.duration !== void 0 && item.duration !== "") {
|
||||
const numDuration = Number(item.duration);
|
||||
durationValue = isNaN(numDuration) ? null : numDuration;
|
||||
}
|
||||
return {
|
||||
id: item.id,
|
||||
title: `${item.salesName || ""}的服务记录`,
|
||||
@@ -1769,8 +1764,6 @@ const _sfc_main = {
|
||||
customerName: item.customerName || "",
|
||||
recordingName: item.recordingName || "",
|
||||
// 记录名称
|
||||
duration: durationValue,
|
||||
// 录音时长(分钟),数字类型,null 表示无数据
|
||||
// 保留原始数据,用于详情页
|
||||
rawData: item
|
||||
};
|
||||
@@ -1788,7 +1781,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/furniture_customer.vue:2472", "获取服务记录失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/furniture_customer/furniture_customer.vue:2464", "获取服务记录失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: `获取服务记录失败: ${error.errMsg || error.message || "未知错误"}`,
|
||||
icon: "none",
|
||||
|
||||
Reference in New Issue
Block a user