Commit 3f6e55b4 by maxiaohan

用户 用户组 角色 新增接口调整

parent 612fe5c2
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
</div> </div>
<div class="operation"> <div class="operation">
<div class="btn1" @click="batch">批量操作</div> <div class="btn1" @click="batch">批量操作</div>
<div @click="addgroup" class="clear-btn">addgroup</div>
<div class="btns"> <div class="btns">
<div class="btn1" @click="delMore()">删除</div> <div class="btn1" @click="delMore()">删除</div>
<div class="add" @click="open"> <div class="add" @click="open">
...@@ -593,6 +594,18 @@ export default { ...@@ -593,6 +594,18 @@ export default {
} }
}, },
methods: { methods: {
addgroup() {
var group = {
userId: 39898889,
status: -17476821,
describe: "sit laborum Excepteur officia",
name: "ullamco esse",
roleId: -70041648
};
this.$axios.post("/system/user-groups", group).then(res => {
console.info(res);
});
},
clear() { clear() {
this.searchParams.page.page = 1; //必填 this.searchParams.page.page = 1; //必填
this.searchParams.page.total = 20; //必填 this.searchParams.page.total = 20; //必填
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
数据权限 数据权限
</div> </div>
</div> </div>
<div @click="addrole">addrole</div>
<div class="save"> <div class="save">
<div class="btn" @click="save">保存</div> <div class="btn" @click="save">保存</div>
<!-- <el-button @click="add">add</el-button>--> <!-- <el-button @click="add">add</el-button>-->
...@@ -333,6 +334,15 @@ export default { ...@@ -333,6 +334,15 @@ export default {
}; };
}, },
methods: { methods: {
addrole() {
var role = {
name: "do aute officia irure voluptate",
permissionIds: []
};
this.$axios.post("/system/roles", role).then(res => {
console.info(res);
});
},
// 复制 // 复制
copy() { copy() {
console.info("复制数据"); console.info("复制数据");
......
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
</div> </div>
<div class="operation"> <div class="operation">
<div class="btn1" @click="batch">批量操作</div> <div class="btn1" @click="batch">批量操作</div>
<div class="clear-btn" @click="adduser">adduser</div>
<div class="clear-btn" @click="searchuser">searchuser</div>
<div class="btns"> <div class="btns">
<div class="btn1" @click="delMore()">删除</div> <div class="btn1" @click="delMore()">删除</div>
<div class="add" @click="open"> <div class="add" @click="open">
...@@ -384,6 +386,8 @@ ...@@ -384,6 +386,8 @@
<script> <script>
import "@/icons/ic_add.svg"; import "@/icons/ic_add.svg";
import qs from "qs";
export default { export default {
name: "UserManage", name: "UserManage",
created() { created() {
...@@ -632,6 +636,28 @@ export default { ...@@ -632,6 +636,28 @@ export default {
} }
}, },
methods: { methods: {
adduser() {
var user = {
username: "2021",
phoneNumber: "15806613121",
password: "2021",
policeNumber: "223",
unitName: "长沙",
unitCode: "123",
name: "王明光",
status: 1,
userGroupId: 1,
roleId: 1
};
this.$axios.post("/system/users", user).then(res => {
console.info(res);
});
},
searchuser() {
this.$axios.get("/system/users").then(res => {
console.info(res);
});
},
// 新增 // 新增
submitForm(formName) { submitForm(formName) {
this.$refs.addFormParams.validate(valid => { this.$refs.addFormParams.validate(valid => {
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
*/ */
const path = require("path"); const path = require("path");
// 引入等比适配插件 // 引入等比适配插件
const px2rem = require('postcss-px2rem') const px2rem = require("postcss-px2rem");
// 配置基本大小 // 配置基本大小
const postcss = px2rem({ const postcss = px2rem({
// 基准大小 baseSize,需要和rem.js中相同 // 基准大小 baseSize,需要和rem.js中相同
remUnit: 16 remUnit: 16
}) });
// const CompressionPlugin = require('compression-webpack-plugin'); // const CompressionPlugin = require('compression-webpack-plugin');
// const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i; // const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i;
...@@ -97,6 +97,7 @@ module.exports = { ...@@ -97,6 +97,7 @@ module.exports = {
// target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma // target: "http://172.18.116.73:8099/", //统一的请求头部每次修改都要重启才会生效 http://39.99.224.27:8006/ ma
// target: "http://127.0.0.1:8099", // target: "http://127.0.0.1:8099",
// target: "http://47.92.225.109:5602", // target: "http://47.92.225.109:5602",
// target: "http://192.168.128.109:8765", // 湖南-王
target: "http://www.meetfood.cn:2390/", // 湖南-线上 target: "http://www.meetfood.cn:2390/", // 湖南-线上
ws: true, ws: true,
...@@ -107,11 +108,20 @@ module.exports = { ...@@ -107,11 +108,20 @@ module.exports = {
}, },
"/login": { "/login": {
target: "http://47.92.226.24:3004/", // 登录 target: "http://47.92.226.24:3004/", // 登录
// target: "http://192.168.128.109:8765/", // 王
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/login": "" "^/login": ""
} }
},
"/system": {
target: "http://192.168.128.109:8765", // 湖南-王
ws: true,
changeOrigin: true,
pathRewrite: {
"^/system": ""
}
} }
// 阿里 // 阿里
// "/api": { // "/api": {
...@@ -127,9 +137,7 @@ module.exports = { ...@@ -127,9 +137,7 @@ module.exports = {
css: { css: {
loaderOptions: { loaderOptions: {
postcss: { postcss: {
plugins: [ plugins: [postcss]
postcss
]
} }
}, },
sourceMap: process.env.NODE_ENV === "development" ? true : false // 在开发环境下开启 CSS sourcemaps sourceMap: process.env.NODE_ENV === "development" ? true : false // 在开发环境下开启 CSS sourcemaps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment