fix: 修复流程中当发起流程时,如果没有草稿时,后端接口报错的BUG,此处在前端页面增加判断逻辑防止如果没有草稿数据时接口报错的BUG

This commit is contained in:
zyd
2022-07-13 22:22:25 +08:00
parent b9ca214c0f
commit 32370c07e7
4 changed files with 74 additions and 57 deletions
@@ -373,6 +373,8 @@
this.foldFormFlag = !this.foldFormFlag this.foldFormFlag = !this.foldFormFlag
}, },
getData () { getData () {
const queryId = this.$route.query.bpnId
if(queryId !== null && queryId !== undefined && queryId !==''){
queryTaskFirst({ queryTaskFirst({
bpnId: this.$route.query.bpnId bpnId: this.$route.query.bpnId
}).then(res => { }).then(res => {
@@ -387,6 +389,7 @@
this.roleForm = mes.roleForm this.roleForm = mes.roleForm
this.commentText1 = mes.commentText1 || '' this.commentText1 = mes.commentText1 || ''
}) })
}
}, },
checkedRole2 (data) { checkedRole2 (data) {
var idList = '' var idList = ''
@@ -597,9 +600,11 @@
let taskId = { let taskId = {
id: this.$route.query.bpnId id: this.$route.query.bpnId
} }
if(taskId !=='' && taskId !== undefined && taskId !== null){
taskDel(taskId).then(res=>{ taskDel(taskId).then(res=>{
return res return res
}) })
}
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false this.isSubmit = false
@@ -589,9 +589,11 @@ export default {
let taskId = { let taskId = {
id: this.$route.query.bpnId id: this.$route.query.bpnId
} }
if(taskId !== '' && taskId !== undefined && taskId !== null){
taskDel(taskId).then(res=>{ taskDel(taskId).then(res=>{
return res return res
}) })
}
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false this.isSubmit = false
@@ -862,6 +862,8 @@
this.itermsConditionsTitle = row.replace(/''/g, '\'') this.itermsConditionsTitle = row.replace(/''/g, '\'')
}, },
getData () { getData () {
const queryId =this.$route.query.bpnId
if(queryId !== null && queryId !== undefined && queryId !==''){
queryTaskFirst({ queryTaskFirst({
bpnId: this.$route.query.bpnId bpnId: this.$route.query.bpnId
}).then(res => { }).then(res => {
@@ -878,6 +880,7 @@
this.itemList = mes.itemList this.itemList = mes.itemList
this.sarType = mes.sarType this.sarType = mes.sarType
}) })
}
}, },
setMap(data){ setMap(data){
data.forEach(item => { data.forEach(item => {
@@ -1136,9 +1139,11 @@
let taskId = { let taskId = {
id: this.$route.query.bpnId id: this.$route.query.bpnId
} }
if(taskId !== '' && taskId !== undefined && taskId !== null){
taskDel(taskId).then(res=>{ taskDel(taskId).then(res=>{
return res return res
}) })
}
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
}) })
@@ -661,6 +661,8 @@ export default {
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
}, },
getData() { getData() {
const queryId = this.$route.query.bpnId
if(queryId !== null && queryId !== undefined && queryId !==''){
queryTaskFirst({ queryTaskFirst({
bpnId: this.$route.query.bpnId bpnId: this.$route.query.bpnId
}).then(res => { }).then(res => {
@@ -685,6 +687,7 @@ export default {
}) })
} }
}) })
}
}, },
addZqyjList() { addZqyjList() {
this.title = '国内外标准库' this.title = '国内外标准库'
@@ -860,9 +863,11 @@ export default {
let taskId = { let taskId = {
id: this.$route.query.bpnId id: this.$route.query.bpnId
} }
if(taskId !== '' && taskId !== undefined && taskId !== null){
taskDel(taskId).then(res=>{ taskDel(taskId).then(res=>{
return res return res
}) })
}
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
}) })