1. 医生新增测试医生
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
2. 回调分账链路的注释 3. 减少首页访问的时候数据返回量
This commit is contained in:
@@ -76,6 +76,11 @@ export async function updateDoctorTitleBindApi(data: Record<string, any>) {
|
|||||||
return requestClient.post<any>(`${prefix}update-title-bind`, data);
|
return requestClient.post<any>(`${prefix}update-title-bind`, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** doctor_id 为 su_id,更新是否为测试医生 */
|
||||||
|
export async function updateDoctorIsTestApi(data: Record<string, any>) {
|
||||||
|
return requestClient.post<any>(`${prefix}update-is-test`, data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增医生
|
* 新增医生
|
||||||
* @param data
|
* @param data
|
||||||
|
|||||||
@@ -1,13 +1,42 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Avatar, Button } from 'ant-design-vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { Avatar, Button, message, Switch, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import SensitiveText from '#/components/sensitive-text/SensitiveText.vue';
|
import SensitiveText from '#/components/sensitive-text/SensitiveText.vue';
|
||||||
import { resolveAvatarUrl } from '#/views/system/store-input/utils/inputUser';
|
import { resolveAvatarUrl } from '#/views/system/store-input/utils/inputUser';
|
||||||
|
|
||||||
defineProps<{
|
import { updateDoctorIsTestApi } from '../../api';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
row: Record<string, any>;
|
row: Record<string, any>;
|
||||||
onOpenCard: (row: Record<string, any>) => void;
|
onOpenCard: (row: Record<string, any>) => void;
|
||||||
|
onRefresh?: () => void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const switchLoading = ref(false);
|
||||||
|
|
||||||
|
/** 切换测试医生标记,保存后立即生效于患者端列表过滤 */
|
||||||
|
async function handleTestChange(checked: boolean | string | number) {
|
||||||
|
const suId = props.row?.su_id;
|
||||||
|
if (suId == null) {
|
||||||
|
message.error('缺少医生信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const isTest = checked === true || checked === 1 || checked === '1' ? 1 : 0;
|
||||||
|
switchLoading.value = true;
|
||||||
|
try {
|
||||||
|
await updateDoctorIsTestApi({
|
||||||
|
doctor_id: suId,
|
||||||
|
is_test: isTest,
|
||||||
|
});
|
||||||
|
props.row.is_test = isTest;
|
||||||
|
message.success('保存成功');
|
||||||
|
props.onRefresh?.();
|
||||||
|
} finally {
|
||||||
|
switchLoading.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -25,6 +54,9 @@ defineProps<{
|
|||||||
>
|
>
|
||||||
{{ row.name || '-' }}
|
{{ row.name || '-' }}
|
||||||
</Button>
|
</Button>
|
||||||
|
<Tag v-if="Number(row.is_test) === 1" color="orange" class="shrink-0">
|
||||||
|
测试医生
|
||||||
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="doctor-basic-info__grid">
|
<div class="doctor-basic-info__grid">
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
@@ -41,6 +73,17 @@ defineProps<{
|
|||||||
<span class="info-item__value">{{ row.su_id ?? '-' }}</span>
|
<span class="info-item__value">{{ row.su_id ?? '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="doctor-basic-info__test">
|
||||||
|
<span class="info-item__label">测试</span>
|
||||||
|
<Switch
|
||||||
|
:checked="Number(row.is_test) === 1"
|
||||||
|
:loading="switchLoading"
|
||||||
|
checked-children="是"
|
||||||
|
un-checked-children="否"
|
||||||
|
size="small"
|
||||||
|
@change="handleTestChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -71,6 +114,14 @@ defineProps<{
|
|||||||
gap: 4px 8px;
|
gap: 4px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.doctor-basic-info__test {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.info-item {
|
.info-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -173,7 +173,11 @@ const refuse = (id: number) => {
|
|||||||
</TableAction>
|
</TableAction>
|
||||||
</template>
|
</template>
|
||||||
<template #doctor_basic_info="{ row }">
|
<template #doctor_basic_info="{ row }">
|
||||||
<DoctorBasicInfoCell :row="row" :on-open-card="showDoctorCard" />
|
<DoctorBasicInfoCell
|
||||||
|
:row="row"
|
||||||
|
:on-open-card="showDoctorCard"
|
||||||
|
:on-refresh="() => gridApi.query()"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #doctor_professional_info="{ row }">
|
<template #doctor_professional_info="{ row }">
|
||||||
<DoctorProfessionalInfoCell
|
<DoctorProfessionalInfoCell
|
||||||
|
|||||||
Reference in New Issue
Block a user