新增功能

This commit is contained in:
Your Name
2026-04-01 09:46:25 +08:00
parent 099bc1dd22
commit a780356908
332 changed files with 7845 additions and 866 deletions
-1
View File
@@ -15,7 +15,6 @@ const globalData = {
let avatarUrl = ref(""); // 声明为响应式变量
uni.CallManager = new CallManager();
onLaunch(() => {
uni.login({
provider: 'weixin',
success: function (loginRes) {
+54 -1
View File
@@ -241,6 +241,8 @@
import groupPlugin from '@tencentcloud/lite-chat/plugins/group';
import * as GenerateTestUserSig from "@/debug/GenerateTestUserSig-es.js";
import { TUICallKitAPI } from '@/TUICallKit/src/TUICallService/index';
import { TUIStore } from '@/TUICallKit/src/TUICallService/CallService/index';
import { StoreName, NAME, CallStatus } from '@/TUICallKit/src/TUICallService/const/index';
// CallManager 在 App.vue 已挂载到 uni.CallManager,勿在此重复 new,否则会丢失通话状态
const { proxy } = getCurrentInstance()
const messages = ref([]);
@@ -271,6 +273,10 @@ const { proxy } = getCurrentInstance()
let targetUserID = '';
let currentUserID = ''; // 当前登录用户ID
let scrollTimer = null; // 滚动定时器
/** 微信小程序:从系统后台回前台时刷新 IM/TUICall,避免无法接通视频 */
let unsubscribeWxAppShow = null;
let allowChatForegroundRelogin = false;
let foregroundReloginTimer = null;
const CONFIRMATION_MESSAGE = `我已确认以下信息:
1、本人确认已在线下确诊;
@@ -730,6 +736,22 @@ const { proxy } = getCurrentInstance()
uni.$on('TUICall:callEnd', onVideoCallEnd);
//uni.showToast({ title: '聊天已就绪', icon: 'success' });
// #ifdef MP-WEIXIN
// 系统级前后台切换时页面 onShow 不一定等价于「回前台」,用 wx.onAppShow 刷新音视频信令链路
if (typeof wx !== 'undefined' && wx.onAppShow) {
unsubscribeWxAppShow = wx.onAppShow(() => {
if (!allowChatForegroundRelogin) return;
const pages = getCurrentPages();
const top = pages[pages.length - 1];
if (!(top?.route || '').includes('pages/chat/chat')) return;
reloginAfterMiniProgramForeground();
});
}
setTimeout(() => {
allowChatForegroundRelogin = true;
}, 800);
// #endif
// 监听键盘高度变化
uni.onKeyboardHeightChange((res) => {
keyboardHeight.value = res.height;
@@ -765,6 +787,17 @@ const { proxy } = getCurrentInstance()
});
onUnload(() => {
allowChatForegroundRelogin = false;
// #ifdef MP-WEIXIN
if (typeof unsubscribeWxAppShow === 'function') {
unsubscribeWxAppShow();
unsubscribeWxAppShow = null;
}
// #endif
if (foregroundReloginTimer) {
clearTimeout(foregroundReloginTimer);
foregroundReloginTimer = null;
}
uni.$off('TUICall:callStart', onVideoCallStart);
uni.$off('TUICall:callEnd', onVideoCallEnd);
stopDoctorWaitTimer();
@@ -1039,6 +1072,26 @@ const { proxy } = getCurrentInstance()
chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
await initTUICallKitWithTim(chat);
}
/** 小程序切后台再回前台:拉取新 UserSig 并重登 IM、重绑 TUICallEngine(与发消息失败时的 relogin 一致) */
async function reloginAfterMiniProgramForeground() {
if (!chat || !currentUserID) return;
if (foregroundReloginTimer) clearTimeout(foregroundReloginTimer);
foregroundReloginTimer = setTimeout(async () => {
foregroundReloginTimer = null;
// reloginIMChat 会先 IM logout 再 initTUICallKit;若非 IDLEdestroyed 会失败且 IM 已断开,故仅 IDLE 时刷新
try {
const status = TUIStore?.getData?.(StoreName.CALL, NAME.CALL_STATUS);
if (status != null && status !== CallStatus.IDLE) {
console.warn('前台恢复: 通话未结束,跳过 IM/TUICall 重绑');
return;
}
await reloginIMChat();
} catch (e) {
console.warn('前台恢复后 IM/TUICall 刷新失败:', e);
}
}, 400);
}
async function sendTextMessage() {
if (!inputText.value.trim()) return;
@@ -1353,7 +1406,7 @@ const { proxy } = getCurrentInstance()
hideDoctorCardByCall();
}
function onVideoCallEnd() {
async function onVideoCallEnd() {
hideDoctorCardByCall();
uni.showToast({ title: '视频通话已结束', icon: 'success' });
}
+9
View File
@@ -50,6 +50,10 @@ export function tcmDiagnosisAssign(params: any) {
return request.post({ url: '/tcm.diagnosis/assign', params })
}
export function tcmDiagnosisAssignLogList(params: { id: number }) {
return request.get({ url: '/tcm.diagnosis/assignLogList', params })
}
// 获取医助列表
export function getAssistants() {
return request.get({ url: '/tcm.diagnosis/getAssistants' })
@@ -224,6 +228,11 @@ export function prescriptionVoid(params: { id: number }) {
return request.post({ url: '/tcm.prescription/void', params })
}
/** 处方审核:action approve | reject(驳回同时作废处方) */
export function prescriptionAudit(params: { id: number; action: 'approve' | 'reject'; remark?: string }) {
return request.post({ url: '/tcm.prescription/audit', params })
}
// ========== 处方库 ==========
// 处方库列表
@@ -0,0 +1,109 @@
<template>
<div v-if="showFriendlyCustom" class="chat-uikit-custom-msg">
<span v-if="friendlyCustom!.tag" class="chat-uikit-custom-msg__tag">{{ friendlyCustom!.tag }}</span>
<div class="chat-uikit-custom-msg__main">{{ friendlyCustom!.main }}</div>
<div v-if="friendlyCustom!.sub" class="chat-uikit-custom-msg__sub">{{ friendlyCustom!.sub }}</div>
</div>
<div v-else-if="isCustomType && customDescription" class="chat-uikit-custom-msg chat-uikit-custom-msg--plain">
<div class="chat-uikit-custom-msg__main">{{ customDescription }}</div>
</div>
<div v-else-if="isCustomType" class="chat-uikit-custom-msg chat-uikit-custom-msg--plain">
<div class="chat-uikit-custom-msg__main">系统消息</div>
<div v-if="customDataPreview" class="chat-uikit-custom-msg__sub">{{ customDataPreview }}</div>
</div>
<Message v-else v-bind="attrs" :message="message" />
</template>
<script setup lang="ts">
import { computed, useAttrs } from 'vue'
import { Message, MessageType } from '@tencentcloud/chat-uikit-vue3'
import type { MessageModel } from '@tencentcloud/chat-uikit-vue3'
import { parseImBusinessPayload } from '@/utils/im-business-message-parse'
defineOptions({ inheritAttrs: false })
const props = defineProps<{
message: MessageModel
}>()
const attrs = useAttrs()
function payloadDataString(payload: unknown): string | null {
if (!payload || typeof payload !== 'object') return null
const p = payload as Record<string, unknown>
const d = p.data
if (typeof d === 'string') return d
if (d && typeof d === 'object') return JSON.stringify(d)
const ext = p.extension
if (typeof ext === 'string' && ext.trim().startsWith('{')) return ext
return null
}
const isCustomType = computed(() => {
const t = props.message?.type as unknown
if (t === MessageType.CUSTOM) return true
if (typeof t === 'string' && /custom/i.test(t)) return true
return false
})
const friendlyCustom = computed(() => {
if (!isCustomType.value) return null
const raw = payloadDataString(props.message.payload)?.trim()
if (!raw) return null
return parseImBusinessPayload(raw)
})
const showFriendlyCustom = computed(() => isCustomType.value && !!friendlyCustom.value)
const customDescription = computed(() => {
const p = props.message.payload as Record<string, unknown> | undefined
const d = p?.description
return typeof d === 'string' && d.trim() ? d.trim() : ''
})
/** 无法识别结构时短预览,避免空白 */
const customDataPreview = computed(() => {
const raw = payloadDataString(props.message.payload)?.trim()
if (!raw || raw.length < 2) return ''
if (raw.length <= 120) return raw
return `${raw.slice(0, 117)}`
})
</script>
<style scoped lang="scss">
.chat-uikit-custom-msg {
max-width: 85%;
padding: 8px 12px;
border-radius: 8px;
background: var(--el-fill-color-light, #f4f4f5);
color: var(--el-text-color-primary, #303133);
font-size: 13px;
line-height: 1.45;
border: 1px solid var(--el-border-color-lighter, #ebeef5);
}
.chat-uikit-custom-msg--plain {
opacity: 0.95;
}
.chat-uikit-custom-msg__tag {
display: inline-block;
font-size: 11px;
padding: 0 6px;
border-radius: 4px;
background: var(--el-color-info-light-9, #f4f4f5);
color: var(--el-color-info, #909399);
margin-bottom: 4px;
}
.chat-uikit-custom-msg__main {
font-weight: 500;
}
.chat-uikit-custom-msg__sub {
margin-top: 4px;
font-size: 12px;
color: var(--el-text-color-secondary, #909399);
word-break: break-all;
}
</style>
+203 -43
View File
@@ -4,18 +4,34 @@
v-show="visible"
ref="chatWindowRef"
class="chat-floating-window"
:class="{ 'chat-floating-window--minimized': isMinimized }"
:style="windowStyle"
>
<div
class="chat-window-header"
@mousedown="onHeaderMouseDown"
>
<span class="chat-window-title"> {{ patientName }} 聊天</span>
<el-button type="danger" link class="chat-close-btn" @click="handleClose">
<el-icon><Close /></el-icon>
</el-button>
<span class="chat-window-title" :title="patientName"> {{ patientName }} 聊天</span>
<div class="chat-header-actions" @mousedown.stop>
<el-button type="danger" link class="chat-close-btn" @click="handleClose">
<el-icon><Close /></el-icon>
</el-button>
<el-tooltip v-if="!isMinimized" content="缩小为标题条,不关闭会话" placement="top">
<el-button type="primary" link class="chat-minimize-btn" @click="isMinimized = true">
<el-icon><Fold /></el-icon>
<span class="chat-header-btn-text">缩小</span>
</el-button>
</el-tooltip>
<el-tooltip v-else content="展开聊天窗口" placement="top">
<el-button type="primary" link class="chat-expand-btn" @click="isMinimized = false">
<el-icon><Expand /></el-icon>
<span class="chat-header-btn-text">展开</span>
</el-button>
</el-tooltip>
</div>
</div>
<div class="chat-container">
<div v-show="!isMinimized" class="chat-container">
<div v-if="!isReady" class="loading-container">
<el-icon class="is-loading"><Loading /></el-icon>
<span>{{ loadingText }}</span>
@@ -28,7 +44,7 @@
<div class="chat-layout">
<!-- 嵌入式问诊窗口仅与当前患者会话不展示全局会话列表 -->
<Chat class="chat-area">
<MessageList :conversationID="conversationId" />
<MessageList :conversationID="conversationId" :Message="ChatMessageItem" />
<MessageInput>
<template #headerToolbar>
<div class="message-toolbar">
@@ -37,6 +53,7 @@
<FilePicker />
<!-- 仅在 TUICallKit 初始化成功后展示音视频入口避免初始化登录未完成错误 -->
<AudioCallPicker v-if="isCallReady" />
<!-- 视频接通后 doBindCallRoom 后端 bindCallRoom 会调 CreateCloudRecordingRecordParams.RecordMode=2混流/合流 TrtcCloudRecordingService -->
<VideoCallPicker v-if="isCallReady" />
<!-- 群组视频通话基于 TUICallKitServer.calls多人通话入口 -->
<el-button
@@ -76,8 +93,9 @@
link
class="call-kit-screenshot-btn"
:loading="captureUploading"
:disabled="captureUploading"
@mousedown.stop
@click.stop="handleCallKitScreenshot"
@click.stop.prevent="handleCallKitScreenshot"
>
<el-icon><Camera /></el-icon>
<span class="call-kit-screenshot-text">截屏</span>
@@ -108,7 +126,7 @@
<script setup lang="ts">
import { ref, nextTick, watch, computed, onMounted, onUnmounted } from 'vue'
import { Loading, Close, Rank, Camera } from '@element-plus/icons-vue'
import { Loading, Close, Rank, Camera, Fold, Expand } from '@element-plus/icons-vue'
import { uploadImageBlob, uploadVideoBlob } from '@/api/file'
import {
attachLocalCallRecording,
@@ -121,6 +139,10 @@ import {
} from '@/api/tcm'
import { CallLocalRecorder } from '@/utils/call-local-recorder'
import { captureVideoFrameFromElement } from '@/utils/call-video-screenshot'
import {
DIAGNOSIS_TONGUE_IMAGES_UPDATED,
type DiagnosisTongueImagesUpdatedDetail
} from '@/utils/diagnosis-sync-events'
import feedback from '@/utils/feedback'
import {
formatTUICallUserError,
@@ -141,7 +163,10 @@ import {
AudioCallPicker,
VideoCallPicker
} from '@tencentcloud/chat-uikit-vue3'
import ChatMessageItem from './ChatMessageItem.vue'
import TencentCloudChat from '@tencentcloud/chat'
import TUIChatEngine from '@tencentcloud/chat-uikit-engine'
import { imCustomDataIndicatesVideoHangup } from '@/utils/im-call-hangup-detect'
import '@/assets/chat-uikit.css'
import {
TUICallKit,
@@ -153,6 +178,8 @@ import {
} from '@tencentcloud/call-uikit-vue'
import { TUICallEvent } from '@tencentcloud/call-engine-js'
const assistant_ids=ref('');
/** 缩小为仅标题条,便于医生操作后台其他页面(不登出、不挂断) */
const isMinimized = ref(false)
const visible = ref(false)
const isReady = ref(false)
const error = ref('')
@@ -450,6 +477,84 @@ function installTrtcCloudPreStopHook() {
let engineRoomEventHandlers: Array<{ event: TUICallEvent; fn: (e: unknown) => void }> = []
/** IM MESSAGE_RECEIVED:对端挂断等信令走 TIM,与引擎事件双通道;需在 reportCallEnded 之后绑定 */
let imHangupMessageHandler: ((event: { data?: unknown }) => void) | null = null
let lastHangupCloudStopAt = 0
const HANGUP_CLOUD_STOP_DEBOUNCE_MS = 1500
/** 将 tcm_call_record 置结束并 DeleteCloudRecording(合流停录) */
async function reportCallEnded() {
const id = recordingDiagnosisIdSnapshot ?? diagnosisId.value
if (id == null) {
console.warn('[chat-dialog] endCall 跳过:无诊单 ID(快照与当前均为空)')
return
}
try {
await endCall({ diagnosis_id: id })
console.log('[chat-dialog] endCall 已同步', { diagnosis_id: id })
} catch (e) {
console.warn('[chat-dialog] endCall 失败', e)
}
}
/** 引擎 CALL_END / IM 挂断信令共用防抖,避免重复 DeleteCloudRecording */
function debouncedStopRecordingAndEndCloud(source: string) {
const now = Date.now()
if (now - lastHangupCloudStopAt < HANGUP_CLOUD_STOP_DEBOUNCE_MS) return
lastHangupCloudStopAt = now
console.log('[chat-dialog] 挂断停合流:', source)
if (localCallRecorder.isRecording()) {
localCallRecorder.beginStopNow()
}
void reportCallEnded()
}
function bindImHangupMessageListener() {
unbindImHangupMessageListener()
try {
const chat = TUIChatEngine?.chat as { on?: (ev: string, fn: (e: { data?: unknown }) => void) => void; off?: (ev: string, fn: (e: { data?: unknown }) => void) => void } | undefined
if (!chat?.on) {
console.warn('[chat-dialog] TUIChatEngine.chat 不可用,无法监听 IM 视频挂断信令')
return
}
imHangupMessageHandler = (event: { data?: unknown }) => {
if (!visible.value) return
const pu = patientUserId.value
if (!pu) return
const expectConv = pu.startsWith('C2C') ? pu : `C2C${pu}`
const list = Array.isArray(event.data) ? event.data : []
for (const m of list as Array<Record<string, unknown>>) {
if (!m || m.conversationID !== expectConv) continue
const t = m.type as string | number | undefined
const isCustom =
t === TencentCloudChat.TYPES.MSG_CUSTOM ||
t === 'TIMCustomElem' ||
(typeof t === 'string' && /custom/i.test(t))
if (!isCustom) continue
const payload = m.payload as Record<string, unknown> | undefined
const raw = typeof payload?.data === 'string' ? payload.data : ''
if (!raw || !imCustomDataIndicatesVideoHangup(raw)) continue
debouncedStopRecordingAndEndCloud('IM')
break
}
}
chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, imHangupMessageHandler)
} catch (e) {
console.warn('[chat-dialog] 绑定 IM 挂断监听失败', e)
}
}
function unbindImHangupMessageListener() {
if (!imHangupMessageHandler) return
try {
const chat = TUIChatEngine?.chat as { off?: (ev: string, fn: (e: { data?: unknown }) => void) => void } | undefined
chat?.off?.(TencentCloudChat.EVENT.MESSAGE_RECEIVED, imHangupMessageHandler)
} catch {
//
}
imHangupMessageHandler = null
}
function bindEngineRoomEvents() {
try {
type EngineWithEvents = Record<string, unknown> & {
@@ -469,11 +574,7 @@ function bindEngineRoomEvents() {
void tryBindRoomIfReady()
}
const onEarlyStopRecording = () => {
console.log('[chat-dialog] 检测到通话结束事件,立即停止录制')
if (localCallRecorder.isRecording()) {
console.log('[chat-dialog] 录制进行中,触发 beginStopNow')
localCallRecorder.beginStopNow()
}
debouncedStopRecordingAndEndCloud('TUICallEngine')
}
const earlyStopEvents = [
TUICallEvent.CALL_END,
@@ -549,9 +650,18 @@ async function doBindCallRoom(rid: string) {
}
lastBoundRoomKey.value = key
try {
await bindCallRoom({ diagnosis_id: diagnosisId.value, room_id: rid })
const bindRes = (await bindCallRoom({
diagnosis_id: diagnosisId.value,
room_id: rid
})) as { cloud_recording?: { started?: boolean; task_id?: string; message?: string } } | undefined
clearBindRoomRetry()
console.log('[chat-dialog] bindCallRoom 成功', { room_id: rid })
console.log('[chat-dialog] bindCallRoom 成功', { room_id: rid, bindRes })
const cr = bindRes?.cloud_recording
if (cr && cr.started === false && cr.message) {
feedback.msgWarning(
`云端合流录制未启动(关闭控制台全局录制后仅依赖 API):${cr.message}`
)
}
} catch (e) {
console.warn('[chat-dialog] bindCallRoom 失败', e)
lastBoundRoomKey.value = ''
@@ -590,17 +700,6 @@ async function ensureCallRecordStarted() {
}
}
/** 将 tcm_call_record 中本条进行中的记录置为已结束(挂断、对端挂断、异常断线、关窗等) */
async function reportCallEnded() {
if (diagnosisId.value == null) return
try {
await endCall({ diagnosis_id: diagnosisId.value })
console.log('[chat-dialog] endCall 已同步')
} catch (e) {
console.warn('[chat-dialog] endCall 失败', e)
}
}
function setupCallRoomBinding() {
tearDownCallRoomBinding?.()
let previousCallStatus =
@@ -616,9 +715,9 @@ function setupCallRoomBinding() {
localRecordingBadge.value = false
if (previousCallStatus === CALL_STATUS_CALLING || previousCallStatus === CALL_STATUS_CONNECTED) {
void (async () => {
await finalizeLocalRecordingAndAttach()
showCallKitWindow.value = false
await reportCallEnded()
showCallKitWindow.value = false
await finalizeLocalRecordingAndAttach()
})()
}
clearBindRoomRetry()
@@ -842,6 +941,7 @@ onUnmounted(() => {
localCallRecorder.reset()
tearDownCallRoomBinding?.()
unbindEngineRoomEvents()
unbindImHangupMessageListener()
unhookConsoleErrorForPackageHint()
unbindEnginePackageErrorListener()
window.removeEventListener('unhandledrejection', onTuiCallUnhandledRejection)
@@ -916,10 +1016,10 @@ watch(() => activeConversation.value, async (newConversation) => {
const open = async (data: { patientId: number; patientName: string; diagnosisId?: number }) => {
visible.value = true
isMinimized.value = false
posX.value = 100
posY.value = 80
callKitX.value = Math.max(0, (window.innerWidth - 375) / 2)
callKitY.value = Math.max(0, (window.innerHeight - 667) / 2)
resetCallKitPositionToLeft()
patientName.value = data.patientName
patientId.value = data.patientId
diagnosisId.value = data.diagnosisId || null
@@ -959,6 +1059,8 @@ const open = async (data: { patientId: number; patientName: string; diagnosisId?
userSig: res.userSig,
useUploadPlugin: true
})
// IM 自定义信令:对端挂断等 → 立即 endCall 停合流(不依赖小程序上报)
bindImHangupMessageListener()
const sdkAPPid = Number(res.sdkAppId)
// 初始化 TUICallKit(聊天内音视频通话依赖此初始化);只需全局成功一次
@@ -989,17 +1091,18 @@ const open = async (data: { patientId: number; patientName: string; diagnosisId?
localRecordingBadge.value = false
localRecordingRound++
recordingDiagnosisIdSnapshot = diagnosisId.value
resetCallKitPositionToLeft()
showCallKitWindow.value = true
pendingCallRecordStart = ensureCallRecordStarted()
void pendingCallRecordStart
},
// 同步停录须早于 SDK 内部退房;再 finalize 上传并关窗
// 须先 endCallDeleteCloudRecording),再 await 本地上传;否则上传 WebM 耗时数分钟会拖住云端停录,控制台房间长期「尚未结束」
afterCalling: () => {
localCallRecorder.beginStopNow()
void (async () => {
await finalizeLocalRecordingAndAttach()
showCallKitWindow.value = false
await reportCallEnded()
showCallKitWindow.value = false
await finalizeLocalRecordingAndAttach()
})()
}
})
@@ -1120,8 +1223,22 @@ const posStartY = ref(0)
const callKitWrapperRef = ref<HTMLElement>()
const callKitContentRef = ref<HTMLElement>()
const captureUploading = ref(false)
/** 与 .chat-dialog-call-kit-wrapper 尺寸一致 */
const CALL_KIT_FLOAT_W = 375
const CALL_KIT_FLOAT_H = 667
const CALL_KIT_EDGE = 16
const callKitX = ref(0)
const callKitY = ref(0)
/** 视频浮窗默认靠左、垂直居中(每次发起通话也会重置,避免沿用上次拖动位置) */
function resetCallKitPositionToLeft() {
callKitX.value = CALL_KIT_EDGE
callKitY.value = Math.max(
CALL_KIT_EDGE,
Math.floor((window.innerHeight - CALL_KIT_FLOAT_H) / 2)
)
}
const isCallKitDragging = ref(false)
const callKitDragStartX = ref(0)
const callKitDragStartY = ref(0)
@@ -1157,15 +1274,21 @@ const onCallKitDragEnd = () => {
/** 截取当前视频画面并上传,同步到对应患者诊单的「舌苔照片」 */
const handleCallKitScreenshot = async () => {
if (patientId.value == null) {
feedback.msgWarning('缺少患者信息,无法同步舌苔照片')
return
}
const el = callKitContentRef.value
if (!el) return
// 同步防重入:避免连点触发两次上传、诊单里出现两张图
if (captureUploading.value) return
captureUploading.value = true
try {
const blob = await captureVideoFrameFromElement(el)
if (patientId.value == null) {
feedback.msgWarning('缺少患者信息,无法同步舌苔照片')
return
}
const wrap = callKitWrapperRef.value
const content = callKitContentRef.value
const root = wrap || content
if (!root) return
const blob = await captureVideoFrameFromElement(root, {
extraRoots: [content].filter(Boolean) as HTMLElement[]
})
if (!blob) {
feedback.msgWarning('截屏失败,请确认视频画面已加载')
return
@@ -1195,6 +1318,14 @@ const handleCallKitScreenshot = async () => {
payload.tongue_images = next
await tcmDiagnosisEdit(payload)
feedback.msgSuccess('舌苔照片已同步到诊单')
window.dispatchEvent(
new CustomEvent<DiagnosisTongueImagesUpdatedDetail>(DIAGNOSIS_TONGUE_IMAGES_UPDATED, {
detail: {
diagnosisId: diagnosisId.value,
tongue_images: next
}
})
)
} catch (e: unknown) {
const err = e as Error
console.error(err)
@@ -1224,7 +1355,8 @@ const windowStyle = computed(() => ({
}))
const onHeaderMouseDown = (e: MouseEvent) => {
if ((e.target as HTMLElement).closest('.chat-close-btn')) return
const t = e.target as HTMLElement
if (t.closest('.chat-close-btn') || t.closest('.chat-header-actions')) return
isDragging.value = true
dragStartX.value = e.clientX
dragStartY.value = e.clientY
@@ -1247,6 +1379,7 @@ const onHeaderMouseUp = () => {
}
const handleClose = async () => {
unbindImHangupMessageListener()
// 关闭时如有通话中/拨通中,先结束本地录制再挂断(不依赖悬浮窗是否显示)
if (isCallReady.value) {
const st = TUIStore.getData(StoreName.CALL, NAME.CALL_STATUS)
@@ -1287,7 +1420,7 @@ defineExpose({ open })
/* 浮动窗口:无遮罩,不遮挡页面,可任意拖动 */
.chat-floating-window {
position: fixed;
width: 900px;
width: 600px;
height: 75vh;
min-height: 400px;
max-height: 90vh;
@@ -1298,6 +1431,14 @@ defineExpose({ open })
display: flex;
flex-direction: column;
overflow: hidden;
&--minimized {
width: min(360px, 92vw);
height: auto;
min-height: 0;
max-height: none;
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}
}
.chat-window-header {
@@ -1314,9 +1455,28 @@ defineExpose({ open })
.chat-window-title {
font-size: 16px;
font-weight: 500;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-right: 8px;
}
.chat-close-btn {
.chat-header-actions {
display: flex;
align-items: center;
gap: 2px;
flex-shrink: 0;
}
.chat-header-btn-text {
margin-left: 2px;
font-size: 13px;
}
.chat-close-btn,
.chat-minimize-btn,
.chat-expand-btn {
cursor: pointer;
flex-shrink: 0;
}
@@ -1,7 +1,7 @@
<template>
<el-drawer
v-model="visible"
title="中医处方单"
:title="drawerTitle"
size="1200px"
:close-on-click-modal="false"
@close="handleClose"
@@ -264,7 +264,19 @@
<h2 class="prescription-title">{{ templateConfig.stationName }}处方笺</h2>
<div class="prescription-type">
<el-tag v-if="savedPrescription.void_status === 1" type="danger" size="small">已作废</el-tag>
<template v-else>
<el-tag
v-else-if="approvedPreviewOnly"
type="success"
size="small"
class="mr-1"
>已通过</el-tag>
<el-tag
v-else-if="Number(savedPrescription.audit_status) === 0"
type="warning"
size="small"
class="mr-1"
>待审核</el-tag>
<template v-if="savedPrescription.void_status !== 1">
<div>普通处方</div>
<div class="text-sm">当日有效</div>
</template>
@@ -460,7 +472,7 @@
下载PDF
</el-button>
<el-button
v-if="savedPrescription.void_status !== 1"
v-if="savedPrescription.void_status !== 1 && !approvedPreviewOnly"
type="danger"
plain
:loading="voiding"
@@ -468,7 +480,7 @@
>
作废处方
</el-button>
<el-button @click="handleNewPrescription">新建处方</el-button>
<el-button v-if="!approvedPreviewOnly" @click="handleNewPrescription">新建处方</el-button>
<el-button @click="handleClose">关闭</el-button>
</div>
</div>
@@ -609,6 +621,15 @@ const signatureCanvasRef = ref<HTMLCanvasElement>()
const isDrawing = ref(false)
const savedPrescription = ref<any>(null)
/** 已通过且未作废:与消费者处方「查看」一致,仅预览,不可作废/再开新方 */
const approvedPreviewOnly = computed(() => {
const s = savedPrescription.value
if (!s) return false
return Number(s.audit_status) === 1 && Number(s.void_status) !== 1
})
const drawerTitle = computed(() => (approvedPreviewOnly.value ? '查看处方' : '中医处方单'))
// 处方库相关
const showLibraryDialog = ref(false)
const libraryLoading = ref(false)
+5 -1
View File
@@ -4,7 +4,11 @@ const config = {
version: '1.9.4', //版本号
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
urlPrefix: 'adminapi', //请求默认前缀
timeout: 10 * 1000 //请求超时时长
// 默认 30s;可在 .env 设置 VITE_APP_REQUEST_TIMEOUT=60000(毫秒)覆盖
timeout:
Number(import.meta.env.VITE_APP_REQUEST_TIMEOUT) > 0
? Number(import.meta.env.VITE_APP_REQUEST_TIMEOUT)
: 30 * 1000
}
export default config
+3 -2
View File
@@ -38,8 +38,9 @@
--el-fill-color-dark: #ebedf0;
--el-fill-color-darker: #e6e8eb;
--el-fill-color-blank: #ffffff;
--el-mask-color: rgba(255, 255, 255, 0.9);
--el-mask-color-extra-light: rgba(255, 255, 255, 0.3);
/* 过亮会盖住抽屉/弹窗下的内容;Element Loading 与部分蒙层共用此变量 */
--el-mask-color: rgba(255, 255, 255, 0.5);
--el-mask-color-extra-light: rgba(255, 255, 255, 0.22);
-el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.04), 0px 8px 20px rgba(0, 0, 0, 0.08);
--el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.12);
--el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.12);
+172 -14
View File
@@ -1,20 +1,178 @@
/** 视频通话区域截取当前最大的一路 video 帧(WebRTC 画面 */
export async function captureVideoFrameFromElement(
container: HTMLElement
): Promise<Blob | null> {
const videos = Array.from(container.querySelectorAll('video')) as HTMLVideoElement[]
let best: HTMLVideoElement | null = null
let bestArea = 0
/** 视频 track 是否在播(排除已结束轨道 */
function hasLiveVideoTrack(video: HTMLVideoElement): boolean {
const so = video.srcObject
if (!(so instanceof MediaStream)) return false
return so.getVideoTracks().some((t) => t.readyState === 'live')
}
/** 页面上实际占位面积(主画面远大于本地小窗) */
function layoutArea(v: HTMLVideoElement): number {
const r = v.getBoundingClientRect()
return Math.max(0, r.width) * Math.max(0, r.height)
}
function videoPixelArea(v: HTMLVideoElement): number {
const vw = v.videoWidth || v.clientWidth
const vh = v.videoHeight || v.clientHeight
return vw * vh
}
/** 同一路 MediaStream 可能挂多个 video,只保留占位最大的一路,避免重复逻辑与歧义 */
function dedupeVideosByStream(videos: HTMLVideoElement[]): HTMLVideoElement[] {
const byKey = new Map<string, HTMLVideoElement>()
const areaByKey = new Map<string, number>()
for (const v of videos) {
if (v.readyState < 2) continue
const vw = v.videoWidth || v.clientWidth
const vh = v.videoHeight || v.clientHeight
const area = vw * vh
if (area > bestArea) {
bestArea = area
best = v
const so = v.srcObject
if (!(so instanceof MediaStream)) continue
const tracks = so.getVideoTracks()
const key =
(so.id && String(so.id)) ||
tracks
.map((t) => t.id)
.filter(Boolean)
.join('|') ||
`${tracks.length}`
const la = layoutArea(v)
const prev = areaByKey.get(key) ?? 0
if (la >= prev) {
byKey.set(key, v)
areaByKey.set(key, la)
}
}
if (byKey.size === 0) return videos
return Array.from(byKey.values())
}
/**
* 1v1 常见:远端全屏 + 本地小窗。去掉占位明显偏小的一路(画中画),只留主画面候选。
*/
function dropObviousPip(videos: HTMLVideoElement[]): HTMLVideoElement[] {
if (videos.length < 2) return videos
let maxL = 0
for (const v of videos) maxL = Math.max(maxL, layoutArea(v))
if (maxL <= 1) return videos
const minL = Math.min(...videos.map((v) => layoutArea(v)))
if (minL / maxL >= 0.25) return videos
return videos.filter((v) => layoutArea(v) >= maxL * 0.25)
}
/** 本地预览常见:镜像(scaleX(-1) */
function hasMirrorTransform(el: HTMLElement): boolean {
let p: HTMLElement | null = el
for (let i = 0; i < 12 && p; i++) {
const t = getComputedStyle(p).transform
if (t && t !== 'none') {
if (/matrix\(\s*-1\s*,/.test(t) || /scaleX\(\s*-1/.test(t)) return true
}
p = p.parentElement
}
return false
}
/**
* 根据 DOM 判断是否为「本方/本地」预览(腾讯云 TUICall / TRTC 常见 class 及通用命名)
* 注意:不要用泛化的 "player",否则本地/远端容器类名都会命中,导致无法区分。
*/
function isLikelyLocalPreviewVideo(video: HTMLVideoElement): boolean {
const localHints =
/local|self|pusher|mini[_-]?stream|preview[_-]?self|own[_-]?camera|tui-local|tencent-local|stream-local|publisher|send|pip|picture[_-]?in[_-]?picture/i
const remoteHints =
/remote|subscriber|peer|other|tui-remote|stream-remote|big-stream|play[_-]?stream|receiver|pull|substream/i
let el: HTMLElement | null = video
for (let depth = 0; depth < 20 && el; depth++) {
const s = `${el.className || ''} ${el.id || ''} ${el.getAttribute('data-type') || ''}`
if (remoteHints.test(s)) return false
if (localHints.test(s)) return true
el = el.parentElement
}
return false
}
/**
* 从通话区域截取一帧 JPEG。
* 默认优先截取「对方/远端」画面:去重 MediaStream、去掉画中画小窗、排除本地预览与镜像节点。
*/
export async function captureVideoFrameFromElement(
searchRoot: HTMLElement | null,
options?: { preferRemote?: boolean; extraRoots?: (HTMLElement | null)[] }
): Promise<Blob | null> {
const preferRemote = options?.preferRemote !== false
const roots = [searchRoot, ...(options?.extraRoots || [])].filter((r): r is HTMLElement => !!r)
const videoSet = new Set<HTMLVideoElement>()
for (const r of roots) {
for (const v of r.querySelectorAll('video')) {
if (v instanceof HTMLVideoElement) videoSet.add(v)
}
}
if (videoSet.size === 0) {
const wrap = document.querySelector('.chat-dialog-call-kit-wrapper')
if (wrap) {
for (const v of wrap.querySelectorAll('video')) {
if (v instanceof HTMLVideoElement) videoSet.add(v)
}
}
}
if (videoSet.size === 0) {
document.body.querySelectorAll('video').forEach((v) => {
if (v instanceof HTMLVideoElement && hasLiveVideoTrack(v)) videoSet.add(v)
})
}
let candidates = Array.from(videoSet).filter(
(v) => v.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && hasLiveVideoTrack(v)
)
if (candidates.length === 0) {
candidates = Array.from(videoSet).filter((v) => v.readyState >= 2)
}
if (candidates.length === 0) return null
candidates = dedupeVideosByStream(candidates)
let best: HTMLVideoElement | null = null
let bestLayout = 0
let bestPixel = 0
if (preferRemote) {
const scored = candidates.map((v) => ({
v,
layout: layoutArea(v),
pixel: videoPixelArea(v),
localClass: isLikelyLocalPreviewVideo(v),
mirror: hasMirrorTransform(v)
}))
let pool = scored.filter((x) => !x.localClass && !x.mirror)
if (pool.length === 0) pool = scored.filter((x) => !x.localClass)
if (pool.length === 0) pool = scored.filter((x) => !x.mirror)
if (pool.length === 0) pool = scored
let videos = pool.map((x) => x.v)
videos = dropObviousPip(videos)
pool = pool.filter((x) => videos.includes(x.v))
for (const x of pool) {
if (x.layout > bestLayout || (x.layout === bestLayout && x.pixel > bestPixel)) {
bestLayout = x.layout
bestPixel = x.pixel
best = x.v
}
}
} else {
for (const v of candidates) {
const la = layoutArea(v)
const pa = videoPixelArea(v)
if (la > bestLayout || (la === bestLayout && pa > bestPixel)) {
bestLayout = la
bestPixel = pa
best = v
}
}
}
if (!best) return null
const vw = best.videoWidth || best.clientWidth
const vh = best.videoHeight || best.clientHeight
+9
View File
@@ -0,0 +1,9 @@
/**
* 跨组件同步诊单数据(如视频截屏写入舌苔照后刷新编辑抽屉)
*/
export const DIAGNOSIS_TONGUE_IMAGES_UPDATED = 'zyt:diagnosis-tongue-images-updated'
export type DiagnosisTongueImagesUpdatedDetail = {
diagnosisId: number
tongue_images: string[]
}
@@ -0,0 +1,106 @@
import dayjs from 'dayjs'
export type FriendlyParse = { main: string; sub?: string; tag?: string }
/** 业务时间:支持秒级时间戳或毫秒(字符串数字) */
export function formatBizTime(t: unknown): string | undefined {
if (t == null || t === '') return undefined
const n =
typeof t === 'string' && /^\d+$/.test(t.trim())
? parseInt(t.trim(), 10)
: Number(t)
if (!Number.isFinite(n) || n <= 0) return undefined
return n > 1e12
? dayjs(n).format('YYYY-MM-DD HH:mm:ss')
: dayjs.unix(n).format('YYYY-MM-DD HH:mm:ss')
}
export function parseRtcInner(inner: Record<string, unknown>): FriendlyParse {
const callType = inner.call_type
const callTypeLabel =
callType === 2 ? '视频通话' : callType === 1 ? '语音通话' : '通话'
const cmd = String(inner.cmd || '')
const cmdMap: Record<string, string> = {
hangup: '已结束',
invite: '发起通话',
linebusy: '对方忙线',
cancel: '已取消',
reject: '已拒绝',
accept: '已接听',
timeout: '无人接听'
}
const action = cmdMap[cmd] || (cmd ? `状态:${cmd}` : '')
const main = action ? `${callTypeLabel} · ${action}` : callTypeLabel
const parts: string[] = []
if (inner.inviter) parts.push(`发起方 ${inner.inviter}`)
if (inner.invitee) parts.push(`对方 ${inner.invitee}`)
if (inner.groupID) parts.push(`群组 ${inner.groupID}`)
return {
main,
sub: parts.length ? parts.join('') : undefined,
tag: '通话'
}
}
/**
* 将 IM 自定义 / 信令 JSON 解析为可读文案(医生进诊室、音视频通话等)。
* 与后台 IM 漫游、小程序 TUIKit 约定字段一致。
*/
export function parseImBusinessPayload(raw: string): FriendlyParse | null {
const s = raw.trim()
if (!s.startsWith('{')) return null
let o: Record<string, unknown>
try {
o = JSON.parse(s) as Record<string, unknown>
} catch {
return null
}
if (!('businessID' in o) && !('cmd' in o)) {
return null
}
if (o.businessID === 'doctor_entered_consult_room') {
const t = formatBizTime(o.time)
return { main: '医生已进入诊室', sub: t, tag: '诊室' }
}
if (o.businessID === 'patient_opened_chat') {
const parts: string[] = []
if (o.patientName) parts.push(`患者:${String(o.patientName)}`)
if (o.patientId != null && o.patientId !== '') parts.push(`患者 ID${String(o.patientId)}`)
if (o.doctorId != null && o.doctorId !== '') parts.push(`关联医生:${String(o.doctorId)}`)
const t = formatBizTime(o.time)
if (t) parts.push(t)
return { main: '患者进入聊天', sub: parts.length ? parts.join(' · ') : undefined, tag: '诊室' }
}
if (o.businessID === 'user_typing_status') {
return { main: '对方正在输入…', tag: '状态' }
}
if (o.businessID === 'consultation_complete') {
return { main: '问诊已完成', sub: formatBizTime(o.time), tag: '诊室' }
}
if (o.businessID === 1 || o.businessID === '1') {
let inner: unknown = o.data
if (typeof inner === 'string') {
try {
inner = JSON.parse(inner)
} catch {
return { main: '通话信令', sub: '内层数据解析失败', tag: '通话' }
}
}
if (inner && typeof inner === 'object') {
return parseRtcInner(inner as Record<string, unknown>)
}
return null
}
if (o.businessID === 'rtc_call' || o.cmd) {
return parseRtcInner(o as Record<string, unknown>)
}
return null
}
+67
View File
@@ -0,0 +1,67 @@
/**
* 判断 TIM 自定义消息 payload.data 是否表示视频通话结束/挂断/未接通,
* 用于 PC 管理端在 IM 收信后立即 endCall → DeleteCloudRecording,不依赖小程序上报。
*/
function parseInnerData(data: unknown): Record<string, unknown> | null {
if (data == null) return null
if (typeof data === 'object' && !Array.isArray(data)) return data as Record<string, unknown>
if (typeof data !== 'string') return null
const t = data.trim()
if (!t.startsWith('{')) return null
try {
return JSON.parse(t) as Record<string, unknown>
} catch {
return null
}
}
function rtcCmdIndicatesHangup(cmd: string): boolean {
const c = cmd.toLowerCase()
return ['hangup', 'cancel', 'reject', 'timeout', 'linebusy', 'end'].includes(c)
}
/**
* @param raw TIM 自定义消息外层 JSON 字符串(payload.data
*/
export function imCustomDataIndicatesVideoHangup(raw: string): boolean {
const s = raw.trim()
if (!s) return false
// 部分信令不落标准 businessID,整段字符串匹配(如含 call_end / call_engine
if (/\bcall_end\b/i.test(s) && (/call_engine|call_record|rtc/i.test(s) || /"reason"\s*:\s*\d/.test(s))) {
return true
}
if (/call_engine_srv\.[a-z_]*call[a-z_]*/i.test(s) && /hangup|end|leave|reject|cancel/i.test(s)) {
return true
}
if (!s.startsWith('{')) return false
let o: Record<string, unknown>
try {
o = JSON.parse(s) as Record<string, unknown>
} catch {
return false
}
// 标准音视频 businessID: 1
if (o.businessID === 1 || o.businessID === '1') {
const inner = parseInnerData(o.data)
if (inner) {
const cmd = String(inner.cmd ?? '')
if (rtcCmdIndicatesHangup(cmd)) return true
}
}
if (o.businessID === 'rtc_call' || typeof o.cmd === 'string') {
if (rtcCmdIndicatesHangup(String(o.cmd ?? ''))) return true
}
const nested = JSON.stringify(o)
if (nested.includes('call_engine_srv') && /hangup|call_end|CALL_END|reject|cancel/i.test(nested)) {
return true
}
return false
}
File diff suppressed because it is too large Load Diff
+27
View File
@@ -99,6 +99,33 @@
<span class="font-semibold text-blue-600">{{ row.total_count }}</span>
</template>
</el-table-column>
<el-table-column prop="diagnosis_count" label="诊单数" width="90" align="center">
<template #default="{ row }">
<el-tooltip
content="统计期内该医生挂号涉及的去重诊单数,用于计算成交率"
placement="top"
>
<span class="text-gray-700">{{ row.diagnosis_count ?? 0 }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="deal_count" label="成交单" width="90" align="center">
<template #default="{ row }">
<el-tooltip content="上述诊单中已开有效处方(未删除、未作废)的数量" placement="top">
<el-tag type="primary" size="small">{{ row.deal_count ?? 0 }}</el-tag>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="deal_rate" label="成交率" width="100" align="center">
<template #default="{ row }">
<span :class="getCompletionRateClass(Number(row.deal_rate ?? 0))">
{{ row.deal_rate ?? 0 }}%
</span>
</template>
</el-table-column>
<el-table-column prop="registered_count" label="已挂号" width="90" align="center">
<template #default="{ row }">
@@ -331,7 +331,9 @@ const formData = reactive({
dietary_taboo: [] as string[],
usage_notes: '',
doctor_name: '',
is_shared: 0
is_shared: 0,
/** 预约开方直接生效,不走消费者处方「待审核」 */
audit_status: 1
})
// 表单验证规则
@@ -399,6 +401,7 @@ const resetForm = () => {
formData.usage_notes = ''
formData.doctor_name = ''
formData.is_shared = 0
formData.audit_status = 0
}
// 打开抽屉
+55 -25
View File
@@ -106,17 +106,15 @@
:data="pager.lists"
size="default"
class="appointment-table"
stripe
:row-class-name="getRowClassName"
>
<el-table-column label="ID" prop="id" width="72" align="center" />
<el-table-column label="患者信息" min-width="140">
<template #default="{ row }">
<div class="patient-cell">
<div class="patient-avatar">
<!-- <div class="patient-avatar">
{{ (row.patient_name || '患').charAt(0) }}
</div>
</div> -->
<div class="patient-info">
<div class="patient-name">{{ row.patient_name }}</div>
<div class="patient-phone">{{ row.patient_phone }}</div>
@@ -139,9 +137,14 @@
</template>
</el-table-column>
<el-table-column label="助理" prop="assistant_name" width="100" show-overflow-tooltip>
<template #default="{ row }">
{{ row.assistant_name || '—' }}
</template>
</el-table-column>
<el-table-column label="预约类型" prop="appointment_type_desc" width="100" show-overflow-tooltip />
<!-- <el-table-column label="预约类型" prop="appointment_type_desc" width="100" show-overflow-tooltip /> -->
<el-table-column label="确认诊单" width="90" align="center">
<template #default="{ row }">
@@ -172,8 +175,7 @@
<el-table-column label="备注" prop="remark" min-width="120" show-overflow-tooltip />
<el-table-column label="操作" width="380" fixed="right" align="left">
<template #default="{ row }">
<div class="action-btns">
@@ -232,7 +234,7 @@
size="small"
@click="handlePrescription(row)"
>
开方
{{ prescriptionActionLabel(row) }}
</el-button>
<el-dropdown trigger="click" @command="(cmd) => handleAction(cmd, row)" placement="bottom-end">
@@ -456,7 +458,7 @@
</el-dialog>
<!-- 编辑患者弹窗 -->
<edit-popup ref="editRef" @success="loadData" />
<edit-popup ref="editRef" @success="() => loadData({ silent: true })" />
<!-- 中医处方单 -->
<tcm-prescription ref="prescriptionRef" @success="onPrescriptionSuccess" />
@@ -506,7 +508,7 @@
<script setup lang="ts">
import { usePaging } from '@/hooks/usePaging'
import { defineAsyncComponent, onMounted, watch } from 'vue'
import { defineAsyncComponent, onMounted, onUnmounted, watch } from 'vue'
import { appointmentLists, cancelAppointment, completeAppointment, appointmentDetail } from '@/api/doctor'
import { getCallSignature, generateMiniProgramQrcode, tcmDiagnosisDetail, prescriptionGetByAppointment } from '@/api/tcm'
import { getDictData } from '@/api/app'
@@ -598,11 +600,6 @@ watch(
}
)
// 待接诊行高亮
const getRowClassName = ({ row }: { row: any }) => {
return row.status === 1 ? 'row-pending' : ''
}
// 切换选项卡
const handleTabChange = (tabName: string | number) => {
if (tabName === 'all') {
@@ -613,11 +610,16 @@ const handleTabChange = (tabName: string | number) => {
resetPage()
}
/** 列表静默轮询间隔(毫秒) */
const LIST_POLL_MS = 20_000
let listPollTimer: ReturnType<typeof setInterval> | null = null
// 列表 + Tab 角标:一次请求(后端 extend.status_count),翻页等仅 getLists 不重复统计
const loadData = async () => {
const loadData = async (opts?: { silent?: boolean }) => {
const silent = opts?.silent === true
formData.include_status_counts = 1
try {
await getLists()
await getLists({ silent })
const ext = pager.extend as { status_count?: Record<number | string, number> }
const sc = ext?.status_count
if (sc) {
@@ -628,6 +630,11 @@ const loadData = async () => {
}
}
}
} catch (e) {
/* 定时静默刷新失败不向外抛,避免未处理的 rejection;手动刷新仍交给上层/拦截器 */
if (!silent) {
throw e
}
} finally {
formData.include_status_counts = 0
}
@@ -929,7 +936,18 @@ const onPrescriptionSuccess = () => {
editRef.value?.refreshCaseList?.()
}
// 开处方
/** 与本预约关联的处方:已通过且未作废 → 与消费者处方「查看」同为只读预览 */
function prescriptionActionLabel(row: any) {
if (
row?.prescription_audit_status === 1 &&
Number(row?.prescription_void_status) !== 1
) {
return '查看'
}
return '开方'
}
// 开处方 / 查看已通过处方(只读)
const handlePrescription = (row: any) => {
if (!row.diagnosis_id && !row.patient_id) {
feedback.msgWarning('该预约缺少诊单信息,请先编辑患者')
@@ -972,6 +990,16 @@ formData.status = 1
onMounted(() => {
loadData()
listPollTimer = setInterval(() => {
loadData({ silent: true })
}, LIST_POLL_MS)
})
onUnmounted(() => {
if (listPollTimer !== null) {
clearInterval(listPollTimer)
listPollTimer = null
}
})
</script>
@@ -1113,9 +1141,10 @@ onMounted(() => {
.action-btns {
display: flex;
align-items: center;
align-items: flex-start;
flex-wrap: wrap;
gap: 0 8px;
row-gap: 6px;
column-gap: 8px;
.action-qrcode {
color: var(--el-color-warning) !important;
@@ -1135,11 +1164,12 @@ onMounted(() => {
:deep(.el-table__row) {
cursor: default;
}
:deep(.el-table__row.row-pending) {
background: linear-gradient(90deg, rgba(var(--el-color-success-rgb), 0.06) 0%, transparent 100%) !important;
/* 数据行纯白底(不使用 stripe / 行高亮色) */
:deep(.el-table__body tr > td) {
background-color: #ffffff !important;
}
:deep(.el-table__row.row-pending:hover > td) {
background: linear-gradient(90deg, rgba(var(--el-color-success-rgb), 0.1) 0%, transparent 100%) !important;
:deep(.el-table__body tr:hover > td) {
background-color: var(--el-fill-color-light) !important;
}
}
+12 -1
View File
@@ -188,6 +188,17 @@
<el-radio :label="0">禁用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="在用药物" prop="current_medications">
<el-input
v-model="formData.current_medications"
type="textarea"
:rows="3"
placeholder="请填写患者当前正在使用的药物(如降压药、降糖药等),多种请换行或顿号分隔"
maxlength="2000"
show-word-limit
/>
</el-form-item>
</div>
<!-- 主诉 -->
@@ -549,6 +560,7 @@ const formData = ref({
prescription: '',
doctor_advice: '',
remark: '',
current_medications: '',
status: 1
})
@@ -578,7 +590,6 @@ const formRules = {
phone: [{ required: true, validator: validatePhone, trigger: 'blur' }],
gender: [{ required: true, message: '请选择性别', trigger: 'change' }],
age: [{ required: true, message: '请输入年龄', trigger: 'blur' }],
diagnosis_date: [{ required: true, message: '请选择诊断日期', trigger: 'change' }],
diagnosis_type: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
syndrome_type: [{ required: true, message: '请选择证型', trigger: 'change' }],
diabetes_type: [{ required: true, message: '请选择糖尿病期数', trigger: 'change' }]
+75 -2
View File
@@ -8,6 +8,14 @@
:z-index="2000"
>
<div v-loading="loading">
<el-alert
v-if="todayHasBlockingAppointment"
:type="isSelectingToday ? 'warning' : 'info'"
:closable="false"
show-icon
class="today-block-alert"
:title="todayBlockingAlertText"
/>
<el-form :model="form" label-width="100px" class="appointment-form">
<!-- 上次就诊 -->
<el-form-item label="上次就诊:">
@@ -208,6 +216,8 @@ const lastVisit = ref('')
const selectedDoctorId = ref(0)
const doctorRosterDates = ref<string[]>([]) // 医生有排班的日期列表
const channelOptions = ref<{ name: string; value: string }[]>([])
/** 今日是否已有「已预约(1)/已过号(4)」挂号;仅在选择「今天」再预约时禁止提交,其他日期可正常挂 */
const todayHasBlockingAppointment = ref(false)
const patientInfo = reactive({
id: 0,
@@ -286,9 +296,28 @@ const filteredTimeSlots = computed(() => {
})
})
const todayYmd = () => dayjs().format('YYYY-MM-DD')
/** 当前选中的预约日是否为今天(与今日冲突检测联动) */
const isSelectingToday = computed(() => form.date === todayYmd())
/** 今日已有占用号时:选今天给警告文案,选他日给提示文案 */
const todayBlockingAlertText = computed(() => {
if (!todayHasBlockingAppointment.value) return ''
return isSelectingToday.value
? '该患者今日已有挂号(已预约或已过号),不能重复预约今天,请改选其他日期。'
: '该患者今日已有挂号记录;可为患者预约其他日期的时段。'
})
/** 仅当「选今天 + 今日已有占用号」时禁止提交 */
const blockedByTodayDuplicate = computed(
() => todayHasBlockingAppointment.value && isSelectingToday.value
)
// 是否可以提交
const canSubmit = computed(() => {
return (
!blockedByTodayDuplicate.value &&
selectedDoctorId.value &&
form.date &&
form.appointmentTime &&
@@ -318,6 +347,7 @@ const open = async (patient: any) => {
timeSlots.value = []
doctorRosterDates.value = []
lastVisit.value = ''
todayHasBlockingAppointment.value = false
await loadChannelOptions()
// 加载医生列表
@@ -325,6 +355,34 @@ const open = async (patient: any) => {
// 查询该患者的最近一次就诊记录
await loadLastVisit()
await loadTodayAppointmentBlock()
}
/** 今日是否已有状态为已预约(1)或已过号(4)的挂号(仅禁止再挂「今天」,不禁止挂其他天) */
const loadTodayAppointmentBlock = async () => {
todayHasBlockingAppointment.value = false
const pid = patientInfo.id
if (!pid) {
return
}
const today = dayjs().format('YYYY-MM-DD')
try {
const res = await appointmentLists({
patient_id: pid,
start_date: today,
end_date: today,
page_no: 1,
page_size: 50
})
const rows = res?.lists || []
const blocking = rows.find((r: any) => {
const s = Number(r.status)
return s === 1 || s === 4
})
todayHasBlockingAppointment.value = !!blocking
} catch (e) {
console.error('检查今日挂号状态失败:', e)
}
}
// 加载患者最近一次就诊记录(从预约表查询已完成的预约)
@@ -432,9 +490,14 @@ const loadDoctorRoster = async () => {
await nextTick()
if (doctorRosterDates.value.length > 0) {
const today = dayjs().format('YYYY-MM-DD')
const defaultDate = doctorRosterDates.value.includes(today)
? today
let defaultDate = doctorRosterDates.value.includes(today)
? today
: doctorRosterDates.value[0]
// 今日已有占用号时,默认不要落在「今天」,避免一进来确定按钮灰掉
if (todayHasBlockingAppointment.value && defaultDate === today) {
const later = doctorRosterDates.value.find((d) => d > today)
defaultDate = later ?? doctorRosterDates.value.find((d) => d !== today) ?? defaultDate
}
selectDate(defaultDate)
}
} else {
@@ -549,6 +612,12 @@ const handleConfirm = async () => {
feedback.msgWarning('请选择渠道来源')
return
}
if (blockedByTodayDuplicate.value) {
feedback.msgWarning(
'该患者今日已有挂号(已预约或已过号),不能重复预约今天,请改选其他日期。'
)
return
}
try {
submitting.value = true
@@ -584,6 +653,10 @@ defineExpose({ open })
</script>
<style scoped lang="scss">
.today-block-alert {
margin-bottom: 16px;
}
.appointment-form {
:deep(.el-form-item__label) {
font-weight: 500;
@@ -0,0 +1,175 @@
<template>
<div class="appointment-record-panel">
<el-table v-loading="loading" :data="rows" border stripe empty-text="暂无挂号记录">
<el-table-column label="ID" prop="id" width="72" align="center" />
<el-table-column label="状态" width="100" align="center">
<template #default="{ row }">
<el-tag
:type="
row.status === 1
? 'success'
: row.status === 2
? 'info'
: row.status === 3
? 'primary'
: 'danger'
"
size="small"
effect="light"
>
{{ row.status_desc || '—' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="患者(挂号人)" min-width="150">
<template #default="{ row }">
<div class="cell-stack">
<span class="font-medium">{{ row.patient_name || '—' }}</span>
<span class="text-gray-500 text-sm">{{ row.patient_phone || '' }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="挂号医生" prop="doctor_name" width="110" show-overflow-tooltip />
<el-table-column label="挂号助理" width="110" show-overflow-tooltip>
<template #default="{ row }">
{{ row.assistant_name || '—' }}
</template>
</el-table-column>
<el-table-column label="预约时间" min-width="130">
<template #default="{ row }">
<div class="cell-stack">
<span>{{ row.appointment_date || '—' }}</span>
<span class="text-gray-500 text-sm">{{ formatTime(row.appointment_time) }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="时段" width="80" align="center">
<template #default="{ row }">
{{ periodText(row.period) }}
</template>
</el-table-column>
<el-table-column label="类型" width="100" show-overflow-tooltip>
<template #default="{ row }">
{{ row.appointment_type_desc || '—' }}
</template>
</el-table-column>
<el-table-column label="渠道" width="110" show-overflow-tooltip>
<template #default="{ row }">
{{ channelLabel(row) }}
</template>
</el-table-column>
<el-table-column label="确认诊单" width="92" align="center">
<template #default="{ row }">
<el-tag v-if="row.diagnosis_confirmed" type="success" size="small" effect="plain">已确认</el-tag>
<el-tag v-else type="warning" size="small" effect="plain">未确认</el-tag>
</template>
</el-table-column>
<el-table-column label="开方" width="80" align="center">
<template #default="{ row }">
<el-tag v-if="row.has_prescription" type="success" size="small" effect="plain">已开方</el-tag>
<el-tag v-else type="info" size="small" effect="plain">未开方</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" min-width="100" show-overflow-tooltip />
<el-table-column label="创建时间" width="165" prop="create_time" />
</el-table>
</div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
import { appointmentLists } from '@/api/doctor'
import { getDictData } from '@/api/app'
const props = defineProps<{
diagnosisId: number
}>()
const loading = ref(false)
const rows = ref<any[]>([])
const channelMap = ref<Record<string, string>>({})
function formatTime(t: string | undefined) {
if (!t) return ''
return String(t).length >= 8 ? String(t).slice(0, 5) : t
}
function periodText(p: string | undefined) {
if (p === 'morning') return '上午'
if (p === 'afternoon') return '下午'
if (p === 'all') return '全天'
return p || '—'
}
function channelLabel(row: Record<string, any>) {
const raw = row.channel_source ?? row.channels ?? ''
if (raw === '' || raw === null || raw === undefined) return '—'
const key = String(raw)
return channelMap.value[key] || key
}
function sortRows(list: any[]) {
return [...list].sort((a, b) => {
const da = String(a.appointment_date || '')
const db = String(b.appointment_date || '')
if (da !== db) return db.localeCompare(da)
const ta = String(a.appointment_time || '')
const tb = String(b.appointment_time || '')
if (ta !== tb) return tb.localeCompare(ta)
return Number(b.id || 0) - Number(a.id || 0)
})
}
const loadChannels = async () => {
try {
const data = await getDictData({ type: 'channels' })
const opts = (data?.channels || []).filter((row: any) => row.status !== 0)
const map: Record<string, string> = {}
for (const row of opts) {
if (row.value != null) map[String(row.value)] = row.name || String(row.value)
}
channelMap.value = map
} catch {
channelMap.value = {}
}
}
const load = async () => {
if (!props.diagnosisId) return
loading.value = true
try {
await loadChannels()
const res = await appointmentLists({
patient_id: props.diagnosisId,
page_no: 1,
page_size: 500
})
const list = res?.lists || []
rows.value = sortRows(list)
} catch (e) {
console.error(e)
rows.value = []
} finally {
loading.value = false
}
}
watch(
() => props.diagnosisId,
() => {
load()
},
{ immediate: true }
)
defineExpose({ refresh: load })
</script>
<style scoped>
.cell-stack {
display: flex;
flex-direction: column;
gap: 2px;
line-height: 1.35;
}
</style>
@@ -0,0 +1,48 @@
<template>
<div class="assign-log-panel">
<el-table v-loading="loading" :data="rows" border stripe empty-text="暂无指派记录">
<el-table-column label="操作时间" width="175" prop="create_time_text" />
<el-table-column label="原医助" min-width="120" prop="from_assistant_name" />
<el-table-column label="新医助" min-width="120" prop="to_assistant_name" />
<el-table-column label="操作人" width="110" prop="operator_name" />
<el-table-column label="操作账号" width="120" prop="operator_account" show-overflow-tooltip />
<el-table-column label="IP" width="130" prop="ip" show-overflow-tooltip />
</el-table>
</div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
import { tcmDiagnosisAssignLogList } from '@/api/tcm'
const props = defineProps<{
diagnosisId: number
}>()
const loading = ref(false)
const rows = ref<any[]>([])
const load = async () => {
if (!props.diagnosisId) return
loading.value = true
try {
const data = await tcmDiagnosisAssignLogList({ id: props.diagnosisId })
rows.value = Array.isArray(data) ? data : []
} catch (e) {
console.error(e)
rows.value = []
} finally {
loading.value = false
}
}
watch(
() => props.diagnosisId,
() => {
load()
},
{ immediate: true }
)
defineExpose({ refresh: load })
</script>
@@ -72,6 +72,8 @@ import { ref, watch, computed } from 'vue'
import dayjs from 'dayjs'
import { Refresh } from '@element-plus/icons-vue'
import { getImChatMessages } from '@/api/tcm'
import type { FriendlyParse } from '@/utils/im-business-message-parse'
import { parseImBusinessPayload } from '@/utils/im-business-message-parse'
const props = defineProps<{
diagnosisId: number
@@ -90,109 +92,6 @@ function formatTime(ts: number | undefined) {
return dayjs.unix(sec).format('YYYY-MM-DD HH:mm:ss')
}
type FriendlyParse = { main: string; sub?: string; tag?: string }
/** 业务时间:支持秒级时间戳或毫秒(字符串数字) */
function formatBizTime(t: unknown): string | undefined {
if (t == null || t === '') return undefined
const n =
typeof t === 'string' && /^\d+$/.test(t.trim())
? parseInt(t.trim(), 10)
: Number(t)
if (!Number.isFinite(n) || n <= 0) return undefined
return n > 1e12
? dayjs(n).format('YYYY-MM-DD HH:mm:ss')
: dayjs.unix(n).format('YYYY-MM-DD HH:mm:ss')
}
/** 将 IM 自定义 / 信令 JSON 解析为可读文案(医生进诊室、音视频通话等) */
function parseImBusinessPayload(raw: string): FriendlyParse | null {
const s = raw.trim()
if (!s.startsWith('{')) return null
let o: any
try {
o = JSON.parse(s)
} catch {
return null
}
if (!('businessID' in o) && !('cmd' in o)) {
return null
}
if (o.businessID === 'doctor_entered_consult_room') {
const t = formatBizTime(o.time)
return { main: '医生已进入诊室', sub: t, tag: '诊室' }
}
/** 小程序端:患者打开与医生的会话时发送(与 TUIKit/chat.vue 一致) */
if (o.businessID === 'patient_opened_chat') {
const parts: string[] = []
if (o.patientName) parts.push(`患者:${o.patientName}`)
if (o.patientId != null && o.patientId !== '') parts.push(`患者 ID${o.patientId}`)
if (o.doctorId != null && o.doctorId !== '') parts.push(`关联医生:${o.doctorId}`)
const t = formatBizTime(o.time)
if (t) parts.push(t)
return { main: '患者进入聊天', sub: parts.length ? parts.join(' · ') : undefined, tag: '诊室' }
}
if (o.businessID === 'user_typing_status') {
return { main: '对方正在输入…', tag: '状态' }
}
if (o.businessID === 'consultation_complete') {
return { main: '问诊已完成', sub: formatBizTime(o.time), tag: '诊室' }
}
if (o.businessID === 1 || o.businessID === '1') {
let inner: any = o.data
if (typeof inner === 'string') {
try {
inner = JSON.parse(inner)
} catch {
return { main: '通话信令', sub: '内层数据解析失败', tag: '通话' }
}
}
if (inner && typeof inner === 'object') {
return parseRtcInner(inner)
}
return null
}
if (o.businessID === 'rtc_call' || o.cmd) {
return parseRtcInner(o)
}
return null
}
function parseRtcInner(inner: any): FriendlyParse {
const callType = inner.call_type
const callTypeLabel =
callType === 2 ? '视频通话' : callType === 1 ? '语音通话' : '通话'
const cmd = String(inner.cmd || '')
const cmdMap: Record<string, string> = {
hangup: '已结束',
invite: '发起通话',
linebusy: '对方忙线',
cancel: '已取消',
reject: '已拒绝',
accept: '已接听',
timeout: '无人接听'
}
const action = cmdMap[cmd] || (cmd ? `状态:${cmd}` : '')
const main = action ? `${callTypeLabel} · ${action}` : callTypeLabel
const parts: string[] = []
if (inner.inviter) parts.push(`发起方 ${inner.inviter}`)
if (inner.invitee) parts.push(`对方 ${inner.invitee}`)
if (inner.groupID) parts.push(`群组 ${inner.groupID}`)
return {
main,
sub: parts.length ? parts.join('') : undefined,
tag: '通话'
}
}
function parseImFriendly(row: any): FriendlyParse | null {
const raw = (row.text || '').trim()
if (!raw) return null
+3
View File
@@ -100,6 +100,9 @@
<el-descriptions-item label="治则" :span="2">
{{ detail.treatment_principle || '无' }}
</el-descriptions-item>
<el-descriptions-item label="在用药物" :span="2">
<div style="white-space: pre-wrap">{{ detail.current_medications || '无' }}</div>
</el-descriptions-item>
<el-descriptions-item label="处方" :span="2">
<div style="white-space: pre-wrap">{{ detail.prescription || '无' }}</div>
</el-descriptions-item>
+81 -53
View File
@@ -3,7 +3,7 @@
<el-drawer
v-model="visible"
:title="drawerTitle"
size="70%"
size="60%"
:before-close="handleClose"
:z-index="1500"
:modal="true"
@@ -198,7 +198,6 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="formData.status">
@@ -207,6 +206,20 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="在用药物" prop="current_medications">
<el-input
v-model="formData.current_medications"
type="textarea"
:rows="3"
placeholder="请填写患者当前正在使用的药物(如降压药、降糖药等),多种请换行或顿号分隔"
maxlength="2000"
show-word-limit
/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">主诉</el-divider>
@@ -475,51 +488,7 @@
</el-form-item>
<!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="舌苔" prop="tongue_coating">
<el-input
v-model="formData.tongue_coating"
placeholder="请输入舌苔情况"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="脉象" prop="pulse">
<el-input
v-model="formData.pulse"
placeholder="请输入脉象"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="治则" prop="treatment_principle">
<el-input
v-model="formData.treatment_principle"
type="textarea"
:rows="3"
placeholder="请输入治则"
/>
</el-form-item>
<el-form-item label="处方" prop="prescription">
<el-input
v-model="formData.prescription"
type="textarea"
:rows="3"
placeholder="请输入处方"
/>
</el-form-item>
<el-form-item label="医嘱" prop="doctor_advice">
<el-input
v-model="formData.doctor_advice"
type="textarea"
:rows="3"
placeholder="请输入医嘱"
/>
</el-form-item> -->
<el-form-item label="病史补充" prop="remark">
<el-input
@@ -616,6 +585,35 @@
/>
<el-empty v-else description="请先保存诊单后再查看聊天记录" />
</el-tab-pane>
<el-tab-pane
v-if="
hasPermission(['tcm.diagnosis/assign']) ||
hasPermission(['tcm.diagnosis/detail'])
"
label="指派医助记录"
name="assignLog"
:disabled="!formData.id"
lazy
>
<assign-log-panel
v-if="formData.id"
:diagnosis-id="Number(formData.id)"
/>
<el-empty v-else description="请先保存诊单后再查看指派记录" />
</el-tab-pane>
<el-tab-pane
v-if="hasPermission(['doctor.appointment/lists'])"
label="挂号记录"
name="appointmentRecords"
:disabled="!formData.id"
lazy
>
<appointment-record-panel
v-if="formData.id"
:diagnosis-id="Number(formData.id)"
/>
<el-empty v-else description="请先保存诊单后再查看挂号记录" />
</el-tab-pane>
</el-tabs>
<!-- 处方详情(查看病历) -->
@@ -652,7 +650,13 @@ import BloodRecordList from './components/BloodRecordList.vue'
import CaseRecordList from './components/CaseRecordList.vue'
import CallRecordPanel from './components/CallRecordPanel.vue'
import ImChatRecordPanel from './components/ImChatRecordPanel.vue'
import AssignLogPanel from './components/AssignLogPanel.vue'
import AppointmentRecordPanel from './components/AppointmentRecordPanel.vue'
import TcmPrescription from '@/components/tcm-prescription/index.vue'
import {
DIAGNOSIS_TONGUE_IMAGES_UPDATED,
type DiagnosisTongueImagesUpdatedDetail
} from '@/utils/diagnosis-sync-events'
const emit = defineEmits(['success'])
const appStore = useAppStore()
@@ -676,6 +680,32 @@ watch([visible, activeTab], () => {
if (activeTab.value === 'visit' && !hasPermission(['tcm.diagnosis/huifang'])) {
activeTab.value = 'basic'
}
if (
activeTab.value === 'assignLog' &&
!hasPermission(['tcm.diagnosis/assign']) &&
!hasPermission(['tcm.diagnosis/detail'])
) {
activeTab.value = 'basic'
}
if (activeTab.value === 'appointmentRecords' && !hasPermission(['doctor.appointment/lists'])) {
activeTab.value = 'basic'
}
})
function onTongueImagesSyncedFromCall(e: Event) {
if (!visible.value) return
const d = (e as CustomEvent<DiagnosisTongueImagesUpdatedDetail>).detail
if (!d?.diagnosisId || !Array.isArray(d.tongue_images)) return
if (Number(formData.value.id) !== Number(d.diagnosisId)) return
formData.value.tongue_images = [...d.tongue_images]
}
onMounted(() => {
window.addEventListener(DIAGNOSIS_TONGUE_IMAGES_UPDATED, onTongueImagesSyncedFromCall as EventListener)
})
onUnmounted(() => {
window.removeEventListener(DIAGNOSIS_TONGUE_IMAGES_UPDATED, onTongueImagesSyncedFromCall as EventListener)
})
const formData = ref({
@@ -720,7 +750,7 @@ const formData = ref({
allergy_history: 0,
family_history: 0,
pregnancy_history: 0,
tongue_images: [],
tongue_images: [] as string[],
report_files: [],
symptoms: '',
tongue_coating: '',
@@ -729,6 +759,7 @@ const formData = ref({
prescription: '',
doctor_advice: '',
remark: '',
current_medications: '',
status: 1,
external_userid: ''
})
@@ -761,11 +792,7 @@ const formRules = {
gender: [{ required: true, message: '请选择性别', trigger: 'change' }],
age: [{ required: true, message: '请输入年龄', trigger: 'blur' }],
fasting_blood_sugar: [{ required: true, message: '请输入空腹血糖', trigger: 'blur' }],
diagnosis_date: [{ required: true, message: '请选择诊断日期', trigger: 'change' }],
diagnosis_type: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
diabetes_discovery_year: [{ required: true, message: '请输入发现糖尿病病患病史年数', trigger: 'blur' }],
local_hospital_diagnosis: [{ required: true, type: 'array', min: 1, message: '请选择当地医院诊断结果', trigger: 'change' }],
local_hospital_name: [{ required: true, message: '请输入当地就诊医院名称', trigger: 'blur' }]
}
// 获取字典选项
@@ -1015,7 +1042,7 @@ const handleClose = () => {
allergy_history: 0,
family_history: 0,
pregnancy_history: 0,
tongue_images: [],
tongue_images: [] as string[],
report_files: [],
symptoms: '',
tongue_coating: '',
@@ -1024,6 +1051,7 @@ const handleClose = () => {
prescription: '',
doctor_advice: '',
remark: '',
current_medications: '',
status: 1,
external_userid: ''
}
+84 -15
View File
@@ -89,7 +89,7 @@
<el-table-column label="患者" min-width="150">
<template #default="{ row }">
<div class="patient-cell">
<div class="patient-avatar">{{ (row.patient_name || '患').charAt(0) }}</div>
<!-- <div class="patient-avatar">{{ (row.patient_name || '患').charAt(0) }}</div> -->
<div class="patient-info">
<div class="patient-name">{{ row.patient_name }}</div>
<div class="patient-meta">{{ row.id }} · {{ row.gender_desc || '-' }} · {{ row.age ?? '-' }}</div>
@@ -99,9 +99,12 @@
</el-table-column>
<el-table-column label="挂号" min-width="180">
<template #default="{ row }">
<div class="appointment-cell" :class="{ 'has-apt': row.has_appointment }">
<div
class="appointment-cell"
:class="appointmentCellClasses(row)"
>
<template v-if="row.has_appointment">
<div class="apt-badge">已挂号</div>
<div class="apt-badge">{{ appointmentStatusLabel(row) }}</div>
<div class="apt-doctor">{{ row.appointment_doctor_name || '-' }}</div>
<div class="apt-time">{{ row.appointment_time_text || '-' }}</div>
</template>
@@ -183,9 +186,9 @@
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/assign'])" command="assign"><el-icon><User /></el-icon>指派</el-dropdown-item>
<el-dropdown-item v-if="row.has_appointment && hasPermission(['tcm.diagnosis/videoQr'])" command="videoQr"><el-icon><Picture /></el-icon>视频二维码</el-dropdown-item>
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/guahao']) && row.has_appointment" command="confirmQr"><el-icon><Picture /></el-icon>二维码</el-dropdown-item>
<el-dropdown-item v-if="row.has_appointment && hasPermission(['tcm.diagnosis/guahao'])" command="cancelApt"><el-icon><CircleClose /></el-icon>取消挂号</el-dropdown-item>
<el-dropdown-item v-if="isAppointmentActiveForVideo(row) && hasPermission(['tcm.diagnosis/videoQr'])" command="videoQr"><el-icon><Picture /></el-icon>视频二维码</el-dropdown-item>
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/guahao']) && isAppointmentActiveForVideo(row)" command="confirmQr"><el-icon><Picture /></el-icon>二维码</el-dropdown-item>
<el-dropdown-item v-if="canCancelAppointmentRow(row) && hasPermission(['tcm.diagnosis/guahao'])" command="cancelApt"><el-icon><CircleClose /></el-icon>取消挂号</el-dropdown-item>
<el-dropdown-item command="order" v-if="hasPermission(['tcm.diagnosis/order'])"><el-icon><Document /></el-icon>创建订单</el-dropdown-item>
<el-dropdown-item v-if="hasPermission(['tcm.diagnosis/delete'])" command="delete" divided><el-icon><Delete /></el-icon><span class="text-danger">删除</span></el-dropdown-item>
</el-dropdown-menu>
@@ -201,9 +204,9 @@
</div>
</el-card>
<edit-popup ref="editRef" @success="getLists" />
<edit-popup ref="editRef" @success="refreshListAfterPopupSave" />
<detail-popup ref="detailRef" />
<appointment-popup ref="appointmentRef" @success="getLists" />
<appointment-popup ref="appointmentRef" @success="refreshListAfterPopupSave" />
<assistant-watch-call-dialog
v-model="watchCallVisible"
:diagnosis-id="watchCallDiagnosisId"
@@ -698,6 +701,8 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
params: formData
})
/** 弹窗内保存后刷新列表:静默请求,避免 el-table v-loading 白蒙层盖住仍打开的抽屉 */
const refreshListAfterPopupSave = () => getLists({ silent: true })
// 重置
const handleReset = () => {
@@ -995,8 +1000,8 @@ const handleRowAction = (cmd: string, row: any) => {
switch (cmd) {
case 'assign': handleSingleAssign(row); break
case 'videoQr':
if (!row.has_appointment) {
feedback.msgWarning('未挂号患者无法生成视频二维码,请先预约医生')
if (!isAppointmentActiveForVideo(row)) {
feedback.msgWarning('仅「已预约」状态可生成视频二维码')
return
}
handleVideoQRCode(row)
@@ -1008,10 +1013,42 @@ const handleRowAction = (cmd: string, row: any) => {
}
}
/** 挂号状态:1=已预约 3=已完成 4=已过号(与后端一致) */
const appointmentStatusLabel = (row: any) => {
const s = Number(row.appointment_status)
if (s === 3) return '已完成'
if (s === 4) return '已过号'
return '已挂号'
}
const appointmentCellClasses = (row: any) => {
const s = Number(row.appointment_status)
return {
'has-apt': row.has_appointment,
'apt-row-done': row.has_appointment && s === 3,
'apt-row-missed': row.has_appointment && s === 4
}
}
/** 仅已预约(1)可进视频/小程序码 */
const isAppointmentActiveForVideo = (row: any) =>
row.has_appointment && Number(row.appointment_status) === 1
/** 已预约、已过号可取消(后端同步限制) */
const canCancelAppointmentRow = (row: any) => {
const s = Number(row.appointment_status)
return !!(row.has_appointment && row.appointment_id && (s === 1 || s === 4))
}
// 取消挂号
const handleCancelAppointment = async (row: any) => {
if (!row.has_appointment || !row.appointment_id) {
feedback.msgWarning('该诊单未挂号或挂号信息异常')
if (!canCancelAppointmentRow(row)) {
const s = Number(row.appointment_status)
if (row.has_appointment && s === 3) {
feedback.msgWarning('已完成就诊,无法取消挂号')
} else {
feedback.msgWarning('该诊单未挂号或挂号信息异常')
}
return
}
try {
@@ -1081,10 +1118,10 @@ const submitFillIdCard = async () => {
}
}
// 生成视频二维码(跳转登录页)- 仅已挂号患者可生成
// 生成视频二维码(跳转登录页)- 仅已预约(1)可生成
const handleVideoQRCode = async (row: any) => {
if (!row.has_appointment) {
feedback.msgWarning('未挂号患者无法生成视频二维码,请先预约医生')
if (!isAppointmentActiveForVideo(row)) {
feedback.msgWarning('仅「已预约」状态可生成视频二维码')
return
}
if (!row.patient_id) {
@@ -1125,6 +1162,10 @@ const handleVideoQRCode = async (row: any) => {
// 生成确认诊单二维码
const handleMiniProgramQRCode = async (row: any) => {
if (!isAppointmentActiveForVideo(row)) {
feedback.msgWarning('仅「已预约」状态可使用诊单二维码')
return
}
if (!row.patient_id) {
feedback.msgWarning('患者信息不完整')
return
@@ -1532,6 +1573,34 @@ onUnmounted(() => {
}
}
&.apt-row-missed {
background: linear-gradient(135deg, rgba(var(--el-color-warning-rgb), 0.12), rgba(var(--el-color-warning-rgb), 0.05));
border-color: rgba(var(--el-color-warning-rgb), 0.35);
.apt-badge {
color: var(--el-color-warning-dark-2);
background: var(--el-color-warning-light-7);
}
.apt-time {
color: var(--el-color-warning);
}
}
&.apt-row-done {
background: linear-gradient(135deg, rgba(var(--el-color-info-rgb), 0.1), rgba(var(--el-color-info-rgb), 0.04));
border-color: rgba(var(--el-color-info-rgb), 0.28);
.apt-badge {
color: var(--el-color-info-dark-2);
background: var(--el-color-info-light-7);
}
.apt-time {
color: var(--el-color-info);
}
}
.apt-none {
font-size: 13px;
color: var(--el-text-color-placeholder);
File diff suppressed because one or more lines are too long
+20 -8
View File
@@ -1,11 +1,23 @@
# 腾讯云实时音视频(TRTC)配置
# 在腾讯云控制台获取:https://console.cloud.tencent.com/trtc
# 复制为 .env 中 [TRTC] 段落使用,或与现有 [TRTC] 合并(勿提交真实密钥到 Git)
#
# 云端合流录制 CreateCloudRecording 必填 CAM 密钥(与 SECRET_KEY 不是同一个):
# 腾讯云控制台 → 访问管理 → 访问密钥 → API 密钥管理
# https://console.cloud.tencent.com/cam/capi
# 子账号需具备 TRTC 云 API 权限(如 QcloudTRTCFullAccess
# SDK AppID
TRTC_SDK_APP_ID=
[TRTC]
SDK_APP_ID=
SECRET_KEY=
ENABLE=false
# 密钥
TRTC_SECRET_KEY=
# 以下为 CAM(云 API)密钥,用于服务端发起/停止云端录制
# 注意:必须写 API_SECRET_ID / API_SECRET_KEY,不要写成 TRTC_API_SECRET_ID(在 [TRTC] 内会拼成 TRTC_TRTC_… 导致读不到)
API_SECRET_ID=
API_SECRET_KEY=
RECORDING_API_REGION=ap-guangzhou
# 是否启用
TRTC_ENABLE=false
# CreateCloudRecording.RoomIdType:留空或 auto=TUICall 纯数字房用 1、字符串房用 0;勿填 0 除非确定全为字符串房间(填错会导致录制一直 Idle)
# RECORDING_ROOM_ID_TYPE=
# cURL error 60SSL):从 https://curl.se/ca/cacert.pem 下载后填绝对路径,例如 D:\php\extras\ssl\cacert.pem;或放到 server 根目录命名为 cacert.pem
RECORDING_SSL_CAFILE=
+1
View File
@@ -2,6 +2,7 @@
/.vscode
*.log
/.env
/cacert.pem
/public/uploads/*
!/public/uploads/index.html
/runtime/*
+2 -1
View File
@@ -3,6 +3,7 @@ declare (strict_types = 1);
namespace app;
use app\common\service\TrtcCloudRecordingService;
use think\Service;
/**
@@ -17,6 +18,6 @@ class AppService extends Service
public function boot()
{
// 服务启动
TrtcCloudRecordingService::applyRecordingSslCaBundleEarly();
}
}
@@ -197,7 +197,19 @@ class DiagnosisController extends BaseAdminController
}
return $this->fail(DiagnosisLogic::getError());
}
/**
* @notes 指派医助操作记录
* @return \think\response\Json
*/
public function assignLogList()
{
$params = (new DiagnosisValidate())->goCheck('id');
$result = DiagnosisLogic::assignLogList((int) $params['id']);
return $this->data($result);
}
/**
* @notes 获取通话签名
* @return \think\response\Json
@@ -316,10 +328,11 @@ class DiagnosisController extends BaseAdminController
$params['admin_id'] = (int)$this->adminId;
$result = DiagnosisLogic::bindCallRoom($params);
if ($result) {
return $this->success('', [], 1, 1);
if ($result === false) {
return $this->fail(DiagnosisLogic::getError());
}
return $this->fail(DiagnosisLogic::getError());
return $this->success('', is_array($result) ? $result : [], 1, 0);
}
/**
@@ -67,13 +67,46 @@ class PrescriptionController extends BaseAdminController
public function detail()
{
$params = (new PrescriptionValidate())->get()->goCheck('detail');
$detail = PrescriptionLogic::detail((int)$params['id']);
$detail = PrescriptionLogic::detail((int) $params['id'], (int) $this->adminId, $this->adminInfo);
if (!$detail) {
return $this->fail('处方不存在');
$msg = PrescriptionLogic::getError();
return $this->fail($msg !== '' ? $msg : '处方不存在');
}
return $this->data($detail);
}
/**
* @notes 审核处方(通过 / 驳回,驳回即作废)
*/
public function audit()
{
$params = (new PrescriptionValidate())->post()->goCheck('audit');
$ok = PrescriptionLogic::audit(
(int) $params['id'],
(string) $params['action'],
(string) ($params['remark'] ?? ''),
(int) $this->adminId,
$this->adminInfo
);
if (!$ok) {
return $this->fail(PrescriptionLogic::getError());
}
$msg = $params['action'] === 'reject' ? '已驳回并作废处方' : '审核通过';
$wecom = PrescriptionLogic::consumeLastAuditWecomNotify();
$data = [];
if (is_array($wecom)) {
$data['wecom_notify_ok'] = !empty($wecom['ok']);
if (empty($wecom['ok']) && !empty($wecom['message'])) {
$data['wecom_notify_hint'] = (string) $wecom['message'];
}
}
return $this->success($msg, $data);
}
/**
* @notes 根据诊单获取处方列表
*/
@@ -59,12 +59,18 @@ class AppointmentLists extends BaseAdminDataLists implements ListsSearchInterfac
$this->searchWhere[] = ['a.appointment_date', '<=', $this->params['end_date']];
}
// 诊单维度患者(挂号表 patient_id 存诊单 id
if (!empty($this->params['patient_id'])) {
$this->searchWhere[] = ['a.patient_id', '=', (int) $this->params['patient_id']];
}
// 构建查询
$query = Appointment::alias('a')
->with('diagnosis')
->leftJoin('tcm_diagnosis u', 'a.patient_id = u.id')
->leftJoin('admin ad', 'a.doctor_id = ad.id')
->field('a.*, u.patient_name as patient_name, u.phone as patient_phone, u.gender as gender, u.age as age, u.weight as weight, u.height as height, ad.name as doctor_name, u.id as diagnosis_id')
->leftJoin('admin asst', 'a.assistant_id = asst.id')
->field('a.*, u.patient_name as patient_name, u.phone as patient_phone, u.gender as gender, u.age as age, u.weight as weight, u.height as height, ad.name as doctor_name, asst.name as assistant_name, u.id as diagnosis_id')
->where($this->searchWhere);
// 是否确认诊单:1=已确认 0=未确认
@@ -88,6 +94,9 @@ class AppointmentLists extends BaseAdminDataLists implements ListsSearchInterfac
if (in_array(2, $roleIds)) {
$query->where('u.assistant_id', $this->adminId);
}
// 诊单软删除后不再展示对应挂号(leftJoin 时无诊单或诊单未删)
$query->whereRaw('(u.id IS NULL OR u.delete_time IS NULL)');
$lists = $query
->order('a.status', 'asc')
@@ -116,6 +125,23 @@ class AppointmentLists extends BaseAdminDataLists implements ListsSearchInterfac
->column('diagnosis_id');
$prescribedDiagnosisIds = array_flip($prescribedDiagnosisIds ?: []);
}
// 当前页预约关联的处方(按 appointment_id,取最新一条):用于「开方/查看」与审核状态
$appointmentIds = array_filter(array_map('intval', array_column($lists, 'id')));
$rxByAppointmentId = [];
if (!empty($appointmentIds)) {
$rxRows = Prescription::whereIn('appointment_id', $appointmentIds)
->whereNull('delete_time')
->order('id', 'desc')
->field(['id', 'appointment_id', 'audit_status', 'void_status'])
->select()
->toArray();
foreach ($rxRows as $rx) {
$aid = (int) ($rx['appointment_id'] ?? 0);
if ($aid > 0 && !isset($rxByAppointmentId[$aid])) {
$rxByAppointmentId[$aid] = $rx;
}
}
}
foreach ($lists as &$item) {
$statusMap = [
1 => '已预约',
@@ -135,6 +161,11 @@ class AppointmentLists extends BaseAdminDataLists implements ListsSearchInterfac
$item['diagnosis_confirmed'] = isset($confirmedMap[$item['diagnosis_id'] ?? 0]) ? 1 : 0;
$item['has_prescription'] = isset($prescribedDiagnosisIds[$item['diagnosis_id'] ?? 0]) ? 1 : 0;
$apptId = (int) ($item['id'] ?? 0);
$apptRx = $rxByAppointmentId[$apptId] ?? null;
$item['prescription_audit_status'] = $apptRx !== null ? (int) ($apptRx['audit_status'] ?? -1) : -1;
$item['prescription_void_status'] = $apptRx !== null ? (int) ($apptRx['void_status'] ?? 0) : 0;
// 格式化时间戳为日期时间
if (isset($item['create_time']) && is_numeric($item['create_time'])) {
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
@@ -173,6 +204,10 @@ class AppointmentLists extends BaseAdminDataLists implements ListsSearchInterfac
$query->where('a.appointment_date', '<=', $this->params['end_date']);
}
if (!empty($this->params['patient_id'])) {
$query->where('a.patient_id', '=', (int) $this->params['patient_id']);
}
if (isset($this->params['diagnosis_confirmed']) && $this->params['diagnosis_confirmed'] !== '') {
$confirmed = (int)$this->params['diagnosis_confirmed'];
$tbl = (new DiagnosisViewRecord())->getTable();
@@ -190,6 +225,8 @@ class AppointmentLists extends BaseAdminDataLists implements ListsSearchInterfac
if (in_array(2, $roleIds)) {
$query->where('u.assistant_id', $this->adminId);
}
$query->whereRaw('(u.id IS NULL OR u.delete_time IS NULL)');
}
/**
@@ -69,6 +69,39 @@ class StatisticsLists extends BaseAdminDataLists
$statsMap[$stat['doctor_id']] = $stat;
}
// 诊单数:统计期内该医生挂号对应的 distinct 诊单(patient_id 存的是诊单 id
$diagnosisCountQuery = \think\facade\Db::name('doctor_appointment')
->field('doctor_id, COUNT(DISTINCT patient_id) as diagnosis_count')
->whereIn('doctor_id', $doctorAdminIds)
->where('appointment_date', '>=', $startDate)
->where('appointment_date', '<=', $endDate);
if ($doctorId) {
$diagnosisCountQuery->where('doctor_id', $doctorId);
}
$diagnosisCountRows = $diagnosisCountQuery->group('doctor_id')->select()->toArray();
$diagnosisCountMap = [];
foreach ($diagnosisCountRows as $row) {
$diagnosisCountMap[(int) $row['doctor_id']] = (int) $row['diagnosis_count'];
}
// 成交单:上述诊单中存在有效处方(未删除、未作废)的数量
$dealCountQuery = \think\facade\Db::name('doctor_appointment')->alias('apt')
->join('tcm_prescription rx', 'rx.diagnosis_id = apt.patient_id')
->field('apt.doctor_id, COUNT(DISTINCT apt.patient_id) as deal_count')
->whereIn('apt.doctor_id', $doctorAdminIds)
->where('apt.appointment_date', '>=', $startDate)
->where('apt.appointment_date', '<=', $endDate)
->whereNull('rx.delete_time')
->whereRaw('IFNULL(rx.void_status, 0) <> 1');
if ($doctorId) {
$dealCountQuery->where('apt.doctor_id', $doctorId);
}
$dealCountRows = $dealCountQuery->group('apt.doctor_id')->select()->toArray();
$dealCountMap = [];
foreach ($dealCountRows as $row) {
$dealCountMap[(int) $row['doctor_id']] = (int) $row['deal_count'];
}
// 获取医生信息
$doctorQuery = Admin::field('id,name')->whereIn('id', $doctorAdminIds);
if ($doctorId) {
@@ -104,30 +137,99 @@ class StatisticsLists extends BaseAdminDataLists
$deptStatsMap[$stat['doctor_id']][] = $stat['dept_name'] . '(' . $stat['dept_count'] . ')';
}
// 获取渠道字典数据
// 获取渠道字典dict_data.value => name),与挂号创建时 channel_source 存字典 value 一致
$channelDict = \think\facade\Db::name('dict_data')
->where('type_value', 'channels')
->column('name', 'value');
// 获取渠道统计信息(channels字段,按渠道分组统计数量)
$channelStats = \think\facade\Db::name('doctor_appointment')
->field('doctor_id, channels, COUNT(*) as channel_count')
->whereIn('doctor_id', $doctorIdsWithAppointments)
->where('appointment_date', '>=', $startDate)
->where('appointment_date', '<=', $endDate)
->whereNotNull('channels')
->where('channels', '<>', '')
->group('doctor_id, channels')
->select()
->toArray();
// 组装渠道统计数据:医生ID => "渠道名称1(数量1) 渠道名称2(数量2)"
foreach ($channelStats as $stat) {
if (!isset($channelStatsMap[$stat['doctor_id']])) {
$channelStatsMap[$stat['doctor_id']] = [];
// 渠道:业务保存的是 channel_source(字典 value 字符串,见 AppointmentLogic::create);旧库可能仅有 channels(tinyint)
$channelBuckets = [];
try {
$channelStats = \think\facade\Db::name('doctor_appointment')
->field('doctor_id, channel_source, COUNT(*) as channel_count')
->whereIn('doctor_id', $doctorIdsWithAppointments)
->where('appointment_date', '>=', $startDate)
->where('appointment_date', '<=', $endDate)
->where('channel_source', '<>', '')
->group('doctor_id, channel_source')
->select()
->toArray();
foreach ($channelStats as $stat) {
$did = (int) $stat['doctor_id'];
$src = trim((string) ($stat['channel_source'] ?? ''));
$cnt = (int) ($stat['channel_count'] ?? 0);
if ($src === '' || $cnt < 1) {
continue;
}
if (!isset($channelBuckets[$did])) {
$channelBuckets[$did] = [];
}
if (!isset($channelBuckets[$did][$src])) {
$channelBuckets[$did][$src] = 0;
}
$channelBuckets[$did][$src] += $cnt;
}
$channelName = $channelDict[$stat['channels']] ?? $stat['channels'];
$channelStatsMap[$stat['doctor_id']][] = $channelName . '(' . $stat['channel_count'] . ')';
} catch (\Throwable) {
// 无 channel_source 字段等
}
$mergeLegacyChannels = static function (array &$buckets, array $rows): void {
foreach ($rows as $stat) {
$did = (int) $stat['doctor_id'];
$key = (string) (int) ($stat['channels'] ?? 0);
$cnt = (int) ($stat['channel_count'] ?? 0);
if ($key === '0' || $cnt < 1) {
continue;
}
if (!isset($buckets[$did])) {
$buckets[$did] = [];
}
if (!isset($buckets[$did][$key])) {
$buckets[$did][$key] = 0;
}
$buckets[$did][$key] += $cnt;
}
};
try {
$legacyStats = \think\facade\Db::name('doctor_appointment')
->field('doctor_id, channels, COUNT(*) as channel_count')
->whereIn('doctor_id', $doctorIdsWithAppointments)
->where('appointment_date', '>=', $startDate)
->where('appointment_date', '<=', $endDate)
->where('channels', '>', 0)
->where(function ($q) {
$q->whereNull('channel_source')->whereOr('channel_source', '=', '');
})
->group('doctor_id, channels')
->select()
->toArray();
$mergeLegacyChannels($channelBuckets, $legacyStats);
} catch (\Throwable) {
try {
$legacyStats = \think\facade\Db::name('doctor_appointment')
->field('doctor_id, channels, COUNT(*) as channel_count')
->whereIn('doctor_id', $doctorIdsWithAppointments)
->where('appointment_date', '>=', $startDate)
->where('appointment_date', '<=', $endDate)
->where('channels', '>', 0)
->group('doctor_id, channels')
->select()
->toArray();
$mergeLegacyChannels($channelBuckets, $legacyStats);
} catch (\Throwable) {
// 无 channels 字段
}
}
foreach ($channelBuckets as $did => $byKey) {
$parts = [];
foreach ($byKey as $key => $cnt) {
$label = $channelDict[$key] ?? $channelDict[(string) $key] ?? $key;
$parts[] = $label . '(' . $cnt . ')';
}
$channelStatsMap[$did] = $parts;
}
}
@@ -142,6 +244,13 @@ class StatisticsLists extends BaseAdminDataLists
'cancelled_count' => 0
];
$did = (int) $doctor['id'];
$diagnosisCount = $diagnosisCountMap[$did] ?? 0;
$dealCount = $dealCountMap[$did] ?? 0;
$dealRate = $diagnosisCount > 0
? round(($dealCount / $diagnosisCount) * 100, 2)
: 0;
// 计算完成率
$completionRate = $stat['total_count'] > 0
? round(($stat['completed_count'] / $stat['total_count']) * 100, 2)
@@ -155,6 +264,9 @@ class StatisticsLists extends BaseAdminDataLists
'completed_count' => (int)$stat['completed_count'],
'missed_count' => (int)$stat['missed_count'],
'cancelled_count' => (int)$stat['cancelled_count'],
'diagnosis_count' => $diagnosisCount,
'deal_count' => $dealCount,
'deal_rate' => $dealRate,
'completion_rate' => $completionRate,
'dept_stats' => isset($deptStatsMap[$doctor['id']]) ? implode(' ', $deptStatsMap[$doctor['id']]) : '未分配',
'channel_stats' => isset($channelStatsMap[$doctor['id']]) ? implode(' ', $channelStatsMap[$doctor['id']]) : '未设置',
@@ -81,6 +81,7 @@ class OrderLists extends BaseAdminDataLists implements ListsSearchInterface
if (!empty($this->params['patient_keyword'])) {
$where[] = ['patient_id', 'in', function ($query) {
$query->table('zyt_tcm_diagnosis')
->whereNull('delete_time')
->where('patient_name|patient_phone', 'like', '%' . $this->params['patient_keyword'] . '%')
->field('id');
}];
@@ -126,6 +127,7 @@ class OrderLists extends BaseAdminDataLists implements ListsSearchInterface
if (!empty($this->params['patient_keyword'])) {
$where[] = ['patient_id', 'in', function ($query) {
$query->table('zyt_tcm_diagnosis')
->whereNull('delete_time')
->where('patient_name|patient_phone', 'like', '%' . $this->params['patient_keyword'] . '%')
->field('id');
}];
@@ -77,47 +77,63 @@ class DiagnosisLists extends BaseAdminDataLists implements ListsSearchInterface
}
}
// 挂号日期筛选:当天/明天/后天
// 挂号日期筛选:当天/明天/后天(1=已预约 3=已完成 4=已过号,需展示以便取消等操作)
if (!empty($this->params['appointment_date'])) {
$aptDate = addslashes($this->params['appointment_date']);
$aptTbl = (new Appointment())->getTable();
$diagTbl = (new Diagnosis())->getTable();
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.patient_id AND apt.appointment_date = '{$aptDate}' AND apt.status IN (1,3)");
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.id AND apt.appointment_date = '{$aptDate}' AND apt.status IN (1,3,4)");
}
// 挂号状态:1=已挂号 0=未挂号
// 挂号状态:1=已挂号(含已预约/已完成/已过号)0=未挂号
if (isset($this->params['has_appointment']) && $this->params['has_appointment'] !== '') {
$aptTbl = (new Appointment())->getTable();
$diagTbl = (new Diagnosis())->getTable();
if ((int)$this->params['has_appointment'] === 1) {
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.patient_id AND apt.status IN (1,3)");
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.id AND apt.status IN (1,3,4)");
} else {
$query->whereNotExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.patient_id AND apt.status IN (1,3)");
$query->whereNotExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.id AND apt.status IN (1,3,4)");
}
}
// 按挂号日期+时间升序。若传了 appointment_date(当天/明天等筛选),只按「该日」的挂号排序与展示,避免仍按历史最早一天把昨天号顶到最前
$diagTbl = (new Diagnosis())->getTable();
$aptTbl = (new Appointment())->getTable();
$minAptDateCond = '';
if (!empty($this->params['appointment_date'])) {
$sortAptDate = addslashes((string) $this->params['appointment_date']);
$minAptDateCond = " AND apt.appointment_date = '{$sortAptDate}'";
}
$minAptExpr = '(SELECT MIN(CONCAT(apt.appointment_date, \' \', IFNULL(NULLIF(TRIM(apt.appointment_time), \'\'), \'00:00:00\'))) FROM ' . $aptTbl . ' apt WHERE apt.patient_id = ' . $diagTbl . '.id AND apt.status IN (1,3,4)' . $minAptDateCond . ')';
$lists = $query
->with(['DiagnosisViewRecord'])
->field(['id', 'patient_id', 'patient_name', 'id_card', 'phone', 'gender', 'age', 'diagnosis_date', 'diagnosis_type', 'syndrome_type', 'assistant_id', 'status', 'create_time', 'update_time'])
->append(['gender_desc', 'status_desc', 'diagnosis_date_text'])
->order(['id' => 'desc'])
->orderRaw('IFNULL(' . $minAptExpr . ", '9999-12-31 23:59:59') ASC, {$diagTbl}.id DESC")
->limit($this->limitOffset, $this->limitLength)
->select()
->toArray();
// 关联挂号信息:获取患者最新有效挂号(已预约或已完成
$patientIds = array_filter(array_unique(array_column($lists, 'patient_id')));
if (!empty($patientIds)) {
// 关联挂号doctor_appointment.patient_id 存诊单主键 id(与 Appointment 列表 join 一致
$diagnosisIds = array_filter(array_unique(array_column($lists, 'id')));
if (!empty($diagnosisIds)) {
$appointmentMap = [];
$subQuery = Appointment::where('patient_id', 'in', $patientIds)
->where('status', 'in', [1, 3]) // 1=已预约 3=已完成
->field('id, patient_id, doctor_id, appointment_date, appointment_time, create_time')
->order('id', 'desc');
$subQuery = Appointment::where('patient_id', 'in', $diagnosisIds)
->where('status', 'in', [1, 3, 4]); // 1=已预约 3=已完成 4=已过号
if (!empty($this->params['appointment_date'])) {
$subQuery->where('appointment_date', (string) $this->params['appointment_date']);
}
$subQuery
->field('id, patient_id, doctor_id, appointment_date, appointment_time, status, create_time')
->order('appointment_date', 'asc')
->order('appointment_time', 'asc')
->order('id', 'asc');
$appointments = $subQuery->select()->toArray();
foreach ($appointments as $apt) {
$pid = $apt['patient_id'];
if (!isset($appointmentMap[$pid])) {
$appointmentMap[$pid] = $apt;
$did = $apt['patient_id'];
if (!isset($appointmentMap[$did])) {
$appointmentMap[$did] = $apt;
}
}
// 获取医生名称
@@ -129,10 +145,11 @@ class DiagnosisLists extends BaseAdminDataLists implements ListsSearchInterface
}
// 合并到诊单列表
foreach ($lists as &$item) {
$apt = $appointmentMap[$item['patient_id']] ?? null;
$apt = $appointmentMap[$item['id']] ?? null;
if ($apt) {
$item['has_appointment'] = 1;
$item['appointment_id'] = $apt['id'];
$item['appointment_status'] = (int) ($apt['status'] ?? 0);
$item['appointment_doctor_id'] = $apt['doctor_id'];
$item['appointment_doctor_name'] = $doctorNames[$apt['doctor_id']] ?? '-';
$timePart = $apt['appointment_time'] ?? '';
@@ -143,6 +160,7 @@ class DiagnosisLists extends BaseAdminDataLists implements ListsSearchInterface
} else {
$item['has_appointment'] = 0;
$item['appointment_id'] = null;
$item['appointment_status'] = 0;
$item['appointment_doctor_id'] = null;
$item['appointment_doctor_name'] = '';
$item['appointment_time_text'] = '';
@@ -152,6 +170,7 @@ class DiagnosisLists extends BaseAdminDataLists implements ListsSearchInterface
foreach ($lists as &$item) {
$item['has_appointment'] = 0;
$item['appointment_id'] = null;
$item['appointment_status'] = 0;
$item['appointment_doctor_id'] = null;
$item['appointment_doctor_name'] = '';
$item['appointment_time_text'] = '';
@@ -277,7 +296,7 @@ class DiagnosisLists extends BaseAdminDataLists implements ListsSearchInterface
$aptDate = addslashes($this->params['appointment_date']);
$aptTbl = (new Appointment())->getTable();
$diagTbl = (new Diagnosis())->getTable();
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.patient_id AND apt.appointment_date = '{$aptDate}' AND apt.status IN (1,3)");
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.id AND apt.appointment_date = '{$aptDate}' AND apt.status IN (1,3,4)");
}
// 挂号状态
@@ -285,9 +304,9 @@ class DiagnosisLists extends BaseAdminDataLists implements ListsSearchInterface
$aptTbl = (new Appointment())->getTable();
$diagTbl = (new Diagnosis())->getTable();
if ((int)$this->params['has_appointment'] === 1) {
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.patient_id AND apt.status IN (1,3)");
$query->whereExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.id AND apt.status IN (1,3,4)");
} else {
$query->whereNotExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.patient_id AND apt.status IN (1,3)");
$query->whereNotExists("SELECT 1 FROM {$aptTbl} apt WHERE apt.patient_id = {$diagTbl}.id AND apt.status IN (1,3,4)");
}
}
@@ -6,6 +6,7 @@ namespace app\adminapi\lists\tcm;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsSearchInterface;
use app\adminapi\logic\tcm\PrescriptionLogic;
use app\common\model\tcm\Prescription;
/**
@@ -19,24 +20,86 @@ class PrescriptionLists extends BaseAdminDataLists implements ListsSearchInterfa
public function setSearch(): array
{
return [
'=' => ['is_shared'],
'%like%' => ['prescription_name', 'patient_name', 'sn']
'%like%' => ['patient_name', 'sn'],
'between_time' => 'create_time',
];
}
/** 创建人(医师账号)多选,参数 creator_ids:数组或逗号分隔 ID */
private function applyCreatorIdsFilter($query): void
{
$raw = $this->params['creator_ids'] ?? null;
if ($raw === null || $raw === '') {
return;
}
$ids = \is_array($raw) ? $raw : explode(',', (string) $raw);
$ids = array_values(array_filter(array_map('intval', $ids), static function (int $id): bool {
return $id > 0;
}));
if ($ids === []) {
return;
}
$query->whereIn('creator_id', $ids);
}
/**
* audit_filterpassed=已通过,not_passed=未通过(待审+驳回),pendingrejected
*/
private function applyAuditFilter($query): void
{
$af = (string) ($this->params['audit_filter'] ?? '');
if ($af === '' || $af === 'all') {
return;
}
switch ($af) {
case 'passed':
$query->where('audit_status', '=', 1);
break;
case 'not_passed':
$query->whereIn('audit_status', [0, 2]);
break;
case 'pending':
$query->where('audit_status', '=', 0);
break;
case 'rejected':
$query->where('audit_status', '=', 2);
break;
default:
break;
}
}
private function applyVisibilityScope($query): void
{
$query->where(function ($query) {
if (!empty($this->adminInfo['root']) && (int) $this->adminInfo['root'] === 1) {
return;
}
$adminId = $this->adminId;
$roleIds = array_values(array_unique(array_map('intval', $this->adminInfo['role_id'] ?? [])));
$query->where(function ($q) use ($adminId, $roleIds) {
$q->whereOr('is_shared', '=', 1);
$q->whereOr('creator_id', '=', $adminId);
foreach ($roleIds as $rid) {
if ($rid > 0) {
$q->whereOrRaw('FIND_IN_SET(?, `visible_role_ids`)', [(string) $rid]);
}
}
});
});
}
/**
* @notes 获取列表
*/
public function lists(): array
{
$lists = Prescription::where($this->searchWhere)
->where(function ($query) {
// 如果不是共享的,只能看到自己创建的
$query->whereOr([
['is_shared', '=', 1],
['creator_id', '=', $this->adminId]
]);
})
$query = Prescription::where($this->searchWhere);
$this->applyAuditFilter($query);
$this->applyVisibilityScope($query);
$this->applyCreatorIdsFilter($query);
$lists = $query
->whereNull('delete_time')
->order('id', 'desc')
->limit($this->limitOffset, $this->limitLength)
@@ -51,7 +114,10 @@ class PrescriptionLists extends BaseAdminDataLists implements ListsSearchInterfa
$item['usage_notes'] = $item['usage_notes'] ?? '';
$item['usage_days'] = $item['usage_days'] ?? 7;
$item['is_shared'] = $item['is_shared'] ?? 0;
$item['audit_status'] = (int) ($item['audit_status'] ?? 1);
$item['void_status'] = (int) ($item['void_status'] ?? 0);
$item['visible_role_ids'] = PrescriptionLogic::visibleRoleIdsToArray((string) ($item['visible_role_ids'] ?? ''));
// 将 dietary_taboo 从逗号分隔的字符串转换为数组(前端需要数组格式)
if (!empty($item['dietary_taboo']) && is_string($item['dietary_taboo'])) {
$item['dietary_taboo'] = array_filter(explode(',', $item['dietary_taboo']));
@@ -68,15 +134,11 @@ class PrescriptionLists extends BaseAdminDataLists implements ListsSearchInterfa
*/
public function count(): int
{
return Prescription::where($this->searchWhere)
->where(function ($query) {
// 如果不是共享的,只能看到自己创建的
$query->whereOr([
['is_shared', '=', 1],
['creator_id', '=', $this->adminId]
]);
})
->whereNull('delete_time')
->count();
$query = Prescription::where($this->searchWhere);
$this->applyAuditFilter($query);
$this->applyVisibilityScope($query);
$this->applyCreatorIdsFilter($query);
return $query->whereNull('delete_time')->count();
}
}
@@ -186,6 +186,25 @@ class AppointmentLogic extends BaseLogic
try {
Db::startTrans();
// 同一诊单患者在「所选预约日」仅允许一条「已预约」或「已过号」记录(与 appointment_date 一致,不能误用服务器当天拦其它日期)
$apptDate = trim((string) ($params['appointment_date'] ?? ''));
if ($apptDate === '') {
self::setError('预约日期不能为空');
Db::rollback();
return false;
}
$patientSameDay = Appointment::where('patient_id', (int) $params['patient_id'])
->where('appointment_date', $apptDate)
->whereIn('status', [1, 4])
->find();
if ($patientSameDay) {
self::setError('该患者在所选日期已有挂号(已预约或已过号),无法重复预约');
Db::rollback();
return false;
}
// 1. 检查时间段是否已被预约(每个时间段只能预约1次)
// 统一时间格式为 HH:MM:SS
$appointmentTime = strlen($params['appointment_time']) == 5
@@ -214,7 +233,7 @@ class AppointmentLogic extends BaseLogic
'appointment_time' => $appointmentTime,
'appointment_type' => $params['appointment_type'] ?? 'video',
'remark' => $params['remark'] ?? '',
'channel_source' => $params['channel_source'] ?? '',
'channels' => $params['channel_source'] ?? '',
'status' => 1,
'create_time' => time(),
'update_time' => time(),
@@ -245,6 +264,19 @@ class AppointmentLogic extends BaseLogic
return false;
}
$st = (int) $appointment->status;
if ($st === 2) {
return true;
}
if ($st === 3) {
self::setError('预约已完成,无法取消');
return false;
}
if ($st !== 1 && $st !== 4) {
self::setError('当前状态不可取消');
return false;
}
$appointment->status = 2; // 已取消
$appointment->update_time = time();
$appointment->save();
@@ -367,12 +399,13 @@ class AppointmentLogic extends BaseLogic
self::setError('预约记录不存在');
return false;
}
if ($appointment->status != 1) {
if ($appointment->status == 3) {
self::setError('该预约已处理,无法完成');
return false;
}
$appointment->status = 3; // 已完成
$appointment->update_time = time();
$appointment->save();
+332 -41
View File
@@ -16,6 +16,7 @@ namespace app\adminapi\logic\tcm;
use app\common\logic\BaseLogic;
use app\common\model\tcm\Diagnosis;
use app\common\model\tcm\DiagnosisAssignLog;
use app\common\model\tcm\ImChatMessage;
use app\common\model\DiagnosisViewRecord;
use think\facade\Db;
@@ -91,11 +92,11 @@ class DiagnosisLogic extends BaseLogic
if (isset($params['diagnosis_date'])) {
$params['diagnosis_date'] = strtotime($params['diagnosis_date']);
}
$model = Diagnosis::create($params);
// 自动为患者创建 TRTC 账号
self::createPatientTrtcAccount($model->patient_id);
self::createPatientTrtcAccount($model->id);
return $model->id;
} catch (\Exception $e) {
@@ -450,23 +451,102 @@ class DiagnosisLogic extends BaseLogic
}
/**
* @notes 指派医助
* @notes 指派医助(每次成功更新写入一条操作记录,批量指派为多次接口调用各记一条)
* @param array $params
* @return bool
*/
public static function assign(array $params): bool
{
try {
Diagnosis::where('id', $params['id'])->update([
'assistant_id' => $params['assistant_id']
$id = (int) ($params['id'] ?? 0);
$toAssistantId = (int) ($params['assistant_id'] ?? 0);
if ($id <= 0) {
self::setError('诊单不存在');
return false;
}
$diagnosis = Diagnosis::where('id', $id)->whereNull('delete_time')->find();
if (!$diagnosis) {
self::setError('诊单不存在');
return false;
}
$fromAssistantId = (int) ($diagnosis->getAttr('assistant_id') ?? 0);
Db::startTrans();
Diagnosis::where('id', $id)->whereNull('delete_time')->update([
'assistant_id' => $toAssistantId,
]);
$req = request();
$admin = $req->adminInfo ?? [];
DiagnosisAssignLog::create([
'diagnosis_id' => $id,
'from_assistant_id' => $fromAssistantId,
'to_assistant_id' => $toAssistantId,
'operator_admin_id' => (int) ($admin['admin_id'] ?? 0),
'operator_name' => (string) ($admin['name'] ?? ''),
'operator_account' => (string) ($admin['account'] ?? ''),
'ip' => (string) ($req->ip() ?? ''),
'create_time' => time(),
]);
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 诊单指派医助操作记录列表
*/
public static function assignLogList(int $diagnosisId): array
{
$rows = DiagnosisAssignLog::where('diagnosis_id', $diagnosisId)
->order('id', 'desc')
->select()
->toArray();
$adminIds = [];
foreach ($rows as $r) {
if (!empty($r['from_assistant_id'])) {
$adminIds[] = (int) $r['from_assistant_id'];
}
if (!empty($r['to_assistant_id'])) {
$adminIds[] = (int) $r['to_assistant_id'];
}
}
$adminIds = array_values(array_unique(array_filter($adminIds)));
$nameMap = [];
if ($adminIds !== []) {
$nameMap = \app\common\model\auth\Admin::whereIn('id', $adminIds)->column('name', 'id');
}
foreach ($rows as &$r) {
$fromId = (int) ($r['from_assistant_id'] ?? 0);
$toId = (int) ($r['to_assistant_id'] ?? 0);
$r['from_assistant_name'] = $fromId > 0
? (string) ($nameMap[$fromId] ?? ('ID:' . $fromId))
: '—';
$r['to_assistant_name'] = $toId > 0
? (string) ($nameMap[$toId] ?? ('ID:' . $toId))
: '—';
$r['create_time_text'] = !empty($r['create_time'])
? date('Y-m-d H:i:s', (int) $r['create_time'])
: '';
}
unset($r);
return $rows;
}
/**
* @notes 获取通话签名
* @param array $params
@@ -1152,47 +1232,195 @@ class DiagnosisLogic extends BaseLogic
{
try {
// 获取当前管理员ID(从参数中获取)
$adminId = $params['admin_id'] ?? 0;
if (!$adminId) {
$adminId = (int)($params['admin_id'] ?? 0);
$diagnosisId = (int)($params['diagnosis_id'] ?? 0);
if ($adminId <= 0) {
self::setError('获取管理员信息失败');
return false;
}
// 查找最近的通话记录
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $params['diagnosis_id'])
if ($diagnosisId <= 0) {
self::setError('诊单ID无效');
return false;
}
// 优先匹配「当前医生 + 进行中」,与 startCloudRecording / bindCallRoom 一致
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('caller_id', $adminId)
->where('status', 1)
->order('id', 'desc')
->find();
if ($record) {
$taskId = trim((string)($record['cloud_recording_task_id'] ?? ''));
if ($taskId !== '') {
\app\common\service\TrtcCloudRecordingService::stopRecording(
\app\common\service\TrtcCloudRecordingService::trtcSdkAppId(),
$taskId
);
if (!$record) {
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('status', 1)
->order('id', 'desc')
->find();
if ($record) {
\think\facade\Log::warning('endCall: 未匹配 caller_id,已回退到该诊单最新进行中记录', [
'diagnosis_id' => $diagnosisId,
'admin_id' => $adminId,
'record_caller_id' => $record['caller_id'] ?? null,
'call_record_id' => $record['id'] ?? null,
]);
}
$endTime = time();
$duration = $endTime - $record->start_time;
$record->save([
'status' => 2, // 2-已结束
'end_time' => $endTime,
'duration' => $duration,
'cloud_recording_task_id' => '',
'update_time' => time(),
}
if (!$record) {
// 前端常重复回调 endCallafterCalling + Store idle),第一条已结束则不再告警
$latest = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->order('id', 'desc')
->find();
$justEnded = $latest
&& (int)($latest['status'] ?? 0) === 2
&& (int)($latest['end_time'] ?? 0) > 0
&& (time() - (int)$latest['end_time']) < 120;
if (!$justEnded) {
\think\facade\Log::warning('endCall: 无进行中通话记录,未调用 DeleteCloudRecording', [
'diagnosis_id' => $diagnosisId,
'admin_id' => $adminId,
]);
}
return true;
}
$taskId = trim((string)($record['cloud_recording_task_id'] ?? ''));
if ($taskId !== '') {
$stopped = \app\common\service\TrtcCloudRecordingService::stopRecording(
\app\common\service\TrtcCloudRecordingService::trtcSdkAppId(),
$taskId
);
if (empty($stopped['ok'])) {
\think\facade\Log::warning('endCall: DeleteCloudRecording 失败', [
'message' => (string)($stopped['message'] ?? ''),
'task_id' => $taskId,
'call_record_id' => $record['id'] ?? null,
'room_id' => $record['room_id'] ?? '',
]);
}
} else {
\think\facade\Log::warning('endCall: cloud_recording_task_id 为空,未调用 DeleteCloudRecording;控制台「房间尚未结束」常见于录制机器人仍在房或未走 API 合流录制', [
'call_record_id' => $record['id'] ?? null,
'diagnosis_id' => $diagnosisId,
'room_id' => $record['room_id'] ?? '',
]);
}
$endTime = time();
$duration = $endTime - (int)$record->start_time;
// 保留 cloud_recording_task_idVOD 311 回调常在挂断之后到达,需按 TaskId 关联写入 recording_urls
$record->save([
'status' => 2, // 2-已结束
'end_time' => $endTime,
'duration' => $duration,
'update_time' => time(),
]);
return true;
} catch (\Exception $e) {
self::setError($e->getMessage());
return false;
}
}
/**
* @notes 患者端挂断:停止云端录制并结束该诊单下对应通话记录(不依赖管理端浏览器是否触发 endCall
* @param array{diagnosis_id?:int,patient_id:int,room_id?:string} $params patient_id 须与诊单 tcm_diagnosis.patient_id 一致;room_id bindCallRoom 一致时可精准命中(小程序通话页独立时 chat 页可能已卸载,仅靠 room_id + patient_id 即可)
*/
public static function patientHangupVideoCall(array $params): bool
{
try {
$diagnosisId = (int)($params['diagnosis_id'] ?? 0);
$patientId = (int)($params['patient_id'] ?? 0);
$roomIdRaw = trim((string)($params['room_id'] ?? ''));
if ($patientId <= 0) {
self::setError('参数错误');
return false;
}
if ($diagnosisId <= 0 && $roomIdRaw === '') {
self::setError('诊单ID或房间号须至少传一项');
return false;
}
$record = null;
if ($roomIdRaw !== '') {
$roomCandidates = array_values(array_unique(array_filter([
$roomIdRaw,
ctype_digit($roomIdRaw) ? (string)((int)$roomIdRaw) : '',
])));
$record = \app\common\model\tcm\CallRecord::where('status', 1)
->whereIn('room_id', $roomCandidates)
->order('id', 'desc')
->find();
if ($record) {
$diagByRoom = Diagnosis::find((int)$record['diagnosis_id']);
if (!$diagByRoom || (int)($diagByRoom['patient_id'] ?? 0) !== $patientId) {
$record = null;
} else {
$diagnosisId = (int)$record['diagnosis_id'];
}
}
}
if (!$record && $diagnosisId > 0) {
$diag = Diagnosis::find($diagnosisId);
if (!$diag || (int)($diag['patient_id'] ?? 0) !== $patientId) {
self::setError('无权操作该诊单');
return false;
}
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('callee_id', $patientId)
->where('status', 1)
->order('id', 'desc')
->find();
if (!$record) {
$cnt = (int)\app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)->where('status', 1)->count();
if ($cnt === 1) {
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('status', 1)
->order('id', 'desc')
->find();
}
}
}
if (!$record) {
return true;
}
$taskId = trim((string)($record['cloud_recording_task_id'] ?? ''));
if ($taskId !== '') {
\app\common\service\TrtcCloudRecordingService::stopRecording(
\app\common\service\TrtcCloudRecordingService::trtcSdkAppId(),
$taskId
);
}
$endTime = time();
$duration = $endTime - (int)$record->start_time;
$record->save([
'status' => 2,
'end_time' => $endTime,
'duration' => $duration,
'update_time' => $endTime,
]);
\think\facade\Log::info('patientHangupVideoCall: 已停录并结束通话记录', [
'call_record_id' => $record->id,
'diagnosis_id' => $diagnosisId,
]);
return true;
} catch (\Exception $e) {
self::setError($e->getMessage());
\think\facade\Log::warning('patientHangupVideoCall: ' . $e->getMessage());
return false;
}
}
/**
* @notes 获取通话记录
* @param array $params
@@ -1229,9 +1457,10 @@ class DiagnosisLogic extends BaseLogic
}
/**
* @notes TRTC 房间号写入当前诊单最近一次通话记录,便于云端录制回调按 room_id 关联
* @notes TRTC 房间号写入当前诊单通话记录,并尝试 API 合流云端录制
* @return array{cloud_recording?:array}|false 成功返回 data 数组(供接口带给前端);失败 false
*/
public static function bindCallRoom(array $params): bool
public static function bindCallRoom(array $params)
{
try {
$diagnosisId = (int)($params['diagnosis_id'] ?? 0);
@@ -1241,10 +1470,23 @@ class DiagnosisLogic extends BaseLogic
return false;
}
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('status', 1)
->order('id', 'desc')
->find();
$adminId = (int)($params['admin_id'] ?? 0);
// 必须与 startCloudRecording 使用同一条「进行中 + 当前管理员」记录写 room_id,否则会写到别的记录上,合流 API 读到 room_id 仍为空 → 关闭全局录制后无任何文件
$record = null;
if ($adminId > 0) {
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('status', 1)
->where('caller_id', $adminId)
->order('id', 'desc')
->find();
}
if (!$record) {
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('status', 1)
->order('id', 'desc')
->find();
}
if (!$record) {
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('room_id', '')
@@ -1261,15 +1503,49 @@ class DiagnosisLogic extends BaseLogic
'update_time' => time(),
]);
$adminId = (int)($params['admin_id'] ?? 0);
$cloudPayload = [
'started' => false,
'task_id' => '',
'message' => '未尝试合流录制(admin_id 为空)',
];
if ($adminId > 0) {
self::startCloudRecording([
$cloudRec = self::startCloudRecording([
'diagnosis_id' => $diagnosisId,
'admin_id' => $adminId,
], true);
if ($cloudRec === false) {
\think\facade\Log::warning('bindCallRoom: startCloudRecording 未执行或异常', [
'diagnosis_id' => $diagnosisId,
'room_id' => $roomId,
]);
$cloudPayload = [
'started' => false,
'task_id' => '',
'message' => '合流录制未启动(无匹配通话记录或异常,见服务端日志)',
];
} elseif (is_array($cloudRec)) {
$cloudPayload = [
'started' => !empty($cloudRec['started']),
'task_id' => (string)($cloudRec['task_id'] ?? ''),
'message' => (string)($cloudRec['message'] ?? ''),
];
if (empty($cloudRec['started'])) {
\think\facade\Log::warning('bindCallRoom: CreateCloudRecording 合流未启动', [
'diagnosis_id' => $diagnosisId,
'room_id' => $roomId,
'message' => $cloudPayload['message'],
]);
} else {
\think\facade\Log::info('bindCallRoom: 合流云端录制已发起', [
'diagnosis_id' => $diagnosisId,
'room_id' => $roomId,
'task_id' => $cloudPayload['task_id'],
]);
}
}
}
return true;
return ['cloud_recording' => $cloudPayload];
} catch (\Exception $e) {
self::setError($e->getMessage());
return false;
@@ -1302,6 +1578,19 @@ class DiagnosisLogic extends BaseLogic
->where('status', 1)
->order('id', 'desc')
->find();
if (!$record) {
$record = \app\common\model\tcm\CallRecord::where('diagnosis_id', $diagnosisId)
->where('status', 1)
->order('id', 'desc')
->find();
if ($record) {
\think\facade\Log::warning('startCloudRecording: 未找到 caller_id 匹配的进行中记录,已回退到该诊单最新进行中记录', [
'diagnosis_id' => $diagnosisId,
'admin_id' => $adminId,
'record_caller_id' => $record['caller_id'] ?? null,
]);
}
}
if (!$record) {
if (!$silent) {
self::setError('没有进行中的通话记录');
@@ -1337,11 +1626,13 @@ class DiagnosisLogic extends BaseLogic
$botSig = \app\common\service\TrtcCloudRecordingService::makeBotUserSig($botUserId);
$sdkAppId = \app\common\service\TrtcCloudRecordingService::trtcSdkAppId();
$vodMixPrefix = 'mix_' . $diagnosisId . '_' . (int)$record['id'];
$r = \app\common\service\TrtcCloudRecordingService::startMixRecording(
$sdkAppId,
$roomId,
$botUserId,
$botSig
$botSig,
$vodMixPrefix
);
if (!$r['ok']) {
return [
@@ -4,13 +4,20 @@ declare(strict_types=1);
namespace app\adminapi\logic\tcm;
use app\common\model\auth\Admin;
use app\common\model\tcm\Prescription;
use app\common\model\tcm\Diagnosis;
use app\common\service\wechat\WechatWorkAppMessageService;
use think\facade\Config;
use think\facade\Log;
class PrescriptionLogic
{
private static $error = '';
/** @var array{ok: bool, message?: string, errcode?: int}|null 最近一次审核成功后的企微通知结果 */
private static ?array $lastAuditWecomNotify = null;
public static function setError(string $msg): void
{
self::$error = $msg;
@@ -21,11 +28,127 @@ class PrescriptionLogic
return self::$error;
}
/**
* 可见角色 ID 存库为逗号分隔字符串
*
* @param array|string $raw
*/
public static function normalizeVisibleRoleIds($raw): string
{
if (is_string($raw)) {
$parts = array_filter(array_map('intval', explode(',', $raw)));
} elseif (is_array($raw)) {
$parts = array_filter(array_map('intval', $raw));
} else {
$parts = [];
}
return implode(',', array_values(array_unique($parts)));
}
/**
* 当前管理员是否可审核处方(通过/驳回)
*/
public static function canAuditPrescription(int $adminId, array $adminInfo): bool
{
if (!empty($adminInfo['root']) && (int) $adminInfo['root'] === 1) {
return true;
}
$allow = Config::get('project.prescription_audit_roles', []);
if ($allow === [] || $allow === null) {
$allow = Config::get('project.prescription_library_manage_all_roles', [0, 3]);
}
$myRoles = array_map('intval', $adminInfo['role_id'] ?? []);
$allow = array_map('intval', $allow);
return count(array_intersect($myRoles, $allow)) > 0;
}
/**
* 是否可查看该处方(列表/详情)
*
* @param Prescription|array<string,mixed> $row
*/
public static function canViewPrescription($row, int $adminId, array $adminInfo): bool
{
if (!empty($adminInfo['root']) && (int) $adminInfo['root'] === 1) {
return true;
}
$creatorId = is_array($row) ? (int) ($row['creator_id'] ?? 0) : (int) $row->creator_id;
if ($creatorId === $adminId) {
return true;
}
$isShared = is_array($row) ? (int) ($row['is_shared'] ?? 0) : (int) $row->is_shared;
if ($isShared === 1) {
return true;
}
$vis = is_array($row) ? (string) ($row['visible_role_ids'] ?? '') : (string) ($row->visible_role_ids ?? '');
$allowed = array_filter(array_map('intval', explode(',', $vis)));
$myRoles = array_map('intval', $adminInfo['role_id'] ?? []);
return count(array_intersect($myRoles, $allowed)) > 0;
}
private static function generateSn(): string
{
return 'RX' . date('Ymd') . str_pad((string)mt_rand(1, 9999), 4, '0', STR_PAD_LEFT);
}
/**
* 处方日期统一为 Y-m-d(与库表 prescription_date 一致)
*
* @param mixed $raw
*/
private static function normalizePrescriptionDate($raw): string
{
if ($raw === null || $raw === '') {
return date('Y-m-d');
}
if (is_numeric($raw) && (float) $raw > 1e9) {
return date('Y-m-d', (int) $raw);
}
$s = (string) $raw;
if (preg_match('/^\d{4}-\d{2}-\d{2}/', $s)) {
return substr($s, 0, 10);
}
$ts = strtotime($s);
return $ts ? date('Y-m-d', $ts) : date('Y-m-d');
}
/**
* 同一诊单、同一开方人、同一处方日期:仅允许一张「未作废」的未删除记录;已作废的可再新开一张。
*
* @param int|null $excludeId 编辑时排除自身 id
*/
private static function assertUniquePrescriptionPerDiagnosisDay(int $diagnosisId, int $creatorId, string $prescriptionDateYmd, ?int $excludeId): bool
{
if ($diagnosisId <= 0 || $creatorId <= 0) {
return true;
}
$q = Prescription::where('diagnosis_id', $diagnosisId)
->where('creator_id', $creatorId)
->where('prescription_date', $prescriptionDateYmd)
->where('void_status', 0)
->whereNull('delete_time');
if ($excludeId !== null && $excludeId > 0) {
$q->where('id', '<>', $excludeId);
}
if ($q->count() > 0) {
self::setError('同一诊单同一天已存在未作废处方,请先作废后再新开');
return false;
}
return true;
}
/**
* 添加处方
*/
@@ -40,6 +163,12 @@ class PrescriptionLogic
}
}
$dateYmd = self::normalizePrescriptionDate($params['prescription_date'] ?? date('Y-m-d'));
$diagnosisIdRule = (int) ($params['diagnosis_id'] ?? 0);
if ($diagnosisIdRule > 0 && !self::assertUniquePrescriptionPerDiagnosisDay($diagnosisIdRule, $adminId, $dateYmd, null)) {
return null;
}
$herbs = $params['herbs'] ?? [];
if (empty($herbs) || !is_array($herbs)) {
self::setError('请添加中药');
@@ -70,7 +199,7 @@ class PrescriptionLogic
'age' => (int)($params['age'] ?? 0),
'phone' => $params['phone'] ?? '',
'visit_no' => $params['visit_no'] ?? $sn,
'prescription_date' => $params['prescription_date'] ?? date('Y-m-d'),
'prescription_date' => $dateYmd,
'pulse' => $params['pulse'] ?? '',
'pulse_condition' => $params['pulse_condition'] ?? '',
'tongue' => $params['tongue'] ?? '',
@@ -91,6 +220,13 @@ class PrescriptionLogic
'doctor_signature' => $params['doctor_signature'] ?? '',
'template_id' => (int)($params['template_id'] ?? 0),
'is_shared' => (int)($params['is_shared'] ?? 0),
'visible_role_ids' => self::normalizeVisibleRoleIds($params['visible_role_ids'] ?? []),
// 新开方一律待审核(忽略客户端传入的 audit_status,防止绕过审核)
'audit_status' => 0,
'audit_time' => null,
'audit_by' => null,
'audit_by_name' => '',
'audit_remark' => '',
'creator_id' => $adminId,
];
@@ -111,6 +247,32 @@ class PrescriptionLogic
return false;
}
// 已通过且未作废:不可编辑(与消费者端仅「查看」一致)
if ((int) ($prescription->audit_status ?? 1) === 1 && (int) ($prescription->void_status ?? 0) === 0) {
self::setError('该处方已通过审核,不可编辑');
return false;
}
// 已驳回:仅当该诊单+当天+同一创建人下没有另一条「已通过且未作废」的处方时允许重新编辑(改后待审核、作废一并清除)
if ((int) ($prescription->audit_status ?? 1) === 2) {
$rejDiagnosisId = (int) ($params['diagnosis_id'] ?? $prescription->diagnosis_id);
$rejDateYmd = self::normalizePrescriptionDate($params['prescription_date'] ?? $prescription->prescription_date);
if ($rejDiagnosisId > 0) {
$hasOtherApproved = Prescription::where('diagnosis_id', $rejDiagnosisId)
->where('creator_id', (int) $prescription->creator_id)
->where('prescription_date', $rejDateYmd)
->where('audit_status', 1)
->where('void_status', 0)
->whereNull('delete_time')
->where('id', '<>', (int) $params['id'])
->count() > 0;
if ($hasOtherApproved) {
self::setError('该诊单当天已有审核通过的处方,不可再编辑本条已驳回记录');
return false;
}
}
}
// 检查权限:只有创建者或共享的处方才能编辑
if ($prescription->creator_id != $adminId && $prescription->is_shared != 1) {
self::setError('无权限编辑此处方');
@@ -130,14 +292,23 @@ class PrescriptionLogic
}
}
$newDiagnosisId = (int) ($params['diagnosis_id'] ?? $prescription->diagnosis_id);
$newDateYmd = self::normalizePrescriptionDate($params['prescription_date'] ?? $prescription->prescription_date);
if ($newDiagnosisId > 0 && !self::assertUniquePrescriptionPerDiagnosisDay($newDiagnosisId, (int) $prescription->creator_id, $newDateYmd, (int) $params['id'])) {
return false;
}
$wasVoid = (int) ($prescription->void_status ?? 0) === 1;
$data = [
'diagnosis_id' => $newDiagnosisId,
'prescription_name' => $params['prescription_name'] ?? $prescription->prescription_name,
'prescription_type' => $params['prescription_type'] ?? $prescription->prescription_type,
'patient_name' => $params['patient_name'] ?? $prescription->patient_name,
'gender' => (int)($params['gender'] ?? $prescription->gender),
'age' => (int)($params['age'] ?? $prescription->age),
'visit_no' => $params['visit_no'] ?? $prescription->visit_no,
'prescription_date' => $params['prescription_date'] ?? $prescription->prescription_date,
'prescription_date' => $newDateYmd,
'tongue' => $params['tongue'] ?? $prescription->tongue,
'tongue_image' => $params['tongue_image'] ?? $prescription->tongue_image,
'pulse' => $params['pulse'] ?? $prescription->pulse,
@@ -154,8 +325,24 @@ class PrescriptionLogic
'usage_notes' => $params['usage_notes'] ?? $prescription->usage_notes,
'doctor_name' => $params['doctor_name'] ?? $prescription->doctor_name,
'is_shared' => (int)($params['is_shared'] ?? $prescription->is_shared),
'visible_role_ids' => array_key_exists('visible_role_ids', $params)
? self::normalizeVisibleRoleIds($params['visible_role_ids'])
: (string) ($prescription->visible_role_ids ?? ''),
// 开方医生修改后重新进入待审核
'audit_status' => 0,
'audit_time' => null,
'audit_by' => null,
'audit_by_name' => '',
'audit_remark' => '',
];
if ($wasVoid) {
$data['void_status'] = 0;
$data['void_time'] = null;
$data['void_by'] = null;
$data['void_by_name'] = '';
}
$prescription->save($data);
return true;
} catch (\Exception $e) {
@@ -176,6 +363,11 @@ class PrescriptionLogic
return false;
}
if ((int) ($prescription->audit_status ?? 1) === 1 && (int) ($prescription->void_status ?? 0) === 0) {
self::setError('该处方已通过审核,不可删除');
return false;
}
$prescription->delete();
return true;
} catch (\Exception $e) {
@@ -185,19 +377,180 @@ class PrescriptionLogic
}
/**
* 处方详情
* 处方详情(带查看权限校验,供后台管理端)
*/
public static function detail(int $id): ?array
public static function detail(int $id, int $viewerAdminId, array $viewerAdminInfo): ?array
{
self::$error = '';
$row = Prescription::find($id);
if (!$row) {
return null;
}
if (!self::canViewPrescription($row, $viewerAdminId, $viewerAdminInfo)) {
self::setError('无权限查看此处方');
return null;
}
$arr = $row->toArray();
$arr['gender_desc'] = $arr['gender'] == 1 ? '男' : '女';
$arr['visible_role_ids'] = self::visibleRoleIdsToArray($arr['visible_role_ids'] ?? '');
return $arr;
}
/**
* @return int[]
*/
public static function visibleRoleIdsToArray(string $csv): array
{
if ($csv === '') {
return [];
}
return array_values(array_unique(array_filter(array_map('intval', explode(',', $csv)))));
}
/**
* 审核:通过 / 驳回(驳回同时作废处方)
*/
public static function audit(int $id, string $action, string $remark, int $adminId, array $adminInfo): bool
{
self::$error = '';
self::$lastAuditWecomNotify = null;
if (!self::canAuditPrescription($adminId, $adminInfo)) {
self::setError('无审核权限');
return false;
}
$row = Prescription::find($id);
if (!$row) {
self::setError('处方不存在');
return false;
}
if (!self::canViewPrescription($row, $adminId, $adminInfo)) {
self::setError('无权限查看此处方,无法审核');
return false;
}
if ((int) ($row->audit_status ?? 1) !== 0) {
self::setError('当前状态不可审核');
return false;
}
$name = (string) ($adminInfo['name'] ?? '');
$now = time();
if ($action === 'approve') {
$row->audit_status = 1;
$row->audit_time = $now;
$row->audit_by = $adminId;
$row->audit_by_name = $name;
$row->audit_remark = $remark;
$ok = (bool) $row->save();
if ($ok) {
self::$lastAuditWecomNotify = self::notifyCreatorAuditResult($row, 'approve', $remark, $adminInfo);
}
return $ok;
}
if ($action === 'reject') {
if (trim($remark) === '') {
self::setError('驳回时请填写审核意见');
return false;
}
$row->audit_status = 2;
$row->audit_time = $now;
$row->audit_by = $adminId;
$row->audit_by_name = $name;
$row->audit_remark = $remark;
$row->void_status = 1;
$row->void_time = $now;
$row->void_by = $adminId;
$row->void_by_name = $name;
$ok = (bool) $row->save();
if ($ok) {
self::$lastAuditWecomNotify = self::notifyCreatorAuditResult($row, 'reject', $remark, $adminInfo);
}
return $ok;
}
self::setError('无效的审核操作');
return false;
}
/**
* 审核通过/驳回后,给企业微信中的开方人发一条应用消息(需绑定 work_wechat_userid
*
* @return array{ok: bool, message?: string, errcode?: int}
*/
private static function notifyCreatorAuditResult(Prescription $rx, string $action, string $remark, array $auditorInfo): array
{
try {
$creatorId = (int) ($rx->creator_id ?? 0);
if ($creatorId <= 0) {
return ['ok' => false, 'message' => '无法通知:处方无开方人信息'];
}
$creator = Admin::whereNull('delete_time')->find($creatorId);
if (!$creator) {
return ['ok' => false, 'message' => '无法通知:开方人账号不存在'];
}
$wxId = trim((string) ($creator->work_wechat_userid ?? ''));
if ($wxId === '') {
Log::warning("处方审核企业微信通知跳过: 开方人 admin_id={$creatorId} 未绑定 work_wechat_userid");
return [
'ok' => false,
'message' => '开方人未绑定企业微信账号,无法推送消息(请其在后台「扫码绑定企业微信」后再试)',
];
}
$sn = (string) ($rx->sn ?? '');
$patient = (string) ($rx->patient_name ?? '');
$auditorName = (string) ($auditorInfo['name'] ?? '');
if ($action === 'approve') {
$text = "【处方审核】您开具的处方已通过审核。\n编号:{$sn}\n患者:{$patient}\n审核人:{$auditorName}";
if (trim($remark) !== '') {
$text .= "\n备注:" . trim($remark);
}
} else {
$text = "【处方审核】您开具的处方已被驳回并已作废。\n编号:{$sn}\n患者:{$patient}\n审核人:{$auditorName}\n意见:" . trim($remark);
}
$result = WechatWorkAppMessageService::sendTextToUser($wxId, $text);
if (empty($result['ok'])) {
Log::warning('处方审核企业微信通知失败: ' . ($result['message'] ?? ''));
}
return $result;
} catch (\Throwable $e) {
Log::error('处方审核企业微信通知异常: ' . $e->getMessage());
return ['ok' => false, 'message' => '企业微信通知异常:' . $e->getMessage()];
}
}
/**
* 取出并清空最近一次审核后的企微通知结果(供接口返回给前端提示)
*
* @return array{ok: bool, message?: string, errcode?: int}|null
*/
public static function consumeLastAuditWecomNotify(): ?array
{
$v = self::$lastAuditWecomNotify;
self::$lastAuditWecomNotify = null;
return $v;
}
/**
* 根据诊单ID获取处方列表
*/
@@ -31,9 +31,9 @@ class DiagnosisValidate extends BaseValidate
'phone' => 'require|mobile',
'gender' => 'require|in:0,1',
'age' => 'require|number|between:0,150',
'diagnosis_date' => 'require',
'diagnosis_type' => 'require',
'status' => 'in:0,1',
'current_medications' => 'max:2000',
'tongue_images' => 'array',
'report_files' => 'array',
];
@@ -50,9 +50,9 @@ class DiagnosisValidate extends BaseValidate
'age.require' => '请输入年龄',
'age.number' => '年龄必须为数字',
'age.between' => '年龄范围0-150',
'diagnosis_date.require' => '请选择诊断日期',
'diagnosis_type.require' => '请选择诊断类型',
'status.in' => '状态参数错误',
'current_medications.max' => '在用药物最多2000个字符',
];
public function sceneAdd()
@@ -62,7 +62,7 @@ class DiagnosisValidate extends BaseValidate
public function sceneEdit()
{
return $this->only(['id', 'patient_name', 'id_card', 'phone', 'gender', 'age', 'diagnosis_date', 'diagnosis_type', 'syndrome_type', 'marital_status', 'height', 'weight', 'region', 'systolic_pressure', 'diastolic_pressure', 'fasting_blood_sugar', 'diabetes_discovery_year', 'local_hospital_diagnosis', 'local_hospital_name', 'past_history', 'symptoms', 'tongue_coating', 'pulse', 'treatment_principle', 'prescription', 'doctor_advice', 'remark', 'status', 'tongue_images', 'report_files']);
return $this->only(['id', 'patient_name', 'id_card', 'phone', 'gender', 'age', 'diagnosis_date', 'diagnosis_type', 'syndrome_type', 'marital_status', 'height', 'weight', 'region', 'systolic_pressure', 'diastolic_pressure', 'fasting_blood_sugar', 'diabetes_discovery_year', 'local_hospital_diagnosis', 'local_hospital_name', 'past_history', 'symptoms', 'tongue_coating', 'pulse', 'treatment_principle', 'prescription', 'doctor_advice', 'remark', 'current_medications', 'status', 'tongue_images', 'report_files']);
}
public function sceneId()
@@ -15,6 +15,8 @@ class PrescriptionValidate extends BaseValidate
'patient_name' => 'require',
'clinical_diagnosis' => 'require',
'herbs' => 'require|array',
'action' => 'require|in:approve,reject',
'remark' => 'max:500',
];
protected $message = [
@@ -26,22 +28,23 @@ class PrescriptionValidate extends BaseValidate
public function sceneAdd()
{
return $this->only([
'prescription_name', 'prescription_type', 'patient_name', 'gender', 'age',
'visit_no', 'prescription_date', 'tongue', 'tongue_image', 'pulse',
'pulse_condition', 'clinical_diagnosis', 'herbs', 'dose_count', 'dose_unit',
'usage_days', 'usage_instruction', 'usage_time', 'usage_way', 'dietary_taboo',
'usage_notes', 'doctor_name', 'is_shared', 'diagnosis_id', 'appointment_id'
'prescription_type', 'patient_name', 'gender', 'age',
'visit_no', 'prescription_date', 'tongue', 'tongue_image', 'pulse',
'pulse_condition', 'clinical_diagnosis', 'herbs', 'dose_count', 'dose_unit',
'usage_days', 'usage_instruction', 'usage_time', 'usage_way', 'dietary_taboo',
'usage_notes', 'doctor_name', 'is_shared', 'visible_role_ids',
'diagnosis_id', 'appointment_id', 'audit_status',
]);
}
public function sceneEdit()
{
return $this->only([
'id', 'prescription_name', 'prescription_type', 'patient_name', 'gender', 'age',
'visit_no', 'prescription_date', 'tongue', 'tongue_image', 'pulse',
'pulse_condition', 'clinical_diagnosis', 'herbs', 'dose_count', 'dose_unit',
'usage_days', 'usage_instruction', 'usage_time', 'usage_way', 'dietary_taboo',
'usage_notes', 'doctor_name', 'is_shared'
'id', 'prescription_type', 'patient_name', 'gender', 'age',
'visit_no', 'prescription_date', 'tongue', 'tongue_image', 'pulse',
'pulse_condition', 'clinical_diagnosis', 'herbs', 'dose_count', 'dose_unit',
'usage_days', 'usage_instruction', 'usage_time', 'usage_way', 'dietary_taboo',
'usage_notes', 'doctor_name', 'is_shared', 'visible_role_ids', 'diagnosis_id',
]);
}
@@ -54,4 +57,9 @@ class PrescriptionValidate extends BaseValidate
{
return $this->only(['id']);
}
public function sceneAudit()
{
return $this->only(['id', 'action', 'remark']);
}
}
+27 -2
View File
@@ -28,7 +28,7 @@ class TcmController extends BaseApiController
* @notes 不需要登录的方法
* @var array
*/
public array $notNeedLogin = ['getPatientSignature', 'diagnosisDetail', 'getDict', 'confirmDiagnosis', 'getCardList', 'getOrderByNo'];
public array $notNeedLogin = ['getPatientSignature', 'diagnosisDetail', 'getDict', 'confirmDiagnosis', 'getCardList', 'getOrderByNo', 'patientHangupVideo'];
/**
* @notes 获取患者签名(供小程序调用)
@@ -51,7 +51,32 @@ class TcmController extends BaseApiController
return $this->data($result);
}
/**
* @notes 患者挂断视频:后端 DeleteCloudRecording + 结束通话记录(与诊单 patient_id 校验)
* @return \think\response\Json
*/
public function patientHangupVideo()
{
$params = [
'diagnosis_id' => (int)$this->request->post('diagnosis_id', 0),
'patient_id' => (int)$this->request->post('patient_id', 0),
'room_id' => trim((string)$this->request->post('room_id', '')),
];
if ($params['patient_id'] <= 0) {
return $this->fail('患者ID不能为空');
}
if ($params['diagnosis_id'] <= 0 && $params['room_id'] === '') {
return $this->fail('诊单ID或房间号须至少传一项');
}
$result = DiagnosisLogic::patientHangupVideoCall($params);
if ($result === false) {
return $this->fail(DiagnosisLogic::getError());
}
return $this->success('已结束通话');
}
/**
* @notes 获取诊单详情(供小程序调用)
* @return \think\response\Json
+67 -19
View File
@@ -17,7 +17,7 @@ class TrtcController extends BaseApiController
public array $notNeedLogin = ['recordingNotify'];
/**
* POST /api/trtc/recording-notify
* POST /api/trtc/recording-notify /api/trtc/recordingNotify(与控制台回调 URL 一致即可)
* 可选安全:环境变量 TRTC_RECORDING_CALLBACK_TOKEN 非空时,Query 需带 ?token=xxx
*/
public function recordingNotify()
@@ -37,28 +37,41 @@ class TrtcController extends BaseApiController
return json(['code' => 0, 'msg' => 'ok']);
}
$eventType = (int)($json['EventType'] ?? 0);
$roomId = $this->extractRoomId($json);
$taskId = trim((string)data_get($json, 'EventInfo.TaskId', ''));
$urls = $this->extractRecordingUrls($json);
if ($roomId === '' || $urls === []) {
Log::info('TRTC recording callback: skip (no room or no urls)', [
'roomId' => $roomId,
'eventType' => $json['EventType'] ?? null,
]);
if ($urls === []) {
// 301–308 等为进度事件,无播放地址;311=VOD 上传完成带 VideoUrl(见文档 81113
$mayHaveUrl = in_array($eventType, [309, 310, 311], true);
$payload = data_get($json, 'EventInfo.Payload');
if ($urls === [] && $eventType === 311) {
Log::warning('TRTC recording callback: 311 但未解析到 VideoUrl(可能 Status!=0 或字段名变更)', [
'PayloadStatus' => is_array($payload) ? ($payload['Status'] ?? null) : null,
'Errmsg' => is_array($payload) ? ($payload['Errmsg'] ?? $payload['ErrMsg'] ?? null) : null,
'TaskId' => $taskId !== '' ? $taskId : null,
'roomId' => $roomId !== '' ? $roomId : null,
]);
}
Log::info(
'TRTC recording callback: skip (no playback url in payload) '
. 'EventType=' . $eventType
. ' EventGroupId=' . (string)($json['EventGroupId'] ?? '')
. ' TaskId=' . ($taskId !== '' ? $taskId : '-')
. ' roomId=' . ($roomId !== '' ? $roomId : '-')
. ' ' . ($mayHaveUrl ? 'expect_url' : 'progress_ok')
);
return json(['code' => 0, 'msg' => 'ok']);
}
$record = CallRecord::where('room_id', $roomId)
->order('id', 'desc')
->find();
$record = $this->resolveCallRecordForNotify($roomId, $taskId);
if (!$record) {
// 兼容数字房间号与字符串
$record = CallRecord::where('room_id', (string)(int)$roomId)
->order('id', 'desc')
->find();
}
if (!$record) {
Log::warning('TRTC recording: no call_record for room', ['roomId' => $roomId]);
Log::warning('TRTC recording: no call_record (try room_id + cloud_recording_task_id)', [
'roomId' => $roomId,
'TaskId' => $taskId,
'EventType' => $eventType,
]);
return json(['code' => 0, 'msg' => 'ok']);
}
@@ -88,18 +101,52 @@ class TrtcController extends BaseApiController
$candidates = [
data_get($data, 'EventInfo.RoomId'),
data_get($data, 'EventInfo.RoomIdStr'),
data_get($data, 'EventInfo.StrRoomId'),
data_get($data, 'EventInfo.Payload.RoomId'),
data_get($data, 'EventInfo.Payload.RoomIdStr'),
data_get($data, 'RoomId'),
data_get($data, 'room_id'),
];
foreach ($candidates as $v) {
if ($v !== null && $v !== '') {
return trim((string)$v);
$s = trim((string)$v);
if ($s !== '' && $s !== '0') {
return $s;
}
}
}
return '';
}
/**
* 先按 room_id,再按 CreateCloudRecording 返回的 TaskId(须库中仍保留 cloud_recording_task_id
*/
private function resolveCallRecordForNotify(string $roomId, string $taskId): ?CallRecord
{
if ($roomId !== '') {
$record = CallRecord::where('room_id', $roomId)->order('id', 'desc')->find();
if ($record) {
return $record;
}
if (ctype_digit($roomId)) {
$norm = (string)(int)$roomId;
$record = CallRecord::where('room_id', $norm)->order('id', 'desc')->find();
if ($record) {
return $record;
}
}
}
if ($taskId !== '') {
$record = CallRecord::where('cloud_recording_task_id', $taskId)->order('id', 'desc')->find();
if ($record) {
return $record;
}
}
return null;
}
/**
* 从回调 JSON 中提取录制文件地址(混流/单路字段名在不同版本可能不同)
*/
@@ -117,9 +164,10 @@ class TrtcController extends BaseApiController
return;
}
foreach ($node as $key => $val) {
if (is_string($key) && in_array($key, ['VideoUrl', 'FileUrl', 'MediaUrl', 'Url', 'url'], true) && is_string($val)) {
$keyLower = is_string($key) ? strtolower($key) : '';
if (in_array($keyLower, ['videourl', 'fileurl', 'mediaurl', 'url', 'streamurl', 'playurl'], true) && is_string($val)) {
$v = trim($val);
if ($v !== '' && str_starts_with($v, 'http')) {
if ($v !== '' && preg_match('#^https?://#i', $v) === 1) {
$urls[] = $v;
}
}
@@ -14,16 +14,16 @@ use think\facade\Log;
/**
* 挂号单状态自动更新
* - 预约时间已过:status -> 4(已过号)
* - 预约时间已过超过8小时:status -> 2(已取消)
* - 不处理:status=3(已完成)、未到时间的单子
* - 预约时间已过超过 35 分钟(且未满 8 小时)status -> 4(已过号)
* - 预约时间已过超过 8 小时:status -> 2(已取消)
* - 不处理:status=3(已完成)、未到时间、刚过号未满 35 分钟的单子
*/
class UpdateAppointmentStatus extends Command
{
protected function configure()
{
$this->setName('update_appointment_status')
->setDescription('自动更新挂号单状态:过号->4,超8小时->2(已取消)')
->setDescription('自动更新挂号单状态:过号超35分钟->4,超8小时->2(已取消)')
->addOption('dry', null, Option::VALUE_NONE, '仅预览不执行');
}
@@ -38,8 +38,8 @@ class UpdateAppointmentStatus extends Command
$cancelSql = "UPDATE {$table} SET status = 2, update_time = ? WHERE {$cancelWhere}";
$cancelCount = $dryRun ? 0 : Db::execute($cancelSql, [$now]);
// 2. 已过时间但未超8小时 -> 已过号(status=4)
$missedWhere = "status = 1 AND CONCAT(appointment_date, ' ', IFNULL(appointment_time, '00:00:00')) < NOW() AND CONCAT(appointment_date, ' ', IFNULL(appointment_time, '00:00:00')) > DATE_SUB(NOW(), INTERVAL 8 HOUR)";
// 2. 已过预约时间超过 35 分钟且未满 8 小时 -> 已过号(status=4)
$missedWhere = "status = 1 AND CONCAT(appointment_date, ' ', IFNULL(appointment_time, '00:00:00')) < DATE_SUB(NOW(), INTERVAL 35 MINUTE) AND CONCAT(appointment_date, ' ', IFNULL(appointment_time, '00:00:00')) > DATE_SUB(NOW(), INTERVAL 8 HOUR)";
$missedSql = "UPDATE {$table} SET status = 4, update_time = ? WHERE {$missedWhere}";
$missedCount = $dryRun ? 0 : Db::execute($missedSql, [$now]);
@@ -16,6 +16,8 @@ namespace app\common\model\tcm;
use app\common\model\BaseModel;
use app\common\model\DiagnosisViewRecord;
use think\model\concern\SoftDelete;
/**
* 中医辨房病因诊单模型
* Class Diagnosis
@@ -23,6 +25,8 @@ use app\common\model\DiagnosisViewRecord;
*/
class Diagnosis extends BaseModel
{
use SoftDelete;
protected $name = 'tcm_diagnosis';
// 自动时间戳类型设置为整型
@@ -0,0 +1,15 @@
<?php
namespace app\common\model\tcm;
use app\common\model\BaseModel;
/**
* 诊单指派医助操作记录
*/
class DiagnosisAssignLog extends BaseModel
{
protected $name = 'tcm_diagnosis_assign_log';
protected $autoWriteTimestamp = false;
}
@@ -8,23 +8,65 @@ use think\facade\Log;
/**
* 腾讯云 TRTC 云端录制(CreateCloudRecording / DeleteCloudRecording
* 混流(合流)录制:在 RecordParams 中将 RecordMode 设为 2,并配合 MixLayoutParams / MixTranscodeParams。
* 依赖:composer require tencentcloud/trtc
*/
class TrtcCloudRecordingService
{
/** RecordParams.RecordMode:混流录制(多路合成一个文件) */
public const RECORD_MODE_MIX = 2;
/**
* 在应用启动时调用,避免 Guzzle 首次 defaultCaBundle() 缓存错误路径(Windows 常见 cURL error 60)。
* 也可在发起请求前再次调用(重复 ini_set 无害)。
*/
public static function applyRecordingSslCaBundleEarly(): void
{
$path = self::resolveRecordingCaBundlePath();
if ($path === '') {
if (\function_exists('putenv')) {
@putenv('TRTC_RECORDING_SSL_CAFILE');
}
return;
}
@ini_set('openssl.cafile', $path);
@ini_set('curl.cainfo', $path);
// 腾讯云 SDK 内 Guzzle 会忽略已缓存的 defaultCaBundle;通过环境变量让 HttpConnection 显式 verify
if (\function_exists('putenv')) {
@putenv('TRTC_RECORDING_SSL_CAFILE=' . $path);
}
}
private static function resolveRecordingCaBundlePath(): string
{
$raw = trim((string)config('trtc.recording_ssl_cafile', ''));
$path = trim($raw, " \t\"'");
if ($path !== '' && is_readable($path)) {
return $path;
}
$root = rtrim((string)root_path(), '/\\');
$candidate = $root . DIRECTORY_SEPARATOR . 'cacert.pem';
return is_readable($candidate) ? $candidate : '';
}
public static function sdkAvailable(): bool
{
return class_exists(\TencentCloud\Trtc\V20190722\TrtcClient::class);
}
/**
* @param string|null $vodUserDefineRecordId 云点播文件名前缀(仅字母数字下划线连字符,≤64),便于与控制台单流区分;混流文件会带此前缀
* @return array{ok:bool,task_id?:string,message?:string}
*/
public static function startMixRecording(
int $sdkAppId,
string $roomId,
string $botUserId,
string $botUserSig
string $botUserSig,
?string $vodUserDefineRecordId = null
): array {
if (!self::sdkAvailable()) {
return ['ok' => false, 'message' => '未安装 tencentcloud/trtc,请在 server 目录执行 composer update'];
@@ -41,10 +83,11 @@ class TrtcCloudRecordingService
return ['ok' => false, 'message' => '未配置 TRTC UserSig 密钥(project.trtc.secretKey'];
}
$roomIdType = ctype_digit($roomId) ? 1 : 0;
$roomIdType = self::resolveRecordingRoomIdType((string)$roomId);
$region = (string)config('trtc.recording_api_region', 'ap-guangzhou');
try {
self::applyRecordingSslCaBundleEarly();
$cred = new \TencentCloud\Common\Credential($secretId, $secretKey);
$httpProfile = new \TencentCloud\Common\Profile\HttpProfile();
$httpProfile->setEndpoint('trtc.tencentcloudapi.com');
@@ -60,44 +103,86 @@ class TrtcCloudRecordingService
$req->UserSig = $botUserSig;
$recordParams = new \TencentCloud\Trtc\V20190722\Models\RecordParams();
$recordParams->RecordMode = 2;
// 合流录制:RecordMode=2(见 https://cloud.tencent.com/document/product/647/76497 方案二 API 手动录制)
$recordParams->RecordMode = self::RECORD_MODE_MIX;
$recordParams->StreamType = 0;
$recordParams->MaxIdleTime = 300;
$recordParams->MaxIdleTime = (int)config('trtc.recording_max_idle_time', 300);
// 不订阅录制机器人自身流,避免占混流画面;医患流仍默认全订阅
$subscribe = new \TencentCloud\Trtc\V20190722\Models\SubscribeStreamUserIds();
$subscribe->UnSubscribeAudioUserIds = [$botUserId];
$subscribe->UnSubscribeVideoUserIds = [$botUserId];
$recordParams->SubscribeStreamUserIds = $subscribe;
$req->RecordParams = $recordParams;
$tencentVod = new \TencentCloud\Trtc\V20190722\Models\TencentVod();
$tencentVod->ExpireTime = 0;
$tencentVod->MediaType = 0;
$prefix = self::sanitizeVodUserDefineRecordId($vodUserDefineRecordId);
if ($prefix !== '') {
$tencentVod->UserDefineRecordId = $prefix;
}
$vodSubApp = (int)config('trtc.recording_vod_sub_app_id', 0);
if ($vodSubApp > 0) {
$tencentVod->SubAppId = $vodSubApp;
}
$cloudVod = new \TencentCloud\Trtc\V20190722\Models\CloudVod();
$cloudVod->TencentVod = $tencentVod;
$storage = new \TencentCloud\Trtc\V20190722\Models\StorageParams();
$storage->CloudVod = $cloudVod;
$req->StorageParams = $storage;
// MixTranscodeParamsSDK 说明「若设置该参数则内部字段须填全」。仅填 VideoParams 未填 AudioParams 可能导致合流异常或退化为非预期行为
$videoParams = new \TencentCloud\Trtc\V20190722\Models\VideoParams();
$videoParams->Width = 720;
$videoParams->Height = 1280;
$videoParams->Fps = 15;
$videoParams->BitRate = 1000000;
$videoParams->Gop = 2;
$videoParams->Width = (int)config('trtc.recording_mix_width', 1280);
$videoParams->Height = (int)config('trtc.recording_mix_height', 720);
$videoParams->Fps = (int)config('trtc.recording_mix_fps', 15);
$videoParams->BitRate = (int)config('trtc.recording_mix_video_bitrate', 1500000);
$videoParams->Gop = (int)config('trtc.recording_mix_gop', 2);
$audioParams = new \TencentCloud\Trtc\V20190722\Models\AudioParams();
$audioParams->SampleRate = (int)config('trtc.recording_mix_audio_sample_rate', 1);
$audioParams->Channel = (int)config('trtc.recording_mix_audio_channel', 2);
$audioParams->BitRate = (int)config('trtc.recording_mix_audio_bitrate', 64000);
$mixTc = new \TencentCloud\Trtc\V20190722\Models\MixTranscodeParams();
$mixTc->VideoParams = $videoParams;
$mixTc->AudioParams = $audioParams;
$req->MixTranscodeParams = $mixTc;
$mixLayout = new \TencentCloud\Trtc\V20190722\Models\MixLayoutParams();
$mixLayout->MixLayoutMode = 3;
$layoutMode = (int)config('trtc.recording_mix_layout_mode', 3);
if ($layoutMode < 1 || $layoutMode > 4) {
$layoutMode = 3;
}
$mixLayout->MixLayoutMode = $layoutMode;
$req->MixLayoutParams = $mixLayout;
Log::info('CreateCloudRecording mix', [
'sdkAppId' => $sdkAppId,
'roomId' => $roomId,
'roomIdType' => $roomIdType,
'recordMode' => self::RECORD_MODE_MIX,
'mixLayoutMode' => $layoutMode,
'vodUserDefineRecordId' => $prefix !== '' ? $prefix : null,
]);
$resp = $client->CreateCloudRecording($req);
$taskId = $resp->TaskId ?? '';
if ($taskId === '') {
return ['ok' => false, 'message' => 'CreateCloudRecording 未返回 TaskId'];
}
self::logDescribeCloudRecordingHint($client, $sdkAppId, $taskId, (string)$roomId, $roomIdType);
return ['ok' => true, 'task_id' => $taskId];
} catch (\Throwable $e) {
Log::error('CreateCloudRecording failed: ' . $e->getMessage());
$msg = $e->getMessage();
if (str_contains($msg, 'SSL certificate problem') || str_contains($msg, 'error 60')) {
$msg .= ';请下载 https://curl.se/ca/cacert.pem 保存到本机,在 .env [trtc] 设置 RECORDING_SSL_CAFILE=绝对路径,或在 php.ini 配置 openssl.cafile / curl.cainfo';
}
Log::error('CreateCloudRecording failed: ' . $msg);
return ['ok' => false, 'message' => $e->getMessage()];
return ['ok' => false, 'message' => $msg];
}
}
@@ -120,6 +205,7 @@ class TrtcCloudRecordingService
$region = (string)config('trtc.recording_api_region', 'ap-guangzhou');
try {
self::applyRecordingSslCaBundleEarly();
$cred = new \TencentCloud\Common\Credential($secretId, $secretKey);
$httpProfile = new \TencentCloud\Common\Profile\HttpProfile();
$httpProfile->setEndpoint('trtc.tencentcloudapi.com');
@@ -164,4 +250,90 @@ class TrtcCloudRecordingService
return $api->genUserSig($botUserId, $expire > 0 ? $expire : 86400);
}
/**
* RoomIdType 必须与通话实际房间类型一致,否则录制进错房或只能录到单路(见 CreateCloudRecording RoomIdType 说明)
*/
public static function resolveRecordingRoomIdType(string $roomId): int
{
$cfg = trim((string)config('trtc.recording_room_id_type', ''));
if ($cfg !== '' && strtolower($cfg) !== 'auto') {
return ((int)$cfg) === 1 ? 1 : 0;
}
return ctype_digit($roomId) ? 1 : 0;
}
/**
* TencentVod.UserDefineRecordId:仅 a-zA-Z0-9_-
*/
private static function sanitizeVodUserDefineRecordId(?string $raw): string
{
if ($raw === null || $raw === '') {
return '';
}
$s = preg_replace('/[^a-zA-Z0-9_-]/', '', $raw) ?? '';
return strlen($s) > 64 ? substr($s, 0, 64) : $s;
}
/**
* 混流时 StorageFile.UserId 应为空串;非空则多为单流。用于区分控制台全局单流与 API 合流。
* CreateCloudRecording 后立刻查询常为 Idle,约 2s 后再查一次再下结论。
*/
private static function logDescribeCloudRecordingHint(
\TencentCloud\Trtc\V20190722\TrtcClient $client,
int $sdkAppId,
string $taskId,
string $roomId,
int $roomIdType
): void {
try {
$snap = function () use ($client, $sdkAppId, $taskId, $roomId, $roomIdType): array {
$dreq = new \TencentCloud\Trtc\V20190722\Models\DescribeCloudRecordingRequest();
$dreq->SdkAppId = $sdkAppId;
$dreq->TaskId = $taskId;
$dresp = $client->DescribeCloudRecording($dreq);
$list = $dresp->StorageFileList ?? [];
$firstUid = '';
if (is_array($list) && isset($list[0]) && $list[0] instanceof \TencentCloud\Trtc\V20190722\Models\StorageFile) {
$firstUid = (string)($list[0]->UserId ?? '');
}
return [
'taskId' => $taskId,
'roomId' => $roomId,
'roomIdType' => $roomIdType,
'status' => (string)($dresp->Status ?? ''),
'storageFileCount' => is_array($list) ? count($list) : 0,
'firstFileUserId' => $firstUid,
];
};
$first = $snap();
if (strcasecmp($first['status'], 'Idle') === 0) {
sleep(2);
$second = $snap();
if (strcasecmp($second['status'], 'Idle') !== 0) {
Log::info('DescribeCloudRecording(合流校验): 首次 Idle,约2s 后已非 Idle', $second + [
'hint' => '启动瞬间 Idle 属常见;VOD 成片仍以回调311与点播为准',
]);
return;
}
Log::warning(
'DescribeCloudRecording: 约2s 后仍为 Idle(未拉到流:多因 RoomIdType 与客户端房间类型不一致,或房内无上推)',
$second
);
return;
}
Log::info('DescribeCloudRecording(合流校验)', $first + [
'hint' => $first['firstFileUserId'] === '' ? 'VOD 场景 StorageFileList 常为空,以点播媒资+311 回调为准' : 'firstFileUserId 非空更像单流',
]);
} catch (\Throwable $e) {
Log::info('DescribeCloudRecording 跳过: ' . $e->getMessage());
}
}
}
@@ -0,0 +1,192 @@
<?php
declare(strict_types=1);
namespace app\common\service\wechat;
use think\facade\Cache;
use think\facade\Log;
/**
* 企业微信自建应用:向成员发送应用文本消息
*
* 依赖配置(与登录/绑定可共用 corp_id;发消息必须用「同一自建应用」的 AgentId + Secret):
* - WECHAT_WORK_CORP_ID work_wechat.corp_id
* - WECHAT_WORK_AGENT_ID work_wechat.agent_id
* - WECHAT_WORK_AGENT_SECRET work_wechat.agent_secret(推荐;勿与仅用于网页授权的 secret 混用)
* - 若未配 agent_secret,会回退 work_wechat.secret(若仍无法发消息,请在管理后台复制该应用的 Secret 填到 agent_secret
*
* @see https://developer.work.weixin.qq.com/document/path/90236
*/
class WechatWorkAppMessageService
{
/**
* @return array{0: string, 1: int, 2: string} [corpId, agentId, secret]
*/
private static function resolveMessagingCredentials(): array
{
$corpId = (string) env('WECHAT_WORK_CORP_ID', '');
if ($corpId === '') {
$corpId = (string) env('work_wechat.corp_id', '');
}
$agentIdStr = (string) env('WECHAT_WORK_AGENT_ID', '');
if ($agentIdStr === '') {
$agentIdStr = (string) env('work_wechat.agent_id', '');
}
$agentId = (int) $agentIdStr;
$secret = (string) env('WECHAT_WORK_AGENT_SECRET', '');
if ($secret === '') {
$secret = (string) env('work_wechat.agent_secret', '');
}
if ($secret === '') {
$secret = (string) env('work_wechat.secret', '');
}
return [$corpId, $agentId, $secret];
}
private static function getAccessToken(string $corpId, string $secret): ?string
{
if ($corpId === '' || $secret === '') {
return null;
}
$cacheKey = 'work_wechat_app_msg_token_' . md5($corpId . $secret);
$cached = Cache::get($cacheKey);
if ($cached) {
return (string) $cached;
}
$url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={$corpId}&corpsecret={$secret}";
$res = self::httpGetJson($url);
if (!$res || (int) ($res['errcode'] ?? -1) !== 0) {
Log::error('企业微信应用 access_token 失败: ' . ($res['errmsg'] ?? '无响应'));
return null;
}
$token = (string) ($res['access_token'] ?? '');
if ($token === '') {
return null;
}
$ttl = (int) ($res['expires_in'] ?? 7200) - 200;
if ($ttl > 0) {
Cache::set($cacheKey, $token, $ttl);
}
return $token;
}
/**
* @return array<string,mixed>|null
*/
private static function httpGetJson(string $url): ?array
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$result = curl_exec($ch);
curl_close($ch);
if ($result === false || $result === '') {
return null;
}
$decoded = json_decode($result, true);
return is_array($decoded) ? $decoded : null;
}
/**
* @return array<string,mixed>|null
*/
private static function httpPostJson(string $url, array $body): ?array
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body, JSON_UNESCAPED_UNICODE));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json; charset=utf-8']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$result = curl_exec($ch);
curl_close($ch);
if ($result === false || $result === '') {
return null;
}
$decoded = json_decode($result, true);
return is_array($decoded) ? $decoded : null;
}
/**
* 向指定成员发送文本消息(userid 为企业微信成员账号,与后台 work_wechat_userid 一致)
*
* @return array{ok: bool, message?: string, errcode?: int}
*/
public static function sendTextToUser(string $toUser, string $content): array
{
$toUser = trim($toUser);
$content = trim($content);
if ($toUser === '' || $content === '') {
return ['ok' => false, 'message' => '接收人或消息内容为空'];
}
[$corpId, $agentId, $secret] = self::resolveMessagingCredentials();
if ($corpId === '' || $agentId <= 0 || $secret === '') {
Log::warning('企业微信应用消息未配置完整(corp_id/agent_id/secret),跳过发消息');
return [
'ok' => false,
'message' => '服务端未配置企业微信应用消息(需 corp_id、agent_id 及该应用的 Secret,建议配置 WECHAT_WORK_AGENT_SECRET',
];
}
$token = self::getAccessToken($corpId, $secret);
if (!$token) {
return ['ok' => false, 'message' => '获取企业微信 access_token 失败,请查看服务端日志'];
}
$url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' . urlencode($token);
$body = [
'touser' => $toUser,
'msgtype' => 'text',
'agentid' => $agentId,
'text' => ['content' => $content],
'safe' => 0,
];
$res = self::httpPostJson($url, $body);
if (!$res) {
Log::error('企业微信发消息无响应');
return ['ok' => false, 'message' => '企业微信接口无响应'];
}
$err = (int) ($res['errcode'] ?? -1);
if ($err !== 0) {
$errmsg = (string) ($res['errmsg'] ?? '');
Log::error('企业微信发消息失败: ' . $errmsg . ' errcode=' . $err);
$hint = '';
if ($err === 81013 || $err === 60111) {
$hint = '请核对开方人绑定的 userid 与企业微信成员账号一致,且成员已安装/可见该应用。';
} elseif ($err === 60020) {
$hint = '请将服务器出口 IP 加入企业微信应用可信 IP。';
} elseif ($err === 60011) {
$hint = '请检查应用是否具备发消息能力及可见范围是否包含该成员。';
}
return [
'ok' => false,
'message' => '企业微信返回:' . $errmsg . 'errcode=' . $err . '' . ($hint !== '' ? ' ' . $hint : ''),
'errcode' => $err,
];
}
return ['ok' => true];
}
}
+3
View File
@@ -108,6 +108,9 @@ return [
// 处方库:以下角色ID + 超级管理员(root) 可查看/编辑/删除全部;他人仅可管理自己创建的,公开处方对他人只读
'prescription_library_manage_all_roles' => [0, 3],
// 消费者处方单:以下角色 + root 可对「待审核」处方进行通过/驳回(驳回即作废处方)
'prescription_audit_roles' => [0, 3,6],
// 腾讯云实时音视频(TRTC)配置
'trtc' => [
'sdkAppId' => (int)env('trtc.sdk_app_id', 1600127710),
+39 -1
View File
@@ -1,6 +1,14 @@
<?php
/**
* 腾讯云实时音视频(TRTC)配置
*
* 点播列表里若出现多个带「UserId_s_」「UserId_e_」的文件(每用户一路),属于【单流】命名规则,几乎总是控制台
* 「全局自动录制」单流模板;可与 API 合流并存。API 合流文件可在点播搜前缀 mix_{诊单id}_{通话记录id}TencentVod.UserDefineRecordId)。
* 需要【仅合流一个文件】时:请到 实时音视频控制台 应用管理 录制管理,关闭全局自动录制,仅用 API 触发。
* 关闭全局后若完全没有录制文件,请配置 .env trtc.api_secret_id / trtc.api_secret_keyCAM),并查看 bindCallRoom 接口返回的 cloud_recording.message 或服务端日志。
* 若出现 cURL error 60:将 cacert.pem 放在 server 根目录或配置 recording_ssl_cafilecomposer upgrade 覆盖 vendor 后若复发,需保留对 tencentcloud/common HttpConnection verify 补丁或改用全局 php.ini CA。
* 合流成功时文件名一般为 SdkAppId_RoomId_序号.mp4,不含 UserId_s 段。
* @see https://cloud.tencent.com/document/product/647/76497
*/
return [
// SDK AppID - 在腾讯云控制台获取
@@ -21,16 +29,46 @@ return [
FILTER_VALIDATE_BOOLEAN
),
// 云端录制 HTTP 回调可选校验:非空则请求需带 ?token=xxx(与 .env trtc.recording_callback_token 一致)
// 回调 URL 路径:/api/trtc/recording-notify 或 /api/trtc/recordingNotify(与控制台一致即可)。非空 token 时 Query 需 ?token=xxx
'recording_callback_token' => env('trtc.recording_callback_token', ''),
// 云 APICAMSecretId / SecretKey,用于 CreateCloudRecording / DeleteCloudRecording(与 UserSig 的 secretKey 不是同一个)
// .env 写在 [trtc] 段内时键名须为 API_SECRET_ID、API_SECRET_KEY(会合并为 TRTC_API_SECRET_ID 供 env('trtc.api_secret_id') 读取;勿写 TRTC_API_SECRET_ID 以免变成 TRTC_TRTC_API_SECRET_ID
'api_secret_id' => env('trtc.api_secret_id', ''),
'api_secret_key' => env('trtc.api_secret_key', ''),
// 调用 TRTC OpenAPI 的地域:ap-guangzhou / ap-beijing / ap-shanghai
'recording_api_region' => env('trtc.recording_api_region', 'ap-guangzhou'),
// 云端录制请求 https://trtc.tencentcloudapi.com/ 时使用的 CA 证书包绝对路径(Windows 无系统 CA 链时填此可避免 cURL 60)。也可将 cacert.pem 放在项目根目录 server/cacert.pem
'recording_ssl_cafile' => env('trtc.recording_ssl_cafile', ''),
// CreateCloudRecording → RecordParams.RecordMode1=单流,2=混流(合流)。startMixRecording 内会强制为 2
'recording_record_mode' => (int)env('trtc.recording_record_mode', 2),
// CreateCloudRecording → RoomIdType:须与 TRTC 房间一致。0=强制字符串房,1=强制数字房。留空或 auto=按房间号自动(纯数字→1,否则→0)。勿默认填 0,否则 TUICall 数字房会一直用错类型导致拉流 Idle
'recording_room_id_type' => env('trtc.recording_room_id_type', ''),
// MixLayoutParams.MixLayoutMode1悬浮 2屏幕分享 3九宫格 4自定义(见文档「合流录制的布局模式」)
'recording_mix_layout_mode' => (int)env('trtc.recording_mix_layout_mode', 3),
// 合流输出分辨率(MixTranscodeParams.VideoParams),横屏问诊建议 1280x720
'recording_mix_width' => (int)env('trtc.recording_mix_width', 1280),
'recording_mix_height' => (int)env('trtc.recording_mix_height', 720),
'recording_mix_fps' => (int)env('trtc.recording_mix_fps', 15),
'recording_mix_video_bitrate' => (int)env('trtc.recording_mix_video_bitrate', 1500000),
'recording_mix_gop' => (int)env('trtc.recording_mix_gop', 2),
// AudioParamsSampleRate 1=48000Hz 2=44100 3=16000Channel 1单 2双;BitRate 32000-128000
'recording_mix_audio_sample_rate' => (int)env('trtc.recording_mix_audio_sample_rate', 1),
'recording_mix_audio_channel' => (int)env('trtc.recording_mix_audio_channel', 2),
'recording_mix_audio_bitrate' => (int)env('trtc.recording_mix_audio_bitrate', 64000),
// 房间内无上行超过该秒数自动停录(RecordParams.MaxIdleTime
'recording_max_idle_time' => (int)env('trtc.recording_max_idle_time', 5),
// 云点播子应用 SubAppIdTencentVod),默认不填使用主应用
'recording_vod_sub_app_id' => (int)env('trtc.recording_vod_sub_app_id', 0),
// 录制机器人 UserId 前缀
'recording_bot_prefix' => env('trtc.recording_bot_prefix', 'recorder_'),
@@ -0,0 +1,3 @@
-- 诊单:在用药物(患者当前服用的西药/中成药等)
ALTER TABLE `zyt_tcm_diagnosis`
ADD COLUMN `current_medications` varchar(2000) NOT NULL DEFAULT '' COMMENT '在用药物' AFTER `remark`;
@@ -0,0 +1,5 @@
-- 问题:UNIQUE(doctor_id, appointment_date, appointment_time, status) 允许「一条已预约 + 一条已取消」
-- 同一时段若先后有两名患者预约并取消,第二条 UPDATE status=2 会与第一条已取消行唯一键冲突(1062)。
-- 解决:去掉该唯一索引;「档期仅一条已预约」由 AppointmentLogic::create 中 status=1 存在性检查保证。
ALTER TABLE `zyt_doctor_appointment` DROP INDEX `unique_appointment`;
ALTER TABLE `zyt_doctor_appointment` ADD KEY `idx_doctor_date_time_status` (`doctor_id`, `appointment_date`, `appointment_time`, `status`);
@@ -0,0 +1,8 @@
-- 处方:指定角色可见(非共享时除创建者外,所列角色用户也可查看);审核状态与审核信息
ALTER TABLE `zyt_tcm_prescription`
ADD COLUMN `visible_role_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '额外可见角色ID,逗号分隔,与创建者/共享并列' AFTER `is_shared`,
ADD COLUMN `audit_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '审核:0待审核 1已通过 2已驳回(同时作废)' AFTER `visible_role_ids`,
ADD COLUMN `audit_time` int(10) unsigned DEFAULT NULL COMMENT '审核时间' AFTER `audit_status`,
ADD COLUMN `audit_by` int(11) unsigned DEFAULT NULL COMMENT '审核人ID' AFTER `audit_time`,
ADD COLUMN `audit_by_name` varchar(50) NOT NULL DEFAULT '' COMMENT '审核人姓名' AFTER `audit_by`,
ADD COLUMN `audit_remark` varchar(500) NOT NULL DEFAULT '' COMMENT '审核意见' AFTER `audit_by_name`;
@@ -0,0 +1,15 @@
-- 诊单指派医助操作记录(单次指派一条,批量指派为多条)
CREATE TABLE IF NOT EXISTS `zyt_tcm_diagnosis_assign_log` (
`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`diagnosis_id` int unsigned NOT NULL DEFAULT 0 COMMENT '诊单ID',
`from_assistant_id` int unsigned NOT NULL DEFAULT 0 COMMENT '原医助管理员ID0表示未指派',
`to_assistant_id` int unsigned NOT NULL DEFAULT 0 COMMENT '新医助管理员ID',
`operator_admin_id` int unsigned NOT NULL DEFAULT 0 COMMENT '操作人管理员ID',
`operator_name` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人姓名',
`operator_account` varchar(64) NOT NULL DEFAULT '' COMMENT '操作人账号',
`ip` varchar(45) NOT NULL DEFAULT '' COMMENT '操作IP',
`create_time` int unsigned NOT NULL DEFAULT 0 COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `idx_diagnosis_id` (`diagnosis_id`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='诊单指派医助操作记录';
@@ -1 +1 @@
import r from"./error-Db2Vny7j.js";import{f as p,ak as i,I as m,a as e,aN as s,J as o}from"./@vue/runtime-core-C0pg79pw.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/shared-mAAVTE9n.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./vue-router-CYz6RFzi.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const a="/admin/assets/no_perms-jDxcYpYC.png",n={class:"error404"},W=p({__name:"403",setup(c){return(_,t)=>(i(),m("div",n,[e(r,{code:"403",title:"您的账号权限不足,请联系管理员添加权限!","show-btn":!1},{content:s(()=>[...t[0]||(t[0]=[o("div",{class:"flex justify-center"},[o("img",{class:"w-[150px] h-[150px]",src:a,alt:""})],-1)])]),_:1})]))}});export{W as default};
import r from"./error-BgLNs39O.js";import{f as p,ak as i,I as m,a as e,aN as s,J as o}from"./@vue/runtime-core-C0pg79pw.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/shared-mAAVTE9n.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./vue-router-CYz6RFzi.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const a="/admin/assets/no_perms-jDxcYpYC.png",n={class:"error404"},W=p({__name:"403",setup(c){return(_,t)=>(i(),m("div",n,[e(r,{code:"403",title:"您的账号权限不足,请联系管理员添加权限!","show-btn":!1},{content:s(()=>[...t[0]||(t[0]=[o("div",{class:"flex justify-center"},[o("img",{class:"w-[150px] h-[150px]",src:a,alt:""})],-1)])]),_:1})]))}});export{W as default};
@@ -1 +1 @@
import o from"./error-Db2Vny7j.js";import{f as r,ak as t,I as m,a as p}from"./@vue/runtime-core-C0pg79pw.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/shared-mAAVTE9n.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./vue-router-CYz6RFzi.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const i={class:"error404"},T=r({__name:"404",setup(e){return(a,s)=>(t(),m("div",i,[p(o,{code:"404",title:"哎呀,出错了!您访问的页面不存在…"})]))}});export{T as default};
import o from"./error-BgLNs39O.js";import{f as r,ak as t,I as m,a as p}from"./@vue/runtime-core-C0pg79pw.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/shared-mAAVTE9n.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./vue-router-CYz6RFzi.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const i={class:"error404"},T=r({__name:"404",setup(e){return(a,s)=>(t(),m("div",i,[p(o,{code:"404",title:"哎呀,出错了!您访问的页面不存在…"})]))}});export{T as default};
@@ -1 +1 @@
import"./uikit-base-component-vue3-k0EAtVKz.js";import{A as r}from"../tuikit-atomicx-vue3-BHPlbt3H.js";import{f as s,ak as c,I as l,aq as m,G as u,at as i,H as p,A as d}from"../@vue/runtime-core-C0pg79pw.js";import{y as v}from"../@vue/reactivity-BIbyPIZJ.js";import"./chat-uikit-engine-zx802ozq.js";const _=(t,o)=>{const a=t.__vccOpts||t;for(const[e,n]of o)a[e]=n;return a},f={key:0,class:"chat"},h=s({name:"Chat",__name:"Chat",props:{PlaceholderEmpty:{default:null}},setup(t){const{activeConversation:o}=r(),a=d(()=>{var e;return!((e=o.value)!=null&&e.conversationID)});return(e,n)=>v(o)?(c(),l("div",f,[m(e.$slots,"default",{},void 0,!0)])):a.value&&t.PlaceholderEmpty?(c(),u(i(t.PlaceholderEmpty),{key:1})):p("",!0)}}),A=_(h,[["__scopeId","data-v-1c9c77cd"]]);typeof window<"u"&&(window.__CHAT_ATOMICX_VUE3__={name:"@tencentcloud/chat-uikit-vue3",version:"4.5.4"},console.log("[@tencentcloud/chat-uikit-vue3] v4.5.4"));export{A as E};
import"./uikit-base-component-vue3-DdfqV_bd.js";import{A as r}from"../tuikit-atomicx-vue3-CZgu16-k.js";import{f as s,ak as c,I as l,aq as m,G as u,at as i,H as p,A as d}from"../@vue/runtime-core-C0pg79pw.js";import{y as v}from"../@vue/reactivity-BIbyPIZJ.js";import"./chat-uikit-engine-zx802ozq.js";const _=(t,o)=>{const a=t.__vccOpts||t;for(const[e,n]of o)a[e]=n;return a},f={key:0,class:"chat"},h=s({name:"Chat",__name:"Chat",props:{PlaceholderEmpty:{default:null}},setup(t){const{activeConversation:o}=r(),a=d(()=>{var e;return!((e=o.value)!=null&&e.conversationID)});return(e,n)=>v(o)?(c(),l("div",f,[m(e.$slots,"default",{},void 0,!0)])):a.value&&t.PlaceholderEmpty?(c(),u(i(t.PlaceholderEmpty),{key:1})):p("",!0)}}),A=_(h,[["__scopeId","data-v-1c9c77cd"]]);typeof window<"u"&&(window.__CHAT_ATOMICX_VUE3__={name:"@tencentcloud/chat-uikit-vue3",version:"4.5.4"},console.log("[@tencentcloud/chat-uikit-vue3] v4.5.4"));export{A as E};
@@ -1 +1 @@
import{K as E,L,N,M as P,a0 as T}from"./element-plus-D9NzL5HE.js";import{x as B}from"./tcm-9dTydv5E.js";import{f as R,w as V,ak as o,I as i,a,aP as D,G as u,aN as s,O as l,F,ap as A}from"./@vue/runtime-core-C0pg79pw.js";import{Q as n}from"./@vue/shared-mAAVTE9n.js";import{o as g}from"./@vue/reactivity-BIbyPIZJ.js";import{a as G}from"./index-D54sWaXv.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const K={class:"call-record-panel"},M={key:0,class:"recording-list"},O=["src"],Q={key:1,class:"text-gray-400"},S=R({__name:"CallRecordPanel",props:{diagnosisId:{}},setup(h,{expose:b}){const p=h,m=g(!1),c=g([]),_=async()=>{if(p.diagnosisId){m.value=!0;try{c.value=await B({diagnosis_id:p.diagnosisId})||[]}catch(t){console.error(t),c.value=[]}finally{m.value=!1}}};V(()=>p.diagnosisId,()=>{_()},{immediate:!0}),b({refresh:_});function y(t){return{1:"进行中",2:"已结束",3:"未接听",4:"已取消"}[t]??"—"}function v(t){return!t||typeof t!="string"?!1:/\.(mp4|webm|ogg)(\?|$)/i.test(t)}return(t,w)=>{const x=E,r=N,k=T,C=P,I=L;return o(),i("div",K,[a(x,{type:"info","show-icon":"",closable:!1,class:"mb-4",title:"视频通话与录制回放"}),D((o(),u(C,{data:c.value,border:"",stripe:"","empty-text":"暂无通话记录"},{default:s(()=>[a(r,{label:"开始时间",width:"170",prop:"start_time_text"}),a(r,{label:"结束时间",width:"170",prop:"end_time_text"}),a(r,{label:"通话类型",width:"100"},{default:s(({row:e})=>[l(n(e.call_type===1?"语音":"视频"),1)]),_:1}),a(r,{label:"时长",width:"110",prop:"duration_text"}),a(r,{label:"状态",width:"90"},{default:s(({row:e})=>[l(n(y(e.status)),1)]),_:1}),a(r,{label:"录制",width:"100"},{default:s(({row:e})=>[l(n(e.recording_status_text||"—"),1)]),_:1}),a(r,{label:"录制回放","min-width":"280"},{default:s(({row:e})=>[(e.recording_urls_list||[]).length?(o(),i("div",M,[(o(!0),i(F,null,A(e.recording_urls_list,(d,f)=>(o(),i("div",{key:f,class:"recording-item"},[v(d)?(o(),i("video",{key:0,src:d,controls:"",preload:"metadata",class:"recording-video"},null,8,O)):(o(),u(k,{key:1,href:d,target:"_blank",type:"primary"},{default:s(()=>[l(" 打开链接 "+n(f+1),1)]),_:2},1032,["href"]))]))),128))])):(o(),i("span",Q,"暂无"))]),_:1})]),_:1},8,["data"])),[[I,m.value]])])}}}),Lt=G(S,[["__scopeId","data-v-6e14a232"]]);export{Lt as default};
import{K as E,L,N,M as P,a0 as T}from"./element-plus-8nG574Ul.js";import{z as B}from"./tcm-DsWVWJMK.js";import{f as R,w as V,ak as o,I as i,a,aP as D,G as u,aN as s,O as l,F,ap as z}from"./@vue/runtime-core-C0pg79pw.js";import{Q as n}from"./@vue/shared-mAAVTE9n.js";import{o as g}from"./@vue/reactivity-BIbyPIZJ.js";import{a as A}from"./index-C2ep5Cm2.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const G={class:"call-record-panel"},K={key:0,class:"recording-list"},M=["src"],O={key:1,class:"text-gray-400"},Q=R({__name:"CallRecordPanel",props:{diagnosisId:{}},setup(h,{expose:b}){const p=h,m=g(!1),c=g([]),_=async()=>{if(p.diagnosisId){m.value=!0;try{c.value=await B({diagnosis_id:p.diagnosisId})||[]}catch(t){console.error(t),c.value=[]}finally{m.value=!1}}};V(()=>p.diagnosisId,()=>{_()},{immediate:!0}),b({refresh:_});function y(t){return{1:"进行中",2:"已结束",3:"未接听",4:"已取消"}[t]??"—"}function v(t){return!t||typeof t!="string"?!1:/\.(mp4|webm|ogg)(\?|$)/i.test(t)}return(t,w)=>{const k=E,r=N,x=T,C=P,I=L;return o(),i("div",G,[a(k,{type:"info","show-icon":"",closable:!1,class:"mb-4",title:"视频通话与录制回放"}),D((o(),u(C,{data:c.value,border:"",stripe:"","empty-text":"暂无通话记录"},{default:s(()=>[a(r,{label:"开始时间",width:"170",prop:"start_time_text"}),a(r,{label:"结束时间",width:"170",prop:"end_time_text"}),a(r,{label:"通话类型",width:"100"},{default:s(({row:e})=>[l(n(e.call_type===1?"语音":"视频"),1)]),_:1}),a(r,{label:"时长",width:"110",prop:"duration_text"}),a(r,{label:"状态",width:"90"},{default:s(({row:e})=>[l(n(y(e.status)),1)]),_:1}),a(r,{label:"录制",width:"100"},{default:s(({row:e})=>[l(n(e.recording_status_text||"—"),1)]),_:1}),a(r,{label:"录制回放","min-width":"280"},{default:s(({row:e})=>[(e.recording_urls_list||[]).length?(o(),i("div",K,[(o(!0),i(F,null,z(e.recording_urls_list,(d,f)=>(o(),i("div",{key:f,class:"recording-item"},[v(d)?(o(),i("video",{key:0,src:d,controls:"",preload:"metadata",class:"recording-video"},null,8,M)):(o(),u(x,{key:1,href:d,target:"_blank",type:"primary"},{default:s(()=>[l(" 打开链接 "+n(f+1),1)]),_:2},1032,["href"]))]))),128))])):(o(),i("span",O,"暂无"))]),_:1})]),_:1},8,["data"])),[[I,m.value]])])}}}),Lt=A(Q,[["__scopeId","data-v-6e14a232"]]);export{Lt as default};
@@ -1 +1 @@
import{i as L,L as T,N as V,U as D,M as z,T as M}from"./element-plus-D9NzL5HE.js";import{y as P}from"./tcm-9dTydv5E.js";import{f as F,b as j,w as A,ak as r,I as l,J as v,a as i,aN as s,O as m,aP as H,G as g,F as O,H as R}from"./@vue/runtime-core-C0pg79pw.js";import{y as d,o as w}from"./@vue/reactivity-BIbyPIZJ.js";import{Q as c}from"./@vue/shared-mAAVTE9n.js";import{a as G}from"./index-D54sWaXv.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const J={class:"case-record-list"},Q={class:"mb-3 flex justify-end"},U={key:0},Y={key:1,class:"text-gray-400"},q={class:"void-detail text-xs text-gray-500 mt-1"},K=F({__name:"CaseRecordList",props:{diagnosisId:{type:Number,default:0}},emits:["view","openPrescription"],setup(k,{expose:x,emit:C}){const _=k,y=C,n=w([]),p=w(!1),u=async()=>{if(_.diagnosisId){p.value=!0;try{const e=await P({diagnosis_id:_.diagnosisId});n.value=Array.isArray(e)?e:[]}catch(e){console.error("获取病历记录失败:",e),n.value=[]}finally{p.value=!1}}},S=e=>{if(!e)return"";const t=new Date(e*1e3);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`},$=e=>{y("view",e)},E=()=>{y("openPrescription")};return j(()=>{u()}),A(()=>_.diagnosisId,()=>{u()}),x({refresh:u}),(e,t)=>{const h=L,a=V,b=D,N=z,B=M,I=T;return r(),l("div",J,[v("div",Q,[i(h,{type:"primary",size:"small",onClick:E},{default:s(()=>[...t[0]||(t[0]=[m("开方",-1)])]),_:1})]),H((r(),g(N,{data:d(n),border:""},{default:s(()=>[i(a,{prop:"prescription_date",label:"就诊日期",width:"120"}),i(a,{prop:"visit_no",label:"门诊号",width:"120"}),i(a,{prop:"clinical_diagnosis",label:"临床诊断","min-width":"160","show-overflow-tooltip":""}),i(a,{label:"处方摘要","min-width":"180"},{default:s(({row:o})=>[o.herbs&&o.herbs.length?(r(),l("span",U,c(o.herbs.slice(0,3).map(f=>`${f.name}${f.dosage}`).join("、"))+c(o.herbs.length>3?"...":""),1)):(r(),l("span",Y,"—"))]),_:1}),i(a,{prop:"doctor_name",label:"医师",width:"90","show-overflow-tooltip":""}),i(a,{label:"状态",width:"140",align:"center"},{default:s(({row:o})=>[o.void_status===1?(r(),l(O,{key:0},[i(b,{type:"danger",size:"small"},{default:s(()=>[...t[1]||(t[1]=[m("已作废",-1)])]),_:1}),v("div",q,c(o.void_by_name||"—")+" "+c(S(o.void_time)),1)],64)):(r(),g(b,{key:1,type:"success",size:"small"},{default:s(()=>[...t[2]||(t[2]=[m("正常",-1)])]),_:1}))]),_:1}),i(a,{label:"操作",width:"120",fixed:"right"},{default:s(({row:o})=>[i(h,{link:"",type:"primary",size:"small",onClick:f=>$(o)},{default:s(()=>[...t[3]||(t[3]=[m(" 查看 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[I,d(p)]]),!d(p)&&d(n).length===0?(r(),g(B,{key:0,description:"暂无病历记录,开方后会自动显示",class:"mt-4"})):R("",!0)])}}}),zt=G(K,[["__scopeId","data-v-de802464"]]);export{zt as default};
import{i as L,L as T,N as V,U as D,M as z,T as M}from"./element-plus-8nG574Ul.js";import{A as P}from"./tcm-DsWVWJMK.js";import{f as A,b as F,w as j,ak as r,I as l,J as v,a as i,aN as s,O as m,aP as H,G as g,F as O,H as R}from"./@vue/runtime-core-C0pg79pw.js";import{y as d,o as w}from"./@vue/reactivity-BIbyPIZJ.js";import{Q as c}from"./@vue/shared-mAAVTE9n.js";import{a as G}from"./index-C2ep5Cm2.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";const J={class:"case-record-list"},Q={class:"mb-3 flex justify-end"},U={key:0},Y={key:1,class:"text-gray-400"},q={class:"void-detail text-xs text-gray-500 mt-1"},K=A({__name:"CaseRecordList",props:{diagnosisId:{type:Number,default:0}},emits:["view","openPrescription"],setup(k,{expose:x,emit:C}){const _=k,y=C,n=w([]),p=w(!1),u=async()=>{if(_.diagnosisId){p.value=!0;try{const e=await P({diagnosis_id:_.diagnosisId});n.value=Array.isArray(e)?e:[]}catch(e){console.error("获取病历记录失败:",e),n.value=[]}finally{p.value=!1}}},S=e=>{if(!e)return"";const t=new Date(e*1e3);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`},$=e=>{y("view",e)},E=()=>{y("openPrescription")};return F(()=>{u()}),j(()=>_.diagnosisId,()=>{u()}),x({refresh:u}),(e,t)=>{const h=L,a=V,b=D,N=z,B=M,I=T;return r(),l("div",J,[v("div",Q,[i(h,{type:"primary",size:"small",onClick:E},{default:s(()=>[...t[0]||(t[0]=[m("开方",-1)])]),_:1})]),H((r(),g(N,{data:d(n),border:""},{default:s(()=>[i(a,{prop:"prescription_date",label:"就诊日期",width:"120"}),i(a,{prop:"visit_no",label:"门诊号",width:"120"}),i(a,{prop:"clinical_diagnosis",label:"临床诊断","min-width":"160","show-overflow-tooltip":""}),i(a,{label:"处方摘要","min-width":"180"},{default:s(({row:o})=>[o.herbs&&o.herbs.length?(r(),l("span",U,c(o.herbs.slice(0,3).map(f=>`${f.name}${f.dosage}`).join("、"))+c(o.herbs.length>3?"...":""),1)):(r(),l("span",Y,"—"))]),_:1}),i(a,{prop:"doctor_name",label:"医师",width:"90","show-overflow-tooltip":""}),i(a,{label:"状态",width:"140",align:"center"},{default:s(({row:o})=>[o.void_status===1?(r(),l(O,{key:0},[i(b,{type:"danger",size:"small"},{default:s(()=>[...t[1]||(t[1]=[m("已作废",-1)])]),_:1}),v("div",q,c(o.void_by_name||"—")+" "+c(S(o.void_time)),1)],64)):(r(),g(b,{key:1,type:"success",size:"small"},{default:s(()=>[...t[2]||(t[2]=[m("正常",-1)])]),_:1}))]),_:1}),i(a,{label:"操作",width:"120",fixed:"right"},{default:s(({row:o})=>[i(h,{link:"",type:"primary",size:"small",onClick:f=>$(o)},{default:s(()=>[...t[3]||(t[3]=[m(" 查看 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[I,d(p)]]),!d(p)&&d(n).length===0?(r(),g(B,{key:0,description:"暂无病历记录,开方后会自动显示",class:"mt-4"})):R("",!0)])}}}),zt=G(K,[["__scopeId","data-v-de802464"]]);export{zt as default};
@@ -1 +0,0 @@
.im-chat-record-panel[data-v-ec88f862]{min-height:200px}.panel-tip[data-v-ec88f862]{margin:0;line-height:1.55;font-size:13px}.panel-tip code[data-v-ec88f862]{font-size:12px}.toolbar[data-v-ec88f862]{display:flex;align-items:center}.chat-wrap[data-v-ec88f862]{min-height:120px}.chat-list[data-v-ec88f862]{display:flex;flex-direction:column;gap:16px;max-height:min(60vh,520px);overflow-y:auto;padding:4px 8px 12px}.chat-row[data-v-ec88f862]{display:flex;flex-direction:column;max-width:88%}.chat-row.from-patient[data-v-ec88f862]{align-self:flex-start}.chat-row.from-patient .bubble[data-v-ec88f862]{background:var(--el-fill-color-light);border:1px solid var(--el-border-color-lighter)}.chat-row.from-doctor[data-v-ec88f862]{align-self:flex-end;align-items:flex-end}.chat-row.from-doctor .meta[data-v-ec88f862]{flex-direction:row-reverse}.chat-row.from-doctor .bubble[data-v-ec88f862]{background:var(--el-color-primary-light-9);border:1px solid var(--el-color-primary-light-7)}.meta[data-v-ec88f862]{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--el-text-color-secondary);margin-bottom:6px}.meta .name[data-v-ec88f862]{font-weight:500;color:var(--el-text-color-regular)}.bubble[data-v-ec88f862]{border-radius:8px;padding:10px 12px;word-break:break-word;font-size:14px;line-height:1.5}.text-content[data-v-ec88f862]{white-space:pre-wrap}.chat-img[data-v-ec88f862]{max-width:240px;max-height:200px;border-radius:4px}.muted[data-v-ec88f862]{color:var(--el-text-color-placeholder)}.friendly-text .friendly-main[data-v-ec88f862]{font-size:14px;line-height:1.5;color:var(--el-text-color-primary)}.friendly-text .friendly-sub[data-v-ec88f862]{margin-top:6px;font-size:12px;line-height:1.4;color:var(--el-text-color-secondary)}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.im-chat-record-panel[data-v-2c1a1f20]{min-height:200px}.panel-tip[data-v-2c1a1f20]{margin:0;line-height:1.55;font-size:13px}.panel-tip code[data-v-2c1a1f20]{font-size:12px}.toolbar[data-v-2c1a1f20]{display:flex;align-items:center}.chat-wrap[data-v-2c1a1f20]{min-height:120px}.chat-list[data-v-2c1a1f20]{display:flex;flex-direction:column;gap:16px;max-height:min(60vh,520px);overflow-y:auto;padding:4px 8px 12px}.chat-row[data-v-2c1a1f20]{display:flex;flex-direction:column;max-width:88%}.chat-row.from-patient[data-v-2c1a1f20]{align-self:flex-start}.chat-row.from-patient .bubble[data-v-2c1a1f20]{background:var(--el-fill-color-light);border:1px solid var(--el-border-color-lighter)}.chat-row.from-doctor[data-v-2c1a1f20]{align-self:flex-end;align-items:flex-end}.chat-row.from-doctor .meta[data-v-2c1a1f20]{flex-direction:row-reverse}.chat-row.from-doctor .bubble[data-v-2c1a1f20]{background:var(--el-color-primary-light-9);border:1px solid var(--el-color-primary-light-7)}.meta[data-v-2c1a1f20]{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--el-text-color-secondary);margin-bottom:6px}.meta .name[data-v-2c1a1f20]{font-weight:500;color:var(--el-text-color-regular)}.bubble[data-v-2c1a1f20]{border-radius:8px;padding:10px 12px;word-break:break-word;font-size:14px;line-height:1.5}.text-content[data-v-2c1a1f20]{white-space:pre-wrap}.chat-img[data-v-2c1a1f20]{max-width:240px;max-height:200px;border-radius:4px}.muted[data-v-2c1a1f20]{color:var(--el-text-color-placeholder)}.friendly-text .friendly-main[data-v-2c1a1f20]{font-size:14px;line-height:1.5;color:var(--el-text-color-primary)}.friendly-text .friendly-sub[data-v-2c1a1f20]{margin-top:6px;font-size:12px;line-height:1.4;color:var(--el-text-color-secondary)}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{_ as o}from"./account-adjust.vue_vue_type_script_setup_true_lang-Bk6Hmcnz.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-epy6JK8p.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";export{o as default};
import{_ as o}from"./account-adjust.vue_vue_type_script_setup_true_lang-G1VH3QkR.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-D0lFf8Hm.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";export{o as default};
@@ -1 +1 @@
import{D as h,B,G as q,I,C as D}from"./element-plus-D9NzL5HE.js";import{P as F}from"./index-epy6JK8p.js";import{h as b}from"./index-D54sWaXv.js";import{f as G,w,ak as j,G as P,aN as r,J as S,a,O as u,A as U}from"./@vue/runtime-core-C0pg79pw.js";import{y as n,u as y,r as A}from"./@vue/reactivity-BIbyPIZJ.js";import{Q as k}from"./@vue/shared-mAAVTE9n.js";const J={class:"pr-8"},K=G({__name:"account-adjust",props:{show:{type:Boolean,required:!0},value:{type:[Number,String],required:!0}},emits:["update:show","confirm"],setup(d,{emit:V}){const s=y(),i=d,f=V,o=A({action:1,num:"",remark:""}),m=y(),c=U(()=>Number(i.value)+Number(o.num)*(o.action==1?1:-1)),R={num:[{required:!0,message:"请输入调整的金额"}]},x=e=>{if(e.includes("-"))return b.msgError("请输入正整数");o.num=e},C=async()=>{var e;await((e=s.value)==null?void 0:e.validate()),f("confirm",o)},E=()=>{var e;f("update:show",!1),(e=s.value)==null||e.resetFields()};return w(()=>i.show,e=>{var t,l;e?(t=m.value)==null||t.open():(l=m.value)==null||l.close()}),w(c,e=>{e<0&&(b.msgError("调整后余额需大于0"),o.num="")}),(e,t)=>{const l=B,_=I,N=q,v=D,g=h;return j(),P(F,{ref_key:"popupRef",ref:m,title:"余额调整",width:"500px",onConfirm:C,async:!0,onClose:E},{default:r(()=>[S("div",J,[a(g,{ref_key:"formRef",ref:s,model:n(o),"label-width":"120px",rules:R},{default:r(()=>[a(l,{label:"当前余额"},{default:r(()=>[u("¥ "+k(d.value),1)]),_:1}),a(l,{label:"余额增减",required:"",prop:"action"},{default:r(()=>[a(N,{modelValue:n(o).action,"onUpdate:modelValue":t[0]||(t[0]=p=>n(o).action=p)},{default:r(()=>[a(_,{value:1},{default:r(()=>[...t[2]||(t[2]=[u("增加余额",-1)])]),_:1}),a(_,{value:2},{default:r(()=>[...t[3]||(t[3]=[u("扣减余额",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),a(l,{label:"调整余额",prop:"num"},{default:r(()=>[a(v,{"model-value":n(o).num,placeholder:"请输入调整的金额",type:"number",onInput:x},null,8,["model-value"])]),_:1}),a(l,{label:"调整后余额"},{default:r(()=>[u(" ¥ "+k(n(c)),1)]),_:1}),a(l,{label:"备注",prop:"remark"},{default:r(()=>[a(v,{modelValue:n(o).remark,"onUpdate:modelValue":t[1]||(t[1]=p=>n(o).remark=p),type:"textarea",rows:4},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1},512)}}});export{K as _};
import{D as h,B,G as q,I,C as D}from"./element-plus-8nG574Ul.js";import{P as F}from"./index-D0lFf8Hm.js";import{h as b}from"./index-C2ep5Cm2.js";import{f as G,w,ak as j,G as P,aN as r,J as S,a,O as u,A as U}from"./@vue/runtime-core-C0pg79pw.js";import{y as n,u as y,r as A}from"./@vue/reactivity-BIbyPIZJ.js";import{Q as k}from"./@vue/shared-mAAVTE9n.js";const J={class:"pr-8"},K=G({__name:"account-adjust",props:{show:{type:Boolean,required:!0},value:{type:[Number,String],required:!0}},emits:["update:show","confirm"],setup(d,{emit:V}){const s=y(),i=d,f=V,o=A({action:1,num:"",remark:""}),m=y(),c=U(()=>Number(i.value)+Number(o.num)*(o.action==1?1:-1)),R={num:[{required:!0,message:"请输入调整的金额"}]},x=e=>{if(e.includes("-"))return b.msgError("请输入正整数");o.num=e},C=async()=>{var e;await((e=s.value)==null?void 0:e.validate()),f("confirm",o)},E=()=>{var e;f("update:show",!1),(e=s.value)==null||e.resetFields()};return w(()=>i.show,e=>{var t,l;e?(t=m.value)==null||t.open():(l=m.value)==null||l.close()}),w(c,e=>{e<0&&(b.msgError("调整后余额需大于0"),o.num="")}),(e,t)=>{const l=B,_=I,N=q,v=D,g=h;return j(),P(F,{ref_key:"popupRef",ref:m,title:"余额调整",width:"500px",onConfirm:C,async:!0,onClose:E},{default:r(()=>[S("div",J,[a(g,{ref_key:"formRef",ref:s,model:n(o),"label-width":"120px",rules:R},{default:r(()=>[a(l,{label:"当前余额"},{default:r(()=>[u("¥ "+k(d.value),1)]),_:1}),a(l,{label:"余额增减",required:"",prop:"action"},{default:r(()=>[a(N,{modelValue:n(o).action,"onUpdate:modelValue":t[0]||(t[0]=p=>n(o).action=p)},{default:r(()=>[a(_,{value:1},{default:r(()=>[...t[2]||(t[2]=[u("增加余额",-1)])]),_:1}),a(_,{value:2},{default:r(()=>[...t[3]||(t[3]=[u("扣减余额",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),a(l,{label:"调整余额",prop:"num"},{default:r(()=>[a(v,{"model-value":n(o).num,placeholder:"请输入调整的金额",type:"number",onInput:x},null,8,["model-value"])]),_:1}),a(l,{label:"调整后余额"},{default:r(()=>[u(" ¥ "+k(n(c)),1)]),_:1}),a(l,{label:"备注",prop:"remark"},{default:r(()=>[a(v,{modelValue:n(o).remark,"onUpdate:modelValue":t[1]||(t[1]=p=>n(o).remark=p),type:"textarea",rows:4},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1},512)}}});export{K as _};
@@ -0,0 +1 @@
.p-4{padding:0}[data-v-d419a795]{box-sizing:border-box}html[data-v-d419a795],body[data-v-d419a795]{margin:0;padding:0}.diagnosis-page[data-v-d419a795]{display:flex;flex-direction:column;min-height:100vh;width:100%;background-color:#f5f7fa;margin:0;padding:0}.page-header[data-v-d419a795]{display:flex;align-items:center;gap:12px;padding:16px;background-color:#fff;border-bottom:1px solid #ebeef5;position:sticky;top:0;z-index:100;width:100%}.page-header .back-btn[data-v-d419a795]{padding:0;font-size:16px;color:#606266;flex-shrink:0}.page-header .back-btn[data-v-d419a795]:hover{color:#409eff}.page-header .page-title[data-v-d419a795]{margin:0;font-size:18px;font-weight:600;color:#303133;flex:1}.page-content[data-v-d419a795]{flex:1;width:100%;overflow-y:auto;padding:16px}@media(min-width:768px){.page-content[data-v-d419a795]{padding:24px}}.diagnosis-form[data-v-d419a795]{width:100%}.diagnosis-form[data-v-d419a795] .el-form-item{margin-bottom:16px}.diagnosis-form[data-v-d419a795] .el-form-item__label{font-weight:500;color:#606266}.diagnosis-form[data-v-d419a795] .el-input,.diagnosis-form[data-v-d419a795] .el-input-number,.diagnosis-form[data-v-d419a795] .el-select,.diagnosis-form[data-v-d419a795] .el-date-editor{width:100%}.form-section[data-v-d419a795]{background-color:#fff;border-radius:4px;padding:16px;margin-bottom:16px;width:100%}.form-section .section-title[data-v-d419a795]{font-size:16px;font-weight:600;color:#303133;margin-bottom:16px;padding-bottom:12px;border-bottom:2px solid #409eff}.radio-group[data-v-d419a795]{display:flex;flex-wrap:wrap;gap:8px;width:100%}.radio-group[data-v-d419a795] .el-radio-button{flex:0 1 auto;min-width:60px}.checkbox-group[data-v-d419a795]{display:flex;flex-wrap:wrap;gap:8px;width:100%}.checkbox-group[data-v-d419a795] .el-checkbox-button{flex:0 1 auto;min-width:60px}.form-tips[data-v-d419a795]{font-size:12px;color:#909399;margin-top:4px;line-height:1.5}.page-footer[data-v-d419a795]{display:flex;gap:12px;padding:16px;background-color:#fff;border-top:1px solid #ebeef5;position:sticky;bottom:0;z-index:100;width:100%}@media(max-width:767px){.page-footer[data-v-d419a795]{flex-direction:column}}.page-footer .btn-cancel[data-v-d419a795],.page-footer .btn-submit[data-v-d419a795]{flex:1;height:40px;font-size:16px;font-weight:500}@media(min-width:768px){.page-footer .btn-cancel[data-v-d419a795],.page-footer .btn-submit[data-v-d419a795]{flex:0 1 auto;min-width:120px}}@media(max-width:767px){.page-footer .btn-cancel[data-v-d419a795]{order:2}.page-footer .btn-submit[data-v-d419a795]{order:1}.page-header[data-v-d419a795]{padding:12px}.page-header .page-title[data-v-d419a795]{font-size:16px}.page-content[data-v-d419a795]{padding:12px}.form-section[data-v-d419a795]{padding:12px;margin-bottom:12px}.form-section .section-title[data-v-d419a795]{font-size:14px;margin-bottom:12px;padding-bottom:8px}.radio-group[data-v-d419a795],.checkbox-group[data-v-d419a795]{gap:6px}.radio-group[data-v-d419a795] .el-radio-button,.radio-group[data-v-d419a795] .el-checkbox-button,.checkbox-group[data-v-d419a795] .el-radio-button,.checkbox-group[data-v-d419a795] .el-checkbox-button{min-width:50px;font-size:12px}[data-v-d419a795] .el-form-item__label,[data-v-d419a795] .el-input__inner,[data-v-d419a795] .el-textarea__inner{font-size:14px}}@media(prefers-color-scheme:dark){.diagnosis-page[data-v-d419a795]{background-color:#1a1a1a}.page-header[data-v-d419a795],.page-footer[data-v-d419a795],.form-section[data-v-d419a795]{background-color:#2a2a2a;border-color:#444}.page-title[data-v-d419a795],.section-title[data-v-d419a795]{color:#e0e0e0}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{_ as o}from"./add-nav.vue_vue_type_script_setup_true_lang-xpiil8I7.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./add-nav.vue_vue_type_script_setup_true_lang-CEl0QgUO.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
@@ -1 +1 @@
import{C as E,B,g as C,i as N}from"./element-plus-D9NzL5HE.js";import{_ as $}from"./index-wQPX7dBB.js";import{_ as z}from"./picker-bP9cmZy8.js";import{_ as A}from"./picker-DnoOFo57.js";import{_ as D,h as r}from"./index-D54sWaXv.js";import{D as I}from"./vuedraggable-C3E4D3Yv.js";import{f as R,ak as p,I as F,J as l,a,aN as d,G,O as J,A as L}from"./@vue/runtime-core-C0pg79pw.js";import{y as _,a as O}from"./@vue/reactivity-BIbyPIZJ.js";const P={class:"bg-fill-light flex items-center w-full p-4 mb-4"},S={class:"upload-btn w-[60px] h-[60px]"},T={class:"ml-3 flex-1"},j={class:"flex items-center"},q={class:"flex items-center mt-[18px]"},H={class:"flex-1 flex items-center"},K={class:"drag-move cursor-move ml-auto"},oe=R({__name:"add-nav",props:{modelValue:{type:Array,default:()=>[]},max:{type:Number,default:100},min:{type:Number,default:1}},emits:["update:modelValue"],setup(c,{emit:f}){const t=c,V=f,m=L({get(){return t.modelValue},set(s){V("update:modelValue",s)}}),x=()=>{var s;((s=t.modelValue)==null?void 0:s.length)<t.max?m.value.push({image:"",name:"导航名称",link:{},is_show:"1"}):r.msgError(`最多添加${t.max}`)},g=s=>{var e;if(((e=t.modelValue)==null?void 0:e.length)<=t.min)return r.msgError(`最少保留${t.min}`);m.value.splice(s,1)};return(s,e)=>{const i=D,v=A,h=E,k=z,b=C,w=B,y=$,U=N;return p(),F("div",null,[l("div",null,[a(_(I),{class:"draggable",modelValue:_(m),"onUpdate:modelValue":e[0]||(e[0]=o=>O(m)?m.value=o:null),animation:"300",handle:".drag-move","item-key":"index"},{item:d(({element:o,index:u})=>[(p(),G(y,{class:"w-[467px]",key:u,onClose:n=>g(u)},{default:d(()=>[l("div",P,[a(v,{modelValue:o.image,"onUpdate:modelValue":n=>o.image=n,"upload-class":"bg-body",size:"60px","exclude-domain":""},{upload:d(()=>[l("div",S,[a(i,{name:"el-icon-Plus",size:20})])]),_:1},8,["modelValue","onUpdate:modelValue"]),l("div",T,[l("div",j,[e[1]||(e[1]=l("span",{class:"text-tx-regular flex-none mr-3"},"名称",-1)),a(h,{modelValue:o.name,"onUpdate:modelValue":n=>o.name=n,placeholder:"请输入名称"},null,8,["modelValue","onUpdate:modelValue"])]),l("div",q,[e[2]||(e[2]=l("span",{class:"text-tx-regular flex-none mr-3"},"链接",-1)),a(k,{modelValue:o.link,"onUpdate:modelValue":n=>o.link=n},null,8,["modelValue","onUpdate:modelValue"])]),a(w,{label:"是否显示",class:"mt-[18px]"},{default:d(()=>[l("div",H,[a(b,{modelValue:o.is_show,"onUpdate:modelValue":n=>o.is_show=n,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),l("div",K,[a(i,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"])]),l("div",null,[a(U,{type:"primary",onClick:x},{default:d(()=>[...e[3]||(e[3]=[J("添加",-1)])]),_:1})])])}}});export{oe as _};
import{C as E,B,g as C,i as N}from"./element-plus-8nG574Ul.js";import{_ as $}from"./index-DL2R2dPV.js";import{_ as z}from"./picker-DDyyE4Hw.js";import{_ as A}from"./picker-anRkbqwm.js";import{_ as D,h as r}from"./index-C2ep5Cm2.js";import{D as I}from"./vuedraggable-C3E4D3Yv.js";import{f as R,ak as p,I as F,J as l,a,aN as d,G,O as J,A as L}from"./@vue/runtime-core-C0pg79pw.js";import{y as _,a as O}from"./@vue/reactivity-BIbyPIZJ.js";const P={class:"bg-fill-light flex items-center w-full p-4 mb-4"},S={class:"upload-btn w-[60px] h-[60px]"},T={class:"ml-3 flex-1"},j={class:"flex items-center"},q={class:"flex items-center mt-[18px]"},H={class:"flex-1 flex items-center"},K={class:"drag-move cursor-move ml-auto"},oe=R({__name:"add-nav",props:{modelValue:{type:Array,default:()=>[]},max:{type:Number,default:100},min:{type:Number,default:1}},emits:["update:modelValue"],setup(c,{emit:f}){const t=c,V=f,m=L({get(){return t.modelValue},set(s){V("update:modelValue",s)}}),x=()=>{var s;((s=t.modelValue)==null?void 0:s.length)<t.max?m.value.push({image:"",name:"导航名称",link:{},is_show:"1"}):r.msgError(`最多添加${t.max}`)},g=s=>{var e;if(((e=t.modelValue)==null?void 0:e.length)<=t.min)return r.msgError(`最少保留${t.min}`);m.value.splice(s,1)};return(s,e)=>{const i=D,v=A,h=E,k=z,b=C,w=B,y=$,U=N;return p(),F("div",null,[l("div",null,[a(_(I),{class:"draggable",modelValue:_(m),"onUpdate:modelValue":e[0]||(e[0]=o=>O(m)?m.value=o:null),animation:"300",handle:".drag-move","item-key":"index"},{item:d(({element:o,index:u})=>[(p(),G(y,{class:"w-[467px]",key:u,onClose:n=>g(u)},{default:d(()=>[l("div",P,[a(v,{modelValue:o.image,"onUpdate:modelValue":n=>o.image=n,"upload-class":"bg-body",size:"60px","exclude-domain":""},{upload:d(()=>[l("div",S,[a(i,{name:"el-icon-Plus",size:20})])]),_:1},8,["modelValue","onUpdate:modelValue"]),l("div",T,[l("div",j,[e[1]||(e[1]=l("span",{class:"text-tx-regular flex-none mr-3"},"名称",-1)),a(h,{modelValue:o.name,"onUpdate:modelValue":n=>o.name=n,placeholder:"请输入名称"},null,8,["modelValue","onUpdate:modelValue"])]),l("div",q,[e[2]||(e[2]=l("span",{class:"text-tx-regular flex-none mr-3"},"链接",-1)),a(k,{modelValue:o.link,"onUpdate:modelValue":n=>o.link=n},null,8,["modelValue","onUpdate:modelValue"])]),a(w,{label:"是否显示",class:"mt-[18px]"},{default:d(()=>[l("div",H,[a(b,{modelValue:o.is_show,"onUpdate:modelValue":n=>o.is_show=n,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),l("div",K,[a(i,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"])]),l("div",null,[a(U,{type:"primary",onClick:x},{default:d(()=>[...e[3]||(e[3]=[J("添加",-1)])]),_:1})])])}}});export{oe as _};
@@ -1 +0,0 @@
.p-4{padding:0}[data-v-094a8e12]{box-sizing:border-box}html[data-v-094a8e12],body[data-v-094a8e12]{margin:0;padding:0}.diagnosis-page[data-v-094a8e12]{display:flex;flex-direction:column;min-height:100vh;width:100%;background-color:#f5f7fa;margin:0;padding:0}.page-header[data-v-094a8e12]{display:flex;align-items:center;gap:12px;padding:16px;background-color:#fff;border-bottom:1px solid #ebeef5;position:sticky;top:0;z-index:100;width:100%}.page-header .back-btn[data-v-094a8e12]{padding:0;font-size:16px;color:#606266;flex-shrink:0}.page-header .back-btn[data-v-094a8e12]:hover{color:#409eff}.page-header .page-title[data-v-094a8e12]{margin:0;font-size:18px;font-weight:600;color:#303133;flex:1}.page-content[data-v-094a8e12]{flex:1;width:100%;overflow-y:auto;padding:16px}@media(min-width:768px){.page-content[data-v-094a8e12]{padding:24px}}.diagnosis-form[data-v-094a8e12]{width:100%}.diagnosis-form[data-v-094a8e12] .el-form-item{margin-bottom:16px}.diagnosis-form[data-v-094a8e12] .el-form-item__label{font-weight:500;color:#606266}.diagnosis-form[data-v-094a8e12] .el-input,.diagnosis-form[data-v-094a8e12] .el-input-number,.diagnosis-form[data-v-094a8e12] .el-select,.diagnosis-form[data-v-094a8e12] .el-date-editor{width:100%}.form-section[data-v-094a8e12]{background-color:#fff;border-radius:4px;padding:16px;margin-bottom:16px;width:100%}.form-section .section-title[data-v-094a8e12]{font-size:16px;font-weight:600;color:#303133;margin-bottom:16px;padding-bottom:12px;border-bottom:2px solid #409eff}.radio-group[data-v-094a8e12]{display:flex;flex-wrap:wrap;gap:8px;width:100%}.radio-group[data-v-094a8e12] .el-radio-button{flex:0 1 auto;min-width:60px}.checkbox-group[data-v-094a8e12]{display:flex;flex-wrap:wrap;gap:8px;width:100%}.checkbox-group[data-v-094a8e12] .el-checkbox-button{flex:0 1 auto;min-width:60px}.form-tips[data-v-094a8e12]{font-size:12px;color:#909399;margin-top:4px;line-height:1.5}.page-footer[data-v-094a8e12]{display:flex;gap:12px;padding:16px;background-color:#fff;border-top:1px solid #ebeef5;position:sticky;bottom:0;z-index:100;width:100%}@media(max-width:767px){.page-footer[data-v-094a8e12]{flex-direction:column}}.page-footer .btn-cancel[data-v-094a8e12],.page-footer .btn-submit[data-v-094a8e12]{flex:1;height:40px;font-size:16px;font-weight:500}@media(min-width:768px){.page-footer .btn-cancel[data-v-094a8e12],.page-footer .btn-submit[data-v-094a8e12]{flex:0 1 auto;min-width:120px}}@media(max-width:767px){.page-footer .btn-cancel[data-v-094a8e12]{order:2}.page-footer .btn-submit[data-v-094a8e12]{order:1}.page-header[data-v-094a8e12]{padding:12px}.page-header .page-title[data-v-094a8e12]{font-size:16px}.page-content[data-v-094a8e12]{padding:12px}.form-section[data-v-094a8e12]{padding:12px;margin-bottom:12px}.form-section .section-title[data-v-094a8e12]{font-size:14px;margin-bottom:12px;padding-bottom:8px}.radio-group[data-v-094a8e12],.checkbox-group[data-v-094a8e12]{gap:6px}.radio-group[data-v-094a8e12] .el-radio-button,.radio-group[data-v-094a8e12] .el-checkbox-button,.checkbox-group[data-v-094a8e12] .el-radio-button,.checkbox-group[data-v-094a8e12] .el-checkbox-button{min-width:50px;font-size:12px}[data-v-094a8e12] .el-form-item__label,[data-v-094a8e12] .el-input__inner,[data-v-094a8e12] .el-textarea__inner{font-size:14px}}@media(prefers-color-scheme:dark){.diagnosis-page[data-v-094a8e12]{background-color:#1a1a1a}.page-header[data-v-094a8e12],.page-footer[data-v-094a8e12],.form-section[data-v-094a8e12]{background-color:#2a2a2a;border-color:#444}.page-title[data-v-094a8e12],.section-title[data-v-094a8e12]{color:#e0e0e0}}
@@ -1 +1 @@
import{r as n}from"./index-D54sWaXv.js";function e(t){return n.get({url:"/auth.admin/lists",params:t},{ignoreCancelToken:!0})}function i(t){return n.post({url:"/auth.admin/add",params:t})}function r(t){return n.post({url:"/auth.admin/edit",params:t})}function u(t){return n.post({url:"/auth.admin/delete",params:t})}function d(t){return n.get({url:"/auth.admin/detail",params:t})}export{e as a,r as b,u as c,i as d,d as e};
import{r as n}from"./index-C2ep5Cm2.js";function e(t){return n.get({url:"/auth.admin/lists",params:t},{ignoreCancelToken:!0})}function i(t){return n.post({url:"/auth.admin/add",params:t})}function r(t){return n.post({url:"/auth.admin/edit",params:t})}function u(t){return n.post({url:"/auth.admin/delete",params:t})}function d(t){return n.get({url:"/auth.admin/detail",params:t})}export{e as a,r as b,u as c,i as d,d as e};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.today-block-alert[data-v-0ae1f57a]{margin-bottom:16px}.appointment-form[data-v-0ae1f57a] .el-form-item__label{font-weight:500}.appointment-form .channel-source-select[data-v-0ae1f57a]{width:100%;max-width:360px}.doctor-list[data-v-0ae1f57a]{display:flex;flex-wrap:wrap;gap:12px}.doctor-list .doctor-radio[data-v-0ae1f57a]{margin-right:0}.doctor-list .doctor-radio[data-v-0ae1f57a] .el-radio__label{display:flex;align-items:center}.appointment-time-container[data-v-0ae1f57a]{width:100%}.date-selector[data-v-0ae1f57a]{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.date-selector .date-button[data-v-0ae1f57a]{min-width:130px;height:40px;font-size:14px;border-radius:8px;transition:all .2s}.date-selector .date-button[data-v-0ae1f57a]:hover{transform:translateY(-2px);box-shadow:0 2px 8px #0000001a}.time-slots-container[data-v-0ae1f57a]{background-color:#f8f9fa;border-radius:8px;padding:16px}.time-slots-header[data-v-0ae1f57a]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.time-slots-header .header-title[data-v-0ae1f57a]{font-size:15px;font-weight:600;color:#303133}.time-slots-grid[data-v-0ae1f57a]{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;max-height:450px;overflow-y:auto;padding:2px}.time-slots-grid[data-v-0ae1f57a]::-webkit-scrollbar{width:6px}.time-slots-grid[data-v-0ae1f57a]::-webkit-scrollbar-thumb{background-color:#dcdfe6;border-radius:3px}.time-slots-grid[data-v-0ae1f57a]::-webkit-scrollbar-thumb:hover{background-color:#c0c4cc}.time-slots-grid .time-slot-item[data-v-0ae1f57a]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 8px;border:2px solid #e4e7ed;border-radius:8px;cursor:pointer;transition:all .2s;background-color:#fff;min-height:70px}.time-slots-grid .time-slot-item .slot-time[data-v-0ae1f57a]{font-size:15px;font-weight:600;color:#303133;margin-bottom:6px}.time-slots-grid .time-slot-item .slot-status[data-v-0ae1f57a]{font-size:12px;color:#909399;padding:0 8px;border-radius:4px;background-color:#f4f4f5}.time-slots-grid .time-slot-item .slot-status.status-available[data-v-0ae1f57a]{color:#67c23a;background-color:#f0f9ff}.time-slots-grid .time-slot-item.available[data-v-0ae1f57a]{border-color:#e4e7ed}.time-slots-grid .time-slot-item.available[data-v-0ae1f57a]:hover{border-color:#409eff;background-color:#ecf5ff;transform:translateY(-2px);box-shadow:0 4px 12px #409eff26}.time-slots-grid .time-slot-item.unavailable[data-v-0ae1f57a]{background-color:#f5f7fa;border-color:#e4e7ed;cursor:not-allowed;opacity:.6}.time-slots-grid .time-slot-item.unavailable .slot-time[data-v-0ae1f57a]{color:#c0c4cc}.time-slots-grid .time-slot-item.unavailable .slot-status[data-v-0ae1f57a]{color:#c0c4cc;background-color:#f5f7fa}.time-slots-grid .time-slot-item.unavailable[data-v-0ae1f57a]:hover{transform:none;box-shadow:none}.time-slots-grid .time-slot-item.selected[data-v-0ae1f57a]{border-color:#409eff;background:linear-gradient(135deg,#409eff,#66b1ff);box-shadow:0 4px 12px #409eff4d}.time-slots-grid .time-slot-item.selected .slot-time[data-v-0ae1f57a]{color:#fff}.time-slots-grid .time-slot-item.selected .slot-status[data-v-0ae1f57a]{color:#fff;background-color:#fff3}[data-v-0ae1f57a] .el-radio-group{display:flex;flex-wrap:wrap;gap:12px}[data-v-0ae1f57a] .el-radio{margin-right:0}.drawer-footer[data-v-0ae1f57a]{display:flex;justify-content:flex-end;gap:12px;padding:12px 0}
@@ -1 +0,0 @@
.appointment-form[data-v-d7887556] .el-form-item__label{font-weight:500}.appointment-form .channel-source-select[data-v-d7887556]{width:100%;max-width:360px}.doctor-list[data-v-d7887556]{display:flex;flex-wrap:wrap;gap:12px}.doctor-list .doctor-radio[data-v-d7887556]{margin-right:0}.doctor-list .doctor-radio[data-v-d7887556] .el-radio__label{display:flex;align-items:center}.appointment-time-container[data-v-d7887556]{width:100%}.date-selector[data-v-d7887556]{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.date-selector .date-button[data-v-d7887556]{min-width:130px;height:40px;font-size:14px;border-radius:8px;transition:all .2s}.date-selector .date-button[data-v-d7887556]:hover{transform:translateY(-2px);box-shadow:0 2px 8px #0000001a}.time-slots-container[data-v-d7887556]{background-color:#f8f9fa;border-radius:8px;padding:16px}.time-slots-header[data-v-d7887556]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.time-slots-header .header-title[data-v-d7887556]{font-size:15px;font-weight:600;color:#303133}.time-slots-grid[data-v-d7887556]{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;max-height:450px;overflow-y:auto;padding:2px}.time-slots-grid[data-v-d7887556]::-webkit-scrollbar{width:6px}.time-slots-grid[data-v-d7887556]::-webkit-scrollbar-thumb{background-color:#dcdfe6;border-radius:3px}.time-slots-grid[data-v-d7887556]::-webkit-scrollbar-thumb:hover{background-color:#c0c4cc}.time-slots-grid .time-slot-item[data-v-d7887556]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 8px;border:2px solid #e4e7ed;border-radius:8px;cursor:pointer;transition:all .2s;background-color:#fff;min-height:70px}.time-slots-grid .time-slot-item .slot-time[data-v-d7887556]{font-size:15px;font-weight:600;color:#303133;margin-bottom:6px}.time-slots-grid .time-slot-item .slot-status[data-v-d7887556]{font-size:12px;color:#909399;padding:0 8px;border-radius:4px;background-color:#f4f4f5}.time-slots-grid .time-slot-item .slot-status.status-available[data-v-d7887556]{color:#67c23a;background-color:#f0f9ff}.time-slots-grid .time-slot-item.available[data-v-d7887556]{border-color:#e4e7ed}.time-slots-grid .time-slot-item.available[data-v-d7887556]:hover{border-color:#409eff;background-color:#ecf5ff;transform:translateY(-2px);box-shadow:0 4px 12px #409eff26}.time-slots-grid .time-slot-item.unavailable[data-v-d7887556]{background-color:#f5f7fa;border-color:#e4e7ed;cursor:not-allowed;opacity:.6}.time-slots-grid .time-slot-item.unavailable .slot-time[data-v-d7887556]{color:#c0c4cc}.time-slots-grid .time-slot-item.unavailable .slot-status[data-v-d7887556]{color:#c0c4cc;background-color:#f5f7fa}.time-slots-grid .time-slot-item.unavailable[data-v-d7887556]:hover{transform:none;box-shadow:none}.time-slots-grid .time-slot-item.selected[data-v-d7887556]{border-color:#409eff;background:linear-gradient(135deg,#409eff,#66b1ff);box-shadow:0 4px 12px #409eff4d}.time-slots-grid .time-slot-item.selected .slot-time[data-v-d7887556]{color:#fff}.time-slots-grid .time-slot-item.selected .slot-status[data-v-d7887556]{color:#fff;background-color:#fff3}[data-v-d7887556] .el-radio-group{display:flex;flex-wrap:wrap;gap:12px}[data-v-d7887556] .el-radio{margin-right:0}.drawer-footer[data-v-d7887556]{display:flex;justify-content:flex-end;gap:12px;padding:12px 0}
@@ -1 +1 @@
import{r as e}from"./index-D54sWaXv.js";function a(t){return e.get({url:"/article.articleCate/lists",params:t})}function l(t){return e.get({url:"/article.articleCate/all",params:t})}function i(t){return e.post({url:"/article.articleCate/add",params:t})}function c(t){return e.post({url:"/article.articleCate/edit",params:t})}function u(t){return e.post({url:"/article.articleCate/delete",params:t})}function n(t){return e.get({url:"/article.articleCate/detail",params:t})}function s(t){return e.post({url:"/article.articleCate/updateStatus",params:t})}function o(t){return e.get({url:"/article.article/lists",params:t})}function d(t){return e.post({url:"/article.article/add",params:t})}function f(t){return e.post({url:"/article.article/edit",params:t})}function C(t){return e.post({url:"/article.article/delete",params:t})}function p(t){return e.get({url:"/article.article/detail",params:t})}function g(t){return e.post({url:"/article.article/updateStatus",params:t})}export{a,u as b,s as c,c as d,i as e,n as f,p as g,f as h,d as i,l as j,o as k,g as l,C as m};
import{r as e}from"./index-C2ep5Cm2.js";function a(t){return e.get({url:"/article.articleCate/lists",params:t})}function l(t){return e.get({url:"/article.articleCate/all",params:t})}function i(t){return e.post({url:"/article.articleCate/add",params:t})}function c(t){return e.post({url:"/article.articleCate/edit",params:t})}function u(t){return e.post({url:"/article.articleCate/delete",params:t})}function n(t){return e.get({url:"/article.articleCate/detail",params:t})}function s(t){return e.post({url:"/article.articleCate/updateStatus",params:t})}function o(t){return e.get({url:"/article.article/lists",params:t})}function d(t){return e.post({url:"/article.article/add",params:t})}function f(t){return e.post({url:"/article.article/edit",params:t})}function C(t){return e.post({url:"/article.article/delete",params:t})}function p(t){return e.get({url:"/article.article/detail",params:t})}function g(t){return e.post({url:"/article.article/updateStatus",params:t})}export{a,u as b,s as c,c as d,i as e,n as f,p as g,f as h,d as i,l as j,o as k,g as l,C as m};
@@ -1 +1 @@
import{m as b,l as c,D as V}from"./element-plus-D9NzL5HE.js";import{_ as l}from"./menu-set.vue_vue_type_script_setup_true_lang-BvgIclzg.js";import{f as v,ak as x,I as k,J as E,a as o,aN as e,F as g,A as w}from"./@vue/runtime-core-C0pg79pw.js";import{y as r}from"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";const yt=v({__name:"attr",props:{modelValue:{type:Object,default:()=>({nav:[],menu:{}})}},emits:["update:modelValue"],setup(n,{emit:s}){const u=n,d=s,m=w({get(){return u.modelValue},set(i){d("update:modelValue",i)}});return(i,t)=>{const a=c,f=b,_=V;return x(),k(g,null,[t[2]||(t[2]=E("div",{class:"title flex items-center before:w-[3px] before:h-[14px] before:block before:bg-primary before:mr-2"}," pc导航设置 ",-1)),o(_,{class:"mt-4","label-width":"70px"},{default:e(()=>[o(f,{"model-value":"nav"},{default:e(()=>[o(a,{label:"主导航设置",name:"nav"},{default:e(()=>[o(l,{modelValue:r(m).nav,"onUpdate:modelValue":t[0]||(t[0]=p=>r(m).nav=p)},null,8,["modelValue"])]),_:1}),o(a,{label:"菜单设置",name:"menu"},{default:e(()=>[o(l,{modelValue:r(m).menu,"onUpdate:modelValue":t[1]||(t[1]=p=>r(m).menu=p)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)}}});export{yt as default};
import{m as b,l as c,D as V}from"./element-plus-8nG574Ul.js";import{_ as l}from"./menu-set.vue_vue_type_script_setup_true_lang-D5n7wiBc.js";import{f as v,ak as x,I as k,J as E,a as o,aN as e,F as g,A as w}from"./@vue/runtime-core-C0pg79pw.js";import{y as r}from"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";const yt=v({__name:"attr",props:{modelValue:{type:Object,default:()=>({nav:[],menu:{}})}},emits:["update:modelValue"],setup(n,{emit:s}){const u=n,d=s,m=w({get(){return u.modelValue},set(i){d("update:modelValue",i)}});return(i,t)=>{const a=c,f=b,_=V;return x(),k(g,null,[t[2]||(t[2]=E("div",{class:"title flex items-center before:w-[3px] before:h-[14px] before:block before:bg-primary before:mr-2"}," pc导航设置 ",-1)),o(_,{class:"mt-4","label-width":"70px"},{default:e(()=>[o(f,{"model-value":"nav"},{default:e(()=>[o(a,{label:"主导航设置",name:"nav"},{default:e(()=>[o(l,{modelValue:r(m).nav,"onUpdate:modelValue":t[0]||(t[0]=p=>r(m).nav=p)},null,8,["modelValue"])]),_:1}),o(a,{label:"菜单设置",name:"menu"},{default:e(()=>[o(l,{modelValue:r(m).menu,"onUpdate:modelValue":t[1]||(t[1]=p=>r(m).menu=p)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)}}});export{yt as default};
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-DegvffGY.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index.vue_vue_type_script_setup_true_lang-_izKWNxN.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./picker-DnoOFo57.js";import"./index-epy6JK8p.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./index-l9o66tt_.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./index-wQPX7dBB.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./usePaging-B_C_SZ2Z.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-UvTgYZBe.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index.vue_vue_type_script_setup_true_lang-BnjXGEKw.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./picker-anRkbqwm.js";import"./index-D0lFf8Hm.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./index-D4E_KNst.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./index-DL2R2dPV.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./usePaging-B_C_SZ2Z.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-BAENXUoY.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-pALzINLE.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-CK9aFMyu.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./picker-DnoOFo57.js";import"./index-epy6JK8p.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./index-l9o66tt_.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./index-wQPX7dBB.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./usePaging-B_C_SZ2Z.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-UygRyGe-.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./picker-anRkbqwm.js";import"./index-D0lFf8Hm.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./index-D4E_KNst.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./index-DL2R2dPV.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./usePaging-B_C_SZ2Z.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-Dncc5li2.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./add-nav.vue_vue_type_script_setup_true_lang-xpiil8I7.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-Ch07OD9M.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./add-nav.vue_vue_type_script_setup_true_lang-CEl0QgUO.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-B6TZIs14.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-imdF5haE.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-CnLPtdIt.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";import"./index.vue_vue_type_script_setup_true_lang-_izKWNxN.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-DtXa6ZoY.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";import"./index.vue_vue_type_script_setup_true_lang-BnjXGEKw.js";export{o as default};
@@ -0,0 +1 @@
import{_ as o}from"./attr-setting.vue_vue_type_script_setup_true_lang-hSwyPtds.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-DwBN4Vy9.js";import"./attr-DwTlXGpB.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";import"./content.vue_vue_type_script_setup_true_lang-BlED0m-a.js";import"./decoration-img-DsnbJJ7z.js";import"./attr.vue_vue_type_script_setup_true_lang-UygRyGe-.js";import"./content-Cd32gWWA.js";import"./attr.vue_vue_type_script_setup_true_lang-imdF5haE.js";import"./content.vue_vue_type_script_setup_true_lang-BVOpODOj.js";import"./attr.vue_vue_type_script_setup_true_lang-Ch07OD9M.js";import"./add-nav.vue_vue_type_script_setup_true_lang-CEl0QgUO.js";import"./content-CvNsHrtD.js";import"./attr.vue_vue_type_script_setup_true_lang-BqhkmADK.js";import"./content.vue_vue_type_script_setup_true_lang-DjmvG7sA.js";import"./attr.vue_vue_type_script_setup_true_lang-CfPY9LZg.js";import"./content-CkfJ8oP7.js";import"./decoration-CoS5u1Kg.js";import"./attr.vue_vue_type_script_setup_true_lang-UvTgYZBe.js";import"./index.vue_vue_type_script_setup_true_lang-BnjXGEKw.js";import"./content-DZpzFmih.js";import"./content.vue_vue_type_script_setup_true_lang-CsCo8K9F.js";import"./attr.vue_vue_type_script_setup_true_lang-eatfXr14.js";import"./content-CqPqyOfD.js";import"./attr.vue_vue_type_script_setup_true_lang-pALzINLE.js";import"./content.vue_vue_type_script_setup_true_lang-BHrCuz_g.js";import"./attr.vue_vue_type_script_setup_true_lang-11IwTsyi.js";import"./content-CflfDnDy.js";export{o as default};
@@ -1 +0,0 @@
import{_ as o}from"./attr-setting.vue_vue_type_script_setup_true_lang-Bmr7Rk4a.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./index-XhJ9lk_U.js";import"./attr-xbDjx_Vq.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";import"./content.vue_vue_type_script_setup_true_lang-C8UnjQbm.js";import"./decoration-img-YoVl0vAG.js";import"./attr.vue_vue_type_script_setup_true_lang-CK9aFMyu.js";import"./content-xNuMUsY_.js";import"./attr.vue_vue_type_script_setup_true_lang-B6TZIs14.js";import"./content.vue_vue_type_script_setup_true_lang-CtD0Jigs.js";import"./attr.vue_vue_type_script_setup_true_lang-Dncc5li2.js";import"./add-nav.vue_vue_type_script_setup_true_lang-xpiil8I7.js";import"./content-m_vOy1uc.js";import"./attr.vue_vue_type_script_setup_true_lang-oQY2_nYa.js";import"./content.vue_vue_type_script_setup_true_lang-Bi66yjjs.js";import"./attr.vue_vue_type_script_setup_true_lang-CfPY9LZg.js";import"./content-j89rjdA5.js";import"./decoration-DUxk9vfB.js";import"./attr.vue_vue_type_script_setup_true_lang-DegvffGY.js";import"./index.vue_vue_type_script_setup_true_lang-_izKWNxN.js";import"./content-DUqu7HTs.js";import"./content.vue_vue_type_script_setup_true_lang-CO4uVuMf.js";import"./attr.vue_vue_type_script_setup_true_lang-eatfXr14.js";import"./content-CdPmnECn.js";import"./attr.vue_vue_type_script_setup_true_lang-BAENXUoY.js";import"./content.vue_vue_type_script_setup_true_lang-BKjJdNTm.js";import"./attr.vue_vue_type_script_setup_true_lang-11IwTsyi.js";import"./content-CocqCGQP.js";export{o as default};
@@ -1 +1 @@
import{J as y,s as g}from"./element-plus-D9NzL5HE.js";import{e as b}from"./index-XhJ9lk_U.js";import{f as x,ak as o,I as _,a as r,aN as c,J as h,G as i,K as w,at as k}from"./@vue/runtime-core-C0pg79pw.js";import{Q as v}from"./@vue/shared-mAAVTE9n.js";import{y as C}from"./@vue/reactivity-BIbyPIZJ.js";const B={class:"pages-setting"},E={class:"title flex items-center before:w-[3px] before:h-[14px] before:block before:bg-primary before:mr-2 text-xl font-medium"},V=x({__name:"attr-setting",props:{widget:{type:Object,default:()=>({})},type:{type:String,default:"mobile"}},emits:["update:content"],setup(e,{emit:m}){const d=m,p=a=>{d("update:content",a)};return(a,N)=>{const f=y,u=g;return o(),_("div",B,[r(f,{shadow:"never",class:"!border-none flex"},{default:c(()=>{var t;return[h("div",E,v((t=e.widget)==null?void 0:t.title),1)]}),_:1}),r(u,{class:"w-full",style:{height:"calc(100% - 60px)"}},{default:c(()=>{var t,n,s,l;return[(o(),i(w,null,[(o(),i(k((n=C(b)[(t=e.widget)==null?void 0:t.name])==null?void 0:n.attr),{content:(s=e.widget)==null?void 0:s.content,styles:(l=e.widget)==null?void 0:l.styles,type:e.type,"onUpdate:content":p},null,40,["content","styles","type"]))],1024))]}),_:1})])}}});export{V as _};
import{J as y,s as g}from"./element-plus-8nG574Ul.js";import{e as b}from"./index-DwBN4Vy9.js";import{f as x,ak as o,I as _,a as r,aN as c,J as h,G as i,K as w,at as k}from"./@vue/runtime-core-C0pg79pw.js";import{Q as v}from"./@vue/shared-mAAVTE9n.js";import{y as C}from"./@vue/reactivity-BIbyPIZJ.js";const B={class:"pages-setting"},E={class:"title flex items-center before:w-[3px] before:h-[14px] before:block before:bg-primary before:mr-2 text-xl font-medium"},V=x({__name:"attr-setting",props:{widget:{type:Object,default:()=>({})},type:{type:String,default:"mobile"}},emits:["update:content"],setup(e,{emit:m}){const d=m,p=a=>{d("update:content",a)};return(a,N)=>{const f=y,u=g;return o(),_("div",B,[r(f,{shadow:"never",class:"!border-none flex"},{default:c(()=>{var t;return[h("div",E,v((t=e.widget)==null?void 0:t.title),1)]}),_:1}),r(u,{class:"w-full",style:{height:"calc(100% - 60px)"}},{default:c(()=>{var t,n,s,l;return[(o(),i(w,null,[(o(),i(k((n=C(b)[(t=e.widget)==null?void 0:t.name])==null?void 0:n.attr),{content:(s=e.widget)==null?void 0:s.content,styles:(l=e.widget)==null?void 0:l.styles,type:e.type,"onUpdate:content":p},null,40,["content","styles","type"]))],1024))]}),_:1})])}}});export{V as _};
@@ -1 +1 @@
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-oQY2_nYa.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./add-nav.vue_vue_type_script_setup_true_lang-xpiil8I7.js";import"./index-wQPX7dBB.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-bP9cmZy8.js";import"./index-epy6JK8p.js";import"./index.vue_vue_type_script_setup_true_lang-DNZxpZG_.js";import"./article-DY_XmIG_.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-DnoOFo57.js";import"./index-l9o66tt_.js";import"./index-CppXRPrX.js";import"./index.vue_vue_type_script_setup_true_lang-DUX2T7zX.js";import"./file-BtSeeESa.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
import{_ as o}from"./attr.vue_vue_type_script_setup_true_lang-BqhkmADK.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./add-nav.vue_vue_type_script_setup_true_lang-CEl0QgUO.js";import"./index-DL2R2dPV.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./picker-DDyyE4Hw.js";import"./index-D0lFf8Hm.js";import"./index.vue_vue_type_script_setup_true_lang-DaV3Y2dz.js";import"./article-DrP7QuTz.js";import"./usePaging-B_C_SZ2Z.js";import"./picker-anRkbqwm.js";import"./index-D4E_KNst.js";import"./index-BM19PjE0.js";import"./index.vue_vue_type_script_setup_true_lang-Bm3qXg2y.js";import"./file-CL1V_Cod.js";import"./vuedraggable-C3E4D3Yv.js";import"./vue-tI-HfQaQ.js";import"./@vue/compiler-dom-CqayqxS7.js";import"./@vue/compiler-core-CvbQOXIO.js";import"./sortablejs-dsEAUXlE.js";export{o as default};
@@ -1 +1 @@
import{J as B,G as F,I as N,B as O,P as U,Q as g,D as C}from"./element-plus-D9NzL5HE.js";import{_ as I}from"./add-nav.vue_vue_type_script_setup_true_lang-xpiil8I7.js";import{f as j,ak as d,I as m,a as l,aN as o,J as s,O as x,F as c,ap as v,A as D}from"./@vue/runtime-core-C0pg79pw.js";import{y as n}from"./@vue/reactivity-BIbyPIZJ.js";const G={class:"flex-1 mt-4"},P=j({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(V,{emit:b}){const y=b,w=V,a=D({get:()=>w.content,set:u=>{y("update:content",u)}});return(u,e)=>{const r=N,E=F,p=g,i=U,_=O,f=B,k=C;return d(),m("div",null,[l(k,{"label-width":"70px"},{default:o(()=>[l(f,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[6]||(e[6]=s("div",{class:"flex items-end mb-4"},[s("div",{class:"text-base text-[#101010] font-medium"},"展示样式")],-1)),l(E,{modelValue:n(a).style,"onUpdate:modelValue":e[0]||(e[0]=t=>n(a).style=t)},{default:o(()=>[l(r,{value:1},{default:o(()=>[...e[4]||(e[4]=[x("固定显示",-1)])]),_:1}),l(r,{value:2},{default:o(()=>[...e[5]||(e[5]=[x("分页滑动",-1)])]),_:1})]),_:1},8,["modelValue"]),l(_,{label:"每行数量",class:"mt-4"},{default:o(()=>[l(i,{modelValue:n(a).per_line,"onUpdate:modelValue":e[1]||(e[1]=t=>n(a).per_line=t),style:{width:"300px"}},{default:o(()=>[(d(),m(c,null,v(5,t=>l(p,{key:t,label:t+"个",value:t},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),l(_,{label:"显示行数"},{default:o(()=>[l(i,{modelValue:n(a).show_line,"onUpdate:modelValue":e[2]||(e[2]=t=>n(a).show_line=t),style:{width:"300px"}},{default:o(()=>[(d(),m(c,null,v(2,t=>l(p,{key:t,label:t+"行",value:t},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(f,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[7]||(e[7]=s("div",{class:"flex items-end"},[s("div",{class:"text-base text-[#101010] font-medium"},"菜单设置"),s("div",{class:"text-xs text-tx-secondary ml-2"},"建议图片尺寸:100px*100px")],-1)),s("div",G,[l(I,{modelValue:n(a).data,"onUpdate:modelValue":e[3]||(e[3]=t=>n(a).data=t)},null,8,["modelValue"])])]),_:1})]),_:1})])}}});export{P as _};
import{J as B,G as F,I as N,B as O,P as U,Q as g,D as C}from"./element-plus-8nG574Ul.js";import{_ as I}from"./add-nav.vue_vue_type_script_setup_true_lang-CEl0QgUO.js";import{f as j,ak as d,I as m,a as l,aN as o,J as s,O as x,F as c,ap as v,A as D}from"./@vue/runtime-core-C0pg79pw.js";import{y as n}from"./@vue/reactivity-BIbyPIZJ.js";const G={class:"flex-1 mt-4"},P=j({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(V,{emit:b}){const y=b,w=V,a=D({get:()=>w.content,set:u=>{y("update:content",u)}});return(u,e)=>{const r=N,E=F,p=g,i=U,_=O,f=B,k=C;return d(),m("div",null,[l(k,{"label-width":"70px"},{default:o(()=>[l(f,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[6]||(e[6]=s("div",{class:"flex items-end mb-4"},[s("div",{class:"text-base text-[#101010] font-medium"},"展示样式")],-1)),l(E,{modelValue:n(a).style,"onUpdate:modelValue":e[0]||(e[0]=t=>n(a).style=t)},{default:o(()=>[l(r,{value:1},{default:o(()=>[...e[4]||(e[4]=[x("固定显示",-1)])]),_:1}),l(r,{value:2},{default:o(()=>[...e[5]||(e[5]=[x("分页滑动",-1)])]),_:1})]),_:1},8,["modelValue"]),l(_,{label:"每行数量",class:"mt-4"},{default:o(()=>[l(i,{modelValue:n(a).per_line,"onUpdate:modelValue":e[1]||(e[1]=t=>n(a).per_line=t),style:{width:"300px"}},{default:o(()=>[(d(),m(c,null,v(5,t=>l(p,{key:t,label:t+"个",value:t},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),l(_,{label:"显示行数"},{default:o(()=>[l(i,{modelValue:n(a).show_line,"onUpdate:modelValue":e[2]||(e[2]=t=>n(a).show_line=t),style:{width:"300px"}},{default:o(()=>[(d(),m(c,null,v(2,t=>l(p,{key:t,label:t+"行",value:t},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(f,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[7]||(e[7]=s("div",{class:"flex items-end"},[s("div",{class:"text-base text-[#101010] font-medium"},"菜单设置"),s("div",{class:"text-xs text-tx-secondary ml-2"},"建议图片尺寸:100px*100px")],-1)),s("div",G,[l(I,{modelValue:n(a).data,"onUpdate:modelValue":e[3]||(e[3]=t=>n(a).data=t)},null,8,["modelValue"])])]),_:1})]),_:1})])}}});export{P as _};
@@ -1 +1 @@
import{J as b,B as y,C as E,G as w,I as B,D as C}from"./element-plus-D9NzL5HE.js";import{_ as I}from"./add-nav.vue_vue_type_script_setup_true_lang-xpiil8I7.js";import{f as N,ak as k,I as O,a as t,aN as o,J as a,O as u,A as U}from"./@vue/runtime-core-C0pg79pw.js";import{y as s}from"./@vue/reactivity-BIbyPIZJ.js";const g={class:"flex-1"},J=N({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(p,{emit:i}){const f=i,_=p,l=U({get:()=>_.content,set:m=>{f("update:content",m)}});return(m,e)=>{const x=E,c=y,d=b,r=B,v=w,V=C;return k(),O("div",null,[t(V,{"label-width":"70px"},{default:o(()=>[t(d,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[t(c,{label:"标题"},{default:o(()=>[t(x,{class:"w-[396px]",modelValue:s(l).title,"onUpdate:modelValue":e[0]||(e[0]=n=>s(l).title=n)},null,8,["modelValue"])]),_:1})]),_:1}),t(d,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[5]||(e[5]=a("div",{class:"flex items-end mb-4"},[a("div",{class:"text-base text-[#101010] font-medium"},"展示样式")],-1)),t(v,{modelValue:s(l).style,"onUpdate:modelValue":e[1]||(e[1]=n=>s(l).style=n)},{default:o(()=>[t(r,{value:1},{default:o(()=>[...e[3]||(e[3]=[u("横排",-1)])]),_:1}),t(r,{value:2},{default:o(()=>[...e[4]||(e[4]=[u("竖排",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(d,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[6]||(e[6]=a("div",{class:"flex items-end mb-4"},[a("div",{class:"text-base text-[#101010] font-medium"},"菜单"),a("div",{class:"text-xs text-tx-secondary ml-2"},"建议图片尺寸:100px*100px")],-1)),a("div",g,[t(I,{modelValue:s(l).data,"onUpdate:modelValue":e[2]||(e[2]=n=>s(l).data=n)},null,8,["modelValue"])])]),_:1})]),_:1})])}}});export{J as _};
import{J as b,B as y,C as E,G as w,I as B,D as C}from"./element-plus-8nG574Ul.js";import{_ as I}from"./add-nav.vue_vue_type_script_setup_true_lang-CEl0QgUO.js";import{f as N,ak as k,I as O,a as t,aN as o,J as a,O as u,A as U}from"./@vue/runtime-core-C0pg79pw.js";import{y as s}from"./@vue/reactivity-BIbyPIZJ.js";const g={class:"flex-1"},J=N({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(p,{emit:i}){const f=i,_=p,l=U({get:()=>_.content,set:m=>{f("update:content",m)}});return(m,e)=>{const x=E,c=y,d=b,r=B,v=w,V=C;return k(),O("div",null,[t(V,{"label-width":"70px"},{default:o(()=>[t(d,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[t(c,{label:"标题"},{default:o(()=>[t(x,{class:"w-[396px]",modelValue:s(l).title,"onUpdate:modelValue":e[0]||(e[0]=n=>s(l).title=n)},null,8,["modelValue"])]),_:1})]),_:1}),t(d,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[5]||(e[5]=a("div",{class:"flex items-end mb-4"},[a("div",{class:"text-base text-[#101010] font-medium"},"展示样式")],-1)),t(v,{modelValue:s(l).style,"onUpdate:modelValue":e[1]||(e[1]=n=>s(l).style=n)},{default:o(()=>[t(r,{value:1},{default:o(()=>[...e[3]||(e[3]=[u("横排",-1)])]),_:1}),t(r,{value:2},{default:o(()=>[...e[4]||(e[4]=[u("竖排",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(d,{shadow:"never",class:"!border-none flex mt-2"},{default:o(()=>[e[6]||(e[6]=a("div",{class:"flex items-end mb-4"},[a("div",{class:"text-base text-[#101010] font-medium"},"菜单"),a("div",{class:"text-xs text-tx-secondary ml-2"},"建议图片尺寸:100px*100px")],-1)),a("div",g,[t(I,{modelValue:s(l).data,"onUpdate:modelValue":e[2]||(e[2]=n=>s(l).data=n)},null,8,["modelValue"])])]),_:1})]),_:1})])}}});export{J as _};
@@ -1 +1 @@
import{J as E,B as C,G as F,I as N,C as B,D as z}from"./element-plus-D9NzL5HE.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang-_izKWNxN.js";import{_ as I}from"./picker-DnoOFo57.js";import{f as O,ak as r,G as s,aN as t,a as l,O as p,H as i,J as y,A as j}from"./@vue/runtime-core-C0pg79pw.js";import{y as a}from"./@vue/reactivity-BIbyPIZJ.js";const T=O({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(m,{emit:g}){const b=g,x=m,o=j({get:()=>x.content,set:_=>{b("update:content",_)}});return(_,e)=>{const u=N,f=F,d=C,k=B,V=I,v=G,U=E,w=z;return r(),s(w,{ref:"form","label-width":"80px",size:"large"},{default:t(()=>[l(U,{shadow:"never",class:"!border-none flex mt-2"},{default:t(()=>[l(d,{label:"页面标题"},{default:t(()=>[l(f,{modelValue:a(o).title_type,"onUpdate:modelValue":e[0]||(e[0]=n=>a(o).title_type=n)},{default:t(()=>[l(u,{value:"1"},{default:t(()=>[...e[7]||(e[7]=[p("文字",-1)])]),_:1}),l(u,{value:"2"},{default:t(()=>[...e[8]||(e[8]=[p("图片",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),m.content.title_type==1?(r(),s(d,{key:0},{default:t(()=>[l(k,{modelValue:a(o).title,"onUpdate:modelValue":e[1]||(e[1]=n=>a(o).title=n),maxlength:"8","show-word-limit":"",class:"w-[300px]",placeholder:"请输入页面标题"},null,8,["modelValue"])]),_:1})):i("",!0),m.content.title_type==2?(r(),s(d,{key:1},{default:t(()=>[l(V,{modelValue:a(o).title_img,"onUpdate:modelValue":e[2]||(e[2]=n=>a(o).title_img=n),limit:1,size:"100px"},null,8,["modelValue"]),e[9]||(e[9]=y("div",{class:"form-tips"},"建议图片尺寸:300px*40px",-1))]),_:1})):i("",!0),m.content.title_type==1?(r(),s(d,{key:2,label:"文字颜色"},{default:t(()=>[l(f,{modelValue:a(o).text_color,"onUpdate:modelValue":e[3]||(e[3]=n=>a(o).text_color=n)},{default:t(()=>[l(u,{value:"1"},{default:t(()=>[...e[10]||(e[10]=[p("白色",-1)])]),_:1}),l(u,{value:"2"},{default:t(()=>[...e[11]||(e[11]=[p("黑色",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})):i("",!0),l(d,{label:"页面背景"},{default:t(()=>[l(f,{modelValue:a(o).bg_type,"onUpdate:modelValue":e[4]||(e[4]=n=>a(o).bg_type=n)},{default:t(()=>[l(u,{value:"1"},{default:t(()=>[...e[12]||(e[12]=[p("背景颜色",-1)])]),_:1}),l(u,{value:"2"},{default:t(()=>[...e[13]||(e[13]=[p("背景图片",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),m.content.bg_type==1?(r(),s(d,{key:3},{default:t(()=>[l(v,{modelValue:a(o).bg_color,"onUpdate:modelValue":e[5]||(e[5]=n=>a(o).bg_color=n),"reset-color":"#F5F5F5"},null,8,["modelValue"])]),_:1})):i("",!0),m.content.bg_type==2?(r(),s(d,{key:4},{default:t(()=>[l(V,{modelValue:a(o).bg_image,"onUpdate:modelValue":e[6]||(e[6]=n=>a(o).bg_image=n),limit:1,size:"100px"},null,8,["modelValue"]),e[14]||(e[14]=y("div",{class:"form-tips"},"建议图片尺寸:750px*高度不限",-1))]),_:1})):i("",!0)]),_:1})]),_:1},512)}}});export{T as _};
import{J as E,B as C,G as F,I as N,C as B,D as z}from"./element-plus-8nG574Ul.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang-BnjXGEKw.js";import{_ as I}from"./picker-anRkbqwm.js";import{f as O,ak as r,G as s,aN as t,a as l,O as p,H as i,J as y,A as j}from"./@vue/runtime-core-C0pg79pw.js";import{y as a}from"./@vue/reactivity-BIbyPIZJ.js";const T=O({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(m,{emit:g}){const b=g,x=m,o=j({get:()=>x.content,set:_=>{b("update:content",_)}});return(_,e)=>{const u=N,f=F,d=C,k=B,V=I,v=G,U=E,w=z;return r(),s(w,{ref:"form","label-width":"80px",size:"large"},{default:t(()=>[l(U,{shadow:"never",class:"!border-none flex mt-2"},{default:t(()=>[l(d,{label:"页面标题"},{default:t(()=>[l(f,{modelValue:a(o).title_type,"onUpdate:modelValue":e[0]||(e[0]=n=>a(o).title_type=n)},{default:t(()=>[l(u,{value:"1"},{default:t(()=>[...e[7]||(e[7]=[p("文字",-1)])]),_:1}),l(u,{value:"2"},{default:t(()=>[...e[8]||(e[8]=[p("图片",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),m.content.title_type==1?(r(),s(d,{key:0},{default:t(()=>[l(k,{modelValue:a(o).title,"onUpdate:modelValue":e[1]||(e[1]=n=>a(o).title=n),maxlength:"8","show-word-limit":"",class:"w-[300px]",placeholder:"请输入页面标题"},null,8,["modelValue"])]),_:1})):i("",!0),m.content.title_type==2?(r(),s(d,{key:1},{default:t(()=>[l(V,{modelValue:a(o).title_img,"onUpdate:modelValue":e[2]||(e[2]=n=>a(o).title_img=n),limit:1,size:"100px"},null,8,["modelValue"]),e[9]||(e[9]=y("div",{class:"form-tips"},"建议图片尺寸:300px*40px",-1))]),_:1})):i("",!0),m.content.title_type==1?(r(),s(d,{key:2,label:"文字颜色"},{default:t(()=>[l(f,{modelValue:a(o).text_color,"onUpdate:modelValue":e[3]||(e[3]=n=>a(o).text_color=n)},{default:t(()=>[l(u,{value:"1"},{default:t(()=>[...e[10]||(e[10]=[p("白色",-1)])]),_:1}),l(u,{value:"2"},{default:t(()=>[...e[11]||(e[11]=[p("黑色",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})):i("",!0),l(d,{label:"页面背景"},{default:t(()=>[l(f,{modelValue:a(o).bg_type,"onUpdate:modelValue":e[4]||(e[4]=n=>a(o).bg_type=n)},{default:t(()=>[l(u,{value:"1"},{default:t(()=>[...e[12]||(e[12]=[p("背景颜色",-1)])]),_:1}),l(u,{value:"2"},{default:t(()=>[...e[13]||(e[13]=[p("背景图片",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),m.content.bg_type==1?(r(),s(d,{key:3},{default:t(()=>[l(v,{modelValue:a(o).bg_color,"onUpdate:modelValue":e[5]||(e[5]=n=>a(o).bg_color=n),"reset-color":"#F5F5F5"},null,8,["modelValue"])]),_:1})):i("",!0),m.content.bg_type==2?(r(),s(d,{key:4},{default:t(()=>[l(V,{modelValue:a(o).bg_image,"onUpdate:modelValue":e[6]||(e[6]=n=>a(o).bg_image=n),limit:1,size:"100px"},null,8,["modelValue"]),e[14]||(e[14]=y("div",{class:"form-tips"},"建议图片尺寸:750px*高度不限",-1))]),_:1})):i("",!0)]),_:1})]),_:1},512)}}});export{T as _};
@@ -1 +1 @@
import{J as V,B as w,C as x,D as b}from"./element-plus-D9NzL5HE.js";import{_ as g}from"./picker-DnoOFo57.js";import{f as k,ak as E,I as U,a as e,aN as n,J as y,A as B}from"./@vue/runtime-core-C0pg79pw.js";import{y as o}from"./@vue/reactivity-BIbyPIZJ.js";const j=k({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(u,{emit:r}){const p=r,i=u,l=B({get:()=>i.content,set:d=>{p("update:content",d)}});return(d,t)=>{const s=x,m=w,_=g,c=V,f=b;return E(),U("div",null,[e(f,{"label-width":"90px",size:"large","label-position":"top"},{default:n(()=>[e(c,{shadow:"never",class:"!border-none flex mt-2"},{default:n(()=>[e(m,{label:"平台名称"},{default:n(()=>[e(s,{class:"w-[400px]","show-word-limit":"",maxlength:"20",modelValue:o(l).title,"onUpdate:modelValue":t[0]||(t[0]=a=>o(l).title=a)},null,8,["modelValue"])]),_:1}),e(m,{label:"客服二维码"},{default:n(()=>[y("div",null,[e(_,{modelValue:o(l).qrcode,"onUpdate:modelValue":t[1]||(t[1]=a=>o(l).qrcode=a),"exclude-domain":""},null,8,["modelValue"])])]),_:1}),e(m,{label:"备注"},{default:n(()=>[e(s,{class:"w-[400px]","show-word-limit":"",maxlength:"20",modelValue:o(l).remark,"onUpdate:modelValue":t[2]||(t[2]=a=>o(l).remark=a)},null,8,["modelValue"])]),_:1}),e(m,{label:"联系电话"},{default:n(()=>[e(s,{class:"w-[400px]",modelValue:o(l).mobile,"onUpdate:modelValue":t[3]||(t[3]=a=>o(l).mobile=a)},null,8,["modelValue"])]),_:1}),e(m,{label:"服务时间"},{default:n(()=>[e(s,{class:"w-[400px]","show-word-limit":"",maxlength:"20",modelValue:o(l).time,"onUpdate:modelValue":t[4]||(t[4]=a=>o(l).time=a)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})])}}});export{j as _};
import{J as V,B as w,C as x,D as b}from"./element-plus-8nG574Ul.js";import{_ as g}from"./picker-anRkbqwm.js";import{f as k,ak as E,I as U,a as e,aN as n,J as y,A as B}from"./@vue/runtime-core-C0pg79pw.js";import{y as o}from"./@vue/reactivity-BIbyPIZJ.js";const j=k({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(u,{emit:r}){const p=r,i=u,l=B({get:()=>i.content,set:d=>{p("update:content",d)}});return(d,t)=>{const s=x,m=w,_=g,c=V,f=b;return E(),U("div",null,[e(f,{"label-width":"90px",size:"large","label-position":"top"},{default:n(()=>[e(c,{shadow:"never",class:"!border-none flex mt-2"},{default:n(()=>[e(m,{label:"平台名称"},{default:n(()=>[e(s,{class:"w-[400px]","show-word-limit":"",maxlength:"20",modelValue:o(l).title,"onUpdate:modelValue":t[0]||(t[0]=a=>o(l).title=a)},null,8,["modelValue"])]),_:1}),e(m,{label:"客服二维码"},{default:n(()=>[y("div",null,[e(_,{modelValue:o(l).qrcode,"onUpdate:modelValue":t[1]||(t[1]=a=>o(l).qrcode=a),"exclude-domain":""},null,8,["modelValue"])])]),_:1}),e(m,{label:"备注"},{default:n(()=>[e(s,{class:"w-[400px]","show-word-limit":"",maxlength:"20",modelValue:o(l).remark,"onUpdate:modelValue":t[2]||(t[2]=a=>o(l).remark=a)},null,8,["modelValue"])]),_:1}),e(m,{label:"联系电话"},{default:n(()=>[e(s,{class:"w-[400px]",modelValue:o(l).mobile,"onUpdate:modelValue":t[3]||(t[3]=a=>o(l).mobile=a)},null,8,["modelValue"])]),_:1}),e(m,{label:"服务时间"},{default:n(()=>[e(s,{class:"w-[400px]","show-word-limit":"",maxlength:"20",modelValue:o(l).time,"onUpdate:modelValue":t[4]||(t[4]=a=>o(l).time=a)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})])}}});export{j as _};
@@ -1 +1 @@
import{J as j,B as A,C as F,g as J,i as S,D as z}from"./element-plus-D9NzL5HE.js";import{_ as G}from"./index-wQPX7dBB.js";import{_ as H,h as k}from"./index-D54sWaXv.js";import{_ as R}from"./picker-bP9cmZy8.js";import{_ as T}from"./picker-DnoOFo57.js";import{D as q}from"./vuedraggable-C3E4D3Yv.js";import{l as v}from"./lodash-es-BADexyn7.js";import{f as K,ak as c,I as b,a as o,aN as s,J as n,G as u,H as r,O as L,A as M}from"./@vue/runtime-core-C0pg79pw.js";import{y as _}from"./@vue/reactivity-BIbyPIZJ.js";const P={class:"flex-1"},Q={class:"bg-fill-light w-full p-4 mt-4"},W={class:"flex-1"},X={class:"flex-1 flex items-center"},Y={class:"drag-move cursor-move ml-auto"},Z={key:0,class:"mt-4"},f=5,me=K({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})},type:{type:String,default:"mobile"}},emits:["update:content"],setup(m,{emit:y}){const p=y,d=m,g=M({get:()=>d.content,set:a=>{p("update:content",a)}}),w=()=>{var a;if(((a=d.content.data)==null?void 0:a.length)<f){const e=v(d.content);e.data.push({is_show:"1",image:"",name:"",link:{}}),p("update:content",e)}else k.msgError(`最多添加${f}张图片`)},E=a=>{var i;if(((i=d.content.data)==null?void 0:i.length)<=1)return k.msgError("最少保留一张图片");const e=v(d.content);e.data.splice(a,1),p("update:content",e)};return(a,e)=>{const i=T,U=R,C=F,h=A,B=J,D=H,N=G,$=S,I=j,O=z;return c(),b("div",null,[o(O,{"label-width":"70px"},{default:s(()=>[o(I,{shadow:"never",class:"!border-none flex mt-2"},{default:s(()=>{var x;return[e[2]||(e[2]=n("div",{class:"flex items-end"},[n("div",{class:"text-base text-[#101010] font-medium"},"图片设置"),n("div",{class:"text-xs text-tx-secondary ml-2"}," 最多添加5张,建议图片尺寸:750px*200px ")],-1)),n("div",P,[o(_(q),{class:"draggable",modelValue:_(g).data,"onUpdate:modelValue":e[0]||(e[0]=t=>_(g).data=t),animation:"300",handle:".drag-move"},{item:s(({element:t,index:V})=>[(c(),u(N,{key:V,onClose:l=>E(V),class:"w-full"},{default:s(()=>[n("div",Q,[o(i,{width:"396px",height:"196px",modelValue:t.image,"onUpdate:modelValue":l=>t.image=l,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]),n("div",W,[o(h,{class:"mt-[18px]",label:"图片链接"},{default:s(()=>[m.type=="mobile"?(c(),u(U,{key:0,modelValue:t.link,"onUpdate:modelValue":l=>t.link=l},null,8,["modelValue","onUpdate:modelValue"])):r("",!0),m.type=="pc"?(c(),u(C,{key:1,placeholder:"请输入链接",modelValue:t.link.path,"onUpdate:modelValue":l=>t.link.path=l},null,8,["modelValue","onUpdate:modelValue"])):r("",!0)]),_:2},1024),o(h,{label:"是否显示",class:"mt-[18px] !mb-0"},{default:s(()=>[n("div",X,[o(B,{modelValue:t.is_show,"onUpdate:modelValue":l=>t.is_show=l,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),n("div",Y,[o(D,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"])]),((x=m.content.data)==null?void 0:x.length)<f?(c(),b("div",Z,[o($,{class:"w-full",type:"primary",onClick:w},{default:s(()=>[...e[1]||(e[1]=[L("添加图片",-1)])]),_:1})])):r("",!0)]}),_:1})]),_:1})])}}});export{me as _};
import{J as j,B as A,C as F,g as J,i as S,D as z}from"./element-plus-8nG574Ul.js";import{_ as G}from"./index-DL2R2dPV.js";import{_ as H,h as k}from"./index-C2ep5Cm2.js";import{_ as R}from"./picker-DDyyE4Hw.js";import{_ as T}from"./picker-anRkbqwm.js";import{D as q}from"./vuedraggable-C3E4D3Yv.js";import{l as v}from"./lodash-es-BADexyn7.js";import{f as K,ak as c,I as b,a as o,aN as s,J as n,G as u,H as r,O as L,A as M}from"./@vue/runtime-core-C0pg79pw.js";import{y as _}from"./@vue/reactivity-BIbyPIZJ.js";const P={class:"flex-1"},Q={class:"bg-fill-light w-full p-4 mt-4"},W={class:"flex-1"},X={class:"flex-1 flex items-center"},Y={class:"drag-move cursor-move ml-auto"},Z={key:0,class:"mt-4"},f=5,me=K({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})},type:{type:String,default:"mobile"}},emits:["update:content"],setup(m,{emit:y}){const p=y,d=m,g=M({get:()=>d.content,set:a=>{p("update:content",a)}}),w=()=>{var a;if(((a=d.content.data)==null?void 0:a.length)<f){const e=v(d.content);e.data.push({is_show:"1",image:"",name:"",link:{}}),p("update:content",e)}else k.msgError(`最多添加${f}张图片`)},E=a=>{var i;if(((i=d.content.data)==null?void 0:i.length)<=1)return k.msgError("最少保留一张图片");const e=v(d.content);e.data.splice(a,1),p("update:content",e)};return(a,e)=>{const i=T,U=R,C=F,h=A,B=J,D=H,N=G,$=S,I=j,O=z;return c(),b("div",null,[o(O,{"label-width":"70px"},{default:s(()=>[o(I,{shadow:"never",class:"!border-none flex mt-2"},{default:s(()=>{var x;return[e[2]||(e[2]=n("div",{class:"flex items-end"},[n("div",{class:"text-base text-[#101010] font-medium"},"图片设置"),n("div",{class:"text-xs text-tx-secondary ml-2"}," 最多添加5张,建议图片尺寸:750px*200px ")],-1)),n("div",P,[o(_(q),{class:"draggable",modelValue:_(g).data,"onUpdate:modelValue":e[0]||(e[0]=t=>_(g).data=t),animation:"300",handle:".drag-move"},{item:s(({element:t,index:V})=>[(c(),u(N,{key:V,onClose:l=>E(V),class:"w-full"},{default:s(()=>[n("div",Q,[o(i,{width:"396px",height:"196px",modelValue:t.image,"onUpdate:modelValue":l=>t.image=l,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]),n("div",W,[o(h,{class:"mt-[18px]",label:"图片链接"},{default:s(()=>[m.type=="mobile"?(c(),u(U,{key:0,modelValue:t.link,"onUpdate:modelValue":l=>t.link=l},null,8,["modelValue","onUpdate:modelValue"])):r("",!0),m.type=="pc"?(c(),u(C,{key:1,placeholder:"请输入链接",modelValue:t.link.path,"onUpdate:modelValue":l=>t.link.path=l},null,8,["modelValue","onUpdate:modelValue"])):r("",!0)]),_:2},1024),o(h,{label:"是否显示",class:"mt-[18px] !mb-0"},{default:s(()=>[n("div",X,[o(B,{modelValue:t.is_show,"onUpdate:modelValue":l=>t.is_show=l,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),n("div",Y,[o(D,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"])]),((x=m.content.data)==null?void 0:x.length)<f?(c(),b("div",Z,[o($,{class:"w-full",type:"primary",onClick:w},{default:s(()=>[...e[1]||(e[1]=[L("添加图片",-1)])]),_:1})])):r("",!0)]}),_:1})]),_:1})])}}});export{me as _};
@@ -1 +1 @@
import{J as I,B as O,C as j,g as A,i as F,D as J}from"./element-plus-D9NzL5HE.js";import{_ as z}from"./index-wQPX7dBB.js";import{_ as G,h as g}from"./index-D54sWaXv.js";import{_ as H}from"./picker-bP9cmZy8.js";import{_ as R}from"./picker-DnoOFo57.js";import{D as S}from"./vuedraggable-C3E4D3Yv.js";import{l as h}from"./lodash-es-BADexyn7.js";import{f as T,ak as _,I as v,a as t,aN as a,J as s,G as q,O as K,H as L,A as M}from"./@vue/runtime-core-C0pg79pw.js";import{y as p}from"./@vue/reactivity-BIbyPIZJ.js";const P={class:"bg-fill-light flex items-center w-full p-4 mt-4"},Q={class:"ml-3 flex-1"},W={class:"flex-1 flex items-center"},X={class:"drag-move cursor-move ml-auto"},Y={key:0,class:"mt-4"},r=5,de=T({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(u,{emit:b}){const c=b,m=u,f=M({get:()=>m.content,set:l=>{c("update:content",l)}}),k=()=>{var l;if(((l=m.content.data)==null?void 0:l.length)<r){const e=h(m.content);e.data.push({is_show:"1",image:"",name:"",link:{}}),c("update:content",e)}else g.msgError(`最多添加${r}张图片`)},w=l=>{var d;if(((d=m.content.data)==null?void 0:d.length)<=1)return g.msgError("最少保留一张图片");const e=h(m.content);e.data.splice(l,1),c("update:content",e)};return(l,e)=>{const d=R,y=j,i=O,E=H,U=A,C=G,B=z,D=F,N=I,$=J;return _(),v("div",null,[t($,{"label-width":"70px"},{default:a(()=>[t(N,{shadow:"never",class:"!border-none flex mt-2"},{default:a(()=>{var x;return[e[2]||(e[2]=s("div",{class:"flex items-end mb-4"},[s("div",{class:"text-base text-[#101010] font-medium"},"菜单"),s("div",{class:"text-xs text-tx-secondary ml-2"}," 最多添加5张,建议图片尺寸:750px*200px ")],-1)),t(p(S),{class:"draggable",modelValue:p(f).data,"onUpdate:modelValue":e[0]||(e[0]=o=>p(f).data=o),animation:"300",handle:".drag-move","item-key":"index"},{item:a(({element:o,index:V})=>[(_(),q(B,{key:V,onClose:n=>w(V),class:"w-[467px]"},{default:a(()=>[s("div",P,[t(d,{modelValue:o.image,"onUpdate:modelValue":n=>o.image=n,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]),s("div",Q,[t(i,{label:"图片名称"},{default:a(()=>[t(y,{modelValue:o.name,"onUpdate:modelValue":n=>o.name=n,placeholder:"请输入名称"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t(i,{class:"mt-[18px]",label:"图片链接"},{default:a(()=>[t(E,{modelValue:o.link,"onUpdate:modelValue":n=>o.link=n},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t(i,{label:"是否显示",class:"mt-[18px]"},{default:a(()=>[s("div",W,[t(U,{modelValue:o.is_show,"onUpdate:modelValue":n=>o.is_show=n,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),s("div",X,[t(C,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"]),((x=u.content.data)==null?void 0:x.length)<r?(_(),v("div",Y,[t(D,{class:"w-full",type:"primary",onClick:k},{default:a(()=>[...e[1]||(e[1]=[K("添加图片",-1)])]),_:1})])):L("",!0)]}),_:1})]),_:1})])}}});export{de as _};
import{J as I,B as O,C as j,g as A,i as F,D as J}from"./element-plus-8nG574Ul.js";import{_ as z}from"./index-DL2R2dPV.js";import{_ as G,h as g}from"./index-C2ep5Cm2.js";import{_ as H}from"./picker-DDyyE4Hw.js";import{_ as R}from"./picker-anRkbqwm.js";import{D as S}from"./vuedraggable-C3E4D3Yv.js";import{l as h}from"./lodash-es-BADexyn7.js";import{f as T,ak as _,I as v,a as t,aN as a,J as s,G as q,O as K,H as L,A as M}from"./@vue/runtime-core-C0pg79pw.js";import{y as p}from"./@vue/reactivity-BIbyPIZJ.js";const P={class:"bg-fill-light flex items-center w-full p-4 mt-4"},Q={class:"ml-3 flex-1"},W={class:"flex-1 flex items-center"},X={class:"drag-move cursor-move ml-auto"},Y={key:0,class:"mt-4"},r=5,de=T({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},emits:["update:content"],setup(u,{emit:b}){const c=b,m=u,f=M({get:()=>m.content,set:l=>{c("update:content",l)}}),k=()=>{var l;if(((l=m.content.data)==null?void 0:l.length)<r){const e=h(m.content);e.data.push({is_show:"1",image:"",name:"",link:{}}),c("update:content",e)}else g.msgError(`最多添加${r}张图片`)},w=l=>{var d;if(((d=m.content.data)==null?void 0:d.length)<=1)return g.msgError("最少保留一张图片");const e=h(m.content);e.data.splice(l,1),c("update:content",e)};return(l,e)=>{const d=R,y=j,i=O,E=H,U=A,C=G,B=z,D=F,N=I,$=J;return _(),v("div",null,[t($,{"label-width":"70px"},{default:a(()=>[t(N,{shadow:"never",class:"!border-none flex mt-2"},{default:a(()=>{var x;return[e[2]||(e[2]=s("div",{class:"flex items-end mb-4"},[s("div",{class:"text-base text-[#101010] font-medium"},"菜单"),s("div",{class:"text-xs text-tx-secondary ml-2"}," 最多添加5张,建议图片尺寸:750px*200px ")],-1)),t(p(S),{class:"draggable",modelValue:p(f).data,"onUpdate:modelValue":e[0]||(e[0]=o=>p(f).data=o),animation:"300",handle:".drag-move","item-key":"index"},{item:a(({element:o,index:V})=>[(_(),q(B,{key:V,onClose:n=>w(V),class:"w-[467px]"},{default:a(()=>[s("div",P,[t(d,{modelValue:o.image,"onUpdate:modelValue":n=>o.image=n,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]),s("div",Q,[t(i,{label:"图片名称"},{default:a(()=>[t(y,{modelValue:o.name,"onUpdate:modelValue":n=>o.name=n,placeholder:"请输入名称"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t(i,{class:"mt-[18px]",label:"图片链接"},{default:a(()=>[t(E,{modelValue:o.link,"onUpdate:modelValue":n=>o.link=n},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t(i,{label:"是否显示",class:"mt-[18px]"},{default:a(()=>[s("div",W,[t(U,{modelValue:o.is_show,"onUpdate:modelValue":n=>o.is_show=n,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),s("div",X,[t(C,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"]),((x=u.content.data)==null?void 0:x.length)<r?(_(),v("div",Y,[t(D,{class:"w-full",type:"primary",onClick:k},{default:a(()=>[...e[1]||(e[1]=[K("添加图片",-1)])]),_:1})])):L("",!0)]}),_:1})]),_:1})])}}});export{de as _};
@@ -1 +1 @@
import{_ as o}from"./auth.vue_vue_type_script_setup_true_lang-DT4oDhyD.js";import"./element-plus-D9NzL5HE.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-BZWa1PtL.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./menu-Bas3Z9V_.js";import"./index-D54sWaXv.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./role-BUivZ6pi.js";import"./index-epy6JK8p.js";export{o as default};
import{_ as o}from"./auth.vue_vue_type_script_setup_true_lang-in0U3QZ2.js";import"./element-plus-8nG574Ul.js";import"./@vue/runtime-dom-iFk_KP8y.js";import"./lodash-D3kF6u-c.js";import"./@vue/runtime-core-C0pg79pw.js";import"./@vue/reactivity-BIbyPIZJ.js";import"./@vue/shared-mAAVTE9n.js";import"./@element-plus/icons-vue-DLqm99Vy.js";import"./lodash-es-BADexyn7.js";import"./@popperjs/core-C5az9QE8.js";import"./dayjs-DG77mNTn.js";import"./@ctrl/tinycolor-BuyEbX8F.js";import"./async-validator-CFA_igpM.js";import"./normalize-wheel-es-BQoi3Ox2.js";import"./menu-DjZJwqFA.js";import"./index-C2ep5Cm2.js";import"./jspdf-BsthCvR5.js";import"./@babel/runtime-BanGtE2-.js";import"./fflate-_ayOYiT1.js";import"./vue-router-CYz6RFzi.js";import"./pinia-Ba_jX6-d.js";import"./axios-C80V62Fs.js";import"./@vueuse/core-DIKi2bJB.js";import"./@vueuse/shared-D8934tfB.js";import"./css-color-function-DI01JAaZ.js";import"./balanced-match-BdS7OldZ.js";import"./color-B2zxaWkI.js";import"./clone-DBZ6_OiU.js";import"./color-convert-OrFsTA_V.js";import"./color-name-Dju3oUBS.js";import"./color-string-pUQDDJII.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-DByT_rEQ.js";import"./clipboard-CHgxszqY.js";import"./echarts-DYKKs4Al.js";import"./tslib-BDyQ-Jie.js";import"./zrender-CTTuYiLF.js";import"./highlight.js-Bxt7hFFy.js";import"./@highlightjs/vue-plugin-BVMzZUvF.js";import"./role-BmH2pKEX.js";import"./index-D0lFf8Hm.js";export{o as default};

Some files were not shown because too many files have changed in this diff Show More