|
|
@@ -41,12 +41,17 @@ export function handleArgreementType(formState?: UnwrapRef<FormState>) {
|
|
|
|
|
|
// 处理权限按钮
|
|
|
export function handlePermissionBtn(btnList: BtnList[], item: QhjAgreementConfig) {
|
|
|
- const { isvalid } = item
|
|
|
- const arr: string[] = []
|
|
|
- if (isvalid === 1) { // 正常
|
|
|
- arr.push('platinum_agreement_resume')
|
|
|
- } else if (isvalid === 2) { // 停用
|
|
|
- arr.push('platinum_agreement_stop')
|
|
|
+ if (item) {
|
|
|
+ const { isvalid } = item
|
|
|
+ const arr: string[] = []
|
|
|
+ if (isvalid === 1) { // 正常
|
|
|
+ arr.push('platinum_agreement_resume')
|
|
|
+ } else if (isvalid === 2) { // 停用
|
|
|
+ arr.push('platinum_agreement_stop')
|
|
|
+ }
|
|
|
+ return btnList.filter(e => !arr.includes(e.code))
|
|
|
+ } else {
|
|
|
+ return []
|
|
|
}
|
|
|
- return btnList.filter(e => !arr.includes(e.code))
|
|
|
+
|
|
|
}
|