-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 操作记录与审批功能--story=115998324 #3463
base: master
Are you sure you want to change the base?
feat: 操作记录与审批功能--story=115998324 #3463
Conversation
bcs-services/bcs-bscp/ui/index.html
Outdated
@@ -16,6 +16,7 @@ | |||
var GRPC_ADDR = '{{ .GRPC_ADDR }}'; | |||
var HTTP_ADDR = '{{ .HTTP_ADDR }}'; | |||
var BK_NODE_HOST = '{{ .BK_NODE_HOST }}'; | |||
var User_Man_Host = '{{ .User_Man_Host }}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个变量名称是怎么定的?建议和其他变量格式保持大写字母加下划线的格式。
* @param data 参数 | ||
* @param publish_type 上线方式 | ||
* @param publish_time 定时上线时间 | ||
* @param allFirstPublish 所有待上线的分组是否为首次上线 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个参数没有用到
* 审批人员名单 | ||
* @returns | ||
*/ | ||
export const approverListApi = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个方法是返回一个api的地址,方法名称改一下,建议用get开头
}, | ||
{ | ||
path: ':appId(\\d+)', | ||
name: 'records-appId', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name的格式尽量保持一致,不要同时有中划线和驼峰两种命名方式
:clearable="false" | ||
:open="open" | ||
type="datetimerange" | ||
append-to-body |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个属性提到上面去
@click="open = !open"> | ||
<template #confirm> | ||
<div> | ||
<bk-button theme="primary" @click="handleChange" style="margin-right: 8px; height: 26px"> 确定 </bk-button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 样式不要写在模板里
- 国际化后面记得补上
].includes(row.audit.spec.status), | ||
orange: row.audit.spec.status === APPROVE_STATUS.PendApproval, | ||
}, | ||
]"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 换行
- 模板里不要写这么多的判断逻辑,直接封装一个方法,通过逻辑运算后返回对应的class名称
} else { | ||
tableData.value = data; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
时间处理多用dayjs
name: value, | ||
id: key, | ||
})); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面三个属性都是通过导入常量来处理的,是否有必要做成计算属性?
sendSearchData(); | ||
}, | ||
{ deep: true }, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
慎用watch,尤其是当监听的属性有多个变化源的时候,如果逻辑复杂的话,会导致状态非常不好维护。建议在修改searchValue的地方,手动调用后续处理逻辑。
emits('close', 'refresh'); | ||
} catch (e) { | ||
console.log(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确认按钮的pending交互,和上面的评论保持一致
No description provided.