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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save