Commit 7b5ff340 authored by derong.zhang's avatar derong.zhang

修改初始化问题

parent 40682485
const sapi = 'http://s-engine.quantgroup.cn' const sapi = 'http://api.s-engine.quantgroup.cn'
export { export {
sapi sapi
} }
...@@ -185,8 +185,31 @@ export default { ...@@ -185,8 +185,31 @@ export default {
maintitleuid: '', maintitleuid: '',
detailtitleuid: '', detailtitleuid: '',
soul: '', soul: '',
leftarr: [], mainUid: '',
rightarr: [], leftarr: [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
],
rightarr: [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
],
resultarr: [], resultarr: [],
leftmyArray: [], leftmyArray: [],
addarr: [], addarr: [],
...@@ -289,7 +312,7 @@ export default { ...@@ -289,7 +312,7 @@ export default {
this.leftarr[ind].title = item.title this.leftarr[ind].title = item.title
this.leftarr = [...this.leftarr] this.leftarr = [...this.leftarr]
let params = { let params = {
strategyUid: item.strategyUid, strategyUid: item.strategyUid === '' ? this.mainUid : item.strategyUid,
uid: item.uid, uid: item.uid,
title: item.title, title: item.title,
orderNo: item.orderNo === '' ? this.leftarr.length : item.orderNo, orderNo: item.orderNo === '' ? this.leftarr.length : item.orderNo,
...@@ -318,7 +341,7 @@ export default { ...@@ -318,7 +341,7 @@ export default {
this.rightarr[ind].title = item.title this.rightarr[ind].title = item.title
this.rightarr = [...this.rightarr] this.rightarr = [...this.rightarr]
let params = { let params = {
strategyUid: item.strategyUid, strategyUid: item.strategyUid === '' ? this.mainUid : item.strategyUid,
uid: item.uid, uid: item.uid,
title: item.title, title: item.title,
orderNo: item.orderNo === '' ? this.rightarr.length : item.orderNo, orderNo: item.orderNo === '' ? this.rightarr.length : item.orderNo,
...@@ -535,7 +558,7 @@ export default { ...@@ -535,7 +558,7 @@ export default {
}, },
oneaddtitle () { oneaddtitle () {
this.leftarr.push({ this.leftarr.push({
strategyUid: '3d6768ad7c2a4eaa86a788527f05ca10', strategyUid: this.mainUid,
uid: '', uid: '',
title: '', title: '',
orderNo: '', orderNo: '',
...@@ -547,7 +570,7 @@ export default { ...@@ -547,7 +570,7 @@ export default {
}, },
oneaddtitleright () { oneaddtitleright () {
this.rightarr.push({ this.rightarr.push({
strategyUid: '3d6768ad7c2a4eaa86a788527f05ca10', strategyUid: this.mainUid,
uid: '', uid: '',
title: '', title: '',
orderNo: '', orderNo: '',
...@@ -607,8 +630,11 @@ export default { ...@@ -607,8 +630,11 @@ export default {
this.hosttitlespantitle = data.data.body.title this.hosttitlespantitle = data.data.body.title
this.updatetime = data.data.body.modifyTime this.updatetime = data.data.body.modifyTime
this.maintitleuid = data.data.body.uid this.maintitleuid = data.data.body.uid
this.mainUid = data.data.body.uid
if (data.data.body.leftObjectivesVOList.length === 0) {
this.leftarr = this.leftarr
} else {
this.leftarr = data.data.body.leftObjectivesVOList this.leftarr = data.data.body.leftObjectivesVOList
this.rightarr = data.data.body.rightObjectivesVOList
this.leftarr.map(item => { this.leftarr.map(item => {
item.editstaus = false item.editstaus = false
item.editshowstaus = true item.editshowstaus = true
...@@ -621,6 +647,11 @@ export default { ...@@ -621,6 +647,11 @@ export default {
})) || null })) || null
return item return item
}) })
}
if (data.data.body.rightObjectivesVOList.length === 0) {
this.rightarr = this.rightarr
} else {
this.rightarr = data.data.body.rightObjectivesVOList
this.rightarr.map(item => { this.rightarr.map(item => {
item.editstaus = false item.editstaus = false
item.editshowstaus = true item.editshowstaus = true
...@@ -633,6 +664,7 @@ export default { ...@@ -633,6 +664,7 @@ export default {
})) || null })) || null
return item return item
}) })
}
}) })
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment