|
|
@@ -45,24 +45,40 @@
|
|
|
<template #operation="{row}">
|
|
|
<div class="table_row_option">
|
|
|
<span class="option_button_editor" @click="OpenUserFormDialog(row)">编辑</span>
|
|
|
- <span class="option_button_editor">重置密码</span>
|
|
|
+ <span class="option_button_editor" @click="OpenresetPasswordFormDialog(row)">重置密码</span>
|
|
|
<span class="option_button_editor">禁用</span>
|
|
|
<span class="el_button_delete">删除</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</Table>
|
|
|
-
|
|
|
- <FormDialog width="500px"
|
|
|
- :formItemList="formItemList" :defaultFormData="defaultUserFormData"
|
|
|
- :title="userFormDialogTitle"
|
|
|
- :submitLoading="userFormDialogSubmiting"
|
|
|
- :visible="userFormDialogVisible"
|
|
|
- @close="CloseUserFormDialog"
|
|
|
- @confirm="HandleUserFormDialogConfirm">
|
|
|
- </FormDialog>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
+ <!-- 新增用户 弹窗 -->
|
|
|
+ <FormDialog
|
|
|
+ class="user_form_dialog"
|
|
|
+ style="flex-grow: 0;" width="482px"
|
|
|
+ v-if="userFormDialogVisible"
|
|
|
+ :formItemList="userFormItemList" :defaultFormData="defaultUserFormData"
|
|
|
+ :title="userFormDialogTitle"
|
|
|
+ :submitLoading="userFormDialogSubmiting"
|
|
|
+ :visible="userFormDialogVisible"
|
|
|
+ @close="CloseUserFormDialog"
|
|
|
+ @confirm="HandleUserFormDialogConfirm">
|
|
|
+ </FormDialog>
|
|
|
+
|
|
|
+ <!-- 重置密码弹窗 -->
|
|
|
+ <FormDialog
|
|
|
+ class="reset_password_form_dialog"
|
|
|
+ style="flex-grow: 0;" width="500px"
|
|
|
+ v-if="resetPasswordFormDialogVisible"
|
|
|
+ :formItemList="resetPasswordFormItemList" :defaultFormData="defaultResetPasswordFormData"
|
|
|
+ title="重置密码"
|
|
|
+ :submitLoading="resetPasswordFormDialogSubmiting"
|
|
|
+ :visible="resetPasswordFormDialogVisible"
|
|
|
+ @close="CloseResetPasswordFormDialog"
|
|
|
+ @confirm="HandleresetPasswordFormDialogConfirm">
|
|
|
+ </FormDialog>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@@ -76,9 +92,11 @@ import TableRowStatus from '@/baseComponents/TableRowStatus.vue';
|
|
|
import TabSearch from '@/baseComponents/TabSearch.vue';
|
|
|
import {tabList} from './tabSearch'
|
|
|
import FormDialog from '@/baseComponents/FormDialog.vue';
|
|
|
-import {formItemList} from './formDialog'
|
|
|
+import {userFormItemList, resetPasswordFormItemList} from './formDialog'
|
|
|
|
|
|
-// 表格 有关数据
|
|
|
+/**
|
|
|
+ * 1. 表格 有关数据
|
|
|
+ */
|
|
|
const pageNum = ref(1)
|
|
|
const pageSize = ref(20)
|
|
|
const totalNum = ref(0)
|
|
|
@@ -127,10 +145,12 @@ const statusMsg = ref([
|
|
|
themeClass: 'normal_icon',
|
|
|
},
|
|
|
])
|
|
|
-// more展示的用户类型
|
|
|
+// 默认展示的用户类型
|
|
|
const defaultUserType = ref('onlinePeople')
|
|
|
|
|
|
-// 新增用户弹窗相关数据
|
|
|
+/**
|
|
|
+ * 2. 新增用户弹窗相关数据
|
|
|
+ */
|
|
|
const userFormDialogVisible = ref(false)
|
|
|
const userFormDialogSubmiting = ref(false)
|
|
|
const userFormDialogTitle = ref('')
|
|
|
@@ -138,7 +158,6 @@ const defaultUserFormData = ref({
|
|
|
customerHoldLimit:100,
|
|
|
dailyManualReturnLimit:15,
|
|
|
noFollowAutoReturnDays:15,
|
|
|
-
|
|
|
})
|
|
|
// 打开新增/修改用户弹窗
|
|
|
const OpenUserFormDialog = (row?:any)=>{
|
|
|
@@ -164,6 +183,29 @@ const CloseUserFormDialog = ()=>{
|
|
|
const HandleUserFormDialogConfirm = ()=>{
|
|
|
CloseUserFormDialog()
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 3. 重置密码弹窗相关数据
|
|
|
+ */
|
|
|
+const resetPasswordFormDialogVisible = ref(false)
|
|
|
+const resetPasswordFormDialogSubmiting = ref(false)
|
|
|
+const defaultResetPasswordFormData = ref({})
|
|
|
+// 打开 重置密码弹窗
|
|
|
+const OpenresetPasswordFormDialog = (row?:any)=>{
|
|
|
+ defaultResetPasswordFormData.value = {...row}
|
|
|
+ resetPasswordFormDialogVisible.value = true
|
|
|
+}
|
|
|
+// 关闭 重置密码弹窗
|
|
|
+const CloseResetPasswordFormDialog = ()=>{
|
|
|
+ resetPasswordFormDialogVisible.value = false
|
|
|
+ defaultResetPasswordFormData.value = {}
|
|
|
+}
|
|
|
+// 保存 重置密码弹窗
|
|
|
+const HandleresetPasswordFormDialogConfirm = ()=>{
|
|
|
+ CloseResetPasswordFormDialog()
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@@ -184,4 +226,19 @@ const HandleUserFormDialogConfirm = ()=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.user_form_dialog{
|
|
|
+ :deep(.el-dialog__body){
|
|
|
+ min-height: 520px !important;
|
|
|
+ max-height: 520px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.reset_password_form_dialog{
|
|
|
+ :deep(.el-dialog__body){
|
|
|
+ min-height: 210px !important;
|
|
|
+ max-height: 210px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
</style>
|