Commit 387d0e03 by 米嘉伟

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents 8caa5047 d84fcf51
...@@ -109,6 +109,9 @@ ...@@ -109,6 +109,9 @@
icon-class="ic_add" icon-class="ic_add"
/>新增用户 />新增用户
</div> </div>
<el-button @click="add">add</el-button>
<el-button @click="edit">edit</el-button>
<el-button @click="del">del</el-button>
</div> </div>
</div> </div>
<el-tag <el-tag
...@@ -191,11 +194,7 @@ ...@@ -191,11 +194,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="groupid_list" label="权限" :width="width5">
prop="groupid_list"
label="权限"
:width='width5'
>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="item in scope.row.roleName">{{ item }}/</div> <div v-for="item in scope.row.roleName">{{ item }}/</div>
</template> </template>
...@@ -537,16 +536,16 @@ ...@@ -537,16 +536,16 @@
import "@/icons/ic_add.svg"; import "@/icons/ic_add.svg";
export default { export default {
name: "UserManage", name: "UserManage",
created () { created() {
let w1 = 1920 let w1 = 1920;
let w2 = window.innerWidth let w2 = window.innerWidth;
this.height = this.height * w2 / w1 this.height = (this.height * w2) / w1;
this.width1 = this.width1 * w2 / w1 this.width1 = (this.width1 * w2) / w1;
this.width2 = this.width2 * w2 / w1 this.width2 = (this.width2 * w2) / w1;
this.width3 = this.width3 * w2 / w1 this.width3 = (this.width3 * w2) / w1;
this.width4 = this.width4 * w2 / w1 this.width4 = (this.width4 * w2) / w1;
this.width5 = this.width5 * w2 / w1 this.width5 = (this.width5 * w2) / w1;
}, },
data () { data () {
// 用户名校验 // 用户名校验
...@@ -835,7 +834,6 @@ export default { ...@@ -835,7 +834,6 @@ export default {
user.append("role", this.searchParams.role); user.append("role", this.searchParams.role);
user.append("page", this.searchParams.page.page); user.append("page", this.searchParams.page.page);
user.append("total", this.searchParams.page.total); user.append("total", this.searchParams.page.total);
this.$axios this.$axios
.post("/login/user/queryUserList", user) .post("/login/user/queryUserList", user)
.then(res => { .then(res => {
...@@ -904,32 +902,70 @@ export default { ...@@ -904,32 +902,70 @@ export default {
this.isShowAddUserDialog = false; this.isShowAddUserDialog = false;
this.isShowAddUserDialogBg = false; this.isShowAddUserDialogBg = false;
var user = new URLSearchParams(); var user = new URLSearchParams();
user.append("username", this.addParams.username); // user.append("username", this.addFormParams.username);
user.append("truename", this.addParams.truename); // user.append("truename", this.addFormParams.truename);
user.append("unitname", this.addParams.unitname); // user.append("unitname", this.addFormParams.unitname);
user.append("unitcode", this.addParams.unitcode); // user.append("unitcode", this.addFormParams.unitcode);
user.append("password", this.addParams.password); // user.append("password", this.addFormParams.password);
user.append("policemanid", this.addParams.policemanid); // user.append("policemanid", this.addFormParams.policemanid);
user.append("telphone", this.addParams.telphone); // user.append("telphone", this.addFormParams.telphone);
// // user.append("usergroup", this.searchParams.usergroup); // 警号
// user.append("role", this.addFormParams.role);
user.append("username", "name");
user.append("truename", "姓名");
user.append("unitname", "unitname");
user.append("unitcode", "unitcode");
user.append("password", "123456");
user.append("policemanid", "警号");
user.append("telphone", "17000000000");
// user.append("usergroup", this.searchParams.usergroup); // 警号 // user.append("usergroup", this.searchParams.usergroup); // 警号
user.append("role", this.addParams.role); // user.append("role", this.addFormParams.role);
// user.append("page", this.addParams.page.page); // user.append("page", this.addParams.page.page);
// user.append("total", this.addParams.page.total); // user.append("total", this.addParams.page.total);
console.info(this.addParams); console.info(this.addFormParams);
console.info(user); console.info(user);
this.$axios this.$axios
.post("/login/user/saveuser", user) .post("/login/user/saveuser", user)
.then(res => { .then(res => {
console.log(res); console.log(res);
this.$message.success(res.message);
}) })
.catch(failResponse => { }); .catch(failResponse => {});
this.$message.success("新增成功!");
}, },
edit () { edit () {
console.info("编辑方法"); console.info("编辑方法");
// 根据主键查询用户基本信息
var user = new URLSearchParams();
user.append("userId", "2");
this.$axios
.post("/login/user/queryuserInfo", user)
.then(res => {
console.log("修改的返回值:", res);
})
.catch(failResponse => {});
// 修改用户信息
var user1 = new URLSearchParams();
user1.append("userId", "2");
user1.append("username", "修改用户名1");
user1.append("truename", "修改真实姓名1");
user1.append("unitcode", "unitcode11111");
this.$axios
.post("/login/user/update", user1)
.then(res => {
console.log("修改的返回值:", res);
})
.catch(failResponse => {});
}, },
del () { del () {
console.info("删除方法"); console.info("删除方法");
var user = new URLSearchParams();
user.append("userId", "2");
this.$axios
.post("/login/user/deleteUserById", user)
.then(res => {
console.log("修改的返回值:", res);
})
.catch(failResponse => {});
} }
}, },
mounted () { mounted () {
......
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