Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
48512367
提交
48512367
authored
11月 07, 2022
作者:
leon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户管理fix
上级
8d6fce93
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
226 行增加
和
149 行删除
+226
-149
.env.development
.env.development
+1
-1
index.ts
src/commonSchemaProperty/index.ts
+33
-1
BasicForm.vue
src/components/Form/src/BasicForm.vue
+0
-3
drawer.vue
src/views/order/operation-order/drawer.vue
+12
-7
index.vue
src/views/order/operation-order/index.vue
+17
-13
schema.ts
src/views/order/operation-order/schema.ts
+150
-109
index.vue
src/views/system/doctor/index.vue
+1
-1
drawer.vue
src/views/system/user/drawer.vue
+12
-14
没有找到文件。
.env.development
浏览文件 @
48512367
...
@@ -13,7 +13,7 @@ VITE_PUBLIC_PATH=/
...
@@ -13,7 +13,7 @@ VITE_PUBLIC_PATH=/
VITE_DROP_CONSOLE=false
VITE_DROP_CONSOLE=false
# Basic interface address SPA
# Basic interface address SPA
VITE_GLOB_API_URL=http://1
01.34.156.75:8101
VITE_GLOB_API_URL=http://1
92.168.101.69:8087
# File upload address, optional
# File upload address, optional
VITE_GLOB_UPLOAD_URL=http://192.168.101.69:8087/v1/sys/upload
VITE_GLOB_UPLOAD_URL=http://192.168.101.69:8087/v1/sys/upload
...
...
src/commonSchemaProperty/index.ts
浏览文件 @
48512367
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,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'
;
import
*
as
HospitalApi
from
'/@/api/system/hospitalApi'
;
import
*
as
DoctorApi
from
'/@/api/system/doctorApi'
;
export
const
getDistributorText
=
(
text
)
=>
{
export
const
getDistributorText
=
(
text
)
=>
{
if
(
text
===
0
)
{
if
(
text
===
0
)
{
...
@@ -76,4 +77,35 @@ const getHospitalId = ({ colProps }) => {
...
@@ -76,4 +77,35 @@ const getHospitalId = ({ colProps }) => {
};
};
};
};
export
{
getDistributorId
,
getHospitalId
};
const
getDoctorId
=
({
colProps
})
=>
{
return
{
field
:
'doctorId'
,
label
:
'医生'
,
defaultValue
:
undefined
,
form
:
{
itemProps
:
{
validateTrigger
:
'blur'
,
},
componentProps
:
{
labelInValue
:
true
,
api
:
DoctorApi
.
all
,
params
:
{},
resultField
:
'records'
,
labelField
:
'name'
,
valueField
:
'id'
,
allowClear
:
false
,
placeholder
:
'医生'
,
optionFilterProp
:
'label'
,
showSearch
:
true
,
},
colProps
,
component
:
'ApiSelect'
,
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请选择医生!'
}],
},
table
:
{
customRender
:
({
record
})
=>
get
(
record
,
'hospital.name'
)
||
'(已删除/不存在)'
,
},
};
};
export
{
getDistributorId
,
getHospitalId
,
getDoctorId
};
src/components/Form/src/BasicForm.vue
浏览文件 @
48512367
...
@@ -203,9 +203,6 @@
...
@@ -203,9 +203,6 @@
(
schemas
)
=>
{
(
schemas
)
=>
{
resetSchema
(
schemas
??
[]);
resetSchema
(
schemas
??
[]);
},
},
{
deep
:
true
,
},
);
);
watch
(
watch
(
...
...
src/views/order/operation-order/drawer.vue
浏览文件 @
48512367
<
template
>
<
template
>
<BasicDrawer
v-bind=
"$attrs"
@
register=
"registerDrawer"
showFooter
:confirmDisabled=
"getConfirmDisabled"
:title=
"getTitle"
width=
"600px"
@
ok=
"handleSubmit"
>
<BasicDrawer
v-bind=
"$attrs"
@
register=
"registerDrawer"
showFooter
:confirmDisabled=
"getConfirmDisabled"
:title=
"getTitle"
width=
"1000px"
@
ok=
"handleSubmit"
>
<a-spin
:spinning=
"isLoading"
>
<a-spin
:spinning=
"isLoading"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
/>
</a-spin>
</a-spin>
...
@@ -65,17 +73,13 @@
...
@@ -65,17 +73,13 @@
return
false
;
return
false
;
}
}
});
});
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'新增'
:
'编辑'
));
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'新增'
:
'编辑'
));
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
try
{
try
{
const
values
=
await
validate
();
const
values
=
await
validate
();
setDrawerProps
({
confirmLoading
:
true
});
setDrawerProps
({
confirmLoading
:
true
});
const
{
const
{
hospitalId
,
...
rest
}
=
values
;
hospitalId
,
...
rest
}
=
values
;
const
action
=
!
unref
(
isUpdate
)
?
OperationOrderApi
.
add
:
OperationOrderApi
.
update
;
const
action
=
!
unref
(
isUpdate
)
?
OperationOrderApi
.
add
:
OperationOrderApi
.
update
;
const
data
=
!
unref
(
isUpdate
)
const
data
=
!
unref
(
isUpdate
)
?
{
?
{
...
@@ -83,7 +87,8 @@
...
@@ -83,7 +87,8 @@
hospitalId
:
hospitalId
.
value
,
hospitalId
:
hospitalId
.
value
,
hospitalName
:
hospitalId
.
label
,
hospitalName
:
hospitalId
.
label
,
}
}
:
Object
.
assign
({},
:
Object
.
assign
(
{},
{
{
...
rest
,
...
rest
,
id
:
unref
(
entityId
),
id
:
unref
(
entityId
),
...
...
src/views/order/operation-order/index.vue
浏览文件 @
48512367
...
@@ -76,23 +76,19 @@
...
@@ -76,23 +76,19 @@
import
componentSetting
from
'/@/settings/componentSetting'
;
import
componentSetting
from
'/@/settings/componentSetting'
;
import
OperationOrderDrawer
from
'./drawer.vue'
;
import
OperationOrderDrawer
from
'./drawer.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./schema'
;
import
{
columns
,
searchFormSchema
}
from
'./schema'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
const
userStore
=
useUserStore
();
const
{
hasPermission
}
=
usePermission
();
const
{
hasPermission
}
=
usePermission
();
const
go
=
useGo
();
const
go
=
useGo
();
const
{
const
{
formConfig
,
showTableSetting
,
bordered
,
showIndexColumn
}
=
componentSetting
.
table
;
formConfig
,
showTableSetting
,
bordered
,
showIndexColumn
,
}
=
componentSetting
.
table
;
const
checkedKeys
=
ref
<
Array
<
string
|
number
>>
([]);
const
checkedKeys
=
ref
<
Array
<
string
|
number
>>
([]);
const
onSelectChange
=
(
selectedRowKeys
:
(
string
|
number
)[])
=>
{
const
onSelectChange
=
(
selectedRowKeys
:
(
string
|
number
)[])
=>
{
checkedKeys
.
value
=
selectedRowKeys
;
checkedKeys
.
value
=
selectedRowKeys
;
}
}
;
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerTable
,
{
reload
,
setLoading
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
setLoading
}]
=
useTable
({
title
:
'手术订单管理'
,
title
:
'手术订单管理'
,
api
:
(
params
)
=>
OperationOrderApi
.
search
(
handleParams
(
params
)),
api
:
(
params
)
=>
OperationOrderApi
.
search
(
handleParams
(
params
)),
columns
,
columns
,
...
@@ -142,6 +138,10 @@
...
@@ -142,6 +138,10 @@
}
}
}
}
});
});
// 如果是经销商,只能看到自己的数据
if
(
userStore
.
getIsDistributor
)
{
handledParams
.
distributorId
=
userStore
.
getDistributorId
;
}
return
handledParams
;
return
handledParams
;
};
};
...
@@ -160,18 +160,22 @@
...
@@ -160,18 +160,22 @@
const
handleDelete
=
(
record
:
Recordable
)
=>
{
const
handleDelete
=
(
record
:
Recordable
)
=>
{
setLoading
(
true
);
setLoading
(
true
);
OperationOrderApi
.
remove
(
record
.
id
).
then
((
_
)
=>
{
OperationOrderApi
.
remove
(
record
.
id
)
.
then
((
_
)
=>
{
reload
();
reload
();
}).
catch
(()
=>
{
})
.
catch
(()
=>
{
setLoading
(
false
);
setLoading
(
false
);
});
});
};
};
const
handleBatchDelete
=
()
=>
{
const
handleBatchDelete
=
()
=>
{
setLoading
(
true
);
setLoading
(
true
);
OperationOrderApi
.
batchRemove
(
checkedKeys
.
value
).
then
((
_
)
=>
{
OperationOrderApi
.
batchRemove
(
checkedKeys
.
value
)
.
then
((
_
)
=>
{
reload
();
reload
();
}).
catch
(()
=>
{
})
.
catch
(()
=>
{
setLoading
(
false
);
setLoading
(
false
);
});
});
};
};
...
...
src/views/order/operation-order/schema.ts
浏览文件 @
48512367
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
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
{
useUserStore
}
from
'/@/store/modules/user
'
;
import
*
as
HospitalApi
from
'/@/api/system/hospitalApi
'
;
import
{
getDistributorId
,
getDoctorId
,
getHospitalId
}
from
'/@/commonSchemaProperty
'
;
export
enum
YesNoEnum
{
export
enum
YesNoEnum
{
YES
=
'是'
,
YES
=
'是'
,
...
@@ -37,7 +37,7 @@ for (const key in StatusEnum) {
...
@@ -37,7 +37,7 @@ for (const key in StatusEnum) {
}
}
const
colProps
=
{
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
lg
:
{
span
:
8
}
};
const
colProps
=
{
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
lg
:
{
span
:
8
}
};
const
colPropsInDrawer
=
{
span
:
24
};
const
colPropsInDrawer
=
{
span
:
12
};
export
const
schema
=
{
export
const
schema
=
{
model
:
'OperationOrder'
,
model
:
'OperationOrder'
,
...
@@ -45,36 +45,20 @@ export const schema = {
...
@@ -45,36 +45,20 @@ export const schema = {
properties
:
[
properties
:
[
{
{
field
:
'id'
,
field
:
'id'
,
label
:
'ID
系统自动生成
'
,
label
:
'ID'
,
defaultValue
:
undefined
,
defaultValue
:
undefined
,
form
:
{
form
:
{
componentProps
:
{
componentProps
:
{
allowClear
:
false
,
allowClear
:
false
,
placeholder
:
'ID
系统自动生成
'
,
placeholder
:
'ID'
,
},
},
colProps
,
colProps
,
component
:
'InputNumber'
,
component
:
'InputNumber'
,
rules
:
[{
required
:
true
,
message
:
'请输入ID系统自动生成!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入ID!'
}],
},
table
:
{
},
},
{
field
:
'distributorId'
,
label
:
'经销商id'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
allowClear
:
false
,
placeholder
:
'经销商id'
,
},
colProps
,
component
:
'InputNumber'
,
rules
:
[{
required
:
true
,
message
:
'请输入经销商id!'
}],
},
table
:
{
},
},
table
:
{},
},
},
getDistributorId
({
colProps
}),
{
{
field
:
'orderSn'
,
field
:
'orderSn'
,
label
:
'订单编号'
,
label
:
'订单编号'
,
...
@@ -88,8 +72,7 @@ export const schema = {
...
@@ -88,8 +72,7 @@ export const schema = {
component
:
'Input'
,
component
:
'Input'
,
rules
:
[{
required
:
true
,
message
:
'请输入订单编号!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入订单编号!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'productLineName'
,
field
:
'productLineName'
,
...
@@ -103,31 +86,9 @@ export const schema = {
...
@@ -103,31 +86,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 +101,7 @@ export const schema = {
...
@@ -140,8 +101,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'InputNumber'
,
component
:
'InputNumber'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'saleUserName'
,
field
:
'saleUserName'
,
...
@@ -155,24 +115,9 @@ export const schema = {
...
@@ -155,24 +115,9 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
{
field
:
'doctorId'
,
label
:
'医生id'
,
defaultValue
:
undefined
,
form
:
{
componentProps
:
{
allowClear
:
true
,
placeholder
:
'医生id'
,
},
colProps
,
component
:
'InputNumber'
,
},
table
:
{
},
},
},
getDoctorId
({
colProps
}),
{
{
field
:
'doctorName'
,
field
:
'doctorName'
,
label
:
'医生名称'
,
label
:
'医生名称'
,
...
@@ -185,8 +130,7 @@ export const schema = {
...
@@ -185,8 +130,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'surgicalName'
,
field
:
'surgicalName'
,
...
@@ -200,8 +144,7 @@ export const schema = {
...
@@ -200,8 +144,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'surgicalTime'
,
field
:
'surgicalTime'
,
...
@@ -217,8 +160,7 @@ export const schema = {
...
@@ -217,8 +160,7 @@ export const schema = {
showTime
:
true
,
showTime
:
true
,
},
},
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'deliveryTime'
,
field
:
'deliveryTime'
,
...
@@ -234,8 +176,7 @@ export const schema = {
...
@@ -234,8 +176,7 @@ export const schema = {
showTime
:
true
,
showTime
:
true
,
},
},
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'needTool'
,
field
:
'needTool'
,
...
@@ -252,7 +193,7 @@ export const schema = {
...
@@ -252,7 +193,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 +210,7 @@ export const schema = {
...
@@ -269,8 +210,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'receiveName'
,
field
:
'receiveName'
,
...
@@ -284,8 +224,7 @@ export const schema = {
...
@@ -284,8 +224,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'receivePhone'
,
field
:
'receivePhone'
,
...
@@ -299,8 +238,7 @@ export const schema = {
...
@@ -299,8 +238,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'address'
,
field
:
'address'
,
...
@@ -314,8 +252,7 @@ export const schema = {
...
@@ -314,8 +252,7 @@ export const schema = {
component
:
'InputTextArea'
,
component
:
'InputTextArea'
,
colProps
:
{
span
:
24
},
colProps
:
{
span
:
24
},
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'status'
,
field
:
'status'
,
...
@@ -333,7 +270,7 @@ export const schema = {
...
@@ -333,7 +270,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 +291,7 @@ export const schema = {
...
@@ -354,7 +291,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 +308,7 @@ export const schema = {
...
@@ -371,8 +308,7 @@ export const schema = {
colProps
,
colProps
,
component
:
'Input'
,
component
:
'Input'
,
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'deleteStatus'
,
field
:
'deleteStatus'
,
...
@@ -389,7 +325,7 @@ export const schema = {
...
@@ -389,7 +325,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 +343,7 @@ export const schema = {
...
@@ -407,8 +343,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 +358,7 @@ export const schema = {
...
@@ -423,8 +358,7 @@ export const schema = {
component
:
'Input'
,
component
:
'Input'
,
rules
:
[{
required
:
true
,
message
:
'请输入操作人!'
}],
rules
:
[{
required
:
true
,
message
:
'请输入操作人!'
}],
},
},
table
:
{
table
:
{},
},
},
},
{
{
field
:
'createTime'
,
field
:
'createTime'
,
...
@@ -441,8 +375,7 @@ export const schema = {
...
@@ -441,8 +375,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 +392,123 @@ export const schema = {
...
@@ -459,18 +392,123 @@ 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'
,
export
const
searchFormSchema
:
FormSchema
[]
=
schema
.
properties
.
filter
(
item
=>
queryFields
.
includes
(
item
.
field
))
'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'
,
];
const
userStore
=
useUserStore
();
export
const
searchFormSchema
:
FormSchema
[]
=
schema
.
properties
.
filter
((
item
)
=>
queryFields
.
includes
(
item
.
field
))
.
filter
((
item
)
=>
{
if
(
item
.
field
===
'distributorId'
)
{
return
queryFields
.
includes
(
item
.
field
)
&&
userStore
.
getDistributorId
===
0
;
}
else
{
return
queryFields
.
includes
(
item
.
field
);
}
})
.
map
(
.
map
(
({
field
,
label
,
form
:
{
rules
=
[],
...
formProps
}
})
=>
({
field
,
label
,
form
:
{
rules
=
[],
...
formProps
}
})
=>
({
({
...
@@ -482,7 +520,8 @@ export const searchFormSchema: FormSchema[] = schema.properties.filter(item => q
...
@@ -482,7 +520,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 +533,19 @@ export const formSchema: FormSchema[] = schema.properties.filter(item => editFie
...
@@ -494,17 +533,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/index.vue
浏览文件 @
48512367
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerTable
,
{
reload
,
setLoading
,
getLoading
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
setLoading
}]
=
useTable
({
title
:
'医生管理'
,
title
:
'医生管理'
,
api
:
(
params
)
=>
DoctorApi
.
search
(
handleParams
(
params
)),
api
:
(
params
)
=>
DoctorApi
.
search
(
handleParams
(
params
)),
columns
,
columns
,
...
...
src/views/system/user/drawer.vue
浏览文件 @
48512367
...
@@ -33,18 +33,7 @@
...
@@ -33,18 +33,7 @@
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
});
});
const
[
registerForm
,
{
resetFields
,
setFieldsValue
,
validate
}]
=
useForm
(
useFormProps
.
value
);
const
[
registerForm
,
{
resetFields
,
setFieldsValue
,
validate
,
updateSchema
}]
=
useForm
(
useFormProps
.
value
);
/**
* @description: 编辑时候影藏密码表单项 , 创建时候显示
*/
const
handlePwdFiled
=
()
=>
{
useFormProps
.
value
.
schemas
?.
forEach
((
item
:
any
)
=>
{
if
(
item
.
field
===
PASSWORD
)
{
item
.
show
=
!
unref
(
isUpdate
);
}
});
};
// id 查询
// id 查询
const
{
const
{
...
@@ -68,9 +57,12 @@
...
@@ -68,9 +57,12 @@
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isUpdate
.
value
=
!!
data
?.
isUpdate
;
entityId
.
value
=
data
?.
record
?.
id
;
entityId
.
value
=
data
?.
record
?.
id
;
handlePwdFiled
();
if
(
unref
(
isUpdate
))
{
if
(
unref
(
isUpdate
))
{
// 更新时,不显示密码
await
updateSchema
({
field
:
PASSWORD
,
show
:
false
,
});
await
execute
();
await
execute
();
if
(
detail
.
value
)
{
if
(
detail
.
value
)
{
const
formData
:
any
=
{
...
detail
.
value
};
const
formData
:
any
=
{
...
detail
.
value
};
...
@@ -90,6 +82,12 @@
...
@@ -90,6 +82,12 @@
formData
.
roleList
=
roleObj
;
formData
.
roleList
=
roleObj
;
await
setFieldsValue
(
formData
);
await
setFieldsValue
(
formData
);
}
}
}
else
{
// 新增时,显示密码
await
updateSchema
({
field
:
PASSWORD
,
show
:
true
,
});
}
}
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论