fix: 问题修复
This commit is contained in:
parent
4079f52ed6
commit
b2e9102e78
@ -25,7 +25,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.svg'))
|
||||
const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.png'))
|
||||
|
||||
const size = computed(() => {
|
||||
const val = Number.isInteger(props.size) && props.size > 0 ? props.size : 144;
|
||||
|
||||
@ -86,6 +86,31 @@ function confirm() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品要求, 编辑的情况下 姓名、身份证号、性别、年龄、出生年月
|
||||
* 建档成功或者绑定档案成功后,姓名、身份证号、性别、年龄、出生年月。如果有内容的都不允许修改。没有内容的则允许编辑。
|
||||
* @param data
|
||||
*/
|
||||
async function setDisabledTitles(data) {
|
||||
const list = ['mobile'];
|
||||
if (data.name) {
|
||||
list.push('name');
|
||||
}
|
||||
if (data.idCard) {
|
||||
list.push('idCard');
|
||||
}
|
||||
if (data.sex) {
|
||||
list.push('sex');
|
||||
}
|
||||
if (data.age) {
|
||||
list.push('age');
|
||||
}
|
||||
if (data.birthday) {
|
||||
list.push('birthday');
|
||||
}
|
||||
disableTitles.value = list;
|
||||
}
|
||||
|
||||
async function addArchive() {
|
||||
if (loading.value) return;
|
||||
loading.value = true;
|
||||
@ -163,6 +188,7 @@ async function getCustomer() {
|
||||
const res = await api('getCustomerByCustomerId', { customerId: customerId.value });
|
||||
if (res && res.success && res.data) {
|
||||
customer.value = res.data;
|
||||
setDisabledTitles(res.data)
|
||||
} else {
|
||||
await toast(res?.message || '查询档案信息失败');
|
||||
uni.navigateBack();
|
||||
|
||||
@ -111,7 +111,19 @@ function handleItemClick(item) {
|
||||
|
||||
// 确认选择咨询人
|
||||
async function handleConsultantConfirm(customer) {
|
||||
console.log("选择的咨询人:", customer);
|
||||
const teamIds = customer && Array.isArray(customer.teamId) ? customer.teamId : [];
|
||||
if (!teamIds.includes(props.teamId)) {
|
||||
const res = await api("authCustomerToTeam", {
|
||||
corpId: props.team.corpId,
|
||||
teamId: props.team.teamId,
|
||||
id: customer._id,
|
||||
});
|
||||
if (res && res.success) {
|
||||
uni.$emit("reloadTeamCustomers");
|
||||
} else {
|
||||
toast(res?.message || "授权团队失败");
|
||||
}
|
||||
}
|
||||
// 调用创建咨询群组接口
|
||||
uni.showLoading({ title: "创建咨询中..." });
|
||||
try {
|
||||
|
||||
@ -18,19 +18,11 @@
|
||||
</view>
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="flex flex-nowrap pb-5">
|
||||
<view
|
||||
v-for="i in customers"
|
||||
:key="i._id"
|
||||
class="customer-card flex-shrink-0 mr-15 relative"
|
||||
:class="current && i._id === current._id ? 'current-customer' : ''"
|
||||
@click="toggle(i)"
|
||||
>
|
||||
<view v-for="i in customers" :key="i._id" class="customer-card flex-shrink-0 mr-15 relative"
|
||||
:class="current && i._id === current._id ? 'current-customer' : ''" @click="toggle(i)">
|
||||
<!-- 关系标签 -->
|
||||
<view
|
||||
v-if="i.relationship"
|
||||
class="relationship-tag"
|
||||
:class="i.relationship === '本人' ? 'tag-blue' : 'tag-green'"
|
||||
>
|
||||
<view v-if="i.relationship" class="relationship-tag"
|
||||
:class="i.relationship === '本人' ? 'tag-blue' : 'tag-green'">
|
||||
{{ i.relationship }}
|
||||
</view>
|
||||
<view class="flex flex-col items-center">
|
||||
@ -40,27 +32,18 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选中状态底部条和三角 -->
|
||||
<view
|
||||
v-if="current && i._id === current._id"
|
||||
class="active-indicator"
|
||||
>
|
||||
<view v-if="current && i._id === current._id" class="active-indicator">
|
||||
<view class="active-bar"></view>
|
||||
<view class="active-triangle"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view
|
||||
v-if="canAuth"
|
||||
class="px-10 py-5 mt-5 flex items-center bg-danger rounded-sm"
|
||||
>
|
||||
<view v-if="canAuth" class="px-10 py-5 mt-5 flex items-center bg-danger rounded-sm">
|
||||
<view class="mr-5 w-0 flex-grow text-base text-white">
|
||||
点击右侧授权按钮, 我们将更精准的为您服务
|
||||
</view>
|
||||
<view
|
||||
class="px-12 py-5 text-base rounded-sm text-dark bg-white"
|
||||
@click="auth()"
|
||||
>
|
||||
<view class="px-12 py-5 text-base rounded-sm text-dark bg-white" @click="auth()">
|
||||
授权
|
||||
</view>
|
||||
</view>
|
||||
@ -70,32 +53,18 @@
|
||||
<view class="info-content">
|
||||
<view class="flex items-center justify-between mb-8">
|
||||
<view class="info-title">个人基本信息</view>
|
||||
<image
|
||||
class="arrow-icon-small"
|
||||
src="/static/home/arrow-right-blue.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image class="arrow-icon-small" src="/static/home/arrow-right-blue.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view v-if="baseInfoError" class="text-sm text-danger"
|
||||
>请完善您的个人信息</view
|
||||
>
|
||||
<view v-if="baseInfoError" class="text-sm text-danger">请完善您的个人信息</view>
|
||||
<view v-else class="info-subtitle">完善个人信息</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="hasHealthTemp"
|
||||
class="ml-10 info-card-new flex-grow"
|
||||
@click="toHealthList()"
|
||||
>
|
||||
<view v-if="hasHealthTemp" class="ml-10 info-card-new flex-grow" @click="toHealthList()">
|
||||
<view class="info-bg info-bg-health"></view>
|
||||
<view class="info-content">
|
||||
<view class="flex items-center justify-between mb-8">
|
||||
<view class="info-title">健康信息</view>
|
||||
<image
|
||||
class="arrow-icon-small"
|
||||
src="/static/home/arrow-right-blue.png"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image class="arrow-icon-small" src="/static/home/arrow-right-blue.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="info-subtitle">上传健康档案</view>
|
||||
</view>
|
||||
@ -159,11 +128,7 @@ const baseInfo = computed(() =>
|
||||
? qrcode.value.teamFileds.baseInfo
|
||||
: []
|
||||
);
|
||||
const baseInfoError = computed(() => {
|
||||
const requiredTitles = baseInfo.value
|
||||
.map((i) => i.title);
|
||||
return current.value && requiredTitles.some((i) => !current.value[i]);
|
||||
});
|
||||
const baseInfoError = computed(() => current.value && baseInfo.value.some((i) => i.title && !current.value[i.title]));
|
||||
|
||||
function fillBaseInfo() {
|
||||
if (canAuth.value) {
|
||||
@ -179,12 +144,10 @@ function toHealthList() {
|
||||
if (canAuth.value) {
|
||||
toast("请先授权本服务团队");
|
||||
} else {
|
||||
const name = `${current.value.name} ${
|
||||
current.value.relationship ? `(${current.value.relationship})` : ""
|
||||
const name = `${current.value.name} ${current.value.relationship ? `(${current.value.relationship})` : ""
|
||||
}`;
|
||||
uni.navigateTo({
|
||||
url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${
|
||||
props.corpId
|
||||
url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId
|
||||
}&id=${current.value._id}&name=${encodeURIComponent(name)}`,
|
||||
});
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<view v-for="i in teamates" :key="i.userid"
|
||||
class="member-card flex flex-shrink-0 min-w-120 mr-15 p-15"
|
||||
@click="toHomePage(i)">
|
||||
<image class="flex-shrink-0 avatar mr-10" :src="i.avatar || '/static/default-avatar.svg'" />
|
||||
<image class="flex-shrink-0 avatar mr-10" :src="i.avatar || '/static/default-avatar.png'" />
|
||||
<view class="flex-grow flex flex-col justify-between">
|
||||
<view>
|
||||
<view class="member-name leading-normal h-24 text-base font-semibold text-dark whitespace-nowrap">
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const emit = defineEmits(['accept', 'reject']);
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const emit = defineEmits(['apply']);
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const emit = defineEmits(['cancel']);
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ export default function useGroupAvatars() {
|
||||
const groupAvatarMap = ref({}) // { groupID: [avatarUrl1, avatarUrl2, ...] }
|
||||
const teamStore = useTeamStore()
|
||||
const patientDefaultAvatar = '/static/default-patient-avatar.png'
|
||||
const teamMemberDefaultAvatar = '/static/default-avatar.svg'
|
||||
const teamMemberDefaultAvatar = '/static/default-avatar.png'
|
||||
|
||||
/**
|
||||
* 获取单个群聊的头像列表
|
||||
|
||||
@ -49,8 +49,8 @@ export default function useGroupChat(groupID) {
|
||||
if (!member) {
|
||||
// 如果找不到成员信息,根据是否为团队成员返回默认头像
|
||||
// 患者(userId为当前账户openid)使用 default-patient-avatar.png
|
||||
// 其他情况使用 default-avatar.svg
|
||||
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.svg'
|
||||
// 其他情况使用 default-avatar.png
|
||||
return userId === openid.value ? '/static/default-patient-avatar.png' : '/static/default-avatar.png'
|
||||
}
|
||||
|
||||
// 如果有头像且不为空字符串,返回头像
|
||||
@ -59,8 +59,8 @@ export default function useGroupChat(groupID) {
|
||||
}
|
||||
|
||||
// 否则根据是否为团队成员返回默认头像
|
||||
// 患者使用 default-patient-avatar.png,团队成员使用 default-avatar.svg
|
||||
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
|
||||
// 患者使用 default-patient-avatar.png,团队成员使用 default-avatar.png
|
||||
return member.isTeamMember ? '/static/default-avatar.png' : '/static/default-patient-avatar.png'
|
||||
}
|
||||
|
||||
// 获取群聊信息和成员头像
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="flex flex-col justify-center h-full bg-white">
|
||||
<view>
|
||||
<view class="flex flex-col justify-center items-center h-full bg-white">
|
||||
<image class="service-qrcode" src="/static/service-qrcode.jpg" />
|
||||
<!-- <view>
|
||||
<view class="mb-10 text-dark text-lg font-semibold text-center mb-10">
|
||||
柚康企微客服
|
||||
</view>
|
||||
@ -13,7 +14,7 @@
|
||||
<view class="mt-10 px-15 text-base text-dark leading-normal text-center">
|
||||
我们将为您提供软件使用咨询服务,并支持补充病历、宣教、问卷、回访等多种工作模板。
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -22,5 +23,8 @@ const options = { margin: 10 }
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Using global styles from App.vue */
|
||||
.service-qrcode {
|
||||
width: 750rpx;
|
||||
height: 977rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view v-if="member" class="flex flex-col h-full items-center justify-center">
|
||||
<view class="business-card">
|
||||
<view class="flex">
|
||||
<image class="mr-10 avatar" :src="member.avatar || '/static/default-avatar.svg'"></image>
|
||||
<image class="mr-10 avatar" :src="member.avatar || '/static/default-avatar.png'"></image>
|
||||
<view class="w-0 flex-grow leading-normal">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-5 text-lg font-semibold text-dark">{{ member.anotherName }}</view>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</view>
|
||||
<view v-for="i in teammate.leaders" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm"
|
||||
@click="toHomePage(i.userid)">
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'"></image>
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'"></image>
|
||||
<view class="w-0 flex-grow leading-normal">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view>
|
||||
@ -45,7 +45,7 @@
|
||||
</view>
|
||||
<view v-for="i in teammate.members" :key="i._id" class="mt-12 flex p-10 border-primary rounded-sm"
|
||||
@click="toHomePage(i.userid)">
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'"></image>
|
||||
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'"></image>
|
||||
<view class="w-0 flex-grow leading-normal">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="flex-shrink-0 mr-5 view-lg text-dark font-semibold">{{ i.anotherName }}</view>
|
||||
@ -83,7 +83,7 @@ const { memberJob, memberList: list } = useJob();
|
||||
|
||||
const memberList = computed(() => team.value && Array.isArray(team.value.memberList) ? team.value.memberList : [])
|
||||
|
||||
const avatarList = computed(() => memberList.value.map(i => i.avatar || '/static/default-avatar.svg').filter(Boolean))
|
||||
const avatarList = computed(() => memberList.value.map(i => i.avatar || '/static/default-avatar.png').filter(Boolean))
|
||||
|
||||
const teammate = computed(() => {
|
||||
const memberLeaderList = team.value && Array.isArray(team.value.memberLeaderList) ? team.value.memberLeaderList : [];
|
||||
|
||||
BIN
static/service-qrcode.jpg
Normal file
BIN
static/service-qrcode.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@ -111,6 +111,8 @@ export default defineStore("accountStore", () => {
|
||||
const corpId = account.value?.corpId;
|
||||
const unionid = account.value?.unionid;
|
||||
const openid = account.value?.openid;
|
||||
console.clear()
|
||||
console.log('corpId', corpId, ',unionid', unionid, ',openid', openid)
|
||||
if (!(corpId && unionid && openid) || externalUserId.value) return;
|
||||
const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId }, false);
|
||||
if (res && res.success && typeof res.data === 'string' && res.data.trim()) {
|
||||
|
||||
@ -144,7 +144,7 @@ function mergeConversationData(conversation, groupDetailsMap) {
|
||||
name: formatConversationName(groupDetail),
|
||||
|
||||
// 更新头像(优先使用已有头像,避免闪动)
|
||||
avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.svg'
|
||||
avatar: conversation.avatar || groupDetail.patient?.avatar || '/static/default-avatar.png'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2625,7 +2625,7 @@ class TimChatManager {
|
||||
conversationID,
|
||||
groupID,
|
||||
name: patientName ? `${patientName}的问诊` : groupName || '问诊群聊',
|
||||
avatar: '/static/default-avatar.svg',
|
||||
avatar: '/static/default-avatar.png',
|
||||
lastMessage,
|
||||
lastMessageTime,
|
||||
unreadCount: conversation.unreadCount || 0,
|
||||
@ -2638,7 +2638,7 @@ class TimChatManager {
|
||||
conversationID: conversation.conversationID,
|
||||
groupID: conversation.conversationID?.replace('GROUP', '') || '',
|
||||
name: '问诊群聊',
|
||||
avatar: '/static/default-avatar.svg',
|
||||
avatar: '/static/default-avatar.png',
|
||||
lastMessage: '暂无消息',
|
||||
lastMessageTime: Date.now(),
|
||||
unreadCount: 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user