单点登录优化;删除用户回显修正影响提交问题

main
xuechunyuan 3 years ago
parent 3a8774b9ae
commit 23300a9e9d
  1. 1
      src/const/maintenance/basics.js
  2. 28
      src/permission.js
  3. 8
      src/views/maintenance/system.vue
  4. 2
      src/views/plugin/workflow/process/components/effect.vue
  5. 11
      src/views/wel/index.vue

@ -104,6 +104,7 @@ export const tableOption = {
label: "运维公司",
prop: "companyName",
align: "left",
span: 8,
overHidden: true,
addDisplay: false,
editDisplay: false,

@ -27,6 +27,7 @@ router.beforeEach((to, from, next) => {
next({ path: '/newlogin' })
})
} else {
console.log('登录重新刷新======',to,from)
const value = to.query.src || to.fullPath;
const label = to.query.name || to.name;
const meta = to.meta || router.$avueRouter.meta || {};
@ -54,13 +55,13 @@ router.beforeEach((to, from, next) => {
}
}
} else {
console.log('nologin===permission===========', to,from)
// console.log('nologin===permission===========', to,from)
const ssotoken = to.query.SSOToken;
if (process.env.NODE_ENV == "production" && to.path != '/newlogin') {
if (process.env.NODE_ENV == "production" && to.path != '/newlogin' && to.path != '/login' && to.path != '/') {
//过滤ssotoken重新拼接回调地址
let newQuery = JSON.parse(JSON.stringify(to.query));
delete newQuery.SSOToken;
let fallbackUrl = window.location.href.substring(0, window.location.href.indexOf("?"));
let fallbackUrl = window.location.href.indexOf("?") > -1 ? window.location.href.substring(0, window.location.href.indexOf("?")) : window.location.href;
let keys = Object.keys(newQuery);
for (let i = 0; i < keys.length; i++) {
if (i === 0) {
@ -70,13 +71,30 @@ router.beforeEach((to, from, next) => {
}
}
// alert(fallbackUrl)
// router.replace({path: fallbackUrl})
// let loginForm = {
// "tenantId": "000000",
// "deptId": "",
// "roleId": "",
// "username": "admin",
// "password": "admin",
// "type": "account",
// "code": "",
// "key": "",
// "image": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
// }
// store.dispatch("LoginByUsername",loginForm).then(() => {
// const src = fallbackUrl.substring(fallbackUrl.indexOf('#/')+1);
// router.replace({path:'/wel/index',query:{redirect:src}})
// })
store.dispatch("LoginBySso", { SSOToken: ssotoken, grantType: 'yawei', fallbackUrl: fallbackUrl })
.then(() => {
// alert("登录成功1")
// this.loading = false;
console.log('=============登录成功')
router.replace({ path: fallbackUrl })
const src = fallbackUrl.substring(fallbackUrl.indexOf('#/')+1);
router.replace({path:'/wel/index',query:{redirect:src}})
}, err => {
// alert(JSON.stringify(err))
// this.loading = false;
console.log('err=======res', err)
if (err.error == 'invalid_request') {

@ -342,10 +342,16 @@ export default {
//
const _idx = this.findObject(this.option.column,"company").dicData.findIndex(item => item.id == company);
if(_idx > -1){
this.findObject(this.option.column,"company").display = true;
this.findObject(this.option.column,"companyName").addDisplay = false;
this.form.company = company;
}
else{
this.form.company = companyName;
this.findObject(this.option.column,"company").display = false;
this.findObject(this.option.column,"companyName").addDisplay = true;
this.findObject(this.option.column,"companyName").disabled = true;
this.form.company = company;
this.form.companyName = companyName;
}
this.form.dataBaseIp = dataBaseIp;
this.form.dataBasePort = dataBasePort;

@ -229,6 +229,8 @@ export default {
display: true,
prop: "remark",
labelPosition: "top",
maxlength: 200,
showWordLimit:true,
rules: [{ required: true, message: "请输入实施反馈" }],
// disabled: (JSON.parse(this.$route.query.form).isFinish === 1 ) ? true : false,
},

@ -116,7 +116,16 @@ export default {
};
},
created() {
this.onload();
const redirect = this.$route.query.redirect;
if(redirect) {
console.log(redirect)
setTimeout(() => {
this.$router.replace(redirect)
},300)
}
else{
this.onload();
}
},
methods: {
//

Loading…
Cancel
Save