|
@@ -39,6 +39,12 @@
|
|
:curRow="curRow"
|
|
:curRow="curRow"
|
|
@success="addSuccess"
|
|
@success="addSuccess"
|
|
></AddUserDialog>
|
|
></AddUserDialog>
|
|
|
|
+ <UpdateUserPwdDialog
|
|
|
|
+ v-model:visible="showUpdateUserPwdDialog"
|
|
|
|
+ :curRow="curRow"
|
|
|
|
+ @success="updatePwdSuccess"
|
|
|
|
+ >
|
|
|
|
+ </UpdateUserPwdDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -47,9 +53,11 @@ import { ref } from 'vue';
|
|
import { getUserList } from '@/api/user';
|
|
import { getUserList } from '@/api/user';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
import AddUserDialog from './add-user-dialog.vue';
|
|
import AddUserDialog from './add-user-dialog.vue';
|
|
|
|
+import UpdateUserPwdDialog from './update-user-pwd-dialog.vue';
|
|
import { toggleUserStatus } from '@/api/user';
|
|
import { toggleUserStatus } from '@/api/user';
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
const showAddUserDialog = ref(false);
|
|
const showAddUserDialog = ref(false);
|
|
|
|
+const showUpdateUserPwdDialog = ref(false);
|
|
const curRow = ref(null);
|
|
const curRow = ref(null);
|
|
const toggleStatus = (row) => {
|
|
const toggleStatus = (row) => {
|
|
toggleUserStatus({ id: row.id, enable: !row.enable }).then(() => {
|
|
toggleUserStatus({ id: row.id, enable: !row.enable }).then(() => {
|
|
@@ -72,6 +80,18 @@ const columns = [
|
|
cell: (h, { row }) => {
|
|
cell: (h, { row }) => {
|
|
return (
|
|
return (
|
|
<div class="table-operations">
|
|
<div class="table-operations">
|
|
|
|
+ <t-link
|
|
|
|
+ v-perm="user_LINK_UpdatePwd"
|
|
|
|
+ theme="primary"
|
|
|
|
+ hover="color"
|
|
|
|
+ onClick={(e) => {
|
|
|
|
+ e.stopPropagation();
|
|
|
|
+ curRow.value = row;
|
|
|
|
+ showUpdateUserPwdDialog.value = true;
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 修改密码
|
|
|
|
+ </t-link>
|
|
<t-link
|
|
<t-link
|
|
v-perm="user_LINK_Update"
|
|
v-perm="user_LINK_Update"
|
|
theme="primary"
|
|
theme="primary"
|
|
@@ -115,6 +135,10 @@ const addSuccess = () => {
|
|
MessagePlugin.success('操作成功');
|
|
MessagePlugin.success('操作成功');
|
|
search();
|
|
search();
|
|
};
|
|
};
|
|
|
|
+const updatePwdSuccess = () => {
|
|
|
|
+ showUpdateUserPwdDialog.value = false;
|
|
|
|
+ MessagePlugin.success('操作成功');
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style></style>
|
|
<style></style>
|