feat: 2.4版本开发

This commit is contained in:
huxuejian 2026-05-13 20:43:00 +08:00
parent cd74929a41
commit dc28585715
6 changed files with 120 additions and 6 deletions

View File

@ -20,7 +20,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;

View File

@ -19,7 +19,7 @@
</view>
</view>
<view v-for="i in teammates" :key="i._id" class="mb-10 p-10 border rounded flex">
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.svg'" />
<image class="flex-shrink-0 mr-10 avatar" :src="i.avatar || '/static/default-avatar.png'" />
<view class="w-0 flex-grow">
<view class="flex items-center">
<view class="mr-5 text-lg font-semibold text-dark truncate">{{ i.anotherName }}</view>

View File

@ -0,0 +1,86 @@
<template>
<uni-popup ref="popup" type="bottom" :mask-click="false">
<view class="bg-white overflow-hidden pb-10" style="width: 750rpx;">
<view class="px-15 py-12 text-center text-lg font-semibold text-dark border-b">
咨询设置
</view>
<view class="flex items-center justify-between p-15 border-b">
<view class="text-base text-dark">自动通过申请</view>
<switch color="#0074ff" :checked="autoAcceptConsult" @change="change($event)"></switch>
</view>
<button-footer :showShadow="false" confirmText="确定" @cancel="close" @confirm="save()" />
</view>
</uni-popup>
</template>
<script setup>
import { ref, watch } from 'vue';
import api from "@/utils/api.js";
import buttonFooter from '@/components/button-footer.vue';
import { toast } from '@/utils/widget.js';
const emits = defineEmits(['close'])
const props = defineProps({
teamId: {
type: String,
default: ''
},
visible: {
type: Boolean,
default: false
}
})
const popup = ref();
const autoAcceptConsult = ref(false);
function change(e) {
autoAcceptConsult.value = e.detail.value;
}
async function getAccpetStatus() {
if (!props.teamId) {
autoAcceptConsult.value = false
return
}
const res = await api('getAutoAcceptConsult', {
teamId: props.teamId
})
autoAcceptConsult.value = res && typeof res.data === 'boolean' ? res.data : false
}
async function save() {
const res = await api('updateAutoAcceptConsult', {
teamId: props.teamId,
autoAcceptConsult: autoAcceptConsult.value
})
if (res && res.success) {
toast('操作成功')
close()
} else {
toast(res?.message || '操作失败')
}
}
function close() {
emits('close')
}
watch(() => props.visible, n => {
if (n) {
popup.value && popup.value.open()
getAccpetStatus()
} else {
popup.value && popup.value.close()
}
})
</script>
<style lang="scss" scoped>
.mt-5 {
margin-top: 10rpx;
}
.leading-24 {
line-height: 48rpx;
}
</style>

View File

@ -9,7 +9,8 @@
<view class="team-name text-lg font-semibold truncate mr-5">
{{ i.name }}
</view>
<view v-if="doctorInfo && i.creator === doctorInfo.userid" class="flex-shrink-0 text-base text-primary">(我创建的)</view>
<view v-if="doctorInfo && i.creator === doctorInfo.userid" class="flex-shrink-0 text-base text-primary">(我创建的)
</view>
<view v-else class="flex-shrink-0 text-base text-warning">(我加入的)</view>
<!-- <image v-if="doctorInfo && i.creator === doctorInfo.userid" class="flex-shrink-0 role-tag"
src="/static/icon-owner.svg" />
@ -28,12 +29,18 @@
<image class="mb-5 qrcode" src="/static/work/qrcode.svg" />
<view class="w-full text-sm text-dark text-center">邀请成员</view>
</view>
<view v-if="doctorInfo && i.creator === doctorInfo.userid"
class="setting-btn flex-shrink-0 flex flex-col items-center justify-center" @click.stop="showSetting(i)">
<image class="mb-5 qrcode" src="/static/setting.svg" />
<view class="w-full text-sm text-dark text-center">设置</view>
</view>
</view>
<template #footer>
<button-footer confirmText="创建团队" :showCancel="false" @confirm="toCreate()" />
</template>
</full-page>
<notice-popup :visible="visible" @close="visible = false" />
<setting-popup :visible="settingVisible" @close="settingVisible = false" :teamId="current.teamId" />
</template>
<script setup>
import { computed, ref } from "vue";
@ -46,17 +53,25 @@ import buttonFooter from '@/components/button-footer.vue';
import emptyData from "@/components/empty-data.vue";
import fullPage from '@/components/full-page.vue';
import noticePopup from './notice-popup.vue';
import settingPopup from './setting-popup.vue';
const { useLoad, useShow } = useGuard();
const { doctorInfo, account } = storeToRefs(useAccountStore());
const list = ref([]);
const visible = ref(false);
const settingVisible = ref(false);
const current = ref({});
function invite(team) {
uni.navigateTo({ url: `/pages/work/team/invite/invite-teammate?teamId=${team.teamId || ''}` })
// uni.navigateTo({ url: `/pages/work/team/invite/invite-patient?teamId=${team.teamId || ''}` })
}
function showSetting(team) {
current.value = team;
settingVisible.value = true;
}
function toCreate() {
uni.navigateTo({ url: '/pages/work/team/edit/team-edit' })
}
@ -99,12 +114,22 @@ useShow(() => {
}
.qrcode {
width: 60rpx;
height: 60rpx;
width: 42rpx;
height: 42rpx;
}
.role-tag {
width: 36rpx;
height: 36rpx;
}
.setting-btn {
flex-shrink: 0;
padding-left: 20rpx;
}
.icon-setting {
width: 36rpx;
height: 36rpx;
}
</style>

1
static/setting.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1778673074528" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5577" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 672c-88.2 0-160-71.8-160-160s71.8-160 160-160 160 71.8 160 160-71.8 160-160 160z m0-256c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96z" fill="#243154" p-id="5578"></path><path d="M375.3 972.5c-16.3 0-32.8-4.1-47.8-12.8l-110.8-64c-45.8-26.5-61.6-85.3-35.1-131.2l35.4-61.3c-6.7-10.2-12.8-20.7-18.2-31.3H128c-52.9 0-96-43.1-96-96V448c0-52.9 43.1-96 96-96h70.6c5.5-10.6 11.5-21 18.2-31.3l-35.4-61.3c-12.8-22.1-16.2-48-9.5-72.8s22.5-45.5 44.7-58.3l110.8-64c45.8-26.4 104.7-10.7 131.1 35.1l35.3 61.1c12.4-0.7 23.9-0.7 36.3 0l35.3-61.1c26.5-45.8 85.2-61.7 131.1-35.1l110.8 64c22.2 12.8 38 33.5 44.7 58.3s3.3 50.7-9.5 72.8l-35.4 61.3c6.7 10.2 12.8 20.7 18.2 31.3H896c52.9 0 96 43.1 96 96v128c0 52.9-43.1 96-96 96h-70.6c-5.5 10.6-11.5 21-18.2 31.3l35.4 61.3c26.5 45.8 10.7 104.7-35.1 131.1l-110.8 64c-45.9 26.4-104.7 10.7-131.1-35.2l-35.3-61.1c-12.4 0.7-23.9 0.7-36.3 0l-35.3 61.1c-17.9 30.8-50.2 48-83.4 48zM128 416c-17.6 0-32 14.4-32 32v128c0 17.6 14.4 32 32 32h90.8c12.7 0 24.2 7.5 29.3 19.2 8.3 19.1 19.2 37.7 32.3 55.5 7.5 10.2 8.3 24 2 35l-45.5 78.9c-4.3 7.3-5.4 16-3.1 24.3 2.2 8.3 7.5 15.2 14.8 19.5l110.8 64c15.3 8.8 34.9 3.6 43.7-11.7l45.4-78.7c6.4-11 18.6-17.2 31.2-15.8 21.2 2.3 43.3 2.3 64.4 0 12.6-1.4 24.9 4.8 31.2 15.8l45.4 78.7c8.8 15.3 28.4 20.5 43.7 11.7l110.8-64c7.3-4.2 12.6-11.1 14.8-19.5 2.2-8.3 1.1-16.9-3.1-24.3l-45.5-78.9c-6.4-11-5.6-24.8 2-35 13.1-17.8 24-36.4 32.3-55.5 5.1-11.7 16.6-19.2 29.3-19.2h91c17.6 0 32-14.4 32-32V448c0-17.6-14.4-32-32-32h-90.8c-12.7 0-24.2-7.5-29.3-19.2-8.3-19.1-19.2-37.7-32.3-55.5-7.5-10.2-8.3-24-2-35l45.5-78.9c4.3-7.3 5.4-16 3.1-24.3-2.2-8.3-7.5-15.2-14.8-19.5l-110.8-64c-15.3-8.9-34.9-3.6-43.7 11.7L575.5 210c-6.4 11-18.6 17.2-31.2 15.8-21.2-2.3-43.3-2.3-64.4 0-12.6 1.4-24.9-4.8-31.2-15.8l-45.4-78.7c-8.8-15.3-28.4-20.5-43.7-11.7l-110.8 64c-7.3 4.2-12.6 11.1-14.8 19.5-2.2 8.3-1.1 16.9 3.1 24.2l45.5 78.9c6.4 11 5.6 24.8-2 35-13.1 17.8-24 36.4-32.3 55.5-5.1 11.7-16.6 19.2-29.3 19.2h-91z" fill="#243154" p-id="5579"></path></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -34,7 +34,9 @@ const urlsConfig = {
getTeamMemberAvatarsAndName: 'getTeamMemberAvatarsAndName',
getHlwDeptTree: 'getHlwDeptTree',
getAllHlwDeptList: "getAllHlwDeptList",
getHlwHospitalList: 'getHlwHospitalList'
getHlwHospitalList: 'getHlwHospitalList',
updateAutoAcceptConsult: 'updateAutoAcceptConsult',
getAutoAcceptConsult: 'getAutoAcceptConsult',
},
knowledgeBase: {