【修改】修改
This commit is contained in:
@@ -9,4 +9,12 @@ export default {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
// 查询报告如果已经发起了 就不能再发起了
|
||||
selectReport (data) {
|
||||
return request({
|
||||
url: '/api/report/isAct',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
+1
-20
@@ -43,25 +43,6 @@ instance.interceptors.response.use(function (response) {
|
||||
store.commit('saveIsLoading', false)
|
||||
}
|
||||
|
||||
// 登录超时
|
||||
if (response.data.respCode === '401') {
|
||||
store.commit('saveUserInfo', null)
|
||||
store.commit('saveUserInfo', null)
|
||||
store.commit('savePathUrl', null)
|
||||
store.commit('saveMenuName', null)
|
||||
store.commit('saveMenuData', null)
|
||||
router.push('/login')
|
||||
Message.error('登录超时过期')
|
||||
//清除vuex
|
||||
|
||||
// var url = 'http://192.168.144.22:9966/login?loginType=1'
|
||||
// // var url = 'http://10.64.23.30:7766/home'
|
||||
//
|
||||
// return window.open('http://192.168.144.29:9090/cas/login?service='+url, '_self');
|
||||
// return window.open('https://caddmuat.changan.com.cn/cas/login?service='+url, '_self');
|
||||
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
|
||||
}
|
||||
|
||||
// 请求成功
|
||||
if (response.status === 200) {
|
||||
if (response.data.respCode === '0') {
|
||||
@@ -73,7 +54,7 @@ instance.interceptors.response.use(function (response) {
|
||||
store.commit('saveUserInfo', null)
|
||||
store.commit('savePathUrl', null)
|
||||
store.commit('setHandleProcess', null)
|
||||
router.push('/login')
|
||||
// router.push('/login')
|
||||
Message.error(response.data.message)
|
||||
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
|
||||
// var url = 'http://192.168.144.22:9966/login?loginType=1'
|
||||
|
||||
@@ -434,7 +434,9 @@ export default {
|
||||
})
|
||||
|
||||
} else {
|
||||
this.startProcess()
|
||||
this.isSendDraft().then(()=>{
|
||||
this.startProcess()
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -447,6 +449,23 @@ export default {
|
||||
//修改参数
|
||||
changeParam() {
|
||||
|
||||
},
|
||||
// 草稿发起 需要先调用这个接口
|
||||
isSendDraft(){
|
||||
let ids=this.tableData.map(item=>{
|
||||
return item.reportId
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
this.$api.permissionProcess.selectReport({ids:ids}).then((res)=>{
|
||||
if(res.data.length==0){
|
||||
resolve(true)
|
||||
}else{
|
||||
this.$message.warning("报告"+res.data.join(',')+"已经在流程中")
|
||||
reject()
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
startProcess() {
|
||||
//把表单都整合到form中
|
||||
|
||||
Reference in New Issue
Block a user