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
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

This commit is contained in:
2025-08-28 11:00:39 +08:00
parent 6f8f87fb09
commit 920b47aace
44 changed files with 345 additions and 117 deletions

View File

@@ -118,16 +118,16 @@ const showUploadButton = computed(() =>
<Upload
v-model:value="fileList"
:custom-request="customRequest"
:max-count="maxCount"
:multiple="multiple"
:limit="maxCount"
:show-upload-list="{ showPreviewIcon: true, showRemoveIcon: true }"
list-type="picture-card"
@remove="handleRemove"
@preview="handlePreview"
@remove="handleRemove"
>
<div v-if="showUploadButton" class="upload-button">
<Icon icon="ant-design:plus-outlined" />
<div class="ant-upload-text">上传图片</div>
<div class="ant-upload-text">上传图片{{ maxCount }}</div>
</div>
</Upload>
<Modal
@@ -136,7 +136,7 @@ const showUploadButton = computed(() =>
footer=""
width="60%"
>
<img alt="example" style="width: 100%" :src="previewImage" />
<img :src="previewImage" alt="example" style="width: 100%" />
</Modal>
</template>

View File

@@ -99,14 +99,14 @@ const getNoticeList = async () => {
}
};
getNoticeList();
// 每隔十秒刷新一次
let intervalId = setInterval(getNoticeList, 10_000);
// 每隔十秒刷新一次
let intervalId = setInterval(getNoticeList, 20_000);
// 封装定时器重启逻辑
const restartInterval = () => {
clearInterval(intervalId);
getNoticeList(); // 立即获取最新数据
intervalId = setInterval(getNoticeList, 10_000);
intervalId = setInterval(getNoticeList, 20_000);
};
// 处理跨标签页修改

View File

@@ -17,8 +17,8 @@ export const overridesPreferences = defineOverridesPreferences({
// overrides
app: {
name: import.meta.env.VITE_APP_TITLE,
// layout: 'sidebar-mixed-nav',
layout: 'sidebar-nav',
layout: 'sidebar-mixed-nav',
// layout: 'sidebar-nav',
// 登录过期模式
// loginExpiredMode: 'modal',
loginExpiredMode: 'page',

View File

@@ -275,7 +275,8 @@ export function desensitize(data: string, type: 'bankCard' | 'idCard'): string {
case 'bankCard': {
// 银行卡号脱敏规则显示前6位和后4位中间用*代替
if (data.length < 12) {
throw new Error('Invalid bank card number length');
return data.replace(/(.{6}).*(.{4})/, '$1******$2');
// throw new Error('Invalid bank card number length');
}
return data.slice(0, 6) + '*'.repeat(data.length - 10) + data.slice(-4);
}

View File

@@ -18,3 +18,11 @@ export async function getChatMessageListApi(data: any = {}) {
// return requestClient.post<any>(`${prefix}messages-by-room-id`, { params: data });
return requestClient.post<any>(`${prefix}messages-by-room-id`, data);
}
/**
* 获取挂号卡片信息
* @param data
*/
export async function getChatMessageRegisterInfoApi(data: any = {}) {
// return requestClient.post<any>(`${prefix}messages-by-room-id`, { params: data });
return requestClient.get<any>(`${prefix}chat-register-info`, { params: data });
}

View File

@@ -183,7 +183,6 @@ export const useChatStore = defineStore('chat', () => {
const loadFriends = async (presetUsers, currentUserId) => {
try {
getChatFriendsListApi().then((res) => {
console.log('好友列表', res);
friends.value = res;
});
} catch (error) {

View File

@@ -10,9 +10,7 @@ import { useVbenForm } from '#/adapter/form';
import { createExpressCompanies, updateExpressCompanies } from '../api';
import { modalFormProps } from '../config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { sendOrder } from '#/views/business/order/product-order/api';
import { modalFormProps } from '#/views/business/order/product-order/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -0,0 +1,53 @@
import type { VbenFormProps } from '#/adapter/form';
export const modalFormProps: VbenFormProps = {
wrapperClass: 'grid-cols-12', // 24栅格,
commonConfig: {
formItemClass: 'col-span-12',
// 所有表单项
componentProps: {
class: 'w-full',
},
},
// handleSubmit: onSubmit,
layout: 'horizontal',
schema: [
{
component: 'VbenInput',
fieldName: 'id',
label: 'ID',
dependencies: {
show: false,
triggerFields: ['id'],
},
},
{
component: 'VbenInput',
componentProps: {
placeholder: '请输入角色昵称',
},
fieldName: 'name',
label: '昵称',
rules: 'required',
},
{
component: 'VbenInput',
componentProps: {
placeholder: '请输入角色代码',
},
fieldName: 'value',
label: '角色代码',
rules: 'required',
},
{
component: 'VbenInput',
componentProps: {
placeholder: '请输入角色说明',
},
fieldName: 'desc',
label: '角色说明',
rules: 'required',
},
],
showDefaultActions: false,
};

View File

@@ -12,9 +12,7 @@ import { createChinaMedicine, updateChinaMedicine } from '../api';
import { modalFormProps } from '../config/form';
import {getDrugUseList} from "#/views/doctor/doctor-reception/api";
defineOptions({
name: 'FormModelDemo',
});
const userStore = useUserStore();
const drugTime = ref([]);

View File

@@ -11,9 +11,7 @@ import { useVbenForm } from '#/adapter/form';
import { createServicePack, updateServicePack } from '../api';
import { modalFormProps } from '../config/form';
defineOptions({
name: 'FormModelDemo',
});
const userStore = useUserStore();
const isUpdate = ref(false);

View File

@@ -12,9 +12,7 @@ import { createWesternMedicine, updateWesternMedicine } from '../api';
import { modalFormProps } from '../config/form';
import {getDrugUseList} from "#/views/doctor/doctor-reception/api";
defineOptions({
name: 'FormModelDemo',
});
const userStore = useUserStore();
const drugTime = ref([]);

View File

@@ -15,9 +15,7 @@ import {
import { modalFormProps } from '../config/form';
import {getDrugUseList} from "#/views/doctor/doctor-reception/api";
defineOptions({
name: 'FormModelDemo',
});
const userStore = useUserStore();
const drugTime = ref([]);

View File

@@ -15,9 +15,7 @@ import {
import { modalFormProps } from '../config/form';
import {getDrugUseList} from "#/views/doctor/doctor-reception/api";
defineOptions({
name: 'FormModelDemo',
});
const userStore = useUserStore();
const drugTime = ref([]);

View File

@@ -10,9 +10,7 @@ import { useVbenForm } from '#/adapter/form';
import { createDoctorArticle, updateDoctorArticle } from '../api';
import { modalFormProps } from '../config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -160,7 +160,7 @@ const getImageSource = (imageString) => {
<div>
方法:
<span class="preparation-info">{{
drug.use_way?.name || '煎服'
drug.use_way?.name || drug.useWay || '煎服'
}}</span>
</div>
</div>

View File

@@ -0,0 +1,37 @@
import type { VbenFormProps } from '#/adapter/form';
export const modalFormProps: VbenFormProps = {
wrapperClass: 'grid-cols-12', // 24栅格,
commonConfig: {
formItemClass: 'col-span-12',
// 所有表单项
componentProps: {
class: 'w-full',
},
},
// handleSubmit: onSubmit,
layout: 'horizontal',
schema: [
{
component: 'VbenInput',
fieldName: 'id',
label: 'ID',
formItemClass: 'col-span-6',
dependencies: {
show: false,
triggerFields: ['id'],
},
},
{
component: 'Textarea',
componentProps: {
placeholder: '请输入拒诊原因',
},
fieldName: 'intro',
label: '拒诊原因',
rules: 'required',
},
],
showDefaultActions: false,
};

View File

@@ -1474,9 +1474,9 @@ watch(
v-model:value="newDrugInfo.id"
:filter-option="false"
class="new-select-drug-name w-1/5"
style="min-width: 100px"
placeholder="药名"
show-search
style="min-width: 100px"
@change="selectNewDrugInfo"
@search="searchOption"
>
@@ -1899,6 +1899,11 @@ watch(
</template>
<style scoped>
/* 覆盖antd */
:global(.ant-select-item-option-active) {
background-color: rgba(55, 71, 162, 0.71) !important;
color: white !important;
}
.doctor-second-sign-title {
font-size: 16px;
margin: 10px 0;

View File

@@ -8,6 +8,13 @@ const prefix = 'doctor/';
export async function getDoctorList(data: any) {
return requestClient.get<any>(`${prefix}list`, { params: data });
}
/**
* 获取科室选项
* @param data
*/
export async function getDepartOptionApi() {
return requestClient.get<any>(`${prefix}depart-option`);
}
/**
* 分页查询用户列表
* @param data

View File

@@ -10,9 +10,7 @@ import { useVbenForm } from '#/adapter/form';
import {createDoctor, updateDoctor} from '../api';
import { infoModalFormProps } from '../config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();
@@ -48,12 +46,11 @@ const [Modal, modalApi] = useVbenModal({
gridApi.value = isOpen ? modalApi.getData()?.gridApi : null;
if (isOpen) {
const { values, update } = modalApi.getData<Record<string, any>>();
console.log(values, 'ssssssssssss');
if (values) {
isUpdate.value = update;
getPharmacistEditInfoApi(values.id).then((res) => {
formApi.setValues(res);
});
// getPharmacistEditInfoApi(values.id).then((res) => {
// formApi.setValues(res);
// });
formApi.setValues(values);
// const img = 'https://img2.baidu.com/it/u=3046024791,55863177&fm=253&fmt=auto&app=138&f=JPEG';

View File

@@ -1,7 +1,8 @@
import type { VbenFormProps } from '#/adapter/form';
import {getStoreOption} from "#/views/system/store/api";
import {getPharmacistTitleOptionApi} from "#/views/doctor/pharmacist/api";
import {getDoctorTitleOptionApi, getPharmacistTitleOptionApi} from "#/views/doctor/pharmacist/api";
import {getDepartOptionApi} from "#/views/doctor/doctor/api";
export const modalFormProps: VbenFormProps = {
wrapperClass: 'grid-cols-12', // 24栅格,
@@ -132,7 +133,9 @@ export const infoModalFormProps: VbenFormProps = {
model: 'multiple',
},
dependencies: {
show: false,
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
fieldName: 'store_id',
@@ -144,11 +147,11 @@ export const infoModalFormProps: VbenFormProps = {
component: 'ApiSelect',
componentProps: {
allowClear: true,
filterOption: (input: string, option: any) => {
// 自定义过滤逻辑,确保可以根据 name 进行搜索
return option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
showSearch: true,
// filterOption: (input: string, option: any) => {
// // 自定义过滤逻辑,确保可以根据 name 进行搜索
// return option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
// },
// showSearch: true,
// 菜单接口转options格式
afterFetch: (data: { id: number; name: string }[]) => {
return data.map((item: any) => ({
@@ -156,12 +159,36 @@ export const infoModalFormProps: VbenFormProps = {
value: item.id,
}));
},
api: getPharmacistTitleOptionApi,
api: getDoctorTitleOptionApi,
placeholder: '请选择职称',
},
fieldName: 'title_id',
formItemClass: 'col-span-6',
label: '职称',
// rules: 'required',
},
{
component: 'ApiSelect',
componentProps: {
allowClear: true,
// filterOption: (input: string, option: any) => {
// // 自定义过滤逻辑,确保可以根据 name 进行搜索
// return option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
// },
// showSearch: true,
// 菜单接口转options格式
afterFetch: (data: { id: number; name: string }[]) => {
return data.map((item: any) => ({
label: item.name,
value: item.id,
}));
},
api: getDepartOptionApi,
placeholder: '请选择科室',
},
fieldName: 'depart_id',
formItemClass: 'col-span-6',
label: '科室',
rules: 'required',
},
{
@@ -181,6 +208,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'mobile',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '手机号码',
rules: 'required',
},
@@ -190,7 +223,9 @@ export const infoModalFormProps: VbenFormProps = {
placeholder: '请填写身份证',
},
dependencies: {
show: false,
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
fieldName: 'idcard',
@@ -215,6 +250,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'type',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '身份',
rules: 'required',
},
@@ -234,14 +275,40 @@ export const infoModalFormProps: VbenFormProps = {
],
},
dependencies: {
show: false,
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
fieldName: 'sign_type',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '签名类型',
rules: 'required',
},
{
component: 'Textarea',
componentProps: {
placeholder: '请输入擅长',
},
fieldName: 'good_at',
label: '擅长',
rules: 'required',
},
{
component: 'Textarea',
componentProps: {
placeholder: '请输入简介',
},
fieldName: 'intro',
label: '简介',
rules: 'required',
},
{
fieldName: 'otherinfo',
label: '执业&身份信息',
@@ -249,6 +316,12 @@ export const infoModalFormProps: VbenFormProps = {
formItemClass: 'col-span-12',
componentProps: {},
hideLabel: true,
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
renderComponentContent: () => {
return {
default: () => {
@@ -264,6 +337,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'qualification',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '资格证书',
rules: 'required',
},
@@ -274,6 +353,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'practicing',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '执业证书',
rules: 'required',
},
@@ -284,8 +369,14 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'title',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '职称证书',
rules: 'required',
// rules: 'required',
},
// {
// fieldName: 'otherinfo',
@@ -309,6 +400,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'card_up',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '身份证正面',
rules: 'required',
},
@@ -319,6 +416,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'card_down',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '身份证反面',
rules: 'required',
},
@@ -329,6 +432,12 @@ export const infoModalFormProps: VbenFormProps = {
},
fieldName: 'sign_image',
formItemClass: 'col-span-6',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
label: '签名图片',
rules: 'required',
},

View File

@@ -150,6 +150,14 @@ const refuse = (id: number) => {
<template #action="{ row }">
<TableAction
:actions="[
{
label: '编辑',
type: 'link',
icon: 'uil:edit',
size: 'small',
// auth: ['doctor', 'sys:role:detail'],
onClick: showModal.bind(null, row),
},
{
label: '绑定诊所',
type: 'link',

View File

@@ -12,15 +12,32 @@ export async function getPharmacistList(data: any) {
* 分页查询用户列表
* @param data
*/
export async function getPharmacistTitleOptionApi(data: any = {}) {
return requestClient.get<any>(`${prefix}title-option`, { params: data });
export async function getPharmacistTitleOptionApi() {
return requestClient.get<any>(`${prefix}title-option`, {
params: {
type: 2,
},
});
}
/**
* 获取医生职称
* @param data
*/
export async function getDoctorTitleOptionApi() {
return requestClient.get<any>(`${prefix}title-option`, {
params: {
type: 1,
},
});
}
/**
* 分页查询用户列表
* @param data
*/
export async function getPharmacistInfoByStoreApi(data: any) {
return requestClient.get<any>(`${prefix}pharmacist-info-by-store`, { params: data });
return requestClient.get<any>(`${prefix}pharmacist-info-by-store`, {
params: data,
});
}
/**
* 查询我的余额

View File

@@ -10,9 +10,7 @@ import { useVbenForm } from '#/adapter/form';
import {createPharmacist, getPharmacistEditInfoApi, updatePharmacist} from '../api';
import { infoModalFormProps } from '../config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -132,7 +132,9 @@ export const infoModalFormProps: VbenFormProps = {
model: 'multiple',
},
dependencies: {
show: false,
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
fieldName: 'store_id',
@@ -190,7 +192,9 @@ export const infoModalFormProps: VbenFormProps = {
placeholder: '请填写身份证',
},
dependencies: {
show: false,
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
fieldName: 'idcard',
@@ -234,7 +238,9 @@ export const infoModalFormProps: VbenFormProps = {
],
},
dependencies: {
show: false,
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
fieldName: 'sign_type',

View File

@@ -96,6 +96,7 @@ const infoModal = (id, modalType = 0) => {
label: '审核通过',
type: 'link',
icon: 'mdi:success-bold',
ifShow: row.check_status === 1,
size: 'small',
// auth: ['order', 'sys:role:detail'],
onClick: infoModal.bind(null, row.id),
@@ -104,6 +105,7 @@ const infoModal = (id, modalType = 0) => {
label: '拒绝审核',
type: 'link',
icon: 'icon-park-solid:error',
ifShow: row.check_status === 1,
size: 'small',
// auth: ['order', 'sys:role:detail'],
onClick: infoModal.bind(null, row.id, 1),

View File

@@ -8,9 +8,7 @@ import { Descriptions } from 'ant-design-vue';
import { Icon } from '#/components/icon';
import { getIcon } from '#/util/tool';
defineOptions({
name: 'FormModelDemo',
});
const gridApi = ref();
const data = ref({});

View File

@@ -4,9 +4,7 @@ import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { Descriptions } from 'ant-design-vue';
defineOptions({
name: 'FormModelDemo',
});
const gridApi = ref();
const data = ref({});

View File

@@ -5,9 +5,7 @@ import { useVbenModal } from '@vben/common-ui';
import { Descriptions } from 'ant-design-vue';
defineOptions({
name: 'FormModelDemo',
});
const gridApi = ref();
const data = ref({});

View File

@@ -4,9 +4,7 @@ import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { Descriptions } from 'ant-design-vue';
defineOptions({
name: 'FormModelDemo',
});
const gridApi = ref();
const data = ref({});

View File

@@ -4,9 +4,7 @@ import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { Descriptions } from 'ant-design-vue';
defineOptions({
name: 'FormModelDemo',
});
const gridApi = ref();
const data = ref({});

View File

@@ -4,9 +4,7 @@ import { ref } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { Descriptions } from 'ant-design-vue';
defineOptions({
name: 'FormModelDemo',
});
const gridApi = ref();
const data = ref({});

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createAdmin, updateAdmin } from '#/views/system/admin/api';
import { modalFormProps } from '#/views/system/admin/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createBaseConfig, updateBaseConfig } from '#/views/system/base-config/api';
import { modalFormProps } from '#/views/system/base-config/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createMenu, updateMenu } from '../api';
import { modalFormProps } from '../config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createPlatform, updatePlatform } from '#/views/system/platform/api';
import { modalFormProps } from '#/views/system/platform/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createProcess, updateProcess } from '#/views/system/process/api';
import { modalFormProps } from '#/views/system/process/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createRegion, updateRegion } from '#/views/system/region/api';
import { modalFormProps } from '#/views/system/region/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createRole, updateRole } from '#/views/system/role/api';
import { modalFormProps } from '#/views/system/role/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -11,9 +11,7 @@ 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();
@@ -52,10 +50,14 @@ const [Modal, modalApi] = useVbenModal({
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.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);
formApi.setValues({
...values,
start_time: dayjs(values.start_time, 'HH:mm'),
end_time: dayjs(values.end_time, 'HH:mm')
});
}
}
},

View File

@@ -151,6 +151,21 @@ export const modalFormProps: VbenFormProps = {
label: '详细地址',
rules: 'required',
},
{
component: 'UploadImage',
fieldName: 'url',
label: '轮播图',
rules: 'required',
dependencies: {
show: (values) => {
return values.id == null;
},
triggerFields: ['id'],
},
componentProps: {
maxCount: 9,
},
},
{
component: 'Divider',
fieldName: '',

View File

@@ -35,11 +35,21 @@ export const gridOptions: VxeGridProps<RowType> = {
// { field: 'erp_id', title: 'erpID' },
// { field: 'shouzimu', title: '诊所首字母' },
{ field: 'position', title: '详细地址' },
{ field: 'new_admin.nick_name', title: '业务员' },
// { field: 'contact', title: '联系人' },
{ field: 'mobile', title: '联系人、电话', slots: { default: 'mobile' } },
{ field: 'start_time', title: '营业时间', slots: { default: 'start-time' } },
{
field: 'start_time',
title: '营业时间',
slots: { default: 'start-time' },
},
{ field: 'created_at', title: '注册时间' },
{ type: 'html', title: '操作', align: 'right', slots: { default: 'action' } },
{
type: 'html',
title: '操作',
align: 'right',
slots: { default: 'action' },
},
],
keepSource: true,
pagerConfig: {},

View File

@@ -9,9 +9,7 @@ import { useVbenForm } from '#/adapter/form';
import { createSupplier, updateSupplier } from '#/views/system/supplier/api';
import { modalFormProps } from '#/views/system/supplier/config/form';
defineOptions({
name: 'FormModelDemo',
});
const isUpdate = ref(false);
const gridApi = ref();

View File

@@ -5,9 +5,7 @@ import { message } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
defineOptions({
name: 'FormModelDemo',
});
function onSubmit(values: Record<string, any>) {
message.info(JSON.stringify(values)); // 只会执行一次