| | |
| | | }, |
| | | mounted() { //组件配置后,页面显示前。用于加载数据 |
| | | this.getData(); |
| | | this.userId = localStorage.getItem('userId'); |
| | | this.assign = localStorage.getItem('assign'); |
| | | //this.userId = localStorage.getItem('userId'); |
| | | //this.assign = localStorage.getItem('assign'); |
| | | |
| | | this.userId = this.$cookies.get('userId'); |
| | | this.assign = this.$cookies.get('assign'); |
| | | }, |
| | | methods: { |
| | | Cancel2() { |
| | |
| | | }, |
| | | mounted() { //组件配置后,页面显示前。用于加载数据 |
| | | this.getData(); |
| | | this.userId = localStorage.getItem('userId'); |
| | | this.assign = localStorage.getItem('assign'); |
| | | //this.userId = localStorage.getItem('userId'); |
| | | //this.assign = localStorage.getItem('assign'); |
| | | |
| | | this.userId = this.$cookies.get('userId'); |
| | | this.assign = this.$cookies.get('assign'); |
| | | }, |
| | | methods: { |
| | | Cancel2() { |
| | |
| | | this.ruleForm = this.rowData; |
| | | } |
| | | |
| | | this.userId = localStorage.getItem('userId'); |
| | | this.assign = localStorage.getItem('assign'); |
| | | //this.userId = localStorage.getItem('userId'); |
| | | //this.assign = localStorage.getItem('assign'); |
| | | |
| | | this.userId = this.$cookies.get('userId'); |
| | | this.assign = this.$cookies.get('assign'); |
| | | }, |
| | | methods:{ |
| | | getUsers() { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.userId = localStorage.getItem('userId'); |
| | | this.assign = localStorage.getItem('assign'); |
| | | //this.userId = localStorage.getItem('userId'); |
| | | //this.assign = localStorage.getItem('assign'); |
| | | |
| | | this.userId = this.$cookies.get('userId'); |
| | | this.assign = this.$cookies.get('assign'); |
| | | //this.loadData(); |
| | | }, |
| | | methods:{ |
| | |
| | | |
| | | createTopic() { |
| | | let me = this; |
| | | var userId = localStorage.getItem('userId'); |
| | | //var userId = localStorage.getItem('userId'); |
| | | let userId = this.$cookies.get('userId'); |
| | | if(!userId) { |
| | | this.$router.push('/login'); |
| | | this.$router.push('/login').catch(err => {err}); |
| | | } |
| | | this.form.userId = userId; |
| | | let params = this.form; |
| | |
| | | |
| | | |
| | | Axios.interceptors.request.use(function (config) { |
| | | let userId_ = localStorage.getItem('userId'); |
| | | // let userId_ = localStorage.getItem('userId'); |
| | | if(config.url == "/api/user/login") { |
| | | |
| | | } |
| | | else { |
| | | //let userId_ = Vue.VueCookies.get('userId');//localStorage.getItem('userId'); |
| | | let userId_ = Vue.$cookies.get('userId');//localStorage.getItem('userId'); |
| | | if (!userId_ && config.url != "/api/user/login") { |
| | | router.replace('/login'); |
| | | } |
| | | router.replace('/login'); |
| | | } |
| | | config.headers.common['userId'] = userId_; |
| | | } |
| | | return config; |
| | | }, function (error) { |
| | | // console.info("error: "); |
| | |
| | | //this.userName = localStorage.getItem('userName'); |
| | | //let departId = localStorage.getItem('departId'); |
| | | if (!userId_ || !departId) { |
| | | this.$router.push('/login'); |
| | | this.$router.push('/login').catch(err => {err}); |
| | | } |
| | | else { |
| | | this.defaultActive = "mine"; |
| | | this.$router.push('/mine'); |
| | | this.$router.push('/mine').catch(err => {err}); |
| | | let type; |
| | | if(departId == "100" || departId == "500") { |
| | | type = departId; |
| | |
| | | me.$message.error("保存失败!" + data_.data.message); |
| | | } |
| | | else { |
| | | me.$router.push('/login'); |
| | | me.$router.push('/login').catch(err => {err}); |
| | | } |
| | | //me.$cookies.set('userId', null); |
| | | }).catch(error =>{ |
| | |
| | | }, |
| | | |
| | | Cancel() { |
| | | this.$router.push('/login'); |
| | | //localStorage.setItem('userId', undefined); |
| | | //localStorage.setItem('userId', null); |
| | | this.$cookies.set('userId', null); |
| | | this.$router.push('/login').catch(err => {err}); |
| | | }, |
| | | menuSelect(index, a){ |
| | | let isPage = index.substring(0,2); |
| | | if (isPage != "0_") { |
| | | this.$router.push('/'+ index); |
| | | this.$router.push('/'+ index).catch(err => {err}); |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | see_click() { |
| | | this.$router.push('/list'); |
| | | this.$router.push('/list').catch(err => {err}); |
| | | }, |
| | | |
| | | setActiveTableData(currentRow, oldCurrentRow) { |
| | |
| | | let iformat = imoment.format('YYYY-MM'); |
| | | let systemDate = iformat + '-01 00:00:00'; |
| | | this.getDatedef(systemDate); |
| | | this.userId = localStorage.getItem('userId'); |
| | | //this.userId = localStorage.getItem('userId'); |
| | | this.userId = this.$cookies.get('userId'); |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | }, |
| | | mounted() { //组件配置后,页面显示前。用于加载数据 |
| | | this.getData(); |
| | | this.userId = localStorage.getItem('userId'); |
| | | this.assign = localStorage.getItem('assign'); |
| | | //this.userId = localStorage.getItem('userId'); |
| | | //this.assign = localStorage.getItem('assign'); |
| | | |
| | | this.userId = this.$cookies.get('userId'); |
| | | this.assign = this.$cookies.get('assign'); |
| | | }, |
| | | methods: { |
| | | download() { |
| | |
| | | localStorage.setItem('departName',data_.data.data.departName); */ |
| | | |
| | | this.$cookies.set('userId',data_.data.data.id); |
| | | //localStorage.setItem('userId',data_.data.data.id); |
| | | |
| | | this.$cookies.set('userName',data_.data.data.name); |
| | | this.$cookies.set('roleId',data_.data.data.roleCode); |
| | | this.$cookies.set('roleName',data_.data.data.roleName); |
| | |
| | | this.$cookies.set('departName',data_.data.data.departName); |
| | | this.$cookies.set('password', data_.data.data.password); |
| | | |
| | | this.$router.push('/'); |
| | | this.$router.push('/').catch(err => {err}); |
| | | }else { |
| | | this.$message({message:'登陆失败', type: 'warning'}); |
| | | } |