diff --git a/src/components/register.vue b/src/components/register.vue
index c59c9ea..9e71747 100644
--- a/src/components/register.vue
+++ b/src/components/register.vue
@@ -26,7 +26,7 @@
-
+
@@ -111,35 +111,32 @@
+
+
\ No newline at end of file
diff --git a/src/manager/Data/RoleManage.vue b/src/manager/Data/RoleManage.vue
index 9bb84ed..771c3aa 100644
--- a/src/manager/Data/RoleManage.vue
+++ b/src/manager/Data/RoleManage.vue
@@ -19,10 +19,10 @@
- 用户名:
-
- 电话号:
-
+ 角色id:
+
+
+
@@ -52,7 +52,7 @@
@@ -65,37 +65,27 @@
title="编辑"
@on-ok="editOk"
@on-cancel="editCancel">
-
@@ -104,22 +94,13 @@
title="删除"
@on-ok="deleteOk"
@on-cancel="deleteCancel">
- 请问是否要删除xxx数据
+ 请问是否要删除数据
-
+
@@ -196,40 +177,15 @@ const states = reactive({
data:[]
})
const loadingTable = ref(true)
-const sex = ref('男')
+const lock = ref('正常')
const roleSingle = ref(1)
const updateData = reactive({
id: 0,
- username: '',
- address: '',
- phone: '',
- email: '',
- age: '',
- signature: '',
- sex: '',
- avatar: '',
- nickname: '',
- description: '',
- enabled: true,
- isExpired: false,
- passwordExpired: false,
- recommend: false,
- isLocked: false
+ name: '',
+ displayName: '',
+
})
-const cityList= reactive([
- {
- value: 1,
- label: '管理员'
- },
- {
- value: 2,
- label: '老师'
- },
- {
- value: 3,
- label: '学生'
- }
-])
+
const userLock = reactive({
id: -1,
isLock: 1
@@ -256,7 +212,7 @@ onMounted(() => {
function getAll() {
requests.roleGet(null,token).then((res)=>{
- console.log(res.data.data)
+ console.log(res)
states.data = res.data.data
// states.data = res.data.data
// console.log(res.data.data)
@@ -286,25 +242,22 @@ function handlePageChange(newPage) {
}
const addData = reactive({
- username: '',
- password: '',
- address: '',
- phone: '',
- email: '',
- sex: 1,
- age: ''
+ // id:'',
+ // roleName:'',
+ name:'',
+ displayName:'',
+ // createdAt:'',
+ // updatedAt:'',
+
})
function showAddDialog(){
addDialog.value = true
}
function addOk () {
- if (sex.value === '男') {
- addData.sex = 1
- }else {
- addData.sex = 0
- }
- requests.userAdd(addData, token).then((res)=>{
+
+ requests.roleAdd(addData, token).then((res)=>{
+ console.log(res.data)
if (res.data.code===200) {
message.success('新增成功')
getAll()
@@ -328,7 +281,7 @@ function showDeleteDialog(index, row){
function deleteOk(){
deleteDialog.value = false;
console.log(deleteId.value)
- requests.userDelete(deleteId.value, token).then((res)=>{
+ requests.roleDelete(deleteId.value, token).then((res)=>{
console.log("deleteResult:",res)
if (res.data.code === 200) {
message.success('删除成功')
@@ -346,26 +299,14 @@ function deleteCancel(){
function showEditDialog(index, row){
editDialog.value = true
updateData.id = row.id
- updateData.username = row.username
- updateData.address = row.address
- updateData.phone = row.phone
- updateData.email = row.email
- updateData.age = row.age
- updateData.signature = row.signature
- updateData.sex = row.sex
- updateData.avatar = row.avatar
- updateData.nickname = row.nickname
- updateData.description = row.description
- if (row.sex === 1) {
- sex.value = '男'
- }else {
- sex.value = '女'
- }
+ updateData.name = row.roleName
+ updateData.displayName = row.displayName
+
}
function editOk(){
loadingTable.value = true
editDialog.value = false;
- requests.userEdit(updateData,token).then((res)=>{
+ requests.roleEdit(updateData,token).then((res)=>{
console.log("editResult:",res)
console.log("updateData:",updateData)
if (res.data.code === 200) {