Browse Source

管理端密码修改在列表“更多”

MaxKey 2 days ago
parent
commit
72034a04b3

+ 42 - 53
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/idm/users/users.component.html

@@ -34,9 +34,6 @@
       <button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">
         {{ 'mxk.text.add' | i18n }}
       </button>
-      <button nz-button type="button" [nzType]="'primary'" (click)="changePassword($event)">
-        {{ 'mxk.text.changepassword' | i18n }}
-      </button>
       <button
         nz-button
         type="button"
@@ -111,7 +108,7 @@
             <th nzAlign="center">{{ 'mxk.users.jobTitle' | i18n }}</th>
             <th nzAlign="center">{{ 'mxk.users.gender' | i18n }}</th>
             <th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
-            <th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
+            <th nzAlign="center">{{ 'mxk.text.action' | i18n }}</th>
           </tr>
         </thead>
         <tbody>
@@ -147,55 +144,47 @@
                 <i nz-icon nzType="close-circle" nzTheme="fill" style="color: red"></i>
               </a>
             </td>
-            <td nzAlign="center" nzBreakWord="false">
-              <div nz-col>
-                <button nz-button type="button" (click)="onEdit($event, data.id)">
-                  {{ 'mxk.text.edit' | i18n }}
-                </button>
-                <button *ngIf="data.status == 9" nz-button nz-dropdown>
-                  {{ 'mxk.text.moreaction' | i18n }}
-                  <i nz-icon nzType="down"></i>
-                </button>
-                <button *ngIf="data.status !== 9" nz-button nz-dropdown [nzDropdownMenu]="menuMoreAction">
-                  {{ 'mxk.text.moreaction' | i18n }}
-                  <i nz-icon nzType="down"></i>
-                </button>
-                <nz-dropdown-menu #menuMoreAction="nzDropdownMenu">
-                  <ul nz-menu>
-                    <li nz-menu-item *ngIf="data.status == 1" (click)="onNavToUrl($event, data.id, data.username, 'groups')">{{
-                      'mxk.text.groups' | i18n
-                    }}</li>
-                    <li nz-menu-item *ngIf="data.status == 1" (click)="changePasswordById($event, data.id)">{{
-                      'mxk.text.changepassword' | i18n
-                    }}</li>
-                    <li nz-menu-item *ngIf="data.status == 1" (click)="changeMfaById(data.id)">{{ 'mxk.users.authnType' | i18n }}</li>
-                    <li nz-menu-item *ngIf="data.status == 1" (click)="onUpdateStatus($event, data.id, 5)">{{ 'mxk.text.lock' | i18n }}</li>
-                    <li nz-menu-item *ngIf="data.status == 1" (click)="onUpdateStatus($event, data.id, 4)">{{
-                      'mxk.text.disable' | i18n
-                    }}</li>
-                    <li nz-menu-item *ngIf="data.status == 2" (click)="onUpdateStatus($event, data.id, 1)">{{
-                      'mxk.text.enable' | i18n
-                    }}</li>
-                    <li nz-menu-item *ngIf="data.status == 4" (click)="onUpdateStatus($event, data.id, 1)">{{
-                      'mxk.text.enable' | i18n
-                    }}</li>
-                    <li nz-menu-item *ngIf="data.status == 5" (click)="onUpdateStatus($event, data.id, 1)">{{
-                      'mxk.text.unlock' | i18n
-                    }}</li>
-                    <li
-                      nz-menu-item
-                      nz-popconfirm
-                      nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
-                      nzPopconfirmPlacement="left"
-                      [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
-                      [nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
-                      (nzOnConfirm)="onDelete(data.id)"
-                      nzDanger
-                      >{{ 'mxk.text.delete' | i18n }}</li
-                    >
-                  </ul>
-                </nz-dropdown-menu>
-              </div>
+            <td nzAlign="center" nzBreakWord="false" width="180px">
+              <button nz-button type="button" (click)="onEdit($event, data.id)">
+                {{ 'mxk.text.edit' | i18n }}
+              </button>
+              <button *ngIf="data.status == 9" nz-button nz-dropdown>
+                {{ 'mxk.text.moreaction' | i18n }}
+                <i nz-icon nzType="down"></i>
+              </button>
+              <button *ngIf="data.status !== 9" nz-button nz-dropdown [nzDropdownMenu]="menuMoreAction">
+                {{ 'mxk.text.moreaction' | i18n }}
+                <i nz-icon nzType="down"></i>
+              </button>
+              <nz-dropdown-menu #menuMoreAction="nzDropdownMenu">
+                <ul nz-menu>
+                  <li nz-menu-item *ngIf="data.status == 1" (click)="onNavToUrl($event, data.id, data.username, 'groups')">{{
+                    'mxk.text.groups' | i18n
+                  }}</li>
+                  <li nz-menu-item *ngIf="data.status == 1" (click)="changePasswordById($event, data.id)">{{
+                    'mxk.text.changepassword' | i18n
+                  }}</li>
+                  <li nz-menu-item *ngIf="data.status == 1" (click)="changeMfaById(data.id)">{{ 'mxk.users.authnType' | i18n }}</li>
+                  <li nz-menu-item *ngIf="data.status == 1" (click)="onUpdateStatus($event, data.id, 5)">{{ 'mxk.text.lock' | i18n }}</li>
+                  <li nz-menu-item *ngIf="data.status == 1" (click)="onUpdateStatus($event, data.id, 4)">{{
+                    'mxk.text.disable' | i18n
+                  }}</li>
+                  <li nz-menu-item *ngIf="data.status == 2" (click)="onUpdateStatus($event, data.id, 1)">{{ 'mxk.text.enable' | i18n }}</li>
+                  <li nz-menu-item *ngIf="data.status == 4" (click)="onUpdateStatus($event, data.id, 1)">{{ 'mxk.text.enable' | i18n }}</li>
+                  <li nz-menu-item *ngIf="data.status == 5" (click)="onUpdateStatus($event, data.id, 1)">{{ 'mxk.text.unlock' | i18n }}</li>
+                  <li
+                    nz-menu-item
+                    nz-popconfirm
+                    nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
+                    nzPopconfirmPlacement="left"
+                    [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
+                    [nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
+                    (nzOnConfirm)="onDelete(data.id)"
+                    nzDanger
+                    >{{ 'mxk.text.delete' | i18n }}</li
+                  >
+                </ul>
+              </nz-dropdown-menu>
             </td>
           </tr>
         </tbody>