|
20 | 20 | --> |
21 | 21 |
|
22 | 22 | <template> |
23 | | - <el-row :gutter="20"> |
24 | | - <el-col :span="24"> |
25 | | - <Panel> |
26 | | - <template #title>用户列表</template> |
27 | | - <template #default> |
28 | | - <el-row :gutter="20" class="row-mb"> |
29 | | - <el-col :md="12" :offset="0" class="col-md-responsive"> |
30 | | - <el-input |
31 | | - v-model="query.userName" |
32 | | - type="text" |
33 | | - placeholder="根据名字搜索" |
34 | | - size="small" |
35 | | - style="width: 180px; margin-right: 10px" |
36 | | - autocomplete="off" |
37 | | - :readonly="readonly" |
38 | | - @focus="() => (readonly = false)" |
39 | | - ></el-input> |
40 | | - <el-button size="small" type="primary" @click="refresh"> |
41 | | - <i class="el-icon-refresh"></i> 刷新/搜索 |
42 | | - </el-button> |
43 | | - </el-col> |
44 | | - <el-col :md="12" :offset="0" class="text-align-right col-md-responsive"> |
45 | | - <el-button size="small" type="success" @click="toNewUserPanel"> |
46 | | - <i class="el-icon-plus"></i> 新建用户 |
47 | | - </el-button> |
48 | | - <el-button size="small" type="danger" @click="deleteUser"> |
49 | | - <i class="el-icon-delete"></i> 删除用户 |
50 | | - </el-button> |
51 | | - </el-col> |
52 | | - </el-row> |
| 23 | + <div> |
| 24 | + <el-row :gutter="20"> |
| 25 | + <el-col :span="24"> |
| 26 | + <Panel> |
| 27 | + <template #title>用户列表</template> |
| 28 | + <template #default> |
| 29 | + <el-row :gutter="20" class="row-mb"> |
| 30 | + <el-col :md="12" :offset="0" class="col-md-responsive"> |
| 31 | + <el-input |
| 32 | + v-model="query.userName" |
| 33 | + type="text" |
| 34 | + placeholder="根据名字搜索" |
| 35 | + size="small" |
| 36 | + style="width: 180px; margin-right: 10px" |
| 37 | + autocomplete="off" |
| 38 | + :readonly="readonly" |
| 39 | + @focus="() => (readonly = false)" |
| 40 | + ></el-input> |
| 41 | + <el-button size="small" type="primary" @click="refresh"> |
| 42 | + <i class="el-icon-refresh"></i> 刷新/搜索 |
| 43 | + </el-button> |
| 44 | + </el-col> |
| 45 | + <el-col :md="12" :offset="0" class="text-align-right col-md-responsive"> |
| 46 | + <el-button size="small" type="success" @click="toNewUserPanel"> |
| 47 | + <i class="el-icon-plus"></i> 新建用户 |
| 48 | + </el-button> |
| 49 | + <el-button size="small" type="danger" @click="deleteUser"> |
| 50 | + <i class="el-icon-delete"></i> 删除用户 |
| 51 | + </el-button> |
| 52 | + </el-col> |
| 53 | + </el-row> |
53 | 54 |
|
54 | | - <div class="instance-table-warpper"> |
55 | | - <div></div> |
56 | | - <div> |
57 | | - <el-pagination |
58 | | - background |
59 | | - layout="prev, pager, next" |
60 | | - :total="maxPage" |
61 | | - v-model:currentPage="page" |
62 | | - :page-size="1" |
63 | | - @current-change="handleCurrentChange" |
64 | | - small |
65 | | - ></el-pagination> |
| 55 | + <div class="instance-table-warpper"> |
| 56 | + <div></div> |
| 57 | + <div> |
| 58 | + <el-pagination |
| 59 | + background |
| 60 | + layout="prev, pager, next" |
| 61 | + :total="maxPage" |
| 62 | + v-model:currentPage="page" |
| 63 | + :page-size="1" |
| 64 | + @current-change="handleCurrentChange" |
| 65 | + small |
| 66 | + ></el-pagination> |
| 67 | + </div> |
66 | 68 | </div> |
67 | | - </div> |
68 | 69 |
|
69 | | - <el-table |
70 | | - :data="objects" |
71 | | - stripe |
72 | | - style="width: 100%" |
73 | | - size="small" |
74 | | - ref="multipleTable" |
75 | | - @selection-change="selectionChange" |
76 | | - > |
77 | | - <el-table-column type="selection" width="55"> </el-table-column> |
78 | | - <el-table-column prop="uuid" label="UUID" width="240"></el-table-column> |
79 | | - <el-table-column prop="userName" label="用户名"></el-table-column> |
80 | | - <el-table-column prop="permission" label="权限等级"></el-table-column> |
81 | | - <el-table-column prop="registerTime" label="注册时间"></el-table-column> |
82 | | - <el-table-column prop="loginTime" label="最后登录"></el-table-column> |
83 | | - <el-table-column label="操作" style="text-align: center" width="180"> |
84 | | - <template #default="scope"> |
85 | | - <el-button size="mini" @click="toEditUserPanel(scope.row)">编辑</el-button> |
86 | | - <el-button size="mini" @click="toAssignPanel(scope.row)">分配资源</el-button> |
87 | | - </template> |
88 | | - </el-table-column> |
89 | | - </el-table> |
90 | | - </template> |
91 | | - </Panel> |
92 | | - </el-col> |
93 | | - </el-row> |
| 70 | + <el-table |
| 71 | + :data="objects" |
| 72 | + stripe |
| 73 | + style="width: 100%" |
| 74 | + size="small" |
| 75 | + ref="multipleTable" |
| 76 | + @selection-change="selectionChange" |
| 77 | + > |
| 78 | + <el-table-column type="selection" width="55"> </el-table-column> |
| 79 | + <el-table-column prop="uuid" label="UUID" width="240"></el-table-column> |
| 80 | + <el-table-column prop="userName" label="用户名"></el-table-column> |
| 81 | + <el-table-column prop="permission" label="权限等级"></el-table-column> |
| 82 | + <el-table-column prop="registerTime" label="注册时间"></el-table-column> |
| 83 | + <el-table-column prop="loginTime" label="最后登录"></el-table-column> |
| 84 | + <el-table-column label="操作" style="text-align: center" width="180"> |
| 85 | + <template #default="scope"> |
| 86 | + <el-button size="mini" @click="toEditUserPanel(scope.row)">编辑</el-button> |
| 87 | + <el-button size="mini" @click="toAssignPanel(scope.row)">分配资源</el-button> |
| 88 | + </template> |
| 89 | + </el-table-column> |
| 90 | + </el-table> |
| 91 | + </template> |
| 92 | + </Panel> |
| 93 | + </el-col> |
| 94 | + </el-row> |
94 | 95 |
|
95 | | - <!-- 新增用户弹框 --> |
96 | | - <Dialog v-model="isNewUser"> |
97 | | - <template #title>新增用户</template> |
98 | | - <template #default> |
99 | | - <div> |
100 | | - <div class="sub-title"> |
101 | | - <p class="sub-title-title">用户昵称</p> |
102 | | - <p class="sub-title-info">必填,6到12个字符,支持中文,英文和字符</p> |
103 | | - </div> |
104 | | - <el-input |
105 | | - v-model="newUserInfo.userName" |
106 | | - placeholder="请输入内容..." |
107 | | - size="small" |
108 | | - ></el-input> |
109 | | - <div class="sub-title row-mt"> |
110 | | - <p class="sub-title-title">用户密码</p> |
111 | | - <p class="sub-title-info">必填,6到18个字符,不支持中文,只限于字母,数字和符号</p> |
112 | | - </div> |
113 | | - <el-input |
114 | | - v-model="newUserInfo.password" |
115 | | - placeholder="请输入密码,6到18位" |
116 | | - size="small" |
117 | | - type="text" |
118 | | - ></el-input> |
119 | | - <div class="sub-title row-mt"> |
120 | | - <p class="sub-title-title">权限</p> |
121 | | - <p class="sub-title-info">普通权限适用于商业用户,最高权限适用于管理人员</p> |
122 | | - </div> |
123 | | - <el-select v-model="newUserInfo.permission" placeholder="请选择" size="small"> |
124 | | - <el-option label="普通权限" :value="1"></el-option> |
125 | | - <el-option label="最高权限" :value="10"></el-option> |
126 | | - <el-option label="禁封" :value="-1"></el-option> |
127 | | - </el-select> |
| 96 | + <!-- 新增用户弹框 --> |
| 97 | + <Dialog v-model="isNewUser"> |
| 98 | + <template #title>新增用户</template> |
| 99 | + <template #default> |
| 100 | + <div> |
| 101 | + <div class="sub-title"> |
| 102 | + <p class="sub-title-title">用户昵称</p> |
| 103 | + <p class="sub-title-info">必填,6到12个字符,支持中文,英文和字符</p> |
| 104 | + </div> |
| 105 | + <el-input |
| 106 | + v-model="newUserInfo.userName" |
| 107 | + placeholder="请输入内容..." |
| 108 | + size="small" |
| 109 | + ></el-input> |
| 110 | + <div class="sub-title row-mt"> |
| 111 | + <p class="sub-title-title">用户密码</p> |
| 112 | + <p class="sub-title-info">必填,6到18个字符,不支持中文,只限于字母,数字和符号</p> |
| 113 | + </div> |
| 114 | + <el-input |
| 115 | + v-model="newUserInfo.password" |
| 116 | + placeholder="请输入密码,6到18位" |
| 117 | + size="small" |
| 118 | + type="text" |
| 119 | + ></el-input> |
| 120 | + <div class="sub-title row-mt"> |
| 121 | + <p class="sub-title-title">权限</p> |
| 122 | + <p class="sub-title-info">普通权限适用于商业用户,最高权限适用于管理人员</p> |
| 123 | + </div> |
| 124 | + <el-select v-model="newUserInfo.permission" placeholder="请选择" size="small"> |
| 125 | + <el-option label="普通权限" :value="1"></el-option> |
| 126 | + <el-option label="最高权限" :value="10"></el-option> |
| 127 | + <el-option label="禁封" :value="-1"></el-option> |
| 128 | + </el-select> |
128 | 129 |
|
129 | | - <div class="sub-title row-mt"> |
130 | | - <p class="sub-title-title">注意事项</p> |
131 | | - <p class="sub-title-info"> |
132 | | - 若您从事出租商业活动,请务必保证应用实例运行在 Linux 的 Docker |
133 | | - 虚拟容器中,否则将有安全隐患。 |
134 | | - <br /> |
135 | | - <a |
136 | | - class="color-blue" |
137 | | - href="https://docs.mcsmanager.com/" |
138 | | - target="_blank" |
139 | | - rel="noopener noreferrer" |
140 | | - >具体信息参考</a |
141 | | - > |
142 | | - </p> |
143 | | - </div> |
144 | | - <div class="row-mt"> |
145 | | - <el-button type="success" size="small" @click="createUser">新增</el-button> |
146 | | - <el-button @click="cancelNewPanel" size="small">取消</el-button> |
| 130 | + <div class="sub-title row-mt"> |
| 131 | + <p class="sub-title-title">注意事项</p> |
| 132 | + <p class="sub-title-info"> |
| 133 | + 若您从事出租商业活动,请务必保证应用实例运行在 Linux 的 Docker |
| 134 | + 虚拟容器中,否则将有安全隐患。 |
| 135 | + <br /> |
| 136 | + <a |
| 137 | + class="color-blue" |
| 138 | + href="https://docs.mcsmanager.com/" |
| 139 | + target="_blank" |
| 140 | + rel="noopener noreferrer" |
| 141 | + >具体信息参考</a |
| 142 | + > |
| 143 | + </p> |
| 144 | + </div> |
| 145 | + <div class="row-mt"> |
| 146 | + <el-button type="success" size="small" @click="createUser">新增</el-button> |
| 147 | + <el-button @click="cancelNewPanel" size="small">取消</el-button> |
| 148 | + </div> |
147 | 149 | </div> |
148 | | - </div> |
149 | | - </template> |
150 | | - </Dialog> |
| 150 | + </template> |
| 151 | + </Dialog> |
151 | 152 |
|
152 | | - <!-- 编辑用户弹框 --> |
153 | | - <Dialog v-model="isEditUser"> |
154 | | - <template #title>编辑用户</template> |
155 | | - <template #default> |
156 | | - <div> |
157 | | - <div class="sub-title"> |
158 | | - <p class="sub-title-title require-field">用户昵称</p> |
159 | | - <p class="sub-title-info">必填,6到12个字符,支持中文,英文和字符</p> |
160 | | - </div> |
161 | | - <el-input |
162 | | - v-model="editUserInfo.userName" |
163 | | - placeholder="请输入内容..." |
164 | | - size="small" |
165 | | - ></el-input> |
166 | | - <div class="sub-title row-mt"> |
167 | | - <p class="sub-title-title require-field">重置密码</p> |
168 | | - <p class="sub-title-info">不填写则不更变原有值</p> |
169 | | - </div> |
170 | | - <el-input v-model="editUserInfo.passWord" placeholder="原值" size="small"></el-input> |
171 | | - <div class="sub-title row-mt"> |
172 | | - <p class="sub-title-title require-field">权限</p> |
173 | | - <p class="sub-title-info">普通权限适用于商业用户,最高权限适用于管理人员</p> |
174 | | - </div> |
175 | | - <el-select v-model="editUserInfo.permission" placeholder="请选择" size="small"> |
176 | | - <el-option label="普通权限" :value="1"></el-option> |
177 | | - <el-option label="最高权限" :value="10"></el-option> |
178 | | - <el-option label="禁封" :value="-1"></el-option> |
179 | | - </el-select> |
180 | | - <div class="row-mt"> |
181 | | - <el-button type="success" size="small" @click="updateUser">更新数据</el-button> |
182 | | - <el-button @click="cancelEditPanel" size="small">取消</el-button> |
| 153 | + <!-- 编辑用户弹框 --> |
| 154 | + <Dialog v-model="isEditUser"> |
| 155 | + <template #title>编辑用户</template> |
| 156 | + <template #default> |
| 157 | + <div> |
| 158 | + <div class="sub-title"> |
| 159 | + <p class="sub-title-title require-field">用户昵称</p> |
| 160 | + <p class="sub-title-info">必填,6到12个字符,支持中文,英文和字符</p> |
| 161 | + </div> |
| 162 | + <el-input |
| 163 | + v-model="editUserInfo.userName" |
| 164 | + placeholder="请输入内容..." |
| 165 | + size="small" |
| 166 | + ></el-input> |
| 167 | + <div class="sub-title row-mt"> |
| 168 | + <p class="sub-title-title require-field">重置密码</p> |
| 169 | + <p class="sub-title-info">不填写则不更变原有值</p> |
| 170 | + </div> |
| 171 | + <el-input v-model="editUserInfo.passWord" placeholder="原值" size="small"></el-input> |
| 172 | + <div class="sub-title row-mt"> |
| 173 | + <p class="sub-title-title require-field">权限</p> |
| 174 | + <p class="sub-title-info">普通权限适用于商业用户,最高权限适用于管理人员</p> |
| 175 | + </div> |
| 176 | + <el-select v-model="editUserInfo.permission" placeholder="请选择" size="small"> |
| 177 | + <el-option label="普通权限" :value="1"></el-option> |
| 178 | + <el-option label="最高权限" :value="10"></el-option> |
| 179 | + <el-option label="禁封" :value="-1"></el-option> |
| 180 | + </el-select> |
| 181 | + <div class="row-mt"> |
| 182 | + <el-button type="success" size="small" @click="updateUser">更新数据</el-button> |
| 183 | + <el-button @click="cancelEditPanel" size="small">取消</el-button> |
| 184 | + </div> |
183 | 185 | </div> |
184 | | - </div> |
185 | | - </template> |
186 | | - </Dialog> |
| 186 | + </template> |
| 187 | + </Dialog> |
| 188 | + </div> |
187 | 189 | </template> |
188 | 190 |
|
189 | 191 | <script> |
@@ -216,10 +218,13 @@ export default { |
216 | 218 | instances: [], // 以实例为主键的列表 |
217 | 219 | multipleSelection: [], // 表格多选属性 |
218 | 220 |
|
219 | | - readonly: true |
| 221 | + readonly: true, |
| 222 | +
|
| 223 | + businessWarningDialog: false |
220 | 224 | }; |
221 | 225 | }, |
222 | 226 | async mounted() { |
| 227 | + this.businessWarning = true; |
223 | 228 | // 请求并渲染所有用户 |
224 | 229 | await this.render(); |
225 | 230 | // 异步请求所有实例缓存结果 |
|
0 commit comments