Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -74,6 +74,10 @@ export default {
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: false
|
||||
}).then(() => {
|
||||
this.$http.post('/logout', {}, res => {
|
||||
window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
|
||||
})
|
||||
return
|
||||
this.$store.commit('setTypeFlag', 'loginOut')
|
||||
this.$http.get('logout', {}, {
|
||||
_this: this
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
<el-form-item label="所属模块" prop="sarType" class="add-form-item">
|
||||
<el-select v-model="displayLocationDialogFormData.sarType" filterable>
|
||||
<el-option
|
||||
v-for="item in sarTypeLocationOptions"
|
||||
v-for="item in sarTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+84
-71
@@ -55,10 +55,6 @@
|
||||
},
|
||||
// 点击登录按钮事件
|
||||
signin () {
|
||||
// let username = getCookie();
|
||||
// console.log(username);
|
||||
// window.location.href = "http://testsso1.foton.com.cn/logout?service=http://127.0.0.1";
|
||||
// return
|
||||
if (this.username === '') {
|
||||
this.$message.warning('用户名不能为空')
|
||||
} else if (this.password === '') {
|
||||
@@ -275,7 +271,7 @@
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @description: 获取菜单
|
||||
* @description: 获取菜单logout
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/11 13:42:14
|
||||
*/
|
||||
@@ -292,78 +288,95 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
loginNew (res) {
|
||||
window.sessionStorage.setItem('go1', '开始第一步'); // del
|
||||
if (res.data.orgId === null || res.data.orgId === '') {
|
||||
this.$message.warning('未分配组织机构,请联系管理员分配后重新登录')
|
||||
return
|
||||
}
|
||||
window.sessionStorage.setItem('go2', '开始第二步'); // del
|
||||
let Base64 = require('js-base64').Base64
|
||||
window.sessionStorage.setItem('go3', '开始第3步'); // del
|
||||
let userInfoStr = Base64.decode(res.data)
|
||||
window.sessionStorage.setItem('go4', '开始第4步'); // del
|
||||
let userInfo2 = decodeURIComponent(userInfoStr)
|
||||
window.sessionStorage.setItem('go5', '开始第5步'); // del
|
||||
let userInfoObj = JSON.parse(userInfo2)
|
||||
window.sessionStorage.setItem('go6', '开始第6步'); // del
|
||||
userInfoObj.userId = userInfoObj.usid
|
||||
window.sessionStorage.setItem('go7', '开始第7步'); // del
|
||||
window.sessionStorage.setItem('userInfoObj', userInfoObj); // del
|
||||
this.setToken(userInfoObj.token) // vuex存储token
|
||||
let userInfo = {}
|
||||
for (let key in userInfoObj) {
|
||||
if (key !== 'uname') {
|
||||
userInfo[key] = userInfoObj[key]
|
||||
} else {
|
||||
userInfo.uName = userInfoObj[key]
|
||||
}
|
||||
}
|
||||
this.setUserInfo(JSON.stringify((userInfo)))
|
||||
// this.resetTime()
|
||||
// 获取用户菜单
|
||||
window.sessionStorage.setItem('userInfo', userInfo); // del
|
||||
this.getMenu().then((menuList) => {
|
||||
let hasHomeMenu = false
|
||||
menuList.map((menuItem) => {
|
||||
if (menuItem.id === 'asdfadf') {
|
||||
hasHomeMenu = true
|
||||
}
|
||||
})
|
||||
window.sessionStorage.setItem('hasHomeMenu', hasHomeMenu); // del
|
||||
window.sessionStorage.setItem('menuList', menuList); // del
|
||||
if (hasHomeMenu) {
|
||||
this.setMenu(JSON.stringify(menuList)).then(res => {
|
||||
this.$router.push('/home1')
|
||||
}, e => {
|
||||
this.$message.warning('未获取到菜单')
|
||||
})
|
||||
} else {
|
||||
alert('无系统权限')
|
||||
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code';
|
||||
}
|
||||
})
|
||||
},
|
||||
...mapMutations(['setToken', 'setUserInfo', 'resetTime', 'rememberPwd', 'setJESSCookie']),
|
||||
...mapActions(['setMenu'])
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted () {
|
||||
console.log(document.cookie);
|
||||
let url = window.location.search
|
||||
if (url) {
|
||||
url = url.substr(1);
|
||||
url = url.split('&');
|
||||
let info = [];
|
||||
let obj = {};
|
||||
for (let i = 0,len = url.length; i < len; i++) {
|
||||
info = url[i].split('=')
|
||||
obj[info[0]] = decodeURI(info[1]);
|
||||
url[i] = obj;
|
||||
}
|
||||
let code = url[0].code
|
||||
this.$http.post('login', {
|
||||
code: code
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
const JSESSIONID = document.cookie
|
||||
this.setJESSCookie(JSESSIONID)
|
||||
if (res.data.orgId === null || res.data.orgId === '') {
|
||||
this.$message.warning('未分配组织机构,请联系管理员分配后重新登录')
|
||||
return
|
||||
}
|
||||
// debugger
|
||||
let Base64 = require('js-base64').Base64
|
||||
let userInfoStr = Base64.decode(res.data)
|
||||
let userInfo2 = decodeURIComponent(userInfoStr)
|
||||
let userInfoObj = JSON.parse(userInfo2)
|
||||
userInfoObj.userId = userInfoObj.usid
|
||||
this.setToken(userInfoObj.token) // vuex存储token
|
||||
let userInfo = {}
|
||||
for (let key in userInfoObj) {
|
||||
if (key !== 'uname') {
|
||||
userInfo[key] = userInfoObj[key]
|
||||
} else {
|
||||
userInfo.uName = userInfoObj[key]
|
||||
}
|
||||
}
|
||||
this.setUserInfo(JSON.stringify((userInfo)))
|
||||
this.resetTime()
|
||||
// 获取用户菜单
|
||||
this.getMenu().then((menuList) => {
|
||||
let hasHomeMenu = false
|
||||
menuList.map((menuItem) => {
|
||||
if (menuItem.id === 'asdfadf') {
|
||||
hasHomeMenu = true
|
||||
}
|
||||
})
|
||||
if (hasHomeMenu) {
|
||||
this.setMenu(JSON.stringify(menuList)).then(res => {
|
||||
this.$router.push('/home1')
|
||||
}, e => {
|
||||
this.$message.warning('未获取到菜单')
|
||||
})
|
||||
} else {
|
||||
window.location.href = "http://testsso1.foton.com.cn/logout?service=127.0.0.1";
|
||||
}
|
||||
})
|
||||
} else if (res.respCode === 'r0012') {
|
||||
this.loading = false
|
||||
this.$message.error(res.message)
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
// let url = window.location.search
|
||||
// let code = ''
|
||||
// if (url) {
|
||||
// url = url.substr(1);
|
||||
// url = url.split('&');
|
||||
// let info = [];
|
||||
// let obj = {};
|
||||
// for (let i = 0,len = url.length; i < len; i++) {
|
||||
// info = url[i].split('=')
|
||||
// obj[info[0]] = decodeURI(info[1]);
|
||||
// url[i] = obj;
|
||||
// }
|
||||
// code = url[0].code
|
||||
// window.localStorage.setItem('code', code);
|
||||
// } else if (window.localStorage.getItem('code') && !url) {
|
||||
// code = window.localStorage.getItem('code');
|
||||
// } else {
|
||||
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
|
||||
// }
|
||||
// if (code) {
|
||||
// this.$http.post('login', {
|
||||
// code: code
|
||||
// }, res => {
|
||||
// if (res.ok) {
|
||||
// window.sessionStorage.setItem('go', '开始第0步'); // del
|
||||
// this.loginNew(res)
|
||||
// } else {
|
||||
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
if (this.$store.state.laws_urm !== '') {
|
||||
this.isRemember = true
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="action-bar">
|
||||
<el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="transfer">调取</el-button>
|
||||
<el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="deleteList">批量删除
|
||||
</el-button>
|
||||
<!-- <el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="transfer">调取</el-button>-->
|
||||
<!-- <el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="deleteList">批量删除-->
|
||||
<!-- </el-button>-->
|
||||
<el-button class="common-button-default export-button"
|
||||
size="mini" @click="exportStandard"
|
||||
v-btn-permission="''"
|
||||
|
||||
+34
-8
@@ -108,13 +108,27 @@
|
||||
>
|
||||
<div class="demo-drawer-content">
|
||||
<div class="el-drawer-form">
|
||||
<div class="search-area">
|
||||
<div class="left">
|
||||
<div class="search-area-detail">
|
||||
<div class="left" id="detailSearch">
|
||||
<el-form :inline="true" :model="sarProStateEO" class="label-input-form">
|
||||
<el-form-item label="项目名称" class="search-item search-item-last">
|
||||
<el-form-item label="标准编号" class="search-item search-item-last">
|
||||
<el-input
|
||||
v-model="sarProStateEO.productName"
|
||||
placeholder="根据项目名称查找"
|
||||
v-model="sarProStateEO.standNumber"
|
||||
placeholder="根据标准编号查找"
|
||||
:maxlength="100"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标准名称" class="search-item search-item-last">
|
||||
<el-input
|
||||
v-model="sarProStateEO.standName"
|
||||
placeholder="根据标准名称查找"
|
||||
:maxlength="100"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="具体章条" class="search-item search-item-last">
|
||||
<el-input
|
||||
v-model="sarProStateEO.specificItem"
|
||||
placeholder="根据具体章条查找"
|
||||
:maxlength="100"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
@@ -230,7 +244,12 @@ name: "technologyInvolveProject",
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
showSarProStateModal: false,
|
||||
sarProStateEO: {
|
||||
productName: ''
|
||||
//标准编号
|
||||
standNumber: '',
|
||||
//标准名称
|
||||
standName: '',
|
||||
//具体章条
|
||||
specificItem: '',
|
||||
},
|
||||
sarProStateTotal: 0,
|
||||
sarProStateTotalPage: 1,
|
||||
@@ -306,11 +325,15 @@ name: "technologyInvolveProject",
|
||||
this.showSarProStateModal = true
|
||||
}, // 查询项目数据
|
||||
clearSearchProState () {
|
||||
this.sarProStateEO.productName = ''
|
||||
this.sarProStateEO.standNumber = ''
|
||||
this.sarProStateEO.standName = ''
|
||||
this.sarProStateEO.specificItem = ''
|
||||
this.querySarProStateZero()
|
||||
}, // 清空条件查询
|
||||
clearSearchPro () {
|
||||
this.sarProStateEO.productName = ''
|
||||
this.sarProStateEO.standNumber = ''
|
||||
this.sarProStateEO.standName = ''
|
||||
this.sarProStateEO.specificItem = ''
|
||||
this.showSarProStateModal = false
|
||||
}, // 关闭查看事件
|
||||
pageProStateChange (page) {
|
||||
@@ -368,5 +391,8 @@ name: "technologyInvolveProject",
|
||||
.search-area .search-item .el-input--suffix .el-input__inner{
|
||||
padding-right: 15px;
|
||||
}
|
||||
.search-area-detail .el-input__inner{
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user