Commit 56a83ff4 authored by derong.zhang's avatar derong.zhang

删除打印,优化初始值

parent 9e228925
......@@ -177,7 +177,6 @@ export default {
const list = await getname(query)
this.getNamearr = list.data.body || []
}, 200)
console.log(this.getNamearr, 99)
} else {
this.getNamearr = []
}
......@@ -187,7 +186,9 @@ export default {
keyResultsUid: this.$route.query.uid,
uid: '',
content: '',
orderNo: this.contentarr.length + 1
orderNo: this.contentarr.length + 1,
showspan: false,
showput: true
})
},
delateitem (item, index) {
......
......@@ -142,7 +142,9 @@ export default {
this.contentarr.push({
uid: '',
strategyUid: this.$route.query.uid,
content: ''
content: '',
showput: true,
showspan: false
})
},
delateitem (item, index) {
......@@ -215,20 +217,9 @@ export default {
this.getlist()
}
})
},
// 获取钉钉鉴权配置
getdingTokenconfig () {
getconfiglist().then(data => {
this.agentId = data.data.body.agentId
this.corpId = data.data.body.corpId
this.timeStamp = toString(data.data.body.timeStamp)
this.nonceStr = data.data.body.nonceStr
this.signature = data.data.body.signature
})
}
},
async mounted () {
await this.getdingTokenconfig()
this.getlist()
}
}
......
......@@ -186,30 +186,8 @@ export default {
detailtitleuid: '',
soul: '',
mainUid: '',
leftarr: [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
],
rightarr: [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
],
leftarr: [],
rightarr: [],
resultarr: [],
leftmyArray: [],
addarr: [],
......@@ -319,7 +297,6 @@ export default {
groupType: '1'
}
addtitlelist(params).then(data => {
// console.log(data, 99)
if (data.data.success === true) {
this.objectivesUid = data.data.body.uid
this.$Message.success('保存成功')
......@@ -331,7 +308,6 @@ export default {
})
},
saveedittitleright (item, ind) {
console.log(item.title, 9999)
if (item.title === '') {
this.$Message.error('内容为空,请输入')
return false
......@@ -407,30 +383,16 @@ export default {
}
},
editchliidput (item, index, index1) {
// 1
// Vue.set(this.leftarr[index]['keyResultsVOList'], index1, { ...item, elementeditput: false })
// 2
// this.leftarr[index]['keyResultsVOList'].splice(index1, 1, { ...item, elementeditput: false })
// 3
// this.leftarr[index]['keyResultsVOList'] = this.leftarr[index]['keyResultsVOList'].map((v, i) => {
// return (i === index1 && { ...v, elementeditput: false }) || v
// })
// 4
// this.leftarr[index]['keyResultsVOList'][index1].elementeditput = false
// 5
item.elementeditput = !item.elementeditput
item.elementeditsta = !item.elementeditsta
item.showtitlechlid = !item.showtitlechlid
// this.$refs['input'].focus()
this.leftarr = [...this.leftarr]
this.$nextTick(function () {
console.log(9999)
this.$refs.inputVal.focus()
})
},
delatechlidListleft (element, index, ind) {
if (element.title === '') {
console.log(this.leftarr[index].keyResultsVOList[ind])
this.leftarr[index].keyResultsVOList.splice(ind, 1);
this.leftarr = [...this.leftarr]
return false
......@@ -440,7 +402,6 @@ export default {
},
delatechlidListright (element, index, ind) {
if (element.title === '') {
console.log(this.rightarr[index].keyResultsVOList[ind])
this.rightarr[index].keyResultsVOList.splice(ind, 1);
this.rightarr = [...this.rightarr]
return false
......@@ -450,7 +411,7 @@ export default {
},
confiredelatechlidListleft () {
delatechildputchlid(this.elementuid).then(data => {
if (data.data.success === true) {
if (data.data.success) {
this.$Message.success('删除成功')
this.delateleftchildmodal = false
this.getList()
......@@ -462,7 +423,6 @@ export default {
})
},
saveeditchildput (item, index) {
// console.log(this.leftarr[index].keyResultsVOList.length)
if (item.title === '') {
this.$Message.error('内容为空,请输入')
return false
......@@ -605,11 +565,15 @@ export default {
this.delatelefthosttitlemodal = false
this.$Message.success('删除成功')
this.getList()
this.leftarr = [...this.leftarr]
this.rightarr = [...this.rightarr]
} else {
this.delatelefthostmodal = false
this.delatelefthosttitlemodal = false
this.$Message.error(data.data.body.message)
this.getList()
this.leftarr = [...this.leftarr]
this.rightarr = [...this.rightarr]
}
})
},
......@@ -632,7 +596,18 @@ export default {
this.maintitleuid = data.data.body.uid
this.mainUid = data.data.body.uid
if (data.data.body.leftObjectivesVOList.length === 0) {
this.leftarr = this.leftarr
this.leftarr = [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
]
} else {
this.leftarr = data.data.body.leftObjectivesVOList
this.leftarr.map(item => {
......@@ -649,7 +624,18 @@ export default {
})
}
if (data.data.body.rightObjectivesVOList.length === 0) {
this.rightarr = this.rightarr
this.rightarr = [
{
strategyUid: '',
uid: '',
title: '',
orderNo: '',
editstaus: true,
editshowstaus: false,
showtitlechlid: false,
keyResultsVOList: []
}
]
} else {
this.rightarr = data.data.body.rightObjectivesVOList
this.rightarr.map(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