This commit is contained in:
liushuai
2020-04-13 18:28:27 +08:00
7 changed files with 56 additions and 11 deletions

View File

@@ -16,8 +16,9 @@ export function getInfo(token) {
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 基础表_角色模块信息 inner join 基础表_模块信息 on 基础表_角色模块信息.id = 基础表_模块信息.id where 角色编号=${token} order by 模块顺序`
type: '1',
name: `菜单系统模块_获取角色模块_查询数据`,
param: `角色编号=${token}`
}
})
}

View File

@@ -44,6 +44,7 @@ const user = {
Cookies.set('id', data[0].人员编号, { expires: 1 })
Cookies.set('name', data[0].姓名, { expires: 1 })
Cookies.set('userId', data[0].考勤编号, { expires: 1 })
Cookies.set('session_id', data[0].session_id)
commit('SET_TOKEN', data[0].角色编号)
commit('SET_NAME', data[0].姓名)
commit('SET_ID', data[0].人员编号)

View File

@@ -1,4 +1,6 @@
import axios from 'axios'
import Cookies from 'js-cookie'
import store from '@/store'
export const wsuri = `ws://123.56.95.229:61101//WebMoudule//websocket`
export const name = `OP8888`
@@ -26,7 +28,44 @@ export const MESUploadFile = `http://123.56.95.229:8010/submit/MESUploadFile.ash
export const MESDownloadFile = `http://123.56.95.229:8010/submit/MESDownloadFile.ashx`
const service = axios.create({
baseURL: `http://123.56.95.229:8010/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.192:8045/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})
// && config.data.name !== '菜单系统模块_通知信息_查询数据' && config.data.name !== '菜单系统模块_首页信息_查询数据1' && config.data.name !== '菜单系统模块_首页信息_查询数据2'
service.interceptors.request.use(config => {
if (config.data.name !== '菜单系统模块_用户名密码_查询数据_new2' && config.data.name !== '菜单系统模块_获取角色模块_查询数据') {
getSession_id().then(res => {
if (res === 0) {
store.dispatch('FedLogOut').then(() => {
location.reload() // 为了重新实例化vue-router对象 避免bug
alert('此账号已异地登录,请查重新登录')
})
}
})
}
return config
}, error => {
Promise.reject(error)
})
export default service
async function getSession_id() {
const id = Cookies.get('id')
const session_id = Cookies.get('session_id')
const param = {
url: url,
method: 'post',
data: {
type: '1',
name: '菜单系统模块_用户sessionID_查询数据',
param: '人员编号=' + id
}
}
const res = await axios(param)
if (session_id !== res.data[0].session_id) {
return 0
} else {
return 1
}
}

View File

@@ -132,6 +132,7 @@ export default {
userName: '0000'
}
}).then(res => {
console.log(res, 9999)
})
},
projectChange() {

View File

@@ -91,7 +91,7 @@
{{ scope.row.修补单件工时 }}
</template>
</el-table-column>
<el-table-column label="录入准结" align="center" width="80px">
<el-table-column label="准结" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.修补工时 }}
</template>

View File

@@ -380,7 +380,7 @@ export default {
},
addTableData1() {
this.ADD_disable = true
addList(this.form.EntryName, this.form.remark, this.form.contractSigningDate).then(response => {
addList(this.form.EntryName, this.form.remark, this.form.contractSigningDate, this.$store.state.user.id).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('添加成功')

View File

@@ -69,8 +69,9 @@ export default {
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 基础表_角色模块信息 inner join 基础表_模块信息 on 基础表_角色模块信息.id = 基础表_模块信息.id where 角色编号= ${this.token} and [path] = '/'`
type: '1',
name: `菜单系统模块_首页信息_查询数据1`,
param: '角色编号=' + this.token
}
}).then(data => {
this.fathers = []
@@ -92,8 +93,9 @@ export default {
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 基础表_角色模块信息 inner join 基础表_模块信息 on 基础表_角色模块信息.id = 基础表_模块信息.id where 角色编号= ${this.token} and [path] <> '/'`
type: '1',
name: `菜单系统模块_首页信息_查询数据2`,
param: '角色编号=' + this.token
}
}).then(data => {
this.sons = []
@@ -113,8 +115,9 @@ export default {
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 基础表_角色模块信息 inner join 基础表_模块信息 on 基础表_角色模块信息.id = 基础表_模块信息.id where 角色编号=${this.token} and 是否通知 = 1`
type: '1',
name: `菜单系统模块_通知信息_查询数据`,
param: '角色编号=' + this.token
}
}).then(data => {
this.sudokus = []