ykt-wxapp/pages/case/components/archive-detail/follow-up-manage-tab.vue

1099 lines
26 KiB
Vue
Raw Permalink Normal View History

2026-01-22 15:54:15 +08:00
<template>
<!-- Mobile 来源: ykt-management-mobile/src/pages/customer/customer-detail/followup-manage/followup-manage.vue -->
<view class="wrap">
<view class="top">
<view class="top-row">
<view class="my" @click="toggleMy">
2026-02-04 11:15:17 +08:00
<image
:src="`/static/checkbox${query.isMy ? '-checked' : ''}.svg`"
class="checkbox"
/>
2026-01-22 15:54:15 +08:00
<view class="my-text">我的</view>
</view>
<view class="status-scroll">
<scroll-view scroll-x>
<view class="status-tabs">
<view
v-for="t in statusTabs"
:key="t.value"
class="status-tab"
:class="{ active: query.status === t.value }"
@click="toggleStatus(t.value)"
>
{{ t.label }}
</view>
</view>
</scroll-view>
</view>
<view class="filter-btn" @click="openFilter">
2026-02-04 11:15:17 +08:00
<image
class="filter-icon"
:src="`/static/icons/icon-filter${filtered ? '-active' : ''}.svg`"
/>
2026-01-22 15:54:15 +08:00
</view>
</view>
2026-02-04 11:15:17 +08:00
<view class="total"
><text class="total-num">{{ total }}</text
></view
>
2026-01-22 15:54:15 +08:00
</view>
<view class="list">
2026-02-04 11:15:17 +08:00
<view v-for="i in list" :key="i._id" class="card" @click="toDetail(i)">
2026-01-22 15:54:15 +08:00
<view class="head">
2026-02-04 11:15:17 +08:00
<view class="date"
>计划日期: <text class="date-val">{{ i.planDate }}</text></view
>
<view class="executor truncate"
>{{ i.executorName
}}<text v-if="i.executeTeamName"
>{{ i.executeTeamName }}</text
></view
>
2026-01-22 15:54:15 +08:00
</view>
<view class="body">
<view class="title-row">
<view class="type">{{ i.eventTypeLabel }}</view>
2026-02-04 11:15:17 +08:00
<view class="status" :class="`st-${i.status}`">{{
i.eventStatusLabel
}}</view>
2026-01-22 15:54:15 +08:00
</view>
2026-02-04 11:15:17 +08:00
<view class="content">{{ i.taskContent || "暂无内容" }}</view>
2026-02-05 14:02:35 +08:00
<view
v-if="i.sendContent || (i.fileList && i.fileList.length > 0)"
class="send-content-wrapper"
>
2026-02-04 11:15:17 +08:00
<view class="send-content-section">
2026-02-04 17:09:20 +08:00
<view class="send-content-label">发送内容:</view>
2026-02-04 11:15:17 +08:00
<view class="send-content-body">
2026-02-05 14:02:35 +08:00
<view v-if="i.sendContent" class="send-text">{{
i.sendContent
}}</view>
<view
v-if="i.fileList && i.fileList.length > 0"
class="file-list"
>
<view
v-for="(file, idx) in i.fileList"
:key="idx"
class="file-item"
:class="`file-type-${file.type}`"
>
<view class="file-name">{{
file.file?.name || file.name
}}</view>
2026-02-04 11:15:17 +08:00
</view>
</view>
</view>
</view>
<button
v-if="fromChat"
class="action-btn send-btn"
@click.stop="sendFollowUp(i)"
>
发送
</button>
2026-02-04 10:36:36 +08:00
</view>
2026-02-04 11:15:17 +08:00
<view v-if="i.status === 'treated'" class="result"
>处理结果 {{ i.result || "" }}</view
>
<view class="footer-row">
<view class="footer"
>创建: {{ i.createTimeStr }} {{ i.creatorName }}</view
>
2026-02-04 10:36:36 +08:00
</view>
2026-01-22 15:54:15 +08:00
</view>
</view>
<view v-if="list.length === 0" class="empty">暂无数据</view>
2026-02-04 11:15:17 +08:00
<uni-load-more
v-if="list.length"
:status="moreStatus"
:contentText="loadMoreText"
@clickLoadMore="getMore"
/>
2026-01-22 15:54:15 +08:00
</view>
<view class="fab" :style="{ bottom: `${floatingBottom}px` }" @click="add">
<uni-icons type="plusempty" size="24" color="#fff" />
</view>
<!-- 筛选弹窗简化 mock -->
<uni-popup ref="filterPopupRef" type="bottom" :mask-click="true">
<view class="popup">
<view class="popup-title">
<view class="popup-title-text">全部筛选</view>
<view class="popup-close" @click="closeFilter(true)">
<uni-icons type="closeempty" size="18" color="#666" />
</view>
</view>
<scroll-view scroll-y class="popup-body">
2026-01-26 15:39:14 +08:00
<view class="section">
<view class="section-title">任务状态</view>
<view class="chip-wrap">
<view
v-for="t in statusTabs"
:key="t.value"
class="chip"
:class="{ active: query.status === t.value }"
@click="query.status = t.value"
>
{{ t.label }}
</view>
</view>
</view>
2026-01-22 15:54:15 +08:00
<view class="section">
<view class="section-title">任务类型</view>
<view class="chip-wrap">
<view
v-for="t in typeOptions"
:key="t.value"
class="chip"
:class="{ active: typeSelectedMap[t.value] }"
@click="toggleType(t.value)"
>
{{ t.label }}
</view>
</view>
</view>
<view class="section">
<view class="section-title">所属团队</view>
2026-02-04 11:15:17 +08:00
<picker
mode="selector"
:range="teamOptions"
range-key="label"
@change="pickTeam"
>
2026-01-22 15:54:15 +08:00
<view class="select-row">
2026-02-04 11:15:17 +08:00
<view
class="select-text"
:class="{ muted: teamPicked.value === 'ALL' }"
>{{ teamPicked.label }}</view
>
2026-01-22 15:54:15 +08:00
<uni-icons type="right" size="16" color="#999" />
</view>
</picker>
</view>
<view class="section">
<view class="section-title">计划日期</view>
<view class="range-row">
<picker mode="date" @change="pickStart">
2026-02-04 11:15:17 +08:00
<view class="range-pill" :class="{ muted: !planRange[0] }">{{
planRange[0] || "开始日期"
}}</view>
2026-01-22 15:54:15 +08:00
</picker>
<view class="sep">-</view>
<picker mode="date" @change="pickEnd">
2026-02-04 11:15:17 +08:00
<view class="range-pill" :class="{ muted: !planRange[1] }">{{
planRange[1] || "结束日期"
}}</view>
2026-01-22 15:54:15 +08:00
</picker>
<view class="clear" @click="clearPlanRange">
<uni-icons type="closeempty" size="16" color="#999" />
</view>
</view>
</view>
</scroll-view>
<view class="actions">
<button class="btn plain" @click="resetFilter">重置</button>
<button class="btn primary" @click="confirmFilter">确定</button>
</view>
</view>
</uni-popup>
</view>
</template>
<script setup>
2026-02-04 11:15:17 +08:00
import { computed, onMounted, onUnmounted, reactive, ref, watch } from "vue";
import { storeToRefs } from "pinia";
import dayjs from "dayjs";
import api from "@/utils/api";
import useAccountStore from "@/store/account";
import { toast } from "@/utils/widget";
2026-02-04 17:09:20 +08:00
import { handleFollowUpMessages } from "@/utils/send-message-helper";
2026-02-04 11:15:17 +08:00
import {
getTodoEventTypeLabel,
getTodoEventTypeOptions,
} from "@/utils/todo-const";
2026-01-22 15:54:15 +08:00
const props = defineProps({
data: { type: Object, default: () => ({}) },
2026-02-04 11:15:17 +08:00
archiveId: { type: String, default: "" },
reachBottomTime: { type: [String, Number], default: "" },
2026-01-22 15:54:15 +08:00
floatingBottom: { type: Number, default: 16 },
2026-02-04 10:36:36 +08:00
fromChat: { type: Boolean, default: false },
2026-01-22 15:54:15 +08:00
});
2026-01-26 15:39:14 +08:00
const accountStore = useAccountStore();
const { account, doctorInfo } = storeToRefs(accountStore);
const { getDoctorInfo } = accountStore;
2026-02-04 17:09:20 +08:00
function getUserId() {
return doctorInfo.value?.userid || "";
}
function getCorpId() {
const team = uni.getStorageSync("ykt_case_current_team") || {};
return team.corpId || doctorInfo.value?.corpId || "";
}
2026-01-22 15:54:15 +08:00
const statusTabs = [
2026-02-04 11:15:17 +08:00
{ label: "全部", value: "all" },
{ label: "待处理", value: "processing" },
{ label: "未开始", value: "notStart" },
{ label: "已完成", value: "treated" },
{ label: "已取消", value: "cancelled" },
{ label: "已过期", value: "expired" },
2026-01-22 15:54:15 +08:00
];
2026-02-04 11:15:17 +08:00
const typeOptions = [
{ label: "全部", value: "all" },
...getTodoEventTypeOptions(),
];
2026-01-22 15:54:15 +08:00
2026-02-04 11:15:17 +08:00
const teamOptions = ref([{ label: "全部", value: "ALL" }]);
2026-01-22 15:54:15 +08:00
const query = reactive({
isMy: false,
2026-02-04 11:15:17 +08:00
status: "all",
2026-01-22 15:54:15 +08:00
eventTypes: [],
2026-02-04 11:15:17 +08:00
teamId: "ALL",
planRange: ["", ""],
2026-01-22 15:54:15 +08:00
});
const list = ref([]);
const total = ref(0);
const page = ref(1);
const pageSize = 10;
const pages = ref(1);
const loading = ref(false);
2026-01-26 15:39:14 +08:00
const userNameMap = ref({});
2026-01-22 15:54:15 +08:00
const moreStatus = computed(() => {
2026-02-04 11:15:17 +08:00
if (loading.value) return "loading";
return page.value <= pages.value ? "more" : "no-more";
2026-01-22 15:54:15 +08:00
});
const loadMoreText = {
2026-02-04 11:15:17 +08:00
contentdown: "点击加载更多",
contentrefresh: "加载中...",
contentnomore: "没有更多了",
2026-01-22 15:54:15 +08:00
};
const filtered = ref(false);
const typeSelectedMap = computed(() => {
const s = new Set(query.eventTypes || []);
2026-01-26 15:39:14 +08:00
return typeOptions.reduce((acc, cur) => {
2026-02-04 11:15:17 +08:00
if (cur.value === "all") acc[cur.value] = s.size === 0;
2026-01-26 15:39:14 +08:00
else acc[cur.value] = s.has(cur.value);
return acc;
}, {});
2026-01-22 15:54:15 +08:00
});
2026-01-26 15:39:14 +08:00
async function ensureDoctor() {
if (doctorInfo.value) return;
if (!account.value?.openid) return;
try {
await getDoctorInfo();
} catch {
// ignore
}
}
function statusLabelFromStatus(status) {
const map = {
2026-02-04 11:15:17 +08:00
processing: "待处理",
notStart: "未开始",
treated: "已完成",
cancelled: "已取消",
expired: "已过期",
2026-01-26 15:39:14 +08:00
};
2026-02-04 11:15:17 +08:00
return map[status] || "未知";
2026-01-26 15:39:14 +08:00
}
function getStatus(todo) {
2026-02-04 11:15:17 +08:00
const endOfToday = dayjs().endOf("day").valueOf();
const startOfToday = dayjs().startOf("day").valueOf();
2026-01-26 15:39:14 +08:00
const plannedExecutionTime = Number(todo?.plannedExecutionTime || 0) || 0;
const expireTime = Number(todo?.expireTime || 0) || 0;
2026-02-04 11:15:17 +08:00
const eventStatus = String(todo?.eventStatus || "");
if (eventStatus === "treated") return "treated";
if (eventStatus === "closed") return "cancelled";
if (eventStatus === "expire") return "expired";
if (eventStatus === "untreated") {
if (expireTime && expireTime < startOfToday) return "expired";
if (plannedExecutionTime >= endOfToday) return "notStart";
if (
plannedExecutionTime <= startOfToday &&
(!expireTime || expireTime >= endOfToday)
)
return "processing";
return "processing";
2026-01-26 15:39:14 +08:00
}
2026-02-04 11:15:17 +08:00
return "processing";
2026-01-26 15:39:14 +08:00
}
function eventTypeLabel(eventType) {
return getTodoEventTypeLabel(eventType);
}
function resolveUserName(userId) {
2026-02-04 11:15:17 +08:00
const id = String(userId || "");
if (!id) return "";
2026-01-26 15:39:14 +08:00
const map = userNameMap.value || {};
2026-02-04 11:15:17 +08:00
return String(map[id] || "") || id;
2026-01-26 15:39:14 +08:00
}
function formatTodo(todo) {
const status = getStatus(todo);
const plannedExecutionTime = todo?.plannedExecutionTime;
const createTime = todo?.createTime;
return {
...todo,
status,
eventStatusLabel: statusLabelFromStatus(status),
eventTypeLabel: eventTypeLabel(todo?.eventType),
2026-02-04 11:15:17 +08:00
planDate:
plannedExecutionTime && dayjs(plannedExecutionTime).isValid()
? dayjs(plannedExecutionTime).format("YYYY-MM-DD")
: "",
createTimeStr:
createTime && dayjs(createTime).isValid()
? dayjs(createTime).format("YYYY-MM-DD HH:mm")
: "",
2026-01-26 15:39:14 +08:00
executorName: resolveUserName(todo?.executorUserId),
creatorName: resolveUserName(todo?.creatorUserId),
};
}
2026-01-22 15:54:15 +08:00
function resetList() {
page.value = 1;
pages.value = 1;
list.value = [];
getMore();
}
2026-01-26 15:39:14 +08:00
async function getMore() {
2026-01-22 15:54:15 +08:00
if (!props.archiveId) return;
if (loading.value) return;
if (page.value > pages.value) return;
loading.value = true;
try {
2026-01-26 15:39:14 +08:00
await ensureDoctor();
const corpId = getCorpId();
const userId = getUserId();
if (!corpId) {
2026-02-04 11:15:17 +08:00
toast("缺少 corpId请先完成登录/团队选择");
2026-01-26 15:39:14 +08:00
return;
}
const params = {
corpId,
customerId: String(props.archiveId),
2026-01-22 15:54:15 +08:00
page: page.value,
pageSize,
2026-01-26 15:39:14 +08:00
};
2026-02-04 11:15:17 +08:00
if (query.status !== "all") params.statusList = [query.status];
2026-01-26 15:39:14 +08:00
if (query.isMy) params.executorUserId = userId;
2026-02-04 11:15:17 +08:00
if (Array.isArray(query.eventTypes) && query.eventTypes.length)
params.eventType = query.eventTypes;
if (query.teamId && query.teamId !== "ALL") params.teamId = query.teamId;
2026-01-26 15:39:14 +08:00
if (query.planRange?.[0]) params.startDate = query.planRange[0];
if (query.planRange?.[1]) params.endDate = query.planRange[1];
2026-02-04 11:15:17 +08:00
const res = await api("getCustomerTodos", params);
2026-01-26 15:39:14 +08:00
if (!res?.success) {
2026-02-04 11:15:17 +08:00
toast(res?.message || "获取回访任务失败");
2026-01-26 15:39:14 +08:00
return;
}
const arr = Array.isArray(res.data) ? res.data : [];
const next = arr.map(formatTodo);
2026-02-04 11:15:17 +08:00
total.value = typeof res.total === "number" ? res.total : 0;
2026-01-26 15:39:14 +08:00
pages.value = Math.ceil(total.value / pageSize) || 0;
list.value = page.value === 1 ? next : [...list.value, ...next];
2026-01-22 15:54:15 +08:00
page.value += 1;
} finally {
loading.value = false;
}
}
function toggleMy() {
query.isMy = !query.isMy;
resetList();
}
function toggleStatus(v) {
query.status = v;
resetList();
}
2026-01-26 15:39:14 +08:00
async function loadTeams() {
await ensureDoctor();
const corpId = getCorpId();
const userId = getUserId();
if (!corpId || !userId) return;
2026-02-04 11:15:17 +08:00
const res = await api("getTeamBymember", { corpId, corpUserId: userId });
2026-01-26 15:39:14 +08:00
if (!res?.success) return;
2026-02-04 11:15:17 +08:00
const list = Array.isArray(res?.data)
? res.data
: Array.isArray(res?.data?.data)
? res.data.data
: [];
2026-01-26 15:39:14 +08:00
const normalized = list
.map((raw) => {
2026-02-04 11:15:17 +08:00
if (!raw || typeof raw !== "object") return null;
const teamId = raw.teamId || raw.id || raw._id || "";
const name = raw.name || raw.teamName || raw.team || "";
2026-01-26 15:39:14 +08:00
if (!teamId || !name) return null;
return { label: String(name), value: String(teamId) };
})
.filter(Boolean);
2026-02-04 11:15:17 +08:00
teamOptions.value = [{ label: "全部", value: "ALL" }, ...normalized];
2026-01-26 15:39:14 +08:00
}
2026-01-22 15:54:15 +08:00
function add() {
uni.showActionSheet({
2026-02-04 11:15:17 +08:00
itemList: ["+新增任务", "+使用模板", "+回访记录"],
2026-01-22 15:54:15 +08:00
success: ({ tapIndex }) => {
if (tapIndex === 0) {
2026-02-04 11:15:17 +08:00
uni.setStorageSync("new-followup-customer", {
_id: props.archiveId,
name: props.data?.name || "",
});
uni.navigateTo({
url: `/pages/case/new-followup?archiveId=${encodeURIComponent(
props.archiveId
)}`,
});
2026-01-22 15:54:15 +08:00
} else if (tapIndex === 1) {
2026-02-04 11:15:17 +08:00
uni.setStorageSync("new-followup-plan-customer", {
_id: props.archiveId,
name: props.data?.name || "",
});
uni.setStorageSync("select-mamagement-plan", "");
uni.navigateTo({
url: `/pages/case/plan-list?archiveId=${encodeURIComponent(
props.archiveId
)}`,
});
2026-01-22 17:39:23 +08:00
} else if (tapIndex === 2) {
2026-02-04 11:15:17 +08:00
uni.setStorageSync("new-followup-record-customer", {
_id: props.archiveId,
name: props.data?.name || "",
});
uni.navigateTo({
url: `/pages/case/new-followup-record?archiveId=${encodeURIComponent(
props.archiveId
)}`,
});
2026-01-22 15:54:15 +08:00
}
},
});
}
function toDetail(todo) {
2026-02-04 11:15:17 +08:00
uni.navigateTo({
url: `/pages/case/followup-detail?archiveId=${encodeURIComponent(
props.archiveId
)}&mode=edit&id=${encodeURIComponent(todo._id)}`,
});
2026-01-22 15:54:15 +08:00
}
2026-02-04 11:15:17 +08:00
async function sendFollowUp(todo) {
if (!todo.sendContent && (!todo.fileList || todo.fileList.length === 0)) {
toast("没有发送内容");
return;
}
const messages = [];
// 1. 发送文字内容
if (todo.sendContent) {
messages.push({
type: "text",
content: todo.sendContent,
});
}
// 2. 处理文件列表(图片、宣教文章、问卷)
if (Array.isArray(todo.fileList)) {
for (const file of todo.fileList) {
if (file.type === "image" && file.URL) {
// 发送图片
messages.push({
type: "image",
content: file.URL,
name: file.file?.name || file.name || "图片",
});
} else if (file.type === "article" && file.file?.url) {
// 发送宣教文章
messages.push({
type: "article",
content: {
2026-02-04 17:09:20 +08:00
_id: file.file?._id || file._id,
2026-02-04 11:15:17 +08:00
title: file.file?.name || file.name || "宣教文章",
url: file.file?.url || file.URL,
2026-02-04 17:09:20 +08:00
subtitle: file.file?.subtitle || "",
cover: file.file?.cover || "",
articleId: file.file?._id || file._id,
2026-02-04 11:15:17 +08:00
},
});
} else if (file.type === "questionnaire" && file.file?.surveryId) {
// 发送问卷
messages.push({
type: "questionnaire",
content: {
2026-02-04 17:09:20 +08:00
_id: file.file?._id || file._id,
name: file.file?.name || file.name || "问卷",
2026-02-04 11:15:17 +08:00
surveryId: file.file?.surveryId || file.surveryId,
url: file.file?.url || file.URL,
},
});
}
}
}
2026-02-04 17:09:20 +08:00
// 调用统一的消息发送处理函数
const success = await handleFollowUpMessages(messages, {
userId: getUserId(),
customerId: props.archiveId,
customerName: props.data?.name || "",
corpId: getCorpId(),
env: __VITE_ENV__,
2026-02-04 10:36:36 +08:00
});
2026-02-04 11:15:17 +08:00
2026-02-04 17:09:20 +08:00
if (success) {
toast("消息已发送");
uni.navigateBack();
}
2026-02-04 10:36:36 +08:00
}
2026-01-22 15:54:15 +08:00
// ---- filter popup ----
const filterPopupRef = ref(null);
const state = ref(null);
2026-01-26 15:39:14 +08:00
const teamPicked = ref(teamOptions.value[0]);
2026-02-04 11:15:17 +08:00
const planRange = ref(["", ""]);
2026-01-22 15:54:15 +08:00
function openFilter() {
state.value = {
2026-02-04 11:15:17 +08:00
query: {
...query,
eventTypes: [...(query.eventTypes || [])],
planRange: [...(query.planRange || ["", ""])],
},
2026-01-22 15:54:15 +08:00
team: { ...teamPicked.value },
range: [...planRange.value],
};
2026-02-04 11:15:17 +08:00
planRange.value = [...(query.planRange || ["", ""])];
teamPicked.value =
teamOptions.value.find((i) => i.value === query.teamId) ||
teamOptions.value[0];
2026-01-22 15:54:15 +08:00
filterPopupRef.value?.open?.();
}
function closeFilter(revert) {
if (revert && state.value) {
Object.assign(query, state.value.query);
planRange.value = state.value.range;
teamPicked.value = state.value.team;
}
filterPopupRef.value?.close?.();
}
function toggleType(v) {
2026-02-04 11:15:17 +08:00
if (v === "all") {
2026-01-26 15:39:14 +08:00
query.eventTypes = [];
return;
}
2026-01-22 15:54:15 +08:00
const set = new Set(query.eventTypes || []);
if (set.has(v)) set.delete(v);
else set.add(v);
query.eventTypes = Array.from(set);
}
function pickTeam(e) {
2026-01-26 15:39:14 +08:00
teamPicked.value = teamOptions.value[e.detail.value] || teamOptions.value[0];
2026-01-22 15:54:15 +08:00
query.teamId = teamPicked.value.value;
}
function pickStart(e) {
2026-02-04 11:15:17 +08:00
planRange.value = [e.detail.value || "", planRange.value[1] || ""];
2026-01-22 15:54:15 +08:00
query.planRange = [...planRange.value];
}
function pickEnd(e) {
2026-02-04 11:15:17 +08:00
planRange.value = [planRange.value[0] || "", e.detail.value || ""];
2026-01-22 15:54:15 +08:00
query.planRange = [...planRange.value];
}
function clearPlanRange() {
2026-02-04 11:15:17 +08:00
planRange.value = ["", ""];
query.planRange = ["", ""];
2026-01-22 15:54:15 +08:00
}
function resetFilter() {
query.eventTypes = [];
2026-02-04 11:15:17 +08:00
query.teamId = "ALL";
2026-01-26 15:39:14 +08:00
teamPicked.value = teamOptions.value[0];
2026-01-22 15:54:15 +08:00
clearPlanRange();
}
function confirmFilter() {
2026-02-04 11:15:17 +08:00
filtered.value = Boolean(
(query.eventTypes && query.eventTypes.length) ||
query.teamId !== "ALL" ||
query.planRange[0] ||
query.planRange[1]
);
2026-01-22 15:54:15 +08:00
closeFilter(false);
resetList();
}
onMounted(() => {
2026-01-26 15:39:14 +08:00
const userId = getUserId();
2026-02-04 11:15:17 +08:00
const name = String(
doctorInfo.value?.anotherName || doctorInfo.value?.name || ""
);
if (userId && name)
userNameMap.value = { ...(userNameMap.value || {}), [userId]: name };
2026-01-26 15:39:14 +08:00
loadTeams();
2026-01-22 15:54:15 +08:00
resetList();
2026-02-04 11:15:17 +08:00
uni.$on("archive-detail:followup-changed", resetList);
2026-01-22 15:54:15 +08:00
});
onUnmounted(() => {
2026-02-04 11:15:17 +08:00
uni.$off("archive-detail:followup-changed", resetList);
2026-01-22 15:54:15 +08:00
});
watch(
() => props.reachBottomTime,
() => getMore()
);
</script>
<style scoped>
.wrap {
padding: 0 0 96px;
}
.top {
background: #f5f6f8;
padding: 10px 14px 8px;
border-bottom: 1px solid #f2f2f2;
}
.top-row {
display: flex;
align-items: center;
}
.my {
display: flex;
align-items: center;
flex-shrink: 0;
}
.checkbox {
width: 18px;
height: 18px;
margin-right: 6px;
}
.my-text {
font-size: 13px;
color: #333;
}
.status-scroll {
flex: 1;
margin-left: 10px;
}
.status-tabs {
display: flex;
flex-wrap: nowrap;
}
.status-tab {
flex-shrink: 0;
padding: 8px 10px;
font-size: 12px;
border-radius: 6px;
margin-right: 8px;
background: #eaecef;
color: #333;
}
.status-tab.active {
background: #dbe6ff;
2026-02-04 11:15:17 +08:00
color: #0877f1;
2026-01-22 15:54:15 +08:00
}
.filter-btn {
flex-shrink: 0;
padding-left: 10px;
}
.filter-icon {
width: 20px;
height: 20px;
}
.total {
margin-top: 6px;
font-size: 12px;
color: #666;
}
.total-num {
color: #ff4d4f;
margin: 0 4px;
}
.list {
padding: 0 14px;
}
.card {
background: #fff;
border-radius: 8px;
margin-top: 10px;
overflow: hidden;
}
.head {
padding: 12px 12px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #f2f2f2;
}
.date {
font-size: 13px;
color: #666;
flex-shrink: 0;
margin-right: 10px;
}
.date-val {
color: #333;
}
.executor {
flex: 1;
text-align: right;
font-size: 13px;
color: #333;
}
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.body {
padding: 12px 12px;
}
.title-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.type {
font-size: 15px;
font-weight: 600;
color: #1f1f1f;
}
.status {
font-size: 12px;
padding: 6px 10px;
border-radius: 6px;
}
.st-processing {
background: #ffe5e5;
color: #ff4d4f;
}
.st-notStart {
background: #dbe6ff;
2026-02-04 11:15:17 +08:00
color: #0877f1;
2026-01-22 15:54:15 +08:00
}
.st-treated {
background: #dcfce7;
color: #16a34a;
}
.st-cancelled,
.st-expired {
background: #f3f4f6;
color: #666;
}
.content {
margin-top: 10px;
font-size: 13px;
color: #666;
line-height: 18px;
}
2026-02-04 11:15:17 +08:00
.send-content-wrapper {
margin-top: 10px;
display: flex;
align-items: flex-start;
gap: 10px;
}
.send-content-section {
flex: 1;
padding: 10px;
background: #f9f9f9;
border-radius: 6px;
display: flex;
align-items: flex-start;
gap: 10px;
}
.send-content-label {
font-size: 13px;
color: #666;
flex-shrink: 0;
font-weight: 500;
white-space: nowrap;
}
.send-content-body {
flex: 1;
min-width: 0;
}
.send-text {
font-size: 13px;
color: #333;
line-height: 18px;
word-break: break-word;
}
.file-list {
margin-top: 6px;
}
.file-item {
margin-top: 4px;
display: flex;
align-items: center;
gap: 6px;
}
.file-icon {
font-size: 14px;
flex-shrink: 0;
}
.file-name {
font-size: 12px;
color: #0877f1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
2026-02-04 17:09:20 +08:00
width: 330rpx;
2026-02-04 11:15:17 +08:00
}
.file-type-image .file-name {
color: #0877f1;
}
.file-type-article .file-name {
color: #16a34a;
}
.file-type-questionnaire .file-name {
color: #f59e0b;
}
2026-01-22 15:54:15 +08:00
.result {
margin-top: 10px;
font-size: 13px;
color: #666;
}
2026-02-04 10:36:36 +08:00
.footer-row {
display: flex;
align-items: center;
justify-content: space-between;
2026-01-22 15:54:15 +08:00
margin-top: 10px;
2026-02-04 10:36:36 +08:00
padding-top: 10px;
border-top: 1px solid #f2f2f2;
gap: 10px;
}
.footer {
2026-01-22 15:54:15 +08:00
font-size: 12px;
color: #999;
2026-02-04 10:36:36 +08:00
flex: 1;
}
.footer-row .send-btn {
flex: 0 0 auto;
width: 60px;
height: 28px;
line-height: 28px;
padding: 0;
margin: 0;
}
.card-actions {
display: flex;
gap: 10px;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid #f2f2f2;
}
.action-btn {
flex: 1;
height: 32px;
line-height: 32px;
border-radius: 6px;
font-size: 12px;
border: none;
background: #f5f6f8;
color: #333;
}
.action-btn::after {
border: none;
}
.detail-btn {
background: #f5f6f8;
color: #333;
}
.send-btn {
2026-02-04 11:15:17 +08:00
flex: 0 0 auto;
width: 60px;
background: #0877f1;
2026-02-04 10:36:36 +08:00
color: #fff;
2026-01-22 15:54:15 +08:00
}
.empty {
padding: 120px 0;
text-align: center;
color: #9aa0a6;
font-size: 13px;
}
.fab {
position: fixed;
right: 16px;
width: 52px;
height: 52px;
border-radius: 26px;
2026-02-04 11:15:17 +08:00
background: #0877f1;
2026-01-22 15:54:15 +08:00
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 10px 18px rgba(79, 110, 247, 0.35);
z-index: 20;
}
.popup {
background: #fff;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
overflow: hidden;
}
.popup-title {
position: relative;
padding: 14px;
border-bottom: 1px solid #f0f0f0;
}
.popup-title-text {
text-align: center;
font-size: 16px;
font-weight: 600;
color: #333;
}
.popup-close {
position: absolute;
right: 12px;
top: 0;
height: 100%;
display: flex;
align-items: center;
}
.popup-body {
max-height: 70vh;
}
.section {
padding: 14px;
}
.section-title {
font-size: 14px;
font-weight: 600;
color: #333;
margin-bottom: 10px;
}
.chip-wrap {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.chip {
width: 110px;
text-align: center;
padding: 8px 0;
border: 1px solid #e6e6e6;
border-radius: 8px;
font-size: 12px;
color: #333;
}
.chip.active {
2026-02-04 11:15:17 +08:00
background: #0877f1;
border-color: #0877f1;
2026-01-22 15:54:15 +08:00
color: #fff;
}
.select-row {
height: 40px;
border: 1px solid #e6e6e6;
border-radius: 8px;
padding: 0 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.select-text {
font-size: 12px;
color: #333;
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.select-text.muted {
color: #999;
}
.range-row {
display: flex;
align-items: center;
gap: 8px;
}
.range-pill {
width: 110px;
height: 40px;
line-height: 40px;
text-align: center;
border: 1px solid #e6e6e6;
border-radius: 8px;
font-size: 12px;
color: #333;
}
.range-pill.muted {
color: #999;
}
.sep {
color: #999;
}
.clear {
padding: 6px;
}
.actions {
padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
display: flex;
gap: 12px;
}
.btn {
flex: 1;
height: 44px;
line-height: 44px;
border-radius: 6px;
font-size: 15px;
}
.btn::after {
border: none;
}
.btn.plain {
background: #fff;
2026-02-04 11:15:17 +08:00
color: #0877f1;
border: 1px solid #0877f1;
2026-01-22 15:54:15 +08:00
}
.btn.primary {
2026-02-04 11:15:17 +08:00
background: #0877f1;
2026-01-22 15:54:15 +08:00
color: #fff;
}
</style>