mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-08 19:16:39 +08:00
* 状态启用禁用修改
This commit is contained in:
parent
f27241251c
commit
432b41799d
@ -11,6 +11,7 @@ const (
|
||||
StatusEnabled int = 1 // 启用
|
||||
StatusDisable int = 2 // 禁用
|
||||
StatusDelete int = 3 // 已删除
|
||||
StatusOFF int = 0 // 禁用
|
||||
)
|
||||
|
||||
var StatusSlice = []int{StatusALL, StatusEnabled, StatusDisable, StatusDelete}
|
||||
var StatusSlice = []int{StatusALL, StatusEnabled, StatusDisable, StatusDelete, StatusOFF}
|
||||
|
@ -112,7 +112,7 @@ func (in *@{.varName}StatusInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
if in.Status <= 0 {
|
||||
if in.Status < 0 {
|
||||
err = gerror.New("状态不能为空")
|
||||
return
|
||||
}
|
||||
|
@ -123,7 +123,7 @@
|
||||
},@{end}
|
||||
@{ if eq .options.Step.HasStatus true } {
|
||||
label: '禁用',
|
||||
onClick: handleStatus.bind(null, record, 2),
|
||||
onClick: handleStatus.bind(null, record, 0),
|
||||
ifShow: () => {
|
||||
return record.status === 1;
|
||||
},
|
||||
@ -133,7 +133,7 @@
|
||||
label: '启用',
|
||||
onClick: handleStatus.bind(null, record, 1),
|
||||
ifShow: () => {
|
||||
return record.status === 2;
|
||||
return record.status === 0;
|
||||
},
|
||||
auth: ['/@{.apiPrefix}/status'],
|
||||
},@{end}
|
||||
|
Loading…
Reference in New Issue
Block a user