fix: 诊所管理

This commit is contained in:
2025-04-01 19:13:44 +08:00
parent ffd9a0c6e3
commit 342f3cbd57
13 changed files with 12956 additions and 168 deletions

View File

@@ -13,7 +13,7 @@ import { $t } from '@vben/locales';
import {
AutoComplete,
Button,
Button, Cascader,
Checkbox,
CheckboxGroup,
DatePicker,
@@ -48,11 +48,13 @@ const withDefaultPlaceholder = <T extends Component>(
};
};
// 表单组件在这里加
// 这里需要自行根据业务组件库进行适配,需要用到的组件都需要在这里类型说明
export type ComponentType =
| 'ApiSelect'
| 'ApiTreeSelect'
| 'AutoComplete'
| 'Cascader'
| 'Checkbox'
| 'CheckboxGroup'
| 'DatePicker'
@@ -115,6 +117,7 @@ async function initComponentAdapter() {
);
},
AutoComplete,
Cascader,
Checkbox,
CheckboxGroup,
DatePicker,

File diff suppressed because it is too large Load Diff

View File

@@ -23,6 +23,7 @@ import { useUserStore } from '@vben/stores';
import { openWindow } from '@vben/utils';
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
import {getQuickMenuApi} from "#/views/system/admin/api";
const userStore = useUserStore();
@@ -48,108 +49,20 @@ const projectItems: WorkbenchProjectItem[] = [
title: '数据大屏',
url: 'http://dls.xiaokang88.com',
},
// {
// color: '',
// content: '不要等待机会,而要创造机会。',
// date: '2021-04-01',
// group: '开源组',
// icon: 'carbon:logo-github',
// title: 'Github',
// url: 'https://github.com',
// },
// {
// color: '#3fb27f',
// content: '现在的你决定将来的你。',
// date: '2021-04-01',
// group: '算法组',
// icon: 'ion:logo-vue',
// title: 'Vue',
// url: 'https://vuejs.org',
// },
// {
// color: '#e18525',
// content: '没有什么才能比努力更重要。',
// date: '2021-04-01',
// group: '上班摸鱼',
// icon: 'ion:logo-html5',
// title: 'Html5',
// url: 'https://developer.mozilla.org/zh-CN/docs/Web/HTML',
// },
// {
// color: '#bf0c2c',
// content: '热情和欲望可以突破一切难关。',
// date: '2021-04-01',
// group: 'UI',
// icon: 'ion:logo-angular',
// title: 'Angular',
// url: 'https://angular.io',
// },
// {
// color: '#00d8ff',
// content: '健康的身体是实现目标的基石。',
// date: '2021-04-01',
// group: '技术牛',
// icon: 'bx:bxl-react',
// title: 'React',
// url: 'https://reactjs.org',
// },
// {
// color: '#EBD94E',
// content: '路是走出来的,而不是空想出来的。',
// date: '2021-04-01',
// group: '架构组',
// icon: 'ion:logo-javascript',
// title: 'Js',
// url: 'https://developer.mozilla.org/zh-CN/docs/Web/JavaScript',
// },
];
// 同样,这里的 url 也可以使用以 http 开头的外部链接
const quickNavItems: WorkbenchQuickNavItem[] = [
{
color: '#1fdaca',
icon: 'ion:home-outline',
title: '首页',
url: '/',
},
{
color: '#bf0c2c',
icon: 'ion:grid-outline',
title: '仪表盘',
url: '/dashboard',
},
{
color: '#e18525',
icon: 'ion:layers-outline',
title: '管理员管理',
url: '/system/user',
},
// {
// color: '#3fb27f',
// icon: 'ion:settings-outline',
// title: '系统管理',
// url: '/demos/features/login-expired', // 这里的 URL 是示例,实际项目中需要根据实际情况进行调整
// },
{
color: '#4daf1bc9',
icon: 'ion:key-outline',
title: '平台管理',
url: '/platform',
},
{
color: '#00d8ff',
icon: 'ion:bar-chart-outline',
title: '供应商管理',
url: '/supplier',
},
{
color: '#00d8ff',
icon: 'ion:bar-chart-outline',
title: '接诊',
url: '/doctor/reception',
},
];
const quickNavItems: WorkbenchQuickNavItem[] = ref([]);
/**
* 获取快捷菜单
*/
function getQuickMenu() {
getQuickMenuApi().then((res) => {
quickNavItems.value = res;
});
}
getQuickMenu();
const todoItems = ref<WorkbenchTodoItem[]>([
{
completed: false,
@@ -195,54 +108,6 @@ const trendItems: WorkbenchTrendItem[] = [
date: '2025-1-7',
title: '萧康云医',
},
// {
// avatar: 'svg:avatar-2',
// content: `关注了 <a>威廉</a> `,
// date: '1个小时前',
// title: '艾文',
// },
// {
// avatar: 'svg:avatar-3',
// content: `发布了 <a>个人动态</a> `,
// date: '1天前',
// title: '克里斯',
// },
// {
// avatar: 'svg:avatar-4',
// content: `发表文章 <a>如何编写一个Vite插件</a> `,
// date: '2天前',
// title: 'Vben',
// },
// {
// avatar: 'svg:avatar-1',
// content: `回复了 <a>杰克</a> 的问题 <a>如何进行项目优化?</a>`,
// date: '3天前',
// title: '皮特',
// },
// {
// avatar: 'svg:avatar-2',
// content: `关闭了问题 <a>如何运行项目</a> `,
// date: '1周前',
// title: '杰克',
// },
// {
// avatar: 'svg:avatar-3',
// content: `发布了 <a>个人动态</a> `,
// date: '1周前',
// title: '威廉',
// },
// {
// avatar: 'svg:avatar-4',
// content: `推送了代码到 <a>Github</a>`,
// date: '2021-04-01 20:00',
// title: '威廉',
// },
// {
// avatar: 'svg:avatar-4',
// content: `发表文章 <a>如何编写使用 Admin Vben</a> `,
// date: '2021-03-01 20:00',
// title: 'Vben',
// },
];
const router = useRouter();
@@ -275,7 +140,6 @@ function getTodayDate() {
return today.toLocaleDateString('zh-CN', options);
}
const todayDate = getTodayDate();
</script>
<template>
@@ -289,7 +153,6 @@ const todayDate = getTodayDate();
<!-- <Button type="primary" v-access:code="['Super Admin']">测我是超级管理员</Button>-->
<!-- <Button type="primary" v-access:code="['Admin']">测我是管理员</Button>-->
</template>
<!-- <template #description> 今日晴20 - 32 </template>-->
<template #description>
{{ todayDate }}
</template>

View File

@@ -856,7 +856,6 @@ function selectOldDrugInfo(id) {
(newDrugNumberInput as HTMLElement).focus();
}
}, 100);
return console.log(oldDrugInfo, data, 'ssssssssss');
}
/**
@@ -901,7 +900,6 @@ function selectDrugByNewDrugInfo(event: KeyboardEvent, isNewDrug: boolean) {
message.error('请选择药品');
return;
}
console.log(data, ';sssssssssssssssssssssssssssssssss');
data.drug.number = newDrugInfo.value.number;
data.drug.way_id = newDrugInfo.value.way_id;
addProducts(data);
@@ -1368,11 +1366,18 @@ function updateLocalStorageStoreInfo() {
</div>
</Card>
</Col>
<Col :lg="24" :md="24" :sm="12" :xl="12" :xs="24" :xxl="8">
<Col
:lg="12"
:md="24"
:sm="24"
:xl="12"
:xs="24"
:xxl="8"
>
<Card title="">
<div>
<span class="card-index">{{ currentDrugs.length + 1 }}、</span>
<p>
<div>
<Select
v-model:value="newDrugInfo.id"
:filter-option="false"
@@ -1425,7 +1430,156 @@ function updateLocalStorageStoreInfo() {
).toFixed(2)
}}元</span>
</p>
</p>
</div>
</div>
</Card>
</Col>
<!-- 不知道为什么会出问题 -->
<Col
v-if="currentDrugs.length < 3"
:lg="12"
:md="24"
:sm="24"
:xl="12"
:xs="24"
:xxl="8"
>
<Card title="" style="opacity: 0">
<div>
<span class="card-index">{{ currentDrugs.length + 1 }}、</span>
<div>
<Select
v-model:value="newDrugInfo.id"
:filter-option="false"
class="new-select-drug-name w-1/5"
style="min-width: 100px"
placeholder="药名"
show-search
@change="selectNewDrugInfo"
@search="searchOption"
disabled
>
<SelectOption
v-for="(value, index) in drugList"
:key="index"
:value="value.drug_id"
disabled
>
{{ value.drug.drug_name }}
</SelectOption>
</Select>
,
<InputNumber
v-model:value="newDrugInfo.number"
class="new-number-input w-1/5"
style="min-width: 100px"
@blur="updateChineseNumber"
@keydown="selectDrugByNewDrugInfo($event, true)"
disabled
>
<template #addonAfter> g</template>
</InputNumber>
,
<span>
<Select
v-model:value="newDrugInfo.way_id"
placeholder="用法"
@keydown="selectDrugByNewDrugInfo($event, true)"
disabled
>
<SelectOption :value="0">煎服</SelectOption>
<SelectOption
v-for="(value, index) in drugUseWay"
:key="index"
:value="value.id"
>
{{ value.name }}
</SelectOption>
</Select>
</span>
<p class="card-price">
¥<span>{{
(
(newDrugInfo.price || 0) * (newDrugInfo.number || 1)
).toFixed(2)
}}元</span>
</p>
</div>
</div>
</Card>
</Col>
<Col
v-if="currentDrugs.length < 3"
:lg="12"
:md="24"
:sm="24"
:xl="12"
:xs="24"
:xxl="8"
>
<Card title="" style="opacity: 0">
<div>
<span class="card-index">{{ currentDrugs.length + 1 }}、</span>
<div>
<Select
v-model:value="newDrugInfo.id"
:filter-option="false"
class="new-select-drug-name w-1/5"
style="min-width: 100px"
placeholder="药名"
show-search
@change="selectNewDrugInfo"
@search="searchOption"
disabled
>
<SelectOption
v-for="(value, index) in drugList"
:key="index"
:value="value.drug_id"
disabled
>
{{ value.drug.drug_name }}
</SelectOption>
</Select>
,
<InputNumber
v-model:value="newDrugInfo.number"
class="new-number-input w-1/5"
style="min-width: 100px"
@blur="updateChineseNumber"
@keydown="selectDrugByNewDrugInfo($event, true)"
disabled
>
<template #addonAfter> g</template>
</InputNumber>
,
<span>
<Select
v-model:value="newDrugInfo.way_id"
placeholder="用法"
@keydown="selectDrugByNewDrugInfo($event, true)"
disabled
>
<SelectOption :value="0">煎服</SelectOption>
<SelectOption
v-for="(value, index) in drugUseWay"
:key="index"
:value="value.id"
>
{{ value.name }}
</SelectOption>
</Select>
</span>
<p class="card-price">
¥<span>{{
(
(newDrugInfo.price || 0) * (newDrugInfo.number || 1)
).toFixed(2)
}}元</span>
</p>
</div>
</div>
</Card>
</Col>

View File

@@ -73,6 +73,13 @@ export async function getMyCard() {
return requestClient.get<any>(`${prefix}my-card`);
}
/**
* 获取我绑定的银行卡
*/
export async function getQuickMenuApi() {
return requestClient.get<any>(`${prefix}get-quick-menu`);
}
/**
* 编辑账户绑定银行卡
* @param data

View File

@@ -0,0 +1,59 @@
import { requestClient } from '#/api/request';
const prefix = 'store/';
/**
* 分页查询用户列表
* @param data
*/
export async function getStoreList(data: any) {
return requestClient.get<any>(`${prefix}list`, { params: data });
}
/**
* 分页查询用户列表
* @param data
*/
export async function getStoreOption(data: any) {
return requestClient.get<any>(`${prefix}option`, { params: data });
}
/**
* 获取诊所详情
* @param id
*/
export async function getStoreInfo(id: number) {
return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}
/**
* 新增诊所
* @param data
*/
export async function createStore(data: Record<string, any>) {
return requestClient.post<any>(`${prefix}create`, data);
}
/**
* 编辑诊所
* @param data
*/
export async function updateStore(data: Record<string, any>) {
return requestClient.post<any>(`${prefix}update`, data);
}
/**
* 删除诊所
* @param data
*/
export async function deleteStore(data: Record<string, any>) {
return requestClient.post<any>(`${prefix}delete`, data);
}
/**
* 开启后台登录
* @param id
*/
export async function openPcWindowsApiByStore(id: number) {
return requestClient.post<any>(`${prefix}open-pc-windows`, {
id,
});
}

View File

@@ -0,0 +1,68 @@
<script lang="ts" setup>
import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { message } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
import { modalFormProps } from '#/views/system/store/config/form';
import { createStore, updateStore } from '../api';
import dayjs from "dayjs";
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();
const [Form, formApi] = useVbenForm(modalFormProps);
const [Modal, modalApi] = useVbenModal({
fullscreenButton: false,
draggable: true,
onCancel() {
modalApi.close();
},
onConfirm: async () => {
formApi.validate().then(async (e: any) => {
if (e.valid) {
const values = await formApi.getValues();
modalApi.setState({ loading: true, confirmLoading: true });
const submitApi = isUpdate.value ? updateStore : createStore;
submitApi(values)
.then(() => {
message.success('保存成功');
gridApi.value?.reload();
modalApi.close();
})
.finally(() => {
modalApi.setState({ loading: false, confirmLoading: false });
});
}
});
await formApi.validateAndSubmitForm();
},
onOpenChange(isOpen: boolean) {
gridApi.value = isOpen ? modalApi.getData()?.gridApi : null;
if (isOpen) {
const { values, update } = modalApi.getData<Record<string, any>>();
if (values) {
isUpdate.value = update;
// 把values.start_time变成dayjs
values.start_time = dayjs(values.start_time, 'HH:mm');
values.end_time = dayjs(values.end_time, 'HH:mm');
values.address = [values.province_id, values.city_id];
formApi.setValues(values);
}
}
},
});
</script>
<template>
<Modal :title="`${isUpdate === true ? '编辑' : '新增'}诊所`" class="w-[50%]">
<Form />
</Modal>
</template>

View File

@@ -0,0 +1,288 @@
import type {VbenFormProps} from '#/adapter/form';
import { addressOption } from '#/util/address.ts';
export const modalFormProps: VbenFormProps = {
wrapperClass: 'grid-cols-12', // 24栅格,
commonConfig: {
formItemClass: 'col-span-12',
// 所有表单项
componentProps: {
class: 'w-full',
},
},
// handleSubmit: onSubmit,
layout: 'horizontal',
schema: [
// {
// fieldName: 'baseinfo',
// component: 'Divider',
// label: '基础信息',
// formItemClass: 'col-span-12',
// componentProps: {},
// hideLabel: true,
// renderComponentContent: () => {
// return {
// default: () => {
// return '基础信息';
// },
// };
// },
// },
{
component: 'VbenInput',
fieldName: 'id',
label: 'ID',
formItemClass: 'col-span-6',
dependencies: {
show: false,
triggerFields: ['id'],
},
},
{
component: 'Divider',
fieldName: '',
label: '',
rules: 'required',
hideLabel: true,
renderComponentContent: () => {
return {
default: () => {
return '基础信息';
},
};
},
},
{
component: 'Avatar',
formItemClass: 'col-span-6',
fieldName: 'see_rate',
label: '公章',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入诊所昵称',
},
fieldName: 'name',
label: '诊所名称',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入诊所ERP ID',
},
fieldName: 'erp_id',
label: 'ERP ID',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入诊所联系人姓名',
},
fieldName: 'contact',
label: '联系人姓名',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入诊所联系人手机号',
},
fieldName: 'mobile',
label: '联系人手机号',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入业务码',
},
fieldName: 'code',
label: '业务码',
rules: 'required',
},
{
component: 'TimePicker',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请选择开始营业时间',
format: 'HH:mm', // 确保格式与你需要的一致
},
fieldName: 'start_time',
label: '开始营业时间',
rules: 'required',
},
{
component: 'TimePicker',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请选择结束营业时间',
format: 'HH:mm', // 确保格式与你需要的一致
},
fieldName: 'end_time',
label: '结束营业时间',
rules: 'required',
},
{
component: 'Cascader',
componentProps: {
placeholder: '请选省市区',
options: addressOption,
onChange: (value: any) => {
console.log(value);
},
},
fieldName: 'address',
label: '省市区',
rules: 'required',
},
{
component: 'Textarea',
componentProps: {
placeholder: '请选择结束营业时间',
// format: 'HH:MM', // 确保格式与你需要的一致
},
fieldName: 'position',
label: '详细地址',
rules: 'required',
},
{
component: 'Divider',
fieldName: '',
label: 'x',
rules: 'required',
hideLabel: true,
renderComponentContent: () => {
return {
default: () => {
return '销售比例信息';
},
};
},
},
{
component: 'InputNumber',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入中药采购价比例',
},
fieldName: 'z_buy_percent',
label: '中药采购价比例',
rules: 'required',
suffix: () => '%',
},
{
component: 'InputNumber',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入中药销售比例',
},
fieldName: 'z_sale_percent',
label: '中药销售比例',
rules: 'required',
suffix: () => '%',
},
// {
// component: 'VbenInput',
// formItemClass: 'col-span-6',
// componentProps: {
// placeholder: '请输入颗粒药采购价比例',
// },
// fieldName: 'g_bug_percent',
// label: '颗粒药采购价比例',
// rules: 'required',
// },
// {
// component: 'VbenInput',
// formItemClass: 'col-span-6',
// componentProps: {
// placeholder: '请输入颗粒药销售比例',
// },
// fieldName: 'g_sale_percent',
// label: '颗粒药销售比例',
// rules: 'required',
// },
{
component: 'Divider',
fieldName: '',
label: 'x',
rules: 'required',
hideLabel: true,
renderComponentContent: () => {
return {
default: () => {
return '银行卡信息';
},
};
},
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入开户人姓名',
},
fieldName: 'bank_user_name',
label: '开户人姓名',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入银行卡号',
},
fieldName: 'bank_card',
label: '银行卡号',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入开户行',
},
fieldName: 'bank_name',
label: '开户行',
rules: 'required',
},
{
component: 'VbenInput',
formItemClass: 'col-span-6',
componentProps: {
placeholder: '请输入银联行号',
},
fieldName: 'bank_no',
label: '银联行号',
},
{
component: 'RadioGroup',
componentProps: {
options: [
{ label: '对公', value: 1 },
{ label: '对私', value: 2 },
{ label: '存折', value: 5 },
],
placeholder: '请选择银行账户类型',
},
dependencies: {
disabled: (values) => {
return values.id != null;
},
triggerFields: ['id'],
},
fieldName: 'bank_account_type',
label: '银行账户类型',
rules: 'required',
},
],
showDefaultActions: false,
};

View File

@@ -0,0 +1,37 @@
import type { VbenFormProps } from '#/adapter/form';
// import dayjs from 'dayjs';
export const formOptions: VbenFormProps = {
// 默认展开
collapsed: false,
schema: [
{
component: 'VbenInput',
componentProps: {
placeholder: '输入名称',
},
defaultValue: '',
fieldName: 'name',
label: '诊所名称',
},
// {
// component: 'RangePicker',
// componentProps: {
// format: 'YYYY-MM-DD', // 确保格式与你需要的一致
// },
// // defaultValue: [dayjs().startOf('month'), dayjs()],
// fieldName: 'search_time',
// label: '时间范围',
// },
],
// 控制表单是否显示折叠按钮
showCollapseButton: true,
submitButtonOptions: {
content: '查询',
},
// 是否在字段值改变时提交表单
submitOnChange: true,
// 按下回车时是否提交表单
submitOnEnter: false,
};

View File

@@ -0,0 +1,77 @@
import type { VxeGridProps } from '#/adapter/vxe-table';
import { getStoreList } from '../api';
interface RowType {
id: string;
name: string;
logo: string;
introduce: string;
created_at: string;
}
export const gridOptions: VxeGridProps<RowType> = {
checkboxConfig: {
highlight: true,
labelField: '',
},
columnConfig: {
useKey: true,
},
rowConfig: {
useKey: true,
},
columns: [
{ type: 'checkbox', width: 60 },
{ field: 'id', align: 'left', title: 'ID', width: 100 },
{ field: 'name', align: 'left', title: '诊所名称' },
{
field: 'qr_code',
align: 'left',
title: '诊所二维码',
slots: { default: 'qr_code' },
width: 130,
},
// { field: 'erp_id', title: 'erpID' },
// { field: 'shouzimu', title: '诊所首字母' },
{ field: 'position', title: '详细地址' },
{ field: 'contact', title: '联系人' },
{ field: 'mobile', title: '联系电话' },
{ field: 'created_at', title: '注册时间' },
{ type: 'html', title: '操作', align: 'right', slots: { default: 'action' } },
],
keepSource: true,
pagerConfig: {},
proxyConfig: {
ajax: {
// 请求后端接口方法
query: async ({ page }, formValues) => {
return await getStoreList({
page: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
},
},
},
height: 'auto',
border: false,
toolbarConfig: {
// 是否显示搜索表单控制按钮
// @ts-ignore 正式环境时有完整的类型声明
search: true,
refresh: true, // 刷新
print: false, // 打印
export: false, // 导出
// custom: true, // 自定义列
zoom: true, // 最大化最小化
slots: {
buttons: 'toolbar-buttons',
},
custom: {
// 自定义列-图标
icon: 'vxe-icon-menu',
},
},
showOverflow: false,
};

View File

@@ -0,0 +1,175 @@
<script lang="ts" setup>
import type { VxeGridListeners } from '#/adapter/vxe-table';
import { ref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
import { Button, Image, message } from 'ant-design-vue';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { TableAction } from '#/components/table-action';
import { deleteStore, openPcWindowsApiByStore } from './api';
import FormModalDemo from './components/modal.vue';
import { formOptions } from './config/search';
import { gridOptions } from './config/table';
const hasTopTableDropDownActions = ref(false);
const gridEvents: VxeGridListeners<any> = {
checkboxChange() {
// eslint-disable-next-line no-use-before-define
const records = gridApi.grid.getCheckboxRecords();
hasTopTableDropDownActions.value = records.length > 0;
},
checkboxAll() {
// eslint-disable-next-line no-use-before-define
const records = gridApi.grid.getCheckboxRecords();
hasTopTableDropDownActions.value = records.length > 0;
},
};
const [Grid, gridApi] = useVbenVxeGrid({
formOptions,
gridOptions,
gridEvents,
});
const [FormModal, formModalApi] = useVbenModal({
connectedComponent: FormModalDemo,
});
const showModal = (data = {}, isUpdate = false) => {
formModalApi.setData({
// 表单值
values: data,
update: isUpdate,
gridApi,
});
formModalApi.open();
};
const deleteApi = (row: any) => {
let ids = [];
if (row) {
ids.push(row);
} else {
ids = gridApi.grid.getCheckboxRecords().map((item) => item.id);
}
deleteStore({ ids }).then(() => {
message.success('删除成功!');
gridApi.reload();
});
};
/**
* 开启后台账号
*/
function openPcWindows(id) {
openPcWindowsApiByStore(id).then(() => {
message.success('操作成功!');
gridApi.reload();
});
}
</script>
<template>
<Page auto-content-height title="诊所管理">
<FormModal />
<Grid>
<template #toolbar-buttons>
<TableAction
:actions="[
{
label: '新增',
type: 'primary',
icon: 'ant-design:plus-outlined',
// auth: ['超级诊所', 'sys:user:save'],
onClick: showModal.bind(null),
},
]"
:drop-down-actions="[
{
label: '删除',
icon: 'ant-design:delete-outlined',
ifShow: hasTopTableDropDownActions,
// auth: ['超级诊所', 'sys:user:save'],
popConfirm: {
title: '确定删除吗',
confirm: deleteApi.bind(null, false),
},
},
]"
>
<template #more>
<Button style="margin-left: 16px">
批量操作
<Icon icon="ant-design:down-outlined" />
</Button>
</template>
</TableAction>
</template>
<template #qr_code="{ row }">
<Image :src="row.qr_code" height="30" width="30" />
</template>
<template #toolbar-tools></template>
<template #action="{ row }">
<TableAction
:actions="[
{
label: '编辑',
type: 'link',
icon: 'uil:edit',
size: 'small',
// auth: ['store', 'sys:role:detail'],
onClick: showModal.bind(null, row, true),
},
{
label: '删除',
type: 'link',
icon: 'ant-design:delete-outlined',
size: 'small',
// auth: ['store', 'sys:role:detail'],
popConfirm: {
title: '确定删除吗?',
confirm: deleteApi.bind(null, row.id),
},
},
]"
:drop-down-actions="[
// {
// label: '编辑',
// type: 'link',
// icon: 'ant-design:delete-outlined',
// size: 'small',
// // auth: ['store', 'sys:role:detail'],
// onClick: showModal.bind(null, row, true),
// },
// {
// label: '删除',
// type: 'link',
// icon: 'ant-design:delete-outlined',
// size: 'small',
// // auth: ['store', 'sys:role:detail'],
// popConfirm: {
// title: '确定删除吗',
// confirm: deleteApi.bind(null, row.id),
// },
// },
{
label: '开通后台',
type: 'link',
icon: 'uil:edit',
size: 'small',
// auth: ['store', 'sys:role:detail'],
popConfirm: {
title: '确定开通后台吗',
confirm: openPcWindows.bind(null, row.id),
},
},
]"
/>
</template>
</Grid>
</Page>
</template>

View File

@@ -27,20 +27,20 @@ withDefaults(defineProps<Props>(), {
<slot name="description"></slot>
</span>
</div>
<div class="mt-4 flex flex-1 justify-end md:mt-0">
<div class="flex flex-col justify-center text-right">
<span class="text-foreground/80"> 待办 </span>
<span class="text-2xl">2/10</span>
</div>
<!-- <div class="mt-4 flex flex-1 justify-end md:mt-0">-->
<!-- <div class="flex flex-col justify-center text-right">-->
<!-- <span class="text-foreground/80"> 待办 </span>-->
<!-- <span class="text-2xl">2/10</span>-->
<!-- </div>-->
<div class="mx-12 flex flex-col justify-center text-right md:mx-16">
<span class="text-foreground/80"> 项目 </span>
<span class="text-2xl">8</span>
</div>
<div class="mr-4 flex flex-col justify-center text-right md:mr-10">
<span class="text-foreground/80"> 团队 </span>
<span class="text-2xl">300</span>
</div>
</div>
<!-- <div class="mx-12 flex flex-col justify-center text-right md:mx-16">-->
<!-- <span class="text-foreground/80"> 项目 </span>-->
<!-- <span class="text-2xl">8</span>-->
<!-- </div>-->
<!-- <div class="mr-4 flex flex-col justify-center text-right md:mr-10">-->
<!-- <span class="text-foreground/80"> 团队 </span>-->
<!-- <span class="text-2xl">300</span>-->
<!-- </div>-->
<!-- </div>-->
</div>
</template>

View File

@@ -14,6 +14,7 @@ import { $t } from '@vben/locales';
import {
AutoComplete,
Button,
Cascader,
Checkbox,
CheckboxGroup,
DatePicker,
@@ -51,6 +52,7 @@ export type ComponentType =
| 'ApiSelect'
| 'ApiTreeSelect'
| 'AutoComplete'
| 'Cascader'
| 'Checkbox'
| 'CheckboxGroup'
| 'DatePicker'
@@ -114,6 +116,7 @@ async function initComponentAdapter() {
);
},
AutoComplete,
Cascader,
Checkbox,
CheckboxGroup,
DatePicker,