Commit fea99263 by 潘建波

提交导入少token问题

1 parent c5d19691
{"commit":"dca6496e41d3bec96878153d5a1559f82c362cf0","commitDate":"2021-7-2 10:31","buildDate":"2021-7-2 14:4","version":"2.1.0","info":"【NEW】增加配置导入 token 【BUG】修改删除判定线导致车道属性丢失"}
\ No newline at end of file
{"commit":"c5d19691ac1b1f4dbf13ab54d0ee6cdbd7922f34","commitDate":"2021-7-2 14:45","buildDate":"2021-7-5 15:2","version":"2.1.0","info":"【BUG】账号锁定不生效"}
\ No newline at end of file
......@@ -21,9 +21,9 @@ export default {
this.$store.dispatch("GetMenuRole", menus).then(res => {});
}
let token = localStorage.getItem("atoken");
// if (!token) {
// this.$router.push("/").catch(err => {err});
// }
if (!token) {
this.$router.push("/").catch(err => {err});
}
},
mounted() {
window.videoEquitTableHeight = document.body.clientHeight - 142 + "px";
......
......@@ -23,5 +23,11 @@ export default {
},
ddlogin:(params) => {
return api.get(urls.ddlogin,params)
},
getloginset(params){
return api.get(urls.loginset,params)
},
loginset(params){
return api.post(urls.loginset,params)
}
};
import baseUrl from "../baseUrl";
export default {
login: baseUrl + "/api/v1/auth/users/login",
loginset: baseUrl + "/api/v1/auth/users/logininfo",
logout(userid){
return `${baseUrl}/api/v1/auth/users/${userid}/loginout`
},
......
......@@ -79,6 +79,11 @@
label="操作用户名">
</el-table-column>
<el-table-column
prop="ipAddress"
align="center"
label="操作IP">
</el-table-column>
<el-table-column
prop="remark"
align="center"
label="操作内容">
......
<template>
<div class="sys-loginbox">
<el-form label-position="left" label-width="120px" :model="loginfrom">
<el-form-item label="登录锁定次数:">
<el-input v-model="loginfrom.lockTimes" type="number">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="登录锁定时长:">
<el-input v-model="loginfrom.lockDuration" type="number">
<template slot="append">分钟</template>
</el-input>
</el-form-item>
<el-form-item>
<el-button class="savebtn" type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data() {
return {
loginfrom:{
lockTimes:"",
lockDuration:""
}
}
},
methods:{
onSubmit(){
this.$api.login.loginset(this.loginfrom).then(res => {
if(res.ecode == "200") {
this.$message({
type:"success",
message:res.enote
})
} else {
this.$message({
type:"error",
message:res.enote
})
}
})
},
getSetInfo(){
this.$api.login.getloginset().then(res => {
debugger
if(res != "" || res.length > 0) {
this.loginfrom = res[0];
}
})
}
},
created(){
this.getSetInfo();
}
}
</script>
<style lang="stylus" scoped>
.sys-loginbox {
width: 400px;
margin-left: 20px;
}
.savebtn{
}
</style>
\ No newline at end of file
......@@ -171,6 +171,7 @@
:action="authexurl"
:on-success="authsuccessback"
:data="updata"
:headers="headers"
:on-error="onerrorback"
>
<el-button
......@@ -207,8 +208,11 @@ export default {
name:'',
vchan_type:"authfile"
},
headers:{
authorization:localStorage.getItem("atoken")
},
timeArr: [],
exurl: window.config.https? `https://${location.host}/api/v1/devconf_fx/restore"`:`"http://${location.host}/api/v1/devconf_fx/restore`,
exurl: window.config.https? `https://${location.host}/api/v1/devconf_fx/restore`:`"http://${location.host}/api/v1/devconf_fx/restore`,
authexurl:window.config.https?`https://${location.host}/api/v1/devconf_fx/devs/${localStorage.getItem("dev_unid")}/vfile_vchans`:`http://${location.host}/api/v1/devconf_fx/devs/${localStorage.getItem("dev_unid")}/vfile_vchans`,
file: null,
dev_unid: localStorage.getItem("dev_unid"),
......
......@@ -8,8 +8,11 @@
<el-tab-pane label="系统维护" name="second">
<sytemset></sytemset>
</el-tab-pane>
<el-tab-pane label="展示设置" name="third">
<!-- <el-tab-pane label="展示设置" name="third">
<showset></showset>
</el-tab-pane> -->
<el-tab-pane label="登录设置" name="four" v-if="uname=='admin'">
<setlogin></setlogin>
</el-tab-pane>
</el-tabs>
</div>
......@@ -19,17 +22,20 @@
import proofreadtime from "./systemComponents/proofreadtime";
import sytemset from "./systemComponents/sytemSet";
import showset from "./systemComponents/showSet";
import setlogin from './systemComponents/setlogin.vue'
export default {
data() {
return {
activeName: "first",
height: ""
height: "",
uname:localStorage.getItem('uname'),
};
},
components: {
proofreadtime,
sytemset,
showset
showset,
setlogin
},
mounted() {
this.height = document.body.clientHeight - 140 + "px";
......
......@@ -369,7 +369,8 @@ export default {
},
clockuser(index, row){
this.$confirm("此操作将锁定该用户, 是否继续?", "提示", {
let text = row.lock?"此操作将解锁该用户":"此操作将锁定该用户"
this.$confirm(text + ", 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
......
......@@ -37,7 +37,7 @@
:on-success="sucessfile"
:file-list="fileList"
:on-error="errorfile"
:headers="updata"
:headers="headers"
>
<el-button size="small" slot="trigger" type="primary"
>点击上传</el-button
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!