Commit dca6496e by 潘建波

【NEW】增加配置导入 token

【BUG】修改删除判定线导致车道属性丢失
1 parent 5d12b743
{"commit":"ee4353b91c6bb3ef6b691b251786ce1d00609012","commitDate":"2021-6-16 17:19","buildDate":"2021-6-22 13:50","version":"2.1.0","info":"code增加token"}
\ No newline at end of file
{"commit":"5d12b7432475b39f28a0d5076f5d25bb1254e082","commitDate":"2021-6-30 15:16","buildDate":"2021-7-1 13:39","version":"2.1.0","info":"添加用户锁定"}
\ No newline at end of file
......@@ -79,7 +79,8 @@ service.interceptors.request.use(
service.interceptors.response.use(response => {
// endLoading();
if (response.data && response.data.ecode && response.data.ecode == 401) {
// localStorage.removeItem("atoken");
Message.warning({ message: "用户登录过期,请重新登录!" });
localStorage.removeItem("atoken");
router.replace({
path: "/"
});
......
......@@ -143,6 +143,8 @@ a:active{
font-size:16px;
}
.no-btn{
cursor: pointer;
font-size:16px;
color:#cccccc;
}
.no-video-btn{
......
......@@ -208,8 +208,8 @@ export default {
vchan_type:"authfile"
},
timeArr: [],
exurl: "http://" + location.host + "/api/v1/devconf_fx/restore",
authexurl:`http://${location.host}/api/v1/devconf_fx/devs/${localStorage.getItem("dev_unid")}/vfile_vchans`,
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"),
device_id: sessionStorage.getItem("device_id")
......
......@@ -85,6 +85,18 @@
@click="clockuser(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="注销"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-warning no-btn"
@click="logoutuser(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
......@@ -202,9 +214,9 @@ export default {
}
};
var checkUser = (rule, value, callback) => {
var userReg = /^[a-zA-Z0-9]{6,32}/
var userReg = /^[a-zA-Z0-9]{5,32}/
if (!userReg.test(value)) {
callback(new Error("用户名长度为6到32个字符数字字母组合"));
callback(new Error("用户名长度为5到32个字符数字字母组合"));
} else {
callback();
}
......@@ -344,6 +356,18 @@ export default {
});
});
},
//注销用户
logoutuser(index,row){
localStorage.removeItem("menu");
localStorage.removeItem("curmenu");
let uid = sessionStorage.getItem("user_unid");
this.$api.login.logout(row.user_unid).then((res) => {
this.$store.commit(types.ATOKEN, "");
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}`);
localStorage.removeItem("atoken");
});
},
clockuser(index, row){
this.$confirm("此操作将锁定该用户, 是否继续?", "提示", {
confirmButtonText: "确定",
......@@ -352,7 +376,8 @@ export default {
})
.then(() => {
let params = {
lock:row.lock==null?true:row.lock
lock:row.lock==null?true:row.lock,
user_type:'user'
}
this.$api.ops.lockUser(row.user_unid, params).then(res => {
if (!res.ecode) {
......
......@@ -1435,7 +1435,9 @@ export default {
this.selectedShape.line_type != 0 &&
this.selectedShape.line_type != 1 &&
this.selectedShape.line_type != 7 &&
this.selectedShape.line_type != 9
this.selectedShape.line_type != 9 &&
this.selectedShape.line_type != 5 &&
this.selectedShape.line_type != 4
) {
let index = this.blueLines.indexOf(this.selectedShape);
this.blueLines.splice(index, 1);
......
......@@ -37,6 +37,7 @@
:on-success="sucessfile"
:file-list="fileList"
:on-error="errorfile"
:headers="updata"
>
<el-button size="small" slot="trigger" type="primary"
>点击上传</el-button
......@@ -86,7 +87,10 @@ export default {
upfile: "",
uploadurl: "",
subtaskid: "",
subtask_name:""
subtask_name:"",
headers:{
authorization:localStorage.getItem("atoken")
}
};
},
methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!