fix: 新增药师、编辑药师
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
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
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (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
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
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
@@ -92,6 +92,14 @@ function handleWindowPrint(ele, fileName) {
|
|||||||
|
|
||||||
// 解密方法示例(需要根据实际加密方式实现)
|
// 解密方法示例(需要根据实际加密方式实现)
|
||||||
const decrypt = (str: string) => str; // 简单base64解码示例
|
const decrypt = (str: string) => str; // 简单base64解码示例
|
||||||
|
|
||||||
|
const getImageSource = (imageString) => {
|
||||||
|
if (imageString && imageString.includes('http')) {
|
||||||
|
return imageString; // 直接使用HTTP URL
|
||||||
|
} else {
|
||||||
|
return `data:image/jpeg;base64,${imageString}`; // 使用Base64格式
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -200,9 +208,7 @@ const decrypt = (str: string) => str; // 简单base64解码示例
|
|||||||
<label>开方医生:</label>
|
<label>开方医生:</label>
|
||||||
<img
|
<img
|
||||||
v-if="item.doctor_info?.identity_info?.sign_image"
|
v-if="item.doctor_info?.identity_info?.sign_image"
|
||||||
:src="`data:image/jpeg;base64,${
|
:src="getImageSource(item.doctor_info.identity_info.sign_image)"
|
||||||
item.doctor_info.identity_info.sign_image
|
|
||||||
}`"
|
|
||||||
alt="签名"
|
alt="签名"
|
||||||
style="width: 120px; height: 50px; display: inline-block; "
|
style="width: 120px; height: 50px; display: inline-block; "
|
||||||
/>
|
/>
|
||||||
@@ -212,9 +218,7 @@ const decrypt = (str: string) => str; // 简单base64解码示例
|
|||||||
<label>审核药师:</label>
|
<label>审核药师:</label>
|
||||||
<img
|
<img
|
||||||
v-if="item.pharmacist_info?.identity?.sign_image"
|
v-if="item.pharmacist_info?.identity?.sign_image"
|
||||||
:src="`data:image/jpeg;base64,${
|
:src="getImageSource(item.pharmacist_info.identity.sign_image)"
|
||||||
item.pharmacist_info.identity.sign_image
|
|
||||||
}`"
|
|
||||||
alt="签名"
|
alt="签名"
|
||||||
style="width: 120px; height: 50px; display: inline-block"
|
style="width: 120px; height: 50px; display: inline-block"
|
||||||
/>
|
/>
|
||||||
@@ -224,9 +228,7 @@ const decrypt = (str: string) => str; // 简单base64解码示例
|
|||||||
<label>调配人:</label>
|
<label>调配人:</label>
|
||||||
<img
|
<img
|
||||||
v-if="item.doctor_info?.identity_info?.sign_image"
|
v-if="item.doctor_info?.identity_info?.sign_image"
|
||||||
:src="`data:image/jpeg;base64,${
|
:src="getImageSource(item.doctor_info.identity_info.sign_image)"
|
||||||
item.doctor_info.identity_info.sign_image
|
|
||||||
}`"
|
|
||||||
alt="签名"
|
alt="签名"
|
||||||
style="width: 120px; height: 50px; display: inline-block"
|
style="width: 120px; height: 50px; display: inline-block"
|
||||||
/>
|
/>
|
||||||
@@ -236,9 +238,7 @@ const decrypt = (str: string) => str; // 简单base64解码示例
|
|||||||
<label>核对人:</label>
|
<label>核对人:</label>
|
||||||
<img
|
<img
|
||||||
v-if="item.pharmacist_info?.identity?.sign_image"
|
v-if="item.pharmacist_info?.identity?.sign_image"
|
||||||
:src="`data:image/jpeg;base64,${
|
:src="getImageSource(item.pharmacist_info.identity.sign_image)"
|
||||||
item.pharmacist_info.identity.sign_image
|
|
||||||
}`"
|
|
||||||
alt="签名"
|
alt="签名"
|
||||||
style="width: 120px; height: 50px; display: inline-block"
|
style="width: 120px; height: 50px; display: inline-block"
|
||||||
/>
|
/>
|
||||||
@@ -248,9 +248,7 @@ const decrypt = (str: string) => str; // 简单base64解码示例
|
|||||||
<label>发药人:</label>
|
<label>发药人:</label>
|
||||||
<img
|
<img
|
||||||
v-if="item.doctor_info?.identity_info?.sign_image"
|
v-if="item.doctor_info?.identity_info?.sign_image"
|
||||||
:src="`data:image/jpeg;base64,${
|
:src="getImageSource(item.doctor_info.identity_info.sign_image)"
|
||||||
item.doctor_info.identity_info.sign_image
|
|
||||||
}`"
|
|
||||||
alt="签名"
|
alt="签名"
|
||||||
style="width: 120px; height: 50px; display: inline-block"
|
style="width: 120px; height: 50px; display: inline-block"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ export async function getPharmacistInfo(id: number) {
|
|||||||
return requestClient.get<any>(`${prefix}detail`, { params: { id } });
|
return requestClient.get<any>(`${prefix}detail`, { params: { id } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取药师详情 - 编辑
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export async function getPharmacistEditInfoApi(id: number) {
|
||||||
|
return requestClient.get<any>(`${prefix}get-edit-info`, { params: { id } });
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取药师详情
|
* 获取药师详情
|
||||||
* @param id
|
* @param id
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { message, Alert } from 'ant-design-vue';
|
|||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
|
||||||
import { createPharmacist, updatePharmacist } from '../api';
|
import {createPharmacist, getPharmacistEditInfoApi, updatePharmacist} from '../api';
|
||||||
import { infoModalFormProps } from '../config/form';
|
import { infoModalFormProps } from '../config/form';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -50,23 +50,28 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
const { values, update } = modalApi.getData<Record<string, any>>();
|
const { values, update } = modalApi.getData<Record<string, any>>();
|
||||||
if (values) {
|
if (values) {
|
||||||
isUpdate.value = update;
|
isUpdate.value = update;
|
||||||
formApi.setValues(values);
|
getPharmacistEditInfoApi(values.id).then((res) => {
|
||||||
|
formApi.setValues(res);
|
||||||
|
});
|
||||||
|
// formApi.setValues(values);
|
||||||
|
} else {
|
||||||
|
const img = 'https://img2.baidu.com/it/u=3046024791,55863177&fm=253&fmt=auto&app=138&f=JPEG';
|
||||||
|
formApi.setValues({
|
||||||
|
name: '测试药师',
|
||||||
|
mobile: '15110000000',
|
||||||
|
idcard: '134111000022225555',
|
||||||
|
type: 1,
|
||||||
|
sign_type: 2,
|
||||||
|
qualification: img,
|
||||||
|
practicing: img,
|
||||||
|
title: img,
|
||||||
|
card_up: img,
|
||||||
|
card_down: img,
|
||||||
|
sign_image: 'http://demo-1.nailaoyun.cn/p/image/qm1.png',
|
||||||
|
avatar: img,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const img = 'https://img2.baidu.com/it/u=3046024791,55863177&fm=253&fmt=auto&app=138&f=JPEG';
|
|
||||||
formApi.setValues({
|
|
||||||
name: '测试药师',
|
|
||||||
mobile: '15110000000',
|
|
||||||
idcard: '134111000022225555',
|
|
||||||
type: 1,
|
|
||||||
sign_type: 2,
|
|
||||||
qualification: img,
|
|
||||||
practicing: img,
|
|
||||||
title: img,
|
|
||||||
card_up: img,
|
|
||||||
card_down: img,
|
|
||||||
sign_image: img,
|
|
||||||
avatar: img,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,6 +76,16 @@ export const infoModalFormProps: VbenFormProps = {
|
|||||||
triggerFields: ['id'],
|
triggerFields: ['id'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
component: 'VbenInput',
|
||||||
|
fieldName: 'su_id',
|
||||||
|
label: 'WxID',
|
||||||
|
formItemClass: 'col-span-6',
|
||||||
|
dependencies: {
|
||||||
|
show: false,
|
||||||
|
triggerFields: ['id'],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'otherinfo',
|
fieldName: 'otherinfo',
|
||||||
label: '基础信息',
|
label: '基础信息',
|
||||||
@@ -121,6 +131,10 @@ export const infoModalFormProps: VbenFormProps = {
|
|||||||
placeholder: '请选择诊所',
|
placeholder: '请选择诊所',
|
||||||
model: 'multiple',
|
model: 'multiple',
|
||||||
},
|
},
|
||||||
|
dependencies: {
|
||||||
|
show: false,
|
||||||
|
triggerFields: ['id'],
|
||||||
|
},
|
||||||
fieldName: 'store_id',
|
fieldName: 'store_id',
|
||||||
formItemClass: 'col-span-6',
|
formItemClass: 'col-span-6',
|
||||||
label: '诊所',
|
label: '诊所',
|
||||||
@@ -175,6 +189,10 @@ export const infoModalFormProps: VbenFormProps = {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请填写身份证',
|
placeholder: '请填写身份证',
|
||||||
},
|
},
|
||||||
|
dependencies: {
|
||||||
|
show: false,
|
||||||
|
triggerFields: ['id'],
|
||||||
|
},
|
||||||
fieldName: 'idcard',
|
fieldName: 'idcard',
|
||||||
formItemClass: 'col-span-6',
|
formItemClass: 'col-span-6',
|
||||||
label: '身份证',
|
label: '身份证',
|
||||||
@@ -215,6 +233,10 @@ export const infoModalFormProps: VbenFormProps = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
dependencies: {
|
||||||
|
show: false,
|
||||||
|
triggerFields: ['id'],
|
||||||
|
},
|
||||||
fieldName: 'sign_type',
|
fieldName: 'sign_type',
|
||||||
formItemClass: 'col-span-6',
|
formItemClass: 'col-span-6',
|
||||||
label: '签名类型',
|
label: '签名类型',
|
||||||
|
|||||||
@@ -172,6 +172,14 @@ const refuse = (id: number) => {
|
|||||||
// auth: ['pharmacist', 'sys:role:detail'],
|
// auth: ['pharmacist', 'sys:role:detail'],
|
||||||
onClick: showPharmacistDetailModal.bind(null, row),
|
onClick: showPharmacistDetailModal.bind(null, row),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
type: 'link',
|
||||||
|
icon: 'uil:edit',
|
||||||
|
size: 'small',
|
||||||
|
// auth: ['pharmacist', 'sys:role:detail'],
|
||||||
|
onClick: showModal.bind(null, row),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '绑定诊所',
|
label: '绑定诊所',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
|
|||||||
Reference in New Issue
Block a user