Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
872ef813
提交
872ef813
authored
10月 31, 2022
作者:
袁伟伟
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://git.xinwangdao.com/china-resources-surgical/admin
上级
481be456
398699f1
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
38 行增加
和
23 行删除
+38
-23
index.ts
src/commonSchemaProperty/index.ts
+10
-1
reLoadHook.ts
src/hooks/myhooks/reLoadHook.ts
+1
-8
user.ts
src/store/modules/user.ts
+6
-0
index.vue
src/views/system/doctor/index.vue
+8
-5
schema.ts
src/views/system/doctor/schema.ts
+1
-1
index.vue
src/views/system/hospital/index.vue
+4
-2
index.vue
src/views/system/receiver/index.vue
+7
-5
schema.ts
src/views/system/receiver/schema.ts
+1
-1
没有找到文件。
src/commonSchemaProperty/index.ts
浏览文件 @
872ef813
...
@@ -31,7 +31,16 @@ const getDistributorId = ({ colProps }) => {
...
@@ -31,7 +31,16 @@ const getDistributorId = ({ colProps }) => {
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请选择经销商!'
}],
rules
:
[{
required
:
true
,
type
:
'object'
,
message
:
'请选择经销商!'
}],
},
},
table
:
{
table
:
{
customRender
:
({
text
,
record
})
=>
get
(
record
,
'distributor.name'
)
||
text
,
customRender
:
({
text
,
record
})
=>
{
const
getText
=
(
text
)
=>
{
if
(
text
===
0
)
{
return
'供应商创建'
;
}
else
{
return
'(已删除/不存在)'
;
}
};
return
get
(
record
,
'distributor.name'
)
||
getText
(
text
);
},
},
},
};
};
};
};
...
...
src/hooks/myhooks/reLoadHook.ts
浏览文件 @
872ef813
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
*/
*/
import
{
onActivated
,
ref
}
from
'vue'
;
import
{
onActivated
,
ref
}
from
'vue'
;
let
reload
:
()
=>
void
;
export
function
useActivatedReload
(
reload
)
{
const
activatedReload
=
()
=>
{
const
isOnActivated
=
ref
(
false
);
const
isOnActivated
=
ref
(
false
);
onActivated
(()
=>
{
onActivated
(()
=>
{
if
(
isOnActivated
.
value
)
{
if
(
isOnActivated
.
value
)
{
...
@@ -14,9 +12,4 @@ const activatedReload = () => {
...
@@ -14,9 +12,4 @@ const activatedReload = () => {
isOnActivated
.
value
=
true
;
isOnActivated
.
value
=
true
;
}
}
});
});
};
export
function
useActivatedReload
(
reloadFunc
)
{
reload
=
reloadFunc
;
return
activatedReload
;
}
}
src/store/modules/user.ts
浏览文件 @
872ef813
...
@@ -67,6 +67,12 @@ export const useUserStore = defineStore({
...
@@ -67,6 +67,12 @@ export const useUserStore = defineStore({
getDistributorId
():
number
{
getDistributorId
():
number
{
return
this
.
userInfo
?.
distributorId
as
number
;
return
this
.
userInfo
?.
distributorId
as
number
;
},
},
/**
* @description 是否是经销商 true 是 false
*/
getIsDistributor
():
boolean
{
return
this
.
getDistributorId
!==
0
;
},
},
},
actions
:
{
actions
:
{
setToken
(
info
:
string
|
undefined
)
{
setToken
(
info
:
string
|
undefined
)
{
...
...
src/views/system/doctor/index.vue
浏览文件 @
872ef813
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<span>
已选中
{{
checkedKeys
.
length
}}
条记录
</span>
<span>
已选中
{{
checkedKeys
.
length
}}
条记录
</span>
<a-button
type=
"link"
@
click=
"checkedKeys = []"
size=
"small"
>
清空
</a-button>
<a-button
type=
"link"
@
click=
"checkedKeys = []"
size=
"small"
>
清空
</a-button>
<a-popconfirm
<a-popconfirm
v-if=
"isShowHandleDelete()"
class=
"ml-4"
class=
"ml-4"
title=
"确定要全部删除吗?"
title=
"确定要全部删除吗?"
ok-text=
"是"
ok-text=
"是"
...
@@ -17,6 +18,7 @@
...
@@ -17,6 +18,7 @@
<a
href=
"#"
class=
"text-red-500"
>
删除
</a>
<a
href=
"#"
class=
"text-red-500"
>
删除
</a>
</a-popconfirm>
</a-popconfirm>
<a-popconfirm
<a-popconfirm
v-if=
"hasPermission('AUTH_SYSTEM_DOCTOR:PASSED')"
class=
"ml-4"
class=
"ml-4"
title=
"确定要全部通过审核吗?"
title=
"确定要全部通过审核吗?"
ok-text=
"是"
ok-text=
"是"
...
@@ -84,6 +86,7 @@
...
@@ -84,6 +86,7 @@
tooltip: '详情',
tooltip: '详情',
icon: 'ant-design:eye-outlined',
icon: 'ant-design:eye-outlined',
onClick: handleView.bind(null, record),
onClick: handleView.bind(null, record),
ifShow: hasPermission('AUTH_SYSTEM_DOCTOR:QUERY'),
},
},
{
{
tooltip: '删除',
tooltip: '删除',
...
@@ -113,7 +116,8 @@
...
@@ -113,7 +116,8 @@
getVerifyParams
,
getVerifyParams
,
StatusValEnum
,
StatusValEnum
,
}
from
'./schema'
;
}
from
'./schema'
;
import
{
onActivated
,
ref
,
unref
}
from
'vue'
;
const
{
hasPermission
}
=
usePermission
();
import
{
ref
}
from
'vue'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
BasicTable
,
useTable
,
TableAction
,
TableActionType
}
from
'/@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
,
TableActionType
}
from
'/@/components/Table'
;
import
{
isObject
}
from
'/@/utils/is'
;
import
{
isObject
}
from
'/@/utils/is'
;
...
@@ -127,6 +131,7 @@
...
@@ -127,6 +131,7 @@
import
{
BatchVerifyParams
}
from
'/@/api/model/doctor'
;
import
{
BatchVerifyParams
}
from
'/@/api/model/doctor'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
useActivatedReload
}
from
'/@/hooks/myhooks/reLoadHook'
;
import
{
useActivatedReload
}
from
'/@/hooks/myhooks/reLoadHook'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
const
go
=
useGo
();
const
go
=
useGo
();
const
{
formConfig
,
showTableSetting
,
bordered
,
showIndexColumn
}
=
componentSetting
.
table
;
const
{
formConfig
,
showTableSetting
,
bordered
,
showIndexColumn
}
=
componentSetting
.
table
;
const
basicTableRef
=
ref
<
TableActionType
>
();
const
basicTableRef
=
ref
<
TableActionType
>
();
...
@@ -166,7 +171,7 @@
...
@@ -166,7 +171,7 @@
},
},
});
});
useActivatedReload
(
reload
)
()
;
useActivatedReload
(
reload
);
const
handleParams
=
(
params
)
=>
{
const
handleParams
=
(
params
)
=>
{
const
{
pageNum
,
pageSize
}
=
params
;
const
{
pageNum
,
pageSize
}
=
params
;
...
@@ -190,10 +195,8 @@
...
@@ -190,10 +195,8 @@
}
}
});
});
// 如果是经销商,只能看到自己的数据
// 如果是经销商,只能看到自己的数据
if
(
userStore
.
get
DistributorId
!==
0
)
{
if
(
userStore
.
get
IsDistributor
)
{
handledParams
.
distributorId
=
userStore
.
getDistributorId
;
handledParams
.
distributorId
=
userStore
.
getDistributorId
;
}
else
if
(
userStore
.
getDistributorId
==
null
)
{
handledParams
.
distributorId
=
-
1
;
}
}
return
handledParams
;
return
handledParams
;
};
};
...
...
src/views/system/doctor/schema.ts
浏览文件 @
872ef813
...
@@ -46,7 +46,7 @@ export enum StatusValEnum {
...
@@ -46,7 +46,7 @@ export enum StatusValEnum {
}
}
export
const
isShowHandlePassed
=
(
status
:
string
):
boolean
=>
{
export
const
isShowHandlePassed
=
(
status
:
string
):
boolean
=>
{
return
hasPermission
(
'AUTH_SYSTEM_DOCTOR:PASSED'
)
&&
status
===
'PENDING_REVIEW
'
;
return
(
hasPermission
(
'AUTH_SYSTEM_DOCTOR:PASSED'
)
&&
status
===
'PENDING_REVIEW'
)
||
status
===
'FORBIDDEN
'
;
};
};
export
const
isShowHandleReject
=
(
status
:
string
):
boolean
=>
{
export
const
isShowHandleReject
=
(
status
:
string
):
boolean
=>
{
return
hasPermission
(
'AUTH_SYSTEM_DOCTOR:REJECT'
)
&&
status
===
'PENDING_REVIEW'
;
return
hasPermission
(
'AUTH_SYSTEM_DOCTOR:REJECT'
)
&&
status
===
'PENDING_REVIEW'
;
...
...
src/views/system/hospital/index.vue
浏览文件 @
872ef813
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<span>
已选中
{{
checkedKeys
.
length
}}
条记录
</span>
<span>
已选中
{{
checkedKeys
.
length
}}
条记录
</span>
<a-button
type=
"link"
@
click=
"checkedKeys = []"
size=
"small"
>
清空
</a-button>
<a-button
type=
"link"
@
click=
"checkedKeys = []"
size=
"small"
>
清空
</a-button>
<a-popconfirm
<a-popconfirm
v-if=
"hasPermission('AUTH_SYSTEM_HOSPITAL:DELETE')"
class=
"ml-4"
class=
"ml-4"
title=
"确定要全部删除吗?"
title=
"确定要全部删除吗?"
ok-text=
"是"
ok-text=
"是"
...
@@ -44,6 +45,7 @@
...
@@ -44,6 +45,7 @@
tooltip: '详情',
tooltip: '详情',
icon: 'ant-design:eye-outlined',
icon: 'ant-design:eye-outlined',
onClick: handleView.bind(null, record),
onClick: handleView.bind(null, record),
ifShow: hasPermission('AUTH_SYSTEM_HOSPITAL:QUERY'),
},
},
{
{
tooltip: '删除',
tooltip: '删除',
...
@@ -64,7 +66,7 @@
...
@@ -64,7 +66,7 @@
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
name=
"AUTH_SYSTEM_HOSPITAL"
>
<
script
lang=
"ts"
setup
name=
"AUTH_SYSTEM_HOSPITAL"
>
import
{
onActivated
,
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'/@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'/@/components/Table'
;
...
@@ -116,7 +118,7 @@
...
@@ -116,7 +118,7 @@
},
},
});
});
useActivatedReload
(
reload
)
()
;
useActivatedReload
(
reload
);
const
handleParams
=
(
params
)
=>
{
const
handleParams
=
(
params
)
=>
{
const
{
pageNum
,
pageSize
}
=
params
;
const
{
pageNum
,
pageSize
}
=
params
;
...
...
src/views/system/receiver/index.vue
浏览文件 @
872ef813
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<span>
已选中
{{
checkedKeys
.
length
}}
条记录
</span>
<span>
已选中
{{
checkedKeys
.
length
}}
条记录
</span>
<a-button
type=
"link"
@
click=
"checkedKeys = []"
size=
"small"
>
清空
</a-button>
<a-button
type=
"link"
@
click=
"checkedKeys = []"
size=
"small"
>
清空
</a-button>
<a-popconfirm
<a-popconfirm
v-if=
"isShowHandleDelete()"
class=
"ml-4"
class=
"ml-4"
title=
"确定要全部删除吗?"
title=
"确定要全部删除吗?"
ok-text=
"是"
ok-text=
"是"
...
@@ -17,6 +18,7 @@
...
@@ -17,6 +18,7 @@
<a
href=
"#"
class=
"text-red-500"
>
删除
</a>
<a
href=
"#"
class=
"text-red-500"
>
删除
</a>
</a-popconfirm>
</a-popconfirm>
<a-popconfirm
<a-popconfirm
v-if=
"hasPermission('AUTH_SYSTEM_RECEIVER:PASSED')"
class=
"ml-4"
class=
"ml-4"
title=
"确定要全部通过审核吗?"
title=
"确定要全部通过审核吗?"
ok-text=
"是"
ok-text=
"是"
...
@@ -83,6 +85,7 @@
...
@@ -83,6 +85,7 @@
tooltip: '详情',
tooltip: '详情',
icon: 'ant-design:eye-outlined',
icon: 'ant-design:eye-outlined',
onClick: handleView.bind(null, record),
onClick: handleView.bind(null, record),
ifShow: hasPermission('AUTH_SYSTEM_RECEIVER:QUERY'),
},
},
{
{
tooltip: '删除',
tooltip: '删除',
...
@@ -103,6 +106,7 @@
...
@@ -103,6 +106,7 @@
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
name=
"AUTH_SYSTEM_RECEIVER"
>
<
script
lang=
"ts"
setup
name=
"AUTH_SYSTEM_RECEIVER"
>
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'/@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'/@/components/Table'
;
...
@@ -127,7 +131,7 @@
...
@@ -127,7 +131,7 @@
import
{
BatchVerifyParams
}
from
'/@/api/model/doctor'
;
import
{
BatchVerifyParams
}
from
'/@/api/model/doctor'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
useActivatedReload
}
from
'/@/hooks/myhooks/reLoadHook'
;
import
{
useActivatedReload
}
from
'/@/hooks/myhooks/reLoadHook'
;
const
{
hasPermission
}
=
usePermission
();
const
go
=
useGo
();
const
go
=
useGo
();
const
{
formConfig
,
showTableSetting
,
bordered
,
showIndexColumn
}
=
componentSetting
.
table
;
const
{
formConfig
,
showTableSetting
,
bordered
,
showIndexColumn
}
=
componentSetting
.
table
;
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
...
@@ -165,7 +169,7 @@
...
@@ -165,7 +169,7 @@
fixed
:
'right'
,
fixed
:
'right'
,
},
},
});
});
useActivatedReload
(
reload
)
()
;
useActivatedReload
(
reload
);
const
handleParams
=
(
params
)
=>
{
const
handleParams
=
(
params
)
=>
{
const
{
pageNum
,
pageSize
}
=
params
;
const
{
pageNum
,
pageSize
}
=
params
;
const
handledParams
:
any
=
{
pageNum
,
pageSize
};
const
handledParams
:
any
=
{
pageNum
,
pageSize
};
...
@@ -188,10 +192,8 @@
...
@@ -188,10 +192,8 @@
}
}
});
});
// 如果是经销商,只能看到自己的数据
// 如果是经销商,只能看到自己的数据
if
(
userStore
.
get
DistributorId
!==
0
)
{
if
(
userStore
.
get
IsDistributor
)
{
handledParams
.
distributorId
=
userStore
.
getDistributorId
;
handledParams
.
distributorId
=
userStore
.
getDistributorId
;
}
else
if
(
userStore
.
getDistributorId
==
null
)
{
handledParams
.
distributorId
=
-
1
;
}
}
return
handledParams
;
return
handledParams
;
};
};
...
...
src/views/system/receiver/schema.ts
浏览文件 @
872ef813
...
@@ -55,7 +55,7 @@ for (const key in StatusEnum) {
...
@@ -55,7 +55,7 @@ for (const key in StatusEnum) {
}
}
export
const
isShowHandlePassed
=
(
status
:
string
):
boolean
=>
{
export
const
isShowHandlePassed
=
(
status
:
string
):
boolean
=>
{
return
hasPermission
(
'AUTH_SYSTEM_RECEIVER:PASSED'
)
&&
status
===
'PENDING_REVIEW
'
;
return
(
hasPermission
(
'AUTH_SYSTEM_RECEIVER:PASSED'
)
&&
status
===
'PENDING_REVIEW'
)
||
status
===
'FORBIDDEN
'
;
};
};
export
const
isShowHandleReject
=
(
status
:
string
):
boolean
=>
{
export
const
isShowHandleReject
=
(
status
:
string
):
boolean
=>
{
return
hasPermission
(
'AUTH_SYSTEM_RECEIVER:REJECT'
)
&&
status
===
'PENDING_REVIEW'
;
return
hasPermission
(
'AUTH_SYSTEM_RECEIVER:REJECT'
)
&&
status
===
'PENDING_REVIEW'
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论