Browse Source

演示项目优化

master
陈裕财 3 years ago
parent
commit
9b7ea37193
  1. 10
      src/utils/request.js
  2. 2
      src/views/login/components/login.vue
  3. 17
      src/views/xm/core/xmProject/XmProjectMng.vue
  4. 15
      src/views/xm/core/xmProject/XmProjectTplMng.vue

10
src/utils/request.js

@ -24,7 +24,7 @@ if(indexOfHttp>0){
// create an axios instance
const service = axios.create({
baseURL:baseApiUrl, // api的base_url
timeout: 15000 // request timeout
timeout: 25000 // request timeout
})
// request interceptor
@ -71,13 +71,7 @@ service.interceptors.response.use(
return;
}
}
Message({
showClose:true,
message: '通讯错误',
type: 'error',
duration: 5 * 1000
})
Message.closeAll()
return Promise.reject(error)
})

2
src/views/login/components/login.vue

@ -373,7 +373,7 @@ export default {
loginByShowAccount(){
this.loading = true
var loginParams={ }
loginParams.userloginid="chenyc_002"
loginParams.userloginid="demo-branch-01"
loginParams.password=md5("888888")
loginParams.grantType="password"
loginParams.authType='password_display_userid'

17
src/views/xm/core/xmProject/XmProjectMng.vue

@ -841,21 +841,8 @@
this.$notify({position:'bottom-left',showClose:true,message: '项目代号不能为空', type: 'error' });
return;
}
this.load.add=true;
copyTo(this.xmProjectCopy).then(res=>{
this.load.add=false;
var tips = res.data.tips;
if(tips.isOk){
this.copyToVisible=false;
if(this.xmProjectCopy.isTpl=='0'){
this.searchXmProjects()
}else{
this.$refs.xmProjectTplMngRef.searchXmProjects()
}
}
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
})
copyTo(this.xmProjectCopy);
this.$notify({position:'bottom-left',showClose:true,message: "已提交拷贝任务,执行需要1-5分钟,请稍后刷新项目列表", type: 'success' });
},
createProjectCode(){
createProjectCode({}).then(res=>{

15
src/views/xm/core/xmProject/XmProjectTplMng.vue

@ -336,20 +336,9 @@
this.$notify({position:'bottom-left',showClose:true,message: '项目代号不能为空', type: 'error' });
return;
}
this.load.add=true;
copyTo(this.xmProjectCopy).then(res=>{
this.load.add=false;
var tips = res.data.tips;
if(tips.isOk){
this.copyToVisible=false;
if(this.xmProjectCopy.isTpl){
this.searchXmProjects()
}
this.$emit("copy",res.data.data)
}
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
})
copyTo(this.xmProjectCopy);
this.$notify({position:'bottom-left',showClose:true,message: "已提交拷贝任务,执行需要1-5分钟,请稍后刷新项目列表", type: 'success' });
},
/**begin 自定义函数请在下面加**/
// truefalse

Loading…
Cancel
Save