|
@@ -2,20 +2,26 @@
|
|
|
<div class="user-manage">
|
|
|
<qm-low-form :params="searchParams" :fields="searchFields"></qm-low-form>
|
|
|
<a-table :data-source="tableData" :columns="columns" size="middle" bordered>
|
|
|
- <template #bodyCell="{ column }">
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'operation'">
|
|
|
<qm-button type="link">启用</qm-button>
|
|
|
<qm-button type="link">禁用</qm-button>
|
|
|
- <qm-button type="link">重置密码</qm-button>
|
|
|
+ <qm-button type="link" @click="resetPwd(record)">重置密码</qm-button>
|
|
|
</template>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
<AddUserDialog v-model="showAddDialog" v-if="showAddDialog"></AddUserDialog>
|
|
|
+ <ResetPasswordDialog
|
|
|
+ v-model="showResetPwdDialog"
|
|
|
+ v-if="showResetPwdDialog"
|
|
|
+ :cur-row="curRow"
|
|
|
+ ></ResetPasswordDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script name="UserManage" lang="ts" setup>
|
|
|
import { ref } from "vue";
|
|
|
import AddUserDialog from "./AddUserDialog.vue";
|
|
|
+import ResetPasswordDialog from "./ResetPasswordDialog.vue";
|
|
|
import type { TableColumnsType } from "@qmth/ui";
|
|
|
//todo 入参名
|
|
|
const searchParams = ref({
|
|
@@ -77,6 +83,12 @@ const columns: TableColumnsType = [
|
|
|
];
|
|
|
|
|
|
const showAddDialog = ref(false);
|
|
|
+const curRow = ref();
|
|
|
+const showResetPwdDialog = ref(false);
|
|
|
+const resetPwd = (record: any) => {
|
|
|
+ curRow.value = record;
|
|
|
+ showResetPwdDialog.value = true;
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
.user-manage {
|