diff --git a/index.html b/index.html
index 705c68f..6271bf3 100644
--- a/index.html
+++ b/index.html
@@ -3,7 +3,6 @@
-
diff --git a/src/pages/sys/user/User.vue b/src/pages/sys/user/User.vue
index bc42f41..ce35d52 100644
--- a/src/pages/sys/user/User.vue
+++ b/src/pages/sys/user/User.vue
@@ -26,10 +26,10 @@
empty-text="暂无数据"
header-row-class-name="table-header"
row-key="id">
-
+
-
+
@@ -44,8 +44,8 @@
-
-
+
+
@@ -61,7 +61,7 @@
权限
- 修改
+ 修改
重置密码
@@ -93,6 +93,8 @@ import AppApi from '@/common/app/app-api.ts'
import BindRole from '@/pages/sys/user/BindRole.vue'
import ClientUtil from '@/common/utils/client-util.ts'
import Utils from '@/common/utils'
+import Strings from '@/common/utils/strings.ts'
+import Avatar from '@/assets/images/avatar.png'
const totalCount = ref(0)
const tableData = Utils.resetAble(reactive([]))
@@ -127,10 +129,6 @@ function showDialog(data?: UserTypes.SearchUserResult) {
} */
function modifyHandler({row}: { row: UserTypes.SearchUserResult }) {
- if (row.id == '1') {
- ElMessage.error('不能修改管理员')
- return
- }
showDialog(row)
}
@@ -159,10 +157,6 @@ function reset() {
}
function clientChangeHandler(clients: CheckboxValueType[], data: UserTypes.SearchUserResult) {
- if (data.id == '1') {
- ElMessage.error('不能操作管理员')
- return
- }
searching.value = true
UserApi.bindClient(data.id!, clients as number[])
.then(() => {
diff --git a/src/pages/sys/user/UserForm.vue b/src/pages/sys/user/UserForm.vue
index 44a47d9..fdb374f 100644
--- a/src/pages/sys/user/UserForm.vue
+++ b/src/pages/sys/user/UserForm.vue
@@ -7,11 +7,12 @@
-
+
+ placeholder="姓名"/>
{
ElMessage.success('修改成功')
emits('editSucc')
@@ -91,7 +93,8 @@ function submitHandler() {
submiting.value = false
})
} else {
- UserApi.add(userFormData.value)
+ const {nickname, avatar, email, phone, account} = userFormData.value
+ UserApi.add({nickname, avatar, email, phone, account})
.then(() => {
ElMessage.success('添加成功')
emits('editSucc')
diff --git a/src/pages/sys/user/user.d.ts b/src/pages/sys/user/user.d.ts
index f971e7b..06d4810 100644
--- a/src/pages/sys/user/user.d.ts
+++ b/src/pages/sys/user/user.d.ts
@@ -59,6 +59,8 @@ declare global {
email?: string
// 手机号
phone?: string
+
+ account: SearchUserAccountResult
}
interface BindRoleParam {
@@ -69,6 +71,7 @@ declare global {
}
interface ModifyUserParam {
+ id?: string
// 昵称
nickname?: string
// 头像
diff --git a/tsconfig.node.json b/tsconfig.node.json
index 85a09c3..e7f0e15 100644
--- a/tsconfig.node.json
+++ b/tsconfig.node.json
@@ -24,6 +24,7 @@
},
"include": [
"vite.config.ts",
- "plugin/**/*.ts"
+ "plugin/**/*.ts",
+ "plugin/**/*.d.ts"
]
}