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