This commit is contained in:
yezhenman 2022-08-02 20:19:15 +08:00
parent 547ea0b9b4
commit f9586768cc
8 changed files with 241 additions and 72 deletions

10
resources/frontend/src/api/users.js vendored Normal file
View File

@ -0,0 +1,10 @@
import http from '@/util/http.js'
// 用户管理页面
export function users (data) {
return http({
url: '/api/users',
method: 'get',
data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

View File

@ -1,74 +1,114 @@
<!--
* @Description:
* @Author: czw (725551805@qq.com)
* @Date: 2021-11-18 10:47:16
* @LastEditors: czw (725551805@qq.com)
* @LastEditTime: 2022-02-23 12:23:56
* @FilePath: /glxt/src/views/logo.vue
-->
<template> <template>
<div class="page"> <div class="backimg">
<el-form ref="form" <div class="sign">
:model="form" <span class="title">Hi 欢迎使用</span>
label-width="80px"> <p class="manage">
<el-form-item label="账号"> <img src="../css/img/养花人2_画板 1 副本 15.png" alt="" /><span
<el-input v-model="form.add" >ERP管理系统</span
autocomplete='on' >
type='text'></el-input> </p>
</el-form-item> <p class="title-1">登录</p>
<el-form-item label="密码"> <input type="text" placeholder="请输入用户名" />
<el-input v-model="form.app" <br />
autocomplete='on' <input type="text" placeholder="请输入密码" />
type='password'></el-input> <br />
</el-form-item> <el-checkbox v-model="checked">记住密码</el-checkbox>
<el-form-item label="密码"> <br />
<el-button type="primary" <el-button type="primary">登录</el-button>
@click="onSubmit">登录</el-button> </div>
</el-form-item>
</el-form>
</div> </div>
</template> </template>
<script> <script>
import { setToken } from '@/util/auth'
import { postadd } from '@/api/rankingData'
export default { export default {
name: '', //
components: {}, //
props: {}, //
data() { data() {
return { return {
checked: true, //
form: { form: {
add: '', add: "",
app: '', app: "",
}, },
} };
}, },
computed: {}, // data computed: {}, // data
watch: {}, // data watch: {}, // data
created() {}, // -(访this) created() {}, // -(访this)
mounted() {}, // -(访DOM) mounted() {}, // -(访DOM)
methods: { methods: {},
onSubmit() { };
const params = {
username: this.form.add,
password: this.form.app,
}
// postadd(params).then((res) => {
// // if (res.data.code === 200) {
// // }
setToken('w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm')
// const token = res.data.access_token
// setToken(token)
// console.log(token, 'denglucheng')
// this.$router.push({ path: '/index' })
// })
this.$router.push({ path: '/index' })
},
}, //
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.backimg {
width: 100%;
height: 1080px;
background-image: url("./../css/img/组 32.png");
background-repeat: no-repeat;
background-size: 100%;
position: relative;
}
.sign {
width: 400px;
height: 500px;
position: absolute;
top: 270px;
right: 300px;
input {
width: 400px;
height: 51px;
border: 2px solid #bcbcbc;
opacity: 1;
border-radius: 5px;
margin-bottom: 25px;
}
.title {
width: 125px;
height: 23px;
font-size: 22px;
font-family: "BigruixianBlackGBV1.0";
font-weight: 400;
line-height: 23px;
color: #2b53ec;
opacity: 1;
}
.manage {
margin-top: 19px;
margin-bottom: 50px;
img {
margin-right: 20px;
}
span {
width: 340px;
height: 57px;
font-size: 54px;
font-family: "BigruixianBlackGBV1.0";
font-weight: 400;
line-height: 57px;
color: #2b53ec;
opacity: 1;
}
}
.title-1 {
width: 70px;
height: 35px;
font-size: 35px;
font-family: Source Han Sans CN;
font-weight: 500;
line-height: 60px;
color: #393939;
opacity: 1;
margin-bottom: 35px;
}
.el-button {
width: 400px;
height: 58px;
background: rgba(43, 83, 236);
border-radius: 5px;
margin-top: 40px;
}
.el-checkbox {
color: rgba(43, 83, 236);
}
}
</style>

View File

@ -1,22 +1,65 @@
<template> <template>
<div> <div class="conent">
<div class="btn">
<el-button type="primary">新增</el-button>
</div>
<div class="table">
<el-table :data="tableList" style="width: 100%">
<el-table-column prop="id" label="ID" width="400"> </el-table-column>
<el-table-column prop="name" label="角色名称" width="400">
</el-table-column>
<el-table-column prop="guard_name" label="权限内容" width="400">
</el-table-column>
<el-table-column label="操作">
<el-button>编辑</el-button>
</el-table-column>
</el-table>
</div>
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
export default { export default {
name: 'GlxtRole', name: "GlxtUsers",
data() { data() {
return {} return {
tableList: [], //
};
}, },
mounted() {
mounted() {}, //
axios({
methods: {}, method: "get",
} params: {},
url: "http://doc.ii090.com/mock/267/api/users",
}).then((res) => {
this.tableList = res.data.data;
});
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
</style> </style>

View File

@ -1,22 +1,98 @@
<template> <template>
<div> <div class="conent">
<div class="btn">
<el-button type="primary" @click="dialogVisible = true">新增</el-button>
</div>
<div class="from">
<el-dialog title="新增用户" :visible.sync="dialogVisible" width="30%">
<div>
<el-form label-width="80px">
<el-form-item label="ID">
<el-input></el-input>
</el-form-item>
<el-form-item label="姓名">
<el-input></el-input>
</el-form-item>
<el-form-item label="角色">
<el-input></el-input>
</el-form-item>
<div class="from-btn">
<el-button type="danger">取消</el-button>
<el-button>确认</el-button>
</div>
</el-form>
</div>
</el-dialog>
</div>
<div class="table">
<template>
<el-table :data="tableList" style="width: 100%">
<el-table-column prop="id" label="ID" width="400"> </el-table-column>
<el-table-column prop="name" label="姓名" width="400">
</el-table-column>
<el-table-column prop="email" label="角色" width="400">
</el-table-column>
<el-table-column label="操作">
<el-button>编辑</el-button>
<el-button type="danger">删除</el-button>
</el-table-column>
</el-table>
</template>
</div>
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
export default { export default {
name: 'GlxtUsers', name: "GlxtUsers",
data() { data() {
return {} return {
dialogVisible: false, //
tableList: [], //
};
}, },
mounted() {}, mounted() {
//
methods: {}, axios({
} method: "get",
params: {},
url: "http://doc.ii090.com/mock/267/api/users",
}).then((res) => {
this.tableList = res.data.data;
});
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
</style> </style>