Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
d46b853a
提交
d46b853a
authored
10月 27, 2022
作者:
leon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
schema医院id属性抽出
上级
47bfb141
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
170 行增加
和
107 行删除
+170
-107
index.ts
src/commonSchemaProperty/index.ts
+28
-1
schema.ts
src/views/order/operation-order/schema.ts
+137
-77
schema.ts
src/views/system/doctor/schema.ts
+2
-26
schema.ts
src/views/system/hospital/schema.ts
+3
-3
没有找到文件。
src/commonSchemaProperty/index.ts
浏览文件 @
d46b853a
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
*/
*/
import
*
as
DistributorApi
from
'/@/api/system/distributorApi'
;
import
*
as
DistributorApi
from
'/@/api/system/distributorApi'
;
import
get
from
'lodash.get'
;
import
get
from
'lodash.get'
;
import
*
as
HospitalApi
from
'/@/api/system/hospitalApi'
;
const
getDistributorId
=
({
colProps
})
=>
{
const
getDistributorId
=
({
colProps
})
=>
{
return
{
return
{
...
@@ -30,4 +31,30 @@ const getDistributorId = ({ colProps }) => {
...
@@ -30,4 +31,30 @@ const getDistributorId = ({ colProps }) => {
};
};
};
};
export
{
getDistributorId
};
const
getHospitalId
=
({
colProps
})
=>
{
return
{
field
:
'hospitalId'
,
label
:
'医院'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
labelInValue
:
true
,
api
:
HospitalApi
.
all
,
params
:
{},
resultField
:
'records'
,
labelField
:
'name'
,
valueField
:
'id'
,
allowClear
:
false
,
placeholder
:
'医院'
,
},
colProps
,
component
:
'ApiSelect'
,
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请输入医院!'
}],
},
table
:
{
customRender
:
({
text
,
record
})
=>
get
(
record
,
'hospital.name'
)
||
text
,
},
};
};
export
{
getDistributorId
,
getHospitalId
};
src/views/order/operation-order/schema.ts
浏览文件 @
d46b853a
...
@@ -8,8 +8,7 @@
...
@@ -8,8 +8,7 @@
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
get
from
'lodash.get'
;
import
{
getHospitalId
}
from
'/@/commonSchemaProperty'
;
import
*
as
HospitalApi
from
'/@/api/system/hospitalApi'
;
export
enum
YesNoEnum
{
export
enum
YesNoEnum
{
YES
=
'是'
,
YES
=
'是'
,
...
@@ -56,8 +55,7 @@ export const schema = {
...
@@ -56,8 +55,7 @@ export const schema = {
component
:
'InputNumber'
,
component
:
'InputNumber'
,
rules
:
[{
required
:
true
,
message
:
'请输入ID系统自动生成!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入ID系统自动生成!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'distributorId'
,
field
:
'distributorId'
,
...
@@ -72,8 +70,7 @@ export const schema = {
...
@@ -72,8 +70,7 @@ export const schema = {
component
:
'InputNumber'
,
component
:
'InputNumber'
,
rules
:
[{
required
:
true
,
message
:
'请输入经销商id!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入经销商id!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'orderSn'
,
field
:
'orderSn'
,
...
@@ -88,8 +85,7 @@ export const schema = {
...
@@ -88,8 +85,7 @@ export const schema = {
component
:
'Input'
,
component
:
'Input'
,
rules
:
[{
required
:
true
,
message
:
'请输入订单编号!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入订单编号!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'productLineName'
,
field
:
'productLineName'
,
...
@@ -103,31 +99,9 @@ export const schema = {
...
@@ -103,31 +99,9 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
{
field
:
'hospitalId'
,
label
:
'医院id'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
labelInValue
:
true
,
api
:
HospitalApi
.
all
,
params
:
{},
resultField
:
'records'
,
labelField
:
'id'
,
valueField
:
'id'
,
allowClear
:
true
,
placeholder
:
'医院id'
,
},
colProps
,
component
:
'ApiSelect'
,
},
table
:
{
customRender
:
({
text
,
record
})
=>
get
(
record
,
'hospital.name'
)
||
text
,
},
},
},
getHospitalId
({
colProps
}),
{
{
field
:
'saleUserId'
,
field
:
'saleUserId'
,
label
:
'业务员id'
,
label
:
'业务员id'
,
...
@@ -140,8 +114,7 @@ export const schema = {
...
@@ -140,8 +114,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'InputNumber'
,
component
:
'InputNumber'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'saleUserName'
,
field
:
'saleUserName'
,
...
@@ -155,8 +128,7 @@ export const schema = {
...
@@ -155,8 +128,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'doctorId'
,
field
:
'doctorId'
,
...
@@ -170,8 +142,7 @@ export const schema = {
...
@@ -170,8 +142,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'InputNumber'
,
component
:
'InputNumber'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'doctorName'
,
field
:
'doctorName'
,
...
@@ -185,8 +156,7 @@ export const schema = {
...
@@ -185,8 +156,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'surgicalName'
,
field
:
'surgicalName'
,
...
@@ -200,8 +170,7 @@ export const schema = {
...
@@ -200,8 +170,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'surgicalTime'
,
field
:
'surgicalTime'
,
...
@@ -217,8 +186,7 @@ export const schema = {
...
@@ -217,8 +186,7 @@ export const schema = {
showTime
:
true
,
showTime
:
true
,
},
},
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'deliveryTime'
,
field
:
'deliveryTime'
,
...
@@ -234,8 +202,7 @@ export const schema = {
...
@@ -234,8 +202,7 @@ export const schema = {
showTime
:
true
,
showTime
:
true
,
},
},
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'needTool'
,
field
:
'needTool'
,
...
@@ -252,7 +219,7 @@ export const schema = {
...
@@ -252,7 +219,7 @@ export const schema = {
},
},
table
:
{
table
:
{
customRender
:
({
text
})
=>
{
customRender
:
({
text
})
=>
{
const
option
=
YesNoEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
const
option
=
YesNoEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
;
return
option
?
option
.
label
:
text
;
return
option
?
option
.
label
:
text
;
},
},
},
},
...
@@ -269,8 +236,7 @@ export const schema = {
...
@@ -269,8 +236,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'receiveName'
,
field
:
'receiveName'
,
...
@@ -284,8 +250,7 @@ export const schema = {
...
@@ -284,8 +250,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'receivePhone'
,
field
:
'receivePhone'
,
...
@@ -299,8 +264,7 @@ export const schema = {
...
@@ -299,8 +264,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'address'
,
field
:
'address'
,
...
@@ -314,8 +278,7 @@ export const schema = {
...
@@ -314,8 +278,7 @@ export const schema = {
component
:
'InputTextArea'
,
component
:
'InputTextArea'
,
colProps
:
{
span
:
24
},
colProps
:
{
span
:
24
},
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'status'
,
field
:
'status'
,
...
@@ -333,7 +296,7 @@ export const schema = {
...
@@ -333,7 +296,7 @@ export const schema = {
},
},
table
:
{
table
:
{
customRender
:
({
text
})
=>
{
customRender
:
({
text
})
=>
{
const
option
=
StatusEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
const
option
=
StatusEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
;
return
option
?
option
.
label
:
text
;
return
option
?
option
.
label
:
text
;
},
},
},
},
...
@@ -354,7 +317,7 @@ export const schema = {
...
@@ -354,7 +317,7 @@ export const schema = {
},
},
table
:
{
table
:
{
customRender
:
({
text
})
=>
{
customRender
:
({
text
})
=>
{
const
option
=
YesNoEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
const
option
=
YesNoEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
;
return
option
?
option
.
label
:
text
;
return
option
?
option
.
label
:
text
;
},
},
},
},
...
@@ -371,8 +334,7 @@ export const schema = {
...
@@ -371,8 +334,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'deleteStatus'
,
field
:
'deleteStatus'
,
...
@@ -389,7 +351,7 @@ export const schema = {
...
@@ -389,7 +351,7 @@ export const schema = {
},
},
table
:
{
table
:
{
customRender
:
({
text
})
=>
{
customRender
:
({
text
})
=>
{
const
option
=
YesNoEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
const
option
=
YesNoEnumOptions
.
find
((
item
)
=>
item
.
value
===
text
)
;
return
option
?
option
.
label
:
text
;
return
option
?
option
.
label
:
text
;
},
},
},
},
...
@@ -407,8 +369,7 @@ export const schema = {
...
@@ -407,8 +369,7 @@ export const schema = {
component
:
'InputNumber'
,
component
:
'InputNumber'
,
rules
:
[{
required
:
true
,
message
:
'请输入操作人ID!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入操作人ID!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'editorName'
,
field
:
'editorName'
,
...
@@ -423,8 +384,7 @@ export const schema = {
...
@@ -423,8 +384,7 @@ export const schema = {
component
:
'Input'
,
component
:
'Input'
,
rules
:
[{
required
:
true
,
message
:
'请输入操作人!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入操作人!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'createTime'
,
field
:
'createTime'
,
...
@@ -441,8 +401,7 @@ export const schema = {
...
@@ -441,8 +401,7 @@ export const schema = {
component
:
'RangePicker'
,
component
:
'RangePicker'
,
rules
:
[{
required
:
true
,
message
:
'请输入CreateTime!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入CreateTime!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'updateTime'
,
field
:
'updateTime'
,
...
@@ -459,18 +418,116 @@ export const schema = {
...
@@ -459,18 +418,116 @@ export const schema = {
component
:
'RangePicker'
,
component
:
'RangePicker'
,
rules
:
[{
required
:
true
,
message
:
'请输入UpdateTime!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入UpdateTime!'
}],
},
},
table
:
{
table
:
{},
},
},
},
],
],
};
};
const
queryFields
=
[
'id'
,
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
'editorName'
,
'createTime'
,
'updateTime'
];
const
queryFields
=
[
const
editFields
=
[
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
];
'id'
,
const
tableFields
=
[
'id'
,
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
'editorName'
,
'createTime'
,
'updateTime'
];
'distributorId'
,
const
descriptionFields
=
[
'id'
,
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
'editorName'
,
'createTime'
,
'updateTime'
];
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
'editorName'
,
'createTime'
,
'updateTime'
,
];
const
editFields
=
[
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
];
const
tableFields
=
[
'id'
,
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
'editorName'
,
'createTime'
,
'updateTime'
,
];
const
descriptionFields
=
[
'id'
,
'distributorId'
,
'orderSn'
,
'productLineName'
,
'hospitalId'
,
'saleUserId'
,
'saleUserName'
,
'doctorId'
,
'doctorName'
,
'surgicalName'
,
'surgicalTime'
,
'deliveryTime'
,
'needTool'
,
'logisticsMode'
,
'receiveName'
,
'receivePhone'
,
'address'
,
'status'
,
'type'
,
'remark'
,
'deleteStatus'
,
'editorId'
,
'editorName'
,
'createTime'
,
'updateTime'
,
];
export
const
searchFormSchema
:
FormSchema
[]
=
schema
.
properties
.
filter
(
item
=>
queryFields
.
includes
(
item
.
field
))
export
const
searchFormSchema
:
FormSchema
[]
=
schema
.
properties
.
filter
((
item
)
=>
queryFields
.
includes
(
item
.
field
))
.
map
(
.
map
(
({
field
,
label
,
form
:
{
rules
=
[],
...
formProps
}
})
=>
({
field
,
label
,
form
:
{
rules
=
[],
...
formProps
}
})
=>
({
({
...
@@ -482,7 +539,8 @@ export const searchFormSchema: FormSchema[] = schema.properties.filter(item => q
...
@@ -482,7 +539,8 @@ export const searchFormSchema: FormSchema[] = schema.properties.filter(item => q
}
as
FormSchema
),
}
as
FormSchema
),
);
);
export
const
formSchema
:
FormSchema
[]
=
schema
.
properties
.
filter
(
item
=>
editFields
.
includes
(
item
.
field
))
export
const
formSchema
:
FormSchema
[]
=
schema
.
properties
.
filter
((
item
)
=>
editFields
.
includes
(
item
.
field
))
.
map
(
.
map
(
({
field
,
label
,
defaultValue
,
form
})
=>
({
field
,
label
,
defaultValue
,
form
})
=>
({
({
...
@@ -494,17 +552,19 @@ export const formSchema: FormSchema[] = schema.properties.filter(item => editFie
...
@@ -494,17 +552,19 @@ export const formSchema: FormSchema[] = schema.properties.filter(item => editFie
}
as
FormSchema
),
}
as
FormSchema
),
);
);
export
const
columns
:
BasicColumn
[]
=
schema
.
properties
.
filter
(
item
=>
tableFields
.
includes
(
item
.
field
))
export
const
columns
:
BasicColumn
[]
=
schema
.
properties
.
filter
((
item
)
=>
tableFields
.
includes
(
item
.
field
))
.
map
(
.
map
(
({
field
,
label
,
table
})
=>
({
field
,
label
,
table
})
=>
({
({
dataIndex
:
field
,
dataIndex
:
field
,
title
:
label
,
title
:
label
,
...
table
,
...
table
,
}
as
BasicColumn
)
}
as
BasicColumn
)
,
);
);
export
const
descriptionColumns
:
BasicColumn
[]
=
schema
.
properties
.
filter
(
item
=>
descriptionFields
.
includes
(
item
.
field
))
export
const
descriptionColumns
:
BasicColumn
[]
=
schema
.
properties
.
filter
((
item
)
=>
descriptionFields
.
includes
(
item
.
field
))
.
map
(
.
map
(
({
field
,
label
,
table
})
=>
({
field
,
label
,
table
})
=>
({
({
...
...
src/views/system/doctor/schema.ts
浏览文件 @
d46b853a
...
@@ -8,9 +8,7 @@
...
@@ -8,9 +8,7 @@
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
get
from
'lodash.get'
;
import
{
getDistributorId
,
getHospitalId
}
from
'/@/commonSchemaProperty'
;
import
*
as
HospitalApi
from
'/@/api/system/hospitalApi'
;
import
{
getDistributorId
}
from
'/@/commonSchemaProperty'
;
export
enum
SexEnum
{
export
enum
SexEnum
{
MALE
=
'男'
,
MALE
=
'男'
,
...
@@ -60,29 +58,7 @@ export const schema = {
...
@@ -60,29 +58,7 @@ export const schema = {
table
:
{},
table
:
{},
},
},
getDistributorId
({
colProps
}),
getDistributorId
({
colProps
}),
{
getHospitalId
({
colProps
}),
field
:
'hospitalId'
,
label
:
'医院id'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
labelInValue
:
true
,
api
:
HospitalApi
.
all
,
params
:
{},
resultField
:
'records'
,
labelField
:
'name'
,
valueField
:
'id'
,
allowClear
:
false
,
placeholder
:
'医院id'
,
},
colProps
,
component
:
'ApiSelect'
,
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请输入医院id!'
}],
},
table
:
{
customRender
:
({
text
,
record
})
=>
get
(
record
,
'hospital.name'
)
||
text
,
},
},
{
{
field
:
'name'
,
field
:
'name'
,
label
:
'医生名称'
,
label
:
'医生名称'
,
...
...
src/views/system/hospital/schema.ts
浏览文件 @
d46b853a
...
@@ -303,7 +303,7 @@ export const schema = {
...
@@ -303,7 +303,7 @@ export const schema = {
};
};
const
queryFields
=
[
const
queryFields
=
[
'distributorId'
,
//
'distributorId',
'name'
,
'name'
,
'abbreviationName'
,
'abbreviationName'
,
'code'
,
'code'
,
...
@@ -335,7 +335,7 @@ const editFields = [
...
@@ -335,7 +335,7 @@ const editFields = [
'status'
,
'status'
,
];
];
const
tableFields
=
[
const
tableFields
=
[
'distributorId'
,
//
'distributorId',
'name'
,
'name'
,
'abbreviationName'
,
'abbreviationName'
,
'code'
,
'code'
,
...
@@ -355,7 +355,7 @@ const tableFields = [
...
@@ -355,7 +355,7 @@ const tableFields = [
];
];
const
descriptionFields
=
[
const
descriptionFields
=
[
'id'
,
'id'
,
'distributorId'
,
//
'distributorId',
'name'
,
'name'
,
'abbreviationName'
,
'abbreviationName'
,
'code'
,
'code'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论