Browse Source

优化

master
陈裕财 4 years ago
parent
commit
7d12840d35
  1. 16
      src/permission.js
  2. 18
      src/views/login/components/login.vue
  3. 2
      src/views/mdp/mo/moOrder/MoOrderEdit.vue
  4. 2
      src/views/mdp/mo/moOrderModule/MoOrderModuleEdit.vue
  5. 2
      src/views/mdp/plat/bankAccount/BankAccountEdit.vue
  6. 2
      src/views/mdp/sys/module/ModuleEdit.vue
  7. 2
      src/views/mdp/sys/user/MemMemberMng.vue
  8. 2
      src/views/myWork/my/index.vue
  9. 2
      src/views/xm/core/xmQuestion/XmQuestionForTask.vue
  10. 2
      src/views/xm/core/xmTask/XmTaskEdit.vue
  11. 2
      src/views/xm/core/xmTaskWorkItem/XmSubTaskList.vue

16
src/permission.js

@ -143,6 +143,22 @@ function getQueryVariable(variable,url){
} }
return null; return null;
} }
function setIndexPath() {
var indexPath=null
var url=window.location.href;
if(url.indexOf("/login")<=0){
var indexOf=url.indexOf("/#")
if(indexOf > 0){
indexPath=url.substring(indexOf+2)
localStorage.setItem("index-path",indexPath);
}else{
localStorage.setItem("index-path",null);
}
}
}
setIndexPath();
var accessToken=getQueryVariable('accessToken'); var accessToken=getQueryVariable('accessToken');
if(accessToken!=null){ if(accessToken!=null){
//alert(access_token); //alert(access_token);

18
src/views/login/components/login.vue

@ -267,12 +267,11 @@ export default {
loginParams.branchId=params.branchId loginParams.branchId=params.branchId
} }
this.$store.dispatch("LoginByUserloginid",loginParams).then(res => { this.$store.dispatch("LoginByUserloginid",loginParams).then(res => {
debugger;
;
this.loading = false this.loading = false
if(res.data.tips.isOk==true){ if(res.data.tips.isOk==true){
this.loading = true; this.loading = true;
this.$store.dispatch('GetUserInfo').then((res2)=>{
debugger;
this.$store.dispatch('GetUserInfo').then((res2)=>{
this.loading = false this.loading = false
if(res2.data.tips.isOk==true){ if(res2.data.tips.isOk==true){
this.userDeptid=res2.data.userInfo.deptid this.userDeptid=res2.data.userInfo.deptid
@ -312,15 +311,16 @@ export default {
}, },
// //
rolesChecked(){ rolesChecked(){
var indexPath=localStorage.getItem("index-path");
if(!indexPath){
indexPath="/"
}
if(this.userInfo.isSuperAdmin){ if(this.userInfo.isSuperAdmin){
this.$router.push({ path: '/' });
this.$notify.info("欢迎登陆,超级管理员");
this.$router.push({ path: indexPath });
}else if(this.userInfo.isPlatformAdmin){ }else if(this.userInfo.isPlatformAdmin){
this.$router.push({ path: '/' });
this.$notify.info("欢迎登陆,平台管理员");
this.$router.push({ path: indexPath });
}else{ }else{
this.$router.push({ path: '/' });
this.$notify.info("欢迎登陆");
this.$router.push({ path: indexPath });
} }
}, },

2
src/views/mdp/mo/moOrder/MoOrderEdit.vue

@ -292,7 +292,7 @@ MoOrderModuleMng
editSomeFields(row,fieldName,$event){ editSomeFields(row,fieldName,$event){
debugger;
;
if(this.opType=='add'){ if(this.opType=='add'){
return; return;
} }

2
src/views/mdp/mo/moOrderModule/MoOrderModuleEdit.vue

@ -173,7 +173,7 @@
}, },
editSomeFields(row,fieldName,$event){ editSomeFields(row,fieldName,$event){
debugger;
;
if(this.opType=='add'){ if(this.opType=='add'){
return; return;
} }

2
src/views/mdp/plat/bankAccount/BankAccountEdit.vue

@ -115,7 +115,7 @@
this.load.edit=true this.load.edit=true
let params = Object.assign({}, this.editForm); let params = Object.assign({}, this.editForm);
editBankAccount(params).then((res) => { editBankAccount(params).then((res) => {
debugger;
;
this.load.edit=false this.load.edit=false
var tips=res.data.tips; var tips=res.data.tips;
this.$notify({ message: tips.msg, type: tips.isOk?'success':'error' }); this.$notify({ message: tips.msg, type: tips.isOk?'success':'error' });

2
src/views/mdp/sys/module/ModuleEdit.vue

@ -169,7 +169,7 @@
}else{ }else{
} }
debugger;
;
if(this.editForm.discount){ if(this.editForm.discount){
this.discount=JSON.parse(this.editForm.discount) this.discount=JSON.parse(this.editForm.discount)
} }

2
src/views/mdp/sys/user/MemMemberMng.vue

@ -238,7 +238,7 @@
users:this.users, users:this.users,
memMembers:Object.assign({}, row), memMembers:Object.assign({}, row),
}; };
// debugger
//
console.log("查看params"); console.log("查看params");
console.log(params); console.log(params);
addSubacctAddForm(params).then((res) => { addSubacctAddForm(params).then((res) => {

2
src/views/myWork/my/index.vue

@ -93,7 +93,7 @@ export default {
methods: { methods: {
gotolink(context,path) { gotolink(context,path) {
debugger;
;
if(context==process.env.CONTEXT){ if(context==process.env.CONTEXT){
this.$router.push({path:path}); this.$router.push({path:path});
}else{ }else{

2
src/views/xm/core/xmQuestion/XmQuestionForTask.vue

@ -1099,7 +1099,7 @@
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el);
debugger;
;
this.getXmQuestions(); this.getXmQuestions();
}); });
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate']).then(res=>{ initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate']).then(res=>{

2
src/views/xm/core/xmTask/XmTaskEdit.vue

@ -621,7 +621,7 @@ import XmMenuEdit from '../xmMenu/XmMenuEdit.vue';
Object.assign(row,params) Object.assign(row,params)
this.editFormBak=Object.assign({},row) this.editFormBak=Object.assign({},row)
}else{ }else{
debugger;
;
Object.assign(this.editForm,this.editFormBak) Object.assign(this.editForm,this.editFormBak)
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'}) this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
} }

2
src/views/xm/core/xmTaskWorkItem/XmSubTaskList.vue

@ -273,7 +273,7 @@ export default {
} }
editXmTaskSomeFields(params).then(res=>{ editXmTaskSomeFields(params).then(res=>{
debugger;
;
var tips = res.data.tips; var tips = res.data.tips;
if(tips.isOk){ if(tips.isOk){
if(this.sels.length>0){ if(this.sels.length>0){

Loading…
Cancel
Save