Browse Source

代码优化

master
lizhi 3 years ago
parent
commit
732c041141
  1. 2
      .env.development
  2. 2
      src/views/institution/address/address.data.ts
  3. 9
      src/views/institution/doctor/doctor.data.ts
  4. 6
      src/views/system/project/project.data.ts
  5. 3
      src/views/system/role/RoleDrawer.vue

2
.env.development

@ -4,7 +4,7 @@ VITE_PUBLIC_PATH = / @@ -4,7 +4,7 @@ VITE_PUBLIC_PATH = /
# 本地开发代理,可以解决跨域及多地址代理
# 如果接口地址匹配到,则会转发到http://localhost:3000,防止本地出现跨域问题
# 可以有多个,注意多个不能换行,否则代理将会失效
VITE_PROXY = [["/api","http://localhost:9999"],["/upload","http://localhost:9999/system_proxy/system/file/upload"]]
VITE_PROXY = [["/api","http://192.168.3.10:9999"],["/upload","http://192.168.3.10:9999/system_proxy/system/file/upload"]]
# 是否删除console.log
VITE_DROP_CONSOLE = false

2
src/views/institution/address/address.data.ts

@ -108,7 +108,7 @@ export const addressFormSchema: FormSchema[] = [ @@ -108,7 +108,7 @@ export const addressFormSchema: FormSchema[] = [
},
{
field: 'code',
label: '区域码',
label: '区域码',
component: 'Input',
required: true,

9
src/views/institution/doctor/doctor.data.ts

@ -192,7 +192,14 @@ export const doctorFormSchema: FormSchema[] = [ @@ -192,7 +192,14 @@ export const doctorFormSchema: FormSchema[] = [
field: 'email',
label: '医生邮箱',
component: 'Input',
required: false,
rules: [
{
type: 'email',
message: '请输入正确的邮箱',
validateTrigger: 'change',
required: true
}
],
},
{
field: 'detailAddress',

6
src/views/system/project/project.data.ts

@ -137,7 +137,8 @@ export const formSchema: FormSchema[] = [ @@ -137,7 +137,8 @@ export const formSchema: FormSchema[] = [
{
pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'),
message: '请输入正确的手机号码!',
validateTrigger: 'change'
validateTrigger: 'change',
required: true
}
],
colProps: {
@ -165,7 +166,8 @@ export const formSchema: FormSchema[] = [ @@ -165,7 +166,8 @@ export const formSchema: FormSchema[] = [
{
type: 'email',
message: '请输入正确的邮箱地址!',
validateTrigger: 'change'
validateTrigger: 'change',
required: true
}
],
colProps: {

3
src/views/system/role/RoleDrawer.vue

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
showFooter
@ok="handleSubmit"
@register="registerDrawer"
@visible-change="state.checkedKeys={}"
>
<BasicForm @register="registerForm">
<template #menu="{ model, field }">
@ -49,7 +50,7 @@ @@ -49,7 +50,7 @@
//
menuTree: [],
//
checkedKeys: {}
checkedKeys: {},
});
/** https://v3.cn.vuejs.org/api/options-data.html#emits */
const emit = defineEmits(['success', 'register']);

Loading…
Cancel
Save