role1.0
fanluyan 1 year ago
parent 71991fe073
commit d96eb977eb

@ -106,23 +106,10 @@ export default {
index: "/devicePhotoSchedule",
title: "拍照时间表设置",
},
// {
// index: "/deviceReport",
// title: "",
// },
{
index: "/waterMark",
title: "水印下发",
},
// {
// index: "/deviceUpgrade",
// title: "",
// },
// {
// icon: "el-icon-picture-outline",
// index: "imageSettings",
// title: "",
// },
],
},
{
@ -134,10 +121,10 @@ export default {
index: "/userManagement",
title: "用户管理",
},
{
index: "/roleManagement",
title: "角色管理",
},
// {
// index: "/roleManagement",
// title: "",
// },
{
index: "/globalTools",
title: "全局设置",
@ -201,100 +188,97 @@ export default {
},
],
},
{
icon: "el-icon-monitor",
index: "/system",
title: "系统管理",
subs: [
{
index: "/userManagement",
title: "用户管理",
},
],
},
],
// items2: [
// {
// icon: "el-icon-s-home",
// index: "stritl",
// title: "",
// },
// {
// icon: "el-icon-camera",
// index: "/realTimeMonitor",
// title: "",
// },
// {
// icon: "el-icon-film",
// index: "/pictureRotation",
// title: "",
// },
// {
// icon: "el-icon-bell",
// index: "photoAlarm",
// title: "",
// },
// {
// icon: "el-icon-search",
// index: "/realTimeSearch",
// title: "",
// },
// {
// icon: "el-icon-files",
// index: "/property",
// title: "",
// subs: [
// {
// index: "/lineInformation",
// title: "线",
// },
// {
// index: "/towerInformation",
// title: "",
// },
items2: [
{
icon: "el-icon-s-home",
index: "stritl",
title: "首页",
},
{
icon: "el-icon-camera",
index: "/realTimeMonitor",
title: "实时监控",
},
// // {
// // index: "/cameraChannel",
// // title: "",
// // },
// {
// index: "/photographicDevice",
// title: "",
// },
// {
// index: "/devicePhotoSchedule",
// title: "",
// },
// // {
// // index: "/deviceUpgrade",
// // title: "",
// // },
// // {
// // icon: "el-icon-picture-outline",
// // index: "imageSettings",
// // title: "",
// // },
// ],
// },
// ],
// hnjcitems: [
// {
// icon: "el-icon-s-home",
// index: "stritl",
// title: "",
// },
// {
// icon: "el-icon-camera",
// index: "/realTimeMonitor",
// title: "",
// },
// {
// icon: "el-icon-film",
// index: "/pictureRotation",
// title: "",
// },
// {
// icon: "el-icon-bell",
// index: "photoAlarm",
// title: "",
// },
// // {
// // icon: "el-icon-search",
// // index: "/realTimeSearch",
// // title: "",
// // },
// ],
{
icon: "el-icon-film",
index: "/pictureRotation",
title: "图片轮巡",
},
{
icon: "el-icon-bell",
index: "photoAlarm",
title: "告警处理",
},
{
icon: "el-icon-search",
index: "/realTimeSearch",
title: "历史图片",
},
{
icon: "el-icon-files",
index: "/property",
title: "资产管理",
subs: [
{
index: "/lineInformation",
title: "线路信息管理",
},
{
index: "/towerInformation",
title: "杆塔信息管理",
},
{
index: "/photographicDevice",
title: "拍照装置管理",
},
{
index: "/devicePhotoSchedule",
title: "拍照时间表设置",
},
],
},
],
hnjcitems: [
{
icon: "el-icon-s-home",
index: "stritl",
title: "首页",
},
{
icon: "el-icon-camera",
index: "/realTimeMonitor",
title: "实时监控",
},
{
icon: "el-icon-film",
index: "/pictureRotation",
title: "图片轮巡",
},
{
icon: "el-icon-bell",
index: "photoAlarm",
title: "告警处理",
},
{
icon: "el-icon-search",
index: "/realTimeSearch",
title: "历史图片",
},
],
role: "",
};
},
@ -317,18 +301,20 @@ export default {
console.log("用户管理");
console.log(this.role);
// if (this.role == 0) {
// this.items = this.items;
// } else {
// this.items = this.items1;
// }
if (this.role == 0) {
this.items = this.items;
} else {
} else if (this.role == 1) {
this.items = this.items1;
} else if (this.role == 2) {
this.items = this.items2;
} else if (this.role == 4) {
this.items = this.hnjcitems;
}
// else if (this.role == 1) {
// this.items = this.items1;
// } else if (this.role == 2) {
// this.items = this.items2;
// } else if (this.role == 4) {
// this.items = this.hnjcitems;
// }
console.log(this.items);
console.log(this.activeIndex);

@ -758,7 +758,7 @@ export function getPermissionTree(data) {
export function getPermission(data) {
return request({
url: "/xymanager/role/getPermission",
url: "/xymanager/user/getPermission",
method: "get",
params: data,
headers: {
@ -770,7 +770,7 @@ export function getPermission(data) {
//@Api0peration("修改杈限")
export function changePermission(data) {
return request({
url: "/xymanager/role/changePermission",
url: "/xymanager/user/changePermission",
method: "post",
data,
});

@ -52,7 +52,11 @@ export default {
//
getdataform(val) {
console.log(val);
if (val == null) {
return (this.formdata = {
name: "",
});
}
//this.formdata = val;
this.formdata = JSON.parse(JSON.stringify(val));
},

@ -47,9 +47,7 @@
type="text"
>修改</el-button
>
<el-button @click.native.stop="handleBlind(scope.row)" type="text"
>权限绑定</el-button
>
<el-button
type="text"
class="deleteText"
@ -75,20 +73,17 @@
</div>
<!-- 新增 -->
<addRole :title="title" ref="adduserref"></addRole>
<!-- 权限绑定 -->
<blindPermiss ref="blindPermissRef"></blindPermiss>
</div>
</template>
<script>
import addRole from "./components/addRole.vue";
import blindPermiss from "./components/blindPermiss.vue";
import { getRoleList, deleteRole } from "@/utils/api/index";
export default {
name: "roleManagement",
components: {
addRole,
blindPermiss,
},
data() {
return {
@ -127,11 +122,6 @@ export default {
this.$refs.adduserref.display();
this.$refs.adduserref.getdataform(null);
},
//
handleBlind(data) {
this.$refs.blindPermissRef.display();
this.$refs.blindPermissRef.getdataform(data);
},
//
handleResive(data) {
@ -207,3 +197,4 @@ export default {
}
}
</style>
../user/components/blindPermiss.vue

@ -58,12 +58,12 @@ export default {
isShow: false,
roleoptions: [
{
value: 1,
label: "管理员",
id: 1,
name: "管理员",
},
{
value: 2,
label: "用户",
id: 2,
name: "用户",
},
],
@ -147,7 +147,7 @@ export default {
display() {
this.isShow = true;
this.roleUser = localStorage.getItem("role");
this.getRoleListAll();
//this.getRoleListAll();
},
hide() {
this.isShow = false;

@ -97,7 +97,8 @@ export default {
},
//
getPermissionRole() {
getPermission({ id: this.rowData.id })
console.log(this.rowData);
getPermission({ id: this.rowData.uid })
.then((res) => {
if (res.code == 200) {
console.log(res);
@ -168,7 +169,7 @@ export default {
console.log(paramsList);
changePermission({
list: paramsList,
roleId: this.rowData.id,
userId: this.rowData.uid,
})
.then((res) => {
if (res.code == 200) {

@ -28,8 +28,13 @@
show-overflow-tooltip
prop="userName"
></el-table-column>
<el-table-column label="角色" show-overflow-tooltip prop="roleName">
<!-- <el-table-column label="角色" show-overflow-tooltip prop="roleName">
<template slot-scope="scope">{{ scope.row.roleName }}</template>
</el-table-column> -->
<el-table-column label="角色" show-overflow-tooltip prop="role">
<template slot-scope="scope">{{
scope.row.role == 1 ? "管理员" : "用户"
}}</template>
</el-table-column>
<el-table-column
label="创建时间"
@ -41,12 +46,18 @@
}}</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope">
<template
slot-scope="scope"
v-if="scope.row.roleName !== '超级管理员'"
>
<el-button
@click.native.stop="handleResive(scope.row)"
type="text"
>修改</el-button
>
<el-button @click.native.stop="handleBlind(scope.row)" type="text"
>资源分配</el-button
>
<el-button
type="text"
@ -73,16 +84,19 @@
</div>
<!-- 新增 -->
<addUser :title="title" ref="adduserref"></addUser>
<!-- 权限绑定 -->
<blindPermiss ref="blindPermissRef"></blindPermiss>
</div>
</template>
<script>
import addUser from "./components/addUser.vue";
import { getUserList, delUserApi } from "@/utils/api/index";
import blindPermiss from "./components/blindPermiss.vue";
export default {
name: "userManagement",
components: {
addUser,
blindPermiss,
},
data() {
return {
@ -132,7 +146,11 @@ export default {
this.$refs.adduserref.display();
this.$refs.adduserref.getdataform(data);
},
//
handleBlind(data) {
this.$refs.blindPermissRef.display();
this.$refs.blindPermissRef.getdataform(data);
},
//
handleDelete(data) {
console.log(data.uid);

@ -23,12 +23,12 @@ module.exports = defineConfig({
//表示拦截以/api开头的请求路径
//target: "http://47.96.238.157:8093", //阿里云服务器环境
//target: "http://180.166.218.222:40080", //dell
//target: "http://192.168.1.190:90", //dell
target: "http://192.168.50.7:8093", //liu 本机ip
target: "http://192.168.1.190:90", //dell
//target: "http://192.168.50.7:8093", //liu 本机ip
// target: "http://192.168.50.42:81", //东视
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的
"^/api": "/api", //重写api把api变成空字符因为我们真正请求的路径是没有api的
},
},
},

Loading…
Cancel
Save