@ -88,8 +88,8 @@ async function login (ctx, next) {
// await transaction.commit();
} catch (error) {
// await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`)
ctx.status = 400;
ctx.status = 400
let message = typeof error == 'string' ? error
: error.response.body.message || "登录失败"
if (message == '账号或密码错误') {
@ -34,8 +34,8 @@ const Server = (props) => {
<div style={{ width: 679, height: 40, fontSize: 28, fontWeight: 400, color: '#146AD7', lineHeight: '40px', marginTop: 40 }}>
点击可跳转服务器监控网站Grafana</div>
</div>
{/* <iframe frameBorder="0" src={pomsMonitor} style={{height: 'calc(100vh - 80px)', width: 'calc(100%)'}} /> */}
</>
)
}
@ -331,17 +331,18 @@ function pushModal (props) {
u.factor?.map(v => {
v.item.map(vv => factorItem.push(vv.name))
})
factorItem = [...new Set(factorItem)]
return <Form.CheckboxGroup
label={u.name + ':'}
key={u.name + index}
field={'factor' + u.id}
style={{ width: 695 }}
initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : []}
initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : (factorItem || [])}
direction='horizontal'
showClear
>
{
[...new Set(factorItem)].map((v, index) =>
factorItem?.map((v, index) =>
<Form.Checkbox value={v} key={v} style={{ width: 150 }}>{v}</Form.Checkbox>)
</Form.CheckboxGroup>