Commit ee93678e by 潘建波

1.【new】添加admin重置普通用户密码功能

2.【new】添加密码登录5次锁定功能
3.【bug】修复角色管理菜单选中BUG
4.【bug】修复系统管理用户管理添加时间IE下显示错误
1 parent fd62f96e
No preview for this file type
{"commit":"c862e7e1e924d49cb22b704c04321d2ecd3e2724","commitDate":"2020-10-26 11:41","buildDate":"2020-10-27 14:9","version":"2.0.8","info":"增加标题配置"}
\ No newline at end of file
{"commit":"fd62f96ec39cb7d3c47b3f4b918431e4fc2d5795","commitDate":"2020-10-29 16:12","buildDate":"2020-11-25 17:0","version":"2.0.8","info":"密文登录"}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import ops from "./ops";
let wsIP = "";
switch (process.env.NODE_ENV) {
case "development":
wsIP = "192.168.9.62:20080"; // 测试环境url
wsIP = "192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
break;
case "pre":
......
......@@ -3,7 +3,7 @@ console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = "http://192.168.9.133:20080"; // 测试环境url
baseUrl = "http://192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
......
......@@ -16,6 +16,9 @@ export default {
resetPwd(params, id) {
return api.post(`${baseUrl}/api/v1/auth/users/${id}/password`, params);
},
adminresetPwd(params, id) {
return api.post(`${baseUrl}/api/v1/auth/users/${id}/password/reset`, params);
},
delUser(params, id) {
return api.delete(`${baseUrl}/api/v1/auth/users/${id}`, params);
},
......
......@@ -143,7 +143,7 @@ export default {
localStorage.removeItem("curmenu");
this.$store.commit(types.ATOKEN, "");
localStorage.removeItem("atoken");
this.$logs.oplogs('','serv_login',`退出了平台`);
this.$logs.oplogs('','serv_login',`出了平台`);
this.$router.push("/login").catch(err => {
err;
});
......
......@@ -165,8 +165,9 @@ export default {
);
this.$store
.dispatch("GetMenuRole", res.menu_tree[0].children)
.then(res => {
this.$router.push("/video_task/config").catch(err => {err});
.then(r => {
this.$router.push(res.menu_tree[0].children[0].children[0].path).catch(err => {err});
});
});
},
......
......@@ -43,6 +43,10 @@ export default {
if (value === "") {
callback(new Error("请输入密码"));
} else {
if(value == this.ruleForm.oldpassword) {
callback(new Error("新旧密码不能重复!"));
return
}
var pwdRegex = /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}/;
if (!pwdRegex.test(value)) {
callback(new Error("您的密码复杂度太低(密码中必须包含写字母、数字、特殊字符),请及时修改密码!"))
......@@ -94,7 +98,14 @@ export default {
if (valid) {
let user_unid = sessionStorage.getItem("user_unid");
this.$api.ops.resetPwd(data, user_unid).then(res => {
this.$router.push("/login");
this.$router.push("/login");
}).catch(err => {
if (err.response) {
this.$message({
type: "error",
message: err.response.data.enote
});
}
});
} else {
console.log("error submit!!");
......
......@@ -69,7 +69,7 @@
label="操作时间">
<template slot-scope="scope">
<div>
{{showLocalTime(scope.row.dt)}}
{{$moment(scope.row.dt).local().add(8,'h').format("YYYY-MM-DD HH:mm:ss")}}
</div>
</template>
</el-table-column>
......
......@@ -31,7 +31,7 @@
label="创建时间">
<template slot-scope="scope">
<div>
{{showLocalTime(scope.row.create_dt,'local')}}
{{$moment(scope.row.create_dt).local().add(8,'h').format("YYYY-MM-DD HH:mm:ss")}}
</div>
</template>
</el-table-column>
......@@ -257,13 +257,20 @@
},
editUser(index,row){
this.editVisible=true;
this.$refs.editTree.setCheckedKeys([]);
setTimeout(()=> {
this.$refs.editTree.setCheckedKeys([]);
},0)
this.$api.ops.getPerms({
},row.role_unid).then(res=>{
let permarr = [];
this.editForm.role_name=row.name;
res.list_data.forEach(item=>{
this.$refs.editTree.setCheckedKeys([item.perm_unid]);
if (item.perm_unid) {
permarr.push(item.perm_unid)
}
})
this.$refs.editTree.setCheckedKeys(permarr);
this.editUnid=row.role_unid;
})
},
......
......@@ -32,6 +32,11 @@
width="300"
label="创建时间"
>
<template slot-scope="scope">
<div>
{{$moment(scope.row.create_dt).local().add(8,'h').format("YYYY-MM-DD HH:mm:ss")}}
</div>
</template>
</el-table-column>
<el-table-column
align="center"
......@@ -51,11 +56,11 @@
@click="editUser(scope.$index, scope.row)"
></span>
</el-tooltip>
<!-- <span class="tableSpanBorder"></span>
<el-tooltip content="重置密码" placement="bottom" effect="light" :visible-arrow=false>
<span class="icon-fanxing-xiugai editIcon2" @click="reset(scope.$index, scope.row)"></span>
</el-tooltip> -->
<span class="tableSpanBorder"></span>
<span class="tableSpanBorder" v-if="uname=='admin'"></span>
<el-tooltip content="重置密码" placement="bottom" effect="light" :visible-arrow=false v-if="uname=='admin'">
<span class="el-icon-refresh-right reseticon" @click="reset(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
......@@ -210,6 +215,7 @@ export default {
total: 0,
page: 1,
pageSize: 30,
uname:'',
addForm: {
norm_type: "login",
role_unid: "",
......@@ -232,13 +238,15 @@ export default {
password: [{ validator: validatePass, trigger: "change" }],
checkPass: [{ validator: validatePass2, trigger: "change" }]
},
tableHeight: window.opsTableHeight
tableHeight: window.opsTableHeight,
currow: ""
};
},
components: {},
mounted() {
this.getTableList();
this.getRoleList();
this.uname = localStorage.getItem('uname')
},
methods: {
numFormatter(row, column, cellValue, index) {
......@@ -326,15 +334,13 @@ export default {
type: "warning"
})
.then(() => {
this.$api.ops
.resetPwd(
{
reset_unid: row.unid
},
this.userId
.adminresetPwd({},
row.user_unid
)
.then(res => {
if (res.ecode == 200) {
if (res.atoken) {
this.$message({
type: "success",
message: "重置密码成功!"
......@@ -579,4 +585,7 @@ export default {
color: #f2365a;
font-size: 16px;
}
.reseticon {
cursor: pointer;
}
</style>
......@@ -75,6 +75,7 @@ export default {
methods: {
handleClick(tab, event) {},
dataInit(cid, type) {
debugger
this.$refs.allalarm.allAlarmData = [];
this.$refs.caralarm.carAlarmData = [];
this.$refs.illegalalarm.illAlarmData = [];
......
......@@ -145,6 +145,7 @@ export default {
return;
}
this.pushSteam(vdata);
debugger
this.$refs.event.dataInit(this.currentSubtaskId, vdata.task_type);
},
getTask(data) {
......
......@@ -95,8 +95,8 @@ export default {
setTimeout(() => {
_this.$refs.canvas.stageInit();
if (data.rois) {
// _this.$refs.canvas.configInit(data.rois[0].roi);
_this.$refs.canvas.configInit(roi);
_this.$refs.canvas.configInit(data.rois[0].roi);
// _this.$refs.canvas.configInit(roi);
}
}, 300);
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!