添加系统管理员

master
fanluyan 2 years ago
parent 524702ff9b
commit b09c7127bd

@ -69,6 +69,6 @@
.el-dropdown-menu--small .el-dropdown-menu__item {
font-size: 12px;
}
.el-popper[x-placement^="bottom"] {
margin-top: 2px !important;
.el-select-dropdown {
margin-top: 4px !important;
}

@ -133,7 +133,7 @@ export default {
],
},
],
items2: [
items1: [
// {
// icon: "el-icon-s-home",
// index: "stritl",
@ -150,12 +150,92 @@ export default {
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",
title: "通道管理",
},
{
index: "/photographicDevice",
title: "拍照装置管理",
},
{
index: "/devicePhotoSchedule",
title: "拍照时间表设置",
},
// {
// index: "/deviceUpgrade",
// title: "",
// },
// {
// icon: "el-icon-picture-outline",
// index: "imageSettings",
// title: "",
// },
],
},
{
icon: "el-icon-monitor",
index: "/system",
title: "系统管理",
subs: [
{
index: "/userManagement",
title: "用户管理",
},
// {
// index: "/globalTools",
// title: "",
// },
],
},
],
items2: [
// {
// icon: "el-icon-bell",
// index: "photoAlarm",
// title: "",
// 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",
@ -199,6 +279,7 @@ export default {
],
},
],
role: "",
};
},
@ -218,11 +299,14 @@ export default {
console.log("用户管理");
console.log(this.role);
if (this.role == 1) {
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;
}
console.log(this.items);
},
};

@ -20,7 +20,7 @@
>
<el-form-item prop="userName">
<el-input v-model="userInfo.userName" placeholder="用户名">
<el-button slot="prepend" icon="el-icon-user"></el-button>
<span slot="prepend" class="el-icon-user"></span>
</el-input>
</el-form-item>
<el-form-item prop="password">
@ -31,7 +31,7 @@
v-model="userInfo.password"
@keyup.enter.native="submitForm()"
>
<el-button slot="prepend" icon="el-icon-lock"></el-button>
<span slot="prepend" class="el-icon-lock"></span>
</el-input>
</el-form-item>
<!-- <el-form-item prop="verificationCode" class="verifyItem">

@ -28,13 +28,13 @@
<div class="infoCompany">
<!-- <p><label>电压等级</label><span>220kv</span></p> -->
<p>
<label>线路名称</label><span>{{ pictureData.linename }}</span>
<label>线路名称</label><span>{{ pictureData.lineName }}</span>
</p>
<p>
<label>杆塔名称</label><span>{{ pictureData.towername }}</span>
<label>杆塔名称</label><span>{{ pictureData.towerName }}</span>
</p>
<p>
<label>装置名称</label><span>{{ pictureData.cmdid }}</span>
<label>装置名称</label><span>{{ pictureData.cmdId }}</span>
</p>
<p>
<label>选择通道</label>

@ -581,8 +581,10 @@ export default {
},
closebtn() {
this.isShowset = false;
this.checkList = "";
this.setNum = Math.floor(Math.random() * 10);
this.deviceList();
clearInterval(this.timers);
this.timers = null;
},

@ -11,7 +11,7 @@
label-position="left"
ref="formInfo"
label-width="100px"
:rules=" title=='新增' ? rules : xgrules"
:rules="title == '新增' ? rules : xgrules"
:model="formdata"
>
<el-form-item label="用户名:" prop="userName">
@ -31,6 +31,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-input
placeholder="请输入密码"
@ -53,6 +54,7 @@ export default {
},
data() {
return {
roleUser: "",
isShow: false,
roleoptions: [
{
@ -64,6 +66,7 @@ export default {
label: "用户",
},
],
formdata: {},
rules: {
userName: [
@ -72,14 +75,14 @@ export default {
role: [{ required: true, message: "请选择角色", trigger: "blur" }],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 8, message: '请输入6-8位字符', trigger: 'blur' }
{ min: 6, max: 8, message: "请输入6-8位字符", trigger: "blur" },
],
},
xgrules: {
userName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
role: [{ required: true, message: "请选择角色", trigger: "blur" }]
role: [{ required: true, message: "请选择角色", trigger: "blur" }],
},
};
},
@ -131,6 +134,8 @@ export default {
},
display() {
this.isShow = true;
this.roleUser = localStorage.getItem("role");
console.log();
},
hide() {
this.isShow = false;

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

Loading…
Cancel
Save