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] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=E5=AE=8C?=
=?UTF-8?q?=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) {