|
@@ -446,7 +446,12 @@
|
|
|
<!-- <p>{{item.userName}}</p> -->
|
|
|
<p v-if="user.userNameNeedTranslate != '1'">{{item.userName}}</p>
|
|
|
<p v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.userName'></ww-open-data></p>
|
|
|
- <em>{{item.content}}</em>
|
|
|
+ <em>
|
|
|
+ <!-- {{item.content}} -->
|
|
|
+ <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.content.name'></ww-open-data></p>
|
|
|
+ <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content.name}}</p>
|
|
|
+ {{item.content.con}}
|
|
|
+ </em>
|
|
|
</div>
|
|
|
<span>{{item.createTime | relativeTime}}</span>
|
|
|
</li>
|
|
@@ -1315,7 +1320,23 @@ import { error } from 'dingtalk-jsapi';
|
|
|
this.http.post('/task-comment/getList', {taskId: task.id},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
+ for(var i in res.data) {
|
|
|
+ if(res.data[i].content.indexOf(res.data[i].userName) != '-1') {
|
|
|
+ let obj = {
|
|
|
+ name: res.data[i].userName,
|
|
|
+ con: res.data[i].content.split(res.data[i].userName)[1]
|
|
|
+ }
|
|
|
+ res.data[i].content = obj
|
|
|
+ } else {
|
|
|
+ let obj = {
|
|
|
+ name: '',
|
|
|
+ con: res.data[i].content
|
|
|
+ }
|
|
|
+ res.data[i].content = obj
|
|
|
+ }
|
|
|
+ }
|
|
|
this.commentList = res.data
|
|
|
+ console.log(res.data, '数据')
|
|
|
this.sppk(this.commentList) // 获取参与人的方法
|
|
|
} else {
|
|
|
this.$message({
|