mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-09-06 05:16:54 +08:00
处理db.go冲突
This commit is contained in:
@@ -24,11 +24,11 @@ type ClientCertData struct {
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
Username string `json:"username" xorm:"varchar(60) not null"`
|
||||
GroupName string `json:"groupname" xorm:"varchar(60)"`
|
||||
Status int `json:"status" xorm:"int default 0"`
|
||||
Certificate string `json:"certificate" xorm:"text not null"`
|
||||
PrivateKey string `json:"private_key" xorm:"text not null"`
|
||||
SerialNumber string `json:"serial_number" xorm:"varchar(100) not null"`
|
||||
NotAfter time.Time `json:"not_after" xorm:"datetime not null"`
|
||||
Status int `json:"status" xorm:"int default 0"`
|
||||
CreatedAt time.Time `json:"created_at" xorm:"datetime created"`
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ func initDb() {
|
||||
}
|
||||
|
||||
// 初始化数据库
|
||||
err = xdb.Sync2(&User{}, &Setting{}, &Group{}, &IpMap{}, &AccessAudit{}, &Policy{}, &StatsNetwork{}, &StatsCpu{}, &StatsMem{}, &StatsOnline{}, &UserActLog{}, &ClientCertData{})
|
||||
err = xdb.Sync2(&User{}, &Setting{}, &Group{}, &IpMap{}, &AccessAudit{}, &Policy{}, &StatsNetwork{}, &StatsCpu{}, &StatsMem{}, &StatsOnline{}, &UserActLog{}, &PasswordReset{}, &ClientCertData{})
|
||||
if err != nil {
|
||||
base.Fatal(err)
|
||||
}
|
||||
|
@@ -134,8 +134,9 @@
|
||||
<el-dialog title="生成客户端证书" :visible.sync="generateCertDialog" width="450px">
|
||||
<el-form :model="generateForm" label-width="80px">
|
||||
<el-form-item label="用户名">
|
||||
<el-select v-model="generateForm.username" placeholder="请输入或选择用户名" filterable allow-create
|
||||
default-first-option style="width: 100%;" @change="onUserChange">
|
||||
<el-select v-model="generateForm.username" placeholder="请输入或选择用户名" filterable clearable allow-create
|
||||
default-first-option style="width: 100%;" @change="onUserChange"
|
||||
popper-class="custom-select-dropdown">
|
||||
<el-option v-for="user in userList" :key="user.username" :label="user.username"
|
||||
:value="user.username">
|
||||
</el-option>
|
||||
@@ -785,4 +786,14 @@ export default {
|
||||
line-height: 1.428;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
|
||||
/* 自定义下拉框样式 */
|
||||
.custom-select-dropdown .el-select-dropdown__wrap {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.custom-select-dropdown .el-select-dropdown__list {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user