|
@@ -6,6 +6,7 @@ import { computed, onMounted, ref } from 'vue';
|
|
|
import { useVbenModal } from '@vben/common-ui';
|
|
import { useVbenModal } from '@vben/common-ui';
|
|
|
|
|
|
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
|
+import { md5 } from 'js-md5';
|
|
|
|
|
|
|
|
import { useVbenForm, z } from '#/adapter/form';
|
|
import { useVbenForm, z } from '#/adapter/form';
|
|
|
import {
|
|
import {
|
|
@@ -204,6 +205,11 @@ const [Modal, modalApi] = useVbenModal({
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 新增账号,设置默认密码accountpwd 123456,使用md5加密
|
|
|
|
|
+ if (formType.value === 'create') {
|
|
|
|
|
+ (processedValues as any).accountpwd = md5('123456');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
await apiMap[formType.value]();
|
|
await apiMap[formType.value]();
|
|
|
ElMessage.success('操作成功');
|
|
ElMessage.success('操作成功');
|
|
|
emit('finish');
|
|
emit('finish');
|
|
@@ -254,5 +260,29 @@ const [Modal, modalApi] = useVbenModal({
|
|
|
<template>
|
|
<template>
|
|
|
<Modal :title="getTitle">
|
|
<Modal :title="getTitle">
|
|
|
<BaseForm />
|
|
<BaseForm />
|
|
|
|
|
+ <!-- 新增账号时的温馨提示 -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="formType === 'create'"
|
|
|
|
|
+ class="mt-4 rounded border-l-4 border-blue-400 bg-blue-50 p-3"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="flex items-center">
|
|
|
|
|
+ <svg
|
|
|
|
|
+ class="mr-2 h-4 w-4 text-blue-600"
|
|
|
|
|
+ fill="currentColor"
|
|
|
|
|
+ viewBox="0 0 20 20"
|
|
|
|
|
+ >
|
|
|
|
|
+ <path
|
|
|
|
|
+ fill-rule="evenodd"
|
|
|
|
|
+ d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
|
|
|
|
|
+ clip-rule="evenodd"
|
|
|
|
|
+ />
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <span class="text-sm text-blue-800">
|
|
|
|
|
+ <strong>温馨提示:</strong>新建账号的默认密码为
|
|
|
|
|
+ <code class="rounded bg-blue-100 px-1">123456</code>
|
|
|
|
|
+ ,请及时提醒用户修改密码。
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</Modal>
|
|
</Modal>
|
|
|
</template>
|
|
</template>
|