Commit 157138ab by 薛文刚

用户信息

parent 2bfa5b6a
......@@ -8,6 +8,7 @@ const getters = {
currentPage: state => state.xsDet.currentPage,
isShuaxin: state => state.xsDet.isShuaxin,
userInfo: state => state.user.userInfo,
loginForm: state => state.user.loginForm,
// navIndex: state => state.cases.navIndex,
};
......
......@@ -8,6 +8,7 @@ const state = {
logs: [],
userAuth: "",
userInfo:{},
loginForm:{}
};
const mutations = {
......@@ -22,7 +23,10 @@ const mutations = {
},
SET_UserInfo: (state, info) => {
state.userInfo = info
}
},
SET_LoginForm: (state, info) => {
state.loginForm = info
}
};
const actions = {
......
......@@ -688,7 +688,7 @@ export default {
components: {},
computed: {
...mapGetters(['userInfo'])
...mapGetters(['userInfo', 'loginForm'])
},
created () {
this.username = this.$route.query.username || '',
......@@ -1801,12 +1801,15 @@ export default {
},
goDetail (item) {
debugger
if (item.id == '5') {
if (JSON.parse(localStorage.user).unitcode.substring(0, 2) == "15") {
window.open('http://65.65.100.200:8081/GXWJ/servlet/front/JKS?type=YHDL2&USERID=fangzheng3', '_blank')
} else {
window.open('http://65.65.100.200:8081/GXWJ/servlet/front/JKS?type=YHDL2&PAGE=html%2FZDYMX.jsp&USERID=hnsh&XM=方正', '_blank')
}
} else if (item.id == '7') {
window.open(`http://133.8.5.68:9007/login?username=${this.loginForm.username}&password=${this.loginForm.password}`, '_blank')
} else {
this.$router.pushToTab({ path: item.path })
}
......
......@@ -94,7 +94,7 @@ import "video.js/dist/video-js.css";
export default {
name: "Login",
data() {
data () {
return {
loginForm: {
username: "",
......@@ -117,11 +117,11 @@ export default {
sjtitle: '内蒙古自治区'
};
},
created() {
created () {
// window.addEventListener('storage', this.afterQRScan)
this.getTitle()
},
mounted() {
mounted () {
if (this.loginForm.username === "") {
this.$refs.username.focus();
} else if (this.loginForm.password === "") {
......@@ -129,11 +129,11 @@ export default {
}
this.initVideo();
},
destroyed() {
destroyed () {
// window.removeEventListener('storage', this.afterQRScan)
},
methods: {
getTitle() {
getTitle () {
var relUrlIp = window.location.host.substring(
0,
window.location.host.length - 5
......@@ -144,7 +144,7 @@ export default {
this.sjtitle = '内蒙古自治区'
}
},
showPwd() {
showPwd () {
if (this.passwordType === "password") {
this.passwordType = "";
} else {
......@@ -154,14 +154,14 @@ export default {
this.$refs.password.focus();
});
},
handleLogin() {
handleLogin () {
this.loading = true;
doLogin({
username: this.loginForm.username,
password: this.loginForm.password
})
.then(res => {
console.log(res);
this.$store.commit("user/SET_LoginForm", this.loginForm);
if (JSON.stringify(res) !== "{}") {
Cookies.set('JSESSIONID', res.JSESSIONID, { expires: this._expires * (30 * 1000) });
window.localStorage.setItem("user", JSON.stringify(res.USER));
......@@ -181,7 +181,7 @@ export default {
},
//初始化视频方法
initVideo() {
initVideo () {
let myPlayer = Video("myVideo", {
//确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。
controls: false,
......
......@@ -704,7 +704,8 @@
</div>
<!-- 查询线索表格 -->
<div style="overflow-x: scroll; width: 1577px;margin-left: 27px;">
<div style="overflow-x: scroll; width: 1577px;margin-left: 27px;"
v-if="!iscqsr">
<table id="table3"
v-if="!iscqsr"
v-loading="loading"
......@@ -982,7 +983,8 @@
</table>
</div>
<!--table3-2 (指令反馈统计)点击查询后的表格-->
<div>
<div style="overflow-x: scroll; width: 1577px;margin-left: 27px;"
v-if="iscqsr">
<table id="table3-2"
v-if="iscqsr"
v-loading="loading"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment