This commit is contained in:
xiongchengqiang 2020-12-11 14:54:34 +08:00
parent e4ba487773
commit 02d2d09a39
2 changed files with 31 additions and 12 deletions

View File

@ -12,14 +12,18 @@
</div> </div>
<div class="pinglunTem-right"> <div class="pinglunTem-right">
<div class="pinglunTem-right-title"> <div class="pinglunTem-right-title">
<div><span>{{i.staffName}}</span><span class="beizhu"># <div><span>{{i.staffName}}</span><span class="position" v-if="i.position">{{i.position}}</span><span v-if="i.typeDesc" class="beizhu">#
<span v-if="i.type===1">更新名称</span>
{{i.typeDesc}} {{i.typeDesc}}
#</span></div> #</span></div>
<div style="font-size:12px;">{{i.gmtCreate}}</div> <div style="font-size:12px;">{{i.gmtCreate}}</div>
</div> </div>
<div class="pinglunTem-right-content"> <div class="pinglunTem-right-content pre">
{{i.label}} <div v-if="i.taskName" class="content-top">
评论KR {{i.taskName}}
</div>
<pre>
{{i.label}}
</pre>
</div> </div>
</div> </div>
</div> </div>
@ -90,5 +94,13 @@ export default {
color: @fontBlue; color: @fontBlue;
} }
} }
.content-top{
padding: 4px 0;
border-bottom: 1px solid rgba(200, 200, 200,0.6);
}
.position{
font-size: 10px;
margin-left: 6px;
}
} }
</style> </style>

View File

@ -180,9 +180,10 @@
<i @click="pinglunForm={}" class="el-icon-circle-close"> </i> <i @click="pinglunForm={}" class="el-icon-circle-close"> </i>
</div> </div>
<div class="pinglun-bottom-content"> <div class="pinglun-bottom-content">
<el-input type="textarea" <el-input type="textarea"
clearable clearable
placeholder="请输入评论内容" ref="input"
placeholder="请输入评论内容。。。"
v-model="form.content"></el-input> v-model="form.content"></el-input>
<el-button size="small" <el-button size="small"
@click="handleSendPingLun" @click="handleSendPingLun"
@ -292,13 +293,16 @@ export default {
let res = await apiTaskCommentList(params) let res = await apiTaskCommentList(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return
} }
this.nowPingLunList = res.data.list this.nowPingLunList = res.data.list.reverse()
const pingList = this.$refs.pingList this.$nextTick(() => {
pingList.scrollTop = pingList.scrollHeight const pingList = this.$refs.pingList
pingList.scrollTop = pingList.scrollHeight
})
}, },
// //
async handleSendPingLun () { async handleSendPingLun (event) {
let params = {} let params = {}
// debugger // debugger
if (!this.form.content) return if (!this.form.content) return
@ -307,6 +311,7 @@ export default {
let res = await apiAddTaskComment(params) let res = await apiAddTaskComment(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return
} }
this.handleGetPingLunList() this.handleGetPingLunList()
this.form.content = '' this.form.content = ''
@ -316,6 +321,7 @@ export default {
this.pinglunForm = Object.assign({}, item) this.pinglunForm = Object.assign({}, item)
const pingList = this.$refs.pingList const pingList = this.$refs.pingList
pingList.scrollTop = pingList.scrollHeight pingList.scrollTop = pingList.scrollHeight
this.$refs.input.focus()
}, },
// //
async handleShowAll (i) { async handleShowAll (i) {
@ -343,7 +349,8 @@ export default {
const params = { const params = {
currPage: 1, currPage: 1,
detailId: this.taskInfo.detailId, detailId: this.taskInfo.detailId,
pageSize: 2300 pageSize: 2300,
useType: 0
} }
this.pinglunList = [] this.pinglunList = []
let res = await apiChangeTaskList(params) let res = await apiChangeTaskList(params)