From 171d3eebdb07fee42412a466dc6e19a746e55254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=96=E5=A7=90?= <2981176548@qq.com> Date: Tue, 23 Jan 2024 00:29:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=AE=8C=E5=96=844.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manager/Data/CarouselManagement.vue | 414 +++++++++++++++++++++++- src/manager/Data/RoleManage.vue | 147 +++------ 2 files changed, 456 insertions(+), 105 deletions(-) diff --git a/src/manager/Data/CarouselManagement.vue b/src/manager/Data/CarouselManagement.vue index 13c68f8..c8c8ffe 100644 --- a/src/manager/Data/CarouselManagement.vue +++ b/src/manager/Data/CarouselManagement.vue @@ -1,3 +1,413 @@ + \ No newline at end of file +
+
+ + 用户名: + + 电话号: + + + + + +
+ +
+ + + + + + + + +
+
+ +
+ + +
+ + +
+ +
+
+ + 用户名: + + + + +
+
+ + 性别: + + + + + + + 角色: + + +
+ +
邮箱:
+ +
地址:
+ +
简介:
+
+
+ + + +

请问是否要删除xxx数据

+
+ + +
+
用户名:
+
密码:
+
地址:
+
电话:
+
邮箱:
+
性别: + + +
+
年龄:
+ + + +
+
+
+ +
+ + + \ No newline at end of file diff --git a/src/manager/Data/RoleManage.vue b/src/manager/Data/RoleManage.vue index 9bb84ed..6135d81 100644 --- a/src/manager/Data/RoleManage.vue +++ b/src/manager/Data/RoleManage.vue @@ -19,10 +19,10 @@
- 用户名: - - 电话号: - + 角色id: + + + @@ -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 @@ -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() @@ -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) { From f9e761365fb6700bddc56433712ae5c20e4b2bde Mon Sep 17 00:00:00 2001 From: yannqing <67121851@qq.com> Date: Tue, 23 Jan 2024 00:52:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manager/Data/RoleManage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manager/Data/RoleManage.vue b/src/manager/Data/RoleManage.vue index 6135d81..fca384f 100644 --- a/src/manager/Data/RoleManage.vue +++ b/src/manager/Data/RoleManage.vue @@ -52,7 +52,7 @@
- +
@@ -212,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) From 0be9fec35b292cf68d36d8d35702c5e05e1e1e74 Mon Sep 17 00:00:00 2001 From: yannqing <67121851@qq.com> Date: Tue, 23 Jan 2024 01:07:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/register.vue | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/components/register.vue b/src/components/register.vue index 74c631b..01226bb 100644 --- a/src/components/register.vue +++ b/src/components/register.vue @@ -19,14 +19,14 @@

用户注册

- +
- +
@@ -37,7 +37,7 @@ - +
@@ -48,7 +48,7 @@ - +
@@ -59,7 +59,7 @@ - +
@@ -71,7 +71,7 @@ - +
@@ -82,7 +82,7 @@ - +
@@ -93,7 +93,7 @@ - +
立即注册 @@ -114,31 +114,26 @@ import axios from 'axios'; import getCurrentTimestamp from '../public/methods.js'; import Icp from "@/components/MainPage/Icp.vue"; +import requests from '../public/request.js' const data = { username: '', password: '', + address: '', sex: '', age: '', - unit: '', - filed: '', - hometown:'' + email: '', + phone: '' } function registerUser() { - axios({ - url: 'api/user/register', - method: 'post', - data: data, - headers: { - 'content-type': 'application/json;charset=utf-8', - 'Timestamp':getCurrentTimestamp() - } - }).then((res) => { + requests.register(data).then((res) => { if (res.data.code === 200) { //注册成功,提示+跳转页面 + console.log('注册成功') } else { //注册失败,消息提示 + console.log('注册失败') } console.log(res) }) From b5e40996f5cc2ce2eabe02e843d360eb505b4836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=96=E5=A7=90?= <2981176548@qq.com> Date: Tue, 23 Jan 2024 01:32:47 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=AE=8C=E5=96=844.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manager/Data/CarouselManagement.vue | 26 ++++++++++++------------- src/manager/Data/RoleManage.vue | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/manager/Data/CarouselManagement.vue b/src/manager/Data/CarouselManagement.vue index c8c8ffe..08654de 100644 --- a/src/manager/Data/CarouselManagement.vue +++ b/src/manager/Data/CarouselManagement.vue @@ -19,10 +19,8 @@
- 用户名: - - 电话号: - + 轮播图id: + @@ -156,30 +154,30 @@ const columns = reactive( [ align: "center" }, { - title: "用户名", - key: "username", + title: "图片", + key: "image", align: "center" }, { - title: "账号", - key: "jobId", + title: "标题", + key: "title", width: 150, align: "center" }, { - title: "电话", - key: "phone", + title: "图片地址", + key: "imageAddress", width: 150, align: "center" }, { - title: "邮箱", - key: "email", + title: "描述", + key: "description", align: "center" }, { title: "状态", - slot: "status", + slot: "isActive", width: 100, align: "center", }, @@ -253,7 +251,7 @@ onMounted(() => { function getAll() { - requests.userAllCurrent(AllUser,token).then((res)=>{ + requests.infoGetHeaderImage(null,token).then((res)=>{ console.log(res) // states.data = res.data.data // console.log(res.data.data) diff --git a/src/manager/Data/RoleManage.vue b/src/manager/Data/RoleManage.vue index fca384f..771c3aa 100644 --- a/src/manager/Data/RoleManage.vue +++ b/src/manager/Data/RoleManage.vue @@ -281,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('删除成功')