|
@@ -14,7 +14,9 @@
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'">
|
|
|
<span v-for="(item, index) in scope.row.userNameList" :key="index">
|
|
|
- <ww-open-data type='userName' :openid='scope.row.text'></ww-open-data>
|
|
|
+ <!-- <ww-open-data type='userName' :openid='scope.row.text'></ww-open-data> -->
|
|
|
+ <ww-open-data type='userName' :openid='item'></ww-open-data>
|
|
|
+ <span v-if="index < scope.row.userNameList.length - 1">,</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
<span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'">{{scope.row.proNameText}}</span>
|
|
@@ -99,6 +101,7 @@ export default {
|
|
|
|
|
|
// this.treeDataList = this.integrationTree(this.tasks.data)
|
|
|
console.log(this.mergeList, '合并数据')
|
|
|
+ console.log(this.treeDataList, '合并完全的数据')
|
|
|
},
|
|
|
methods: {
|
|
|
// 递归加颜色以及存储需要合并的数据
|
|
@@ -106,20 +109,31 @@ export default {
|
|
|
for (let i in data) {
|
|
|
if(this.stafforpro == '按项目查看') {
|
|
|
data[i].color = '#409EFF'
|
|
|
- if(data[i].type == 'user' && data[i].text) {
|
|
|
+ // if(data[i].type == 'user' && data[i].text) {
|
|
|
+ // let arr = []
|
|
|
+ // if(data[i].text.indexOf('/') != '-1') {
|
|
|
+ // let str = data[i].text.split('/')[0]
|
|
|
+ // if(str.indexOf(',') != '-1') {
|
|
|
+ // let arrList = str.split(',')
|
|
|
+ // data[i].userNameList = arrList
|
|
|
+ // } else {
|
|
|
+ // arr.push(str)
|
|
|
+ // data[i].userNameList = arr
|
|
|
+ // }
|
|
|
+ // data[i].proNameText = data[i].text.split('/')[1]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if(data[i].translationType == 'user' && data[i].text) {
|
|
|
let arr = []
|
|
|
- if(data[i].text.indexOf('/') != '-1') {
|
|
|
- let str = data[i].text.split('/')[0]
|
|
|
- if(str.indexOf(',') != '-1') {
|
|
|
- let arrList = str.split(',')
|
|
|
- data[i].userNameList = arrList
|
|
|
- } else {
|
|
|
- arr.push(str)
|
|
|
- data[i].userNameList = arr
|
|
|
+ arr = data[i].text.split(',')
|
|
|
+ for(var j in arr) {
|
|
|
+ if(arr[j].indexOf('/') != '-1') {
|
|
|
+ arr[j] = arr[j].split('/')[0]
|
|
|
}
|
|
|
- data[i].proNameText = data[i].text.split('/')[1]
|
|
|
}
|
|
|
+ data[i].userNameList = arr
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
this.num++
|
|
|
let obj = {
|