|
@@ -8,6 +8,27 @@
|
|
|
color: #000;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+ .el-badge__content.is-fixed{
|
|
|
+ top:10px;
|
|
|
+ right: -10px;
|
|
|
+ }
|
|
|
+ .el-table tr{
|
|
|
+ height: 45px;
|
|
|
+ }
|
|
|
+ .replyDiag{
|
|
|
+ .consutlList{
|
|
|
+ padding:20px;
|
|
|
+ border:1px solid #ccc;
|
|
|
+ height: 350px;
|
|
|
+ overflow: scroll;
|
|
|
+ }
|
|
|
+ .el-dialog__body{
|
|
|
+ padding:10px 20px!important;
|
|
|
+ }
|
|
|
+ .el-row{
|
|
|
+ margin-bottom:15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|
|
|
<template>
|
|
|
<section class="content data">
|
|
@@ -32,17 +53,28 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<el-table :data="list" height='55vh' style="width: 100%;margin-top:10px;" v-loading='loading'>
|
|
|
- <el-table-column prop="user_name" label="选手名称"/>
|
|
|
- <el-table-column prop="content" label="咨询内容"/>
|
|
|
+ <el-table-column prop="user_name" label="选手名称" width="200"/>
|
|
|
+ <el-table-column prop="content" label="咨询内容">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-badge v-if="scope.row.unreply>0" :value="scope.row.unreply" class="item">
|
|
|
+ <p>{{scope.row.consult_list[scope.row.consult_list.length-1].content}}</p>
|
|
|
+ </el-badge>
|
|
|
+ <p v-else>{{scope.row.consult_list[scope.row.consult_list.length-1].content}}</p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="reply_content" label="回复内容">
|
|
|
<template slot-scope="scope">
|
|
|
- <p v-for="item,index in scope.row.reply_list" :key="index">{{item.reply_content}}</p>
|
|
|
+ <p v-if="scope.row.unreply==0">{{scope.row.all_consult_list[scope.row.all_consult_list.length-1].reply_content}}</p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ctime" label="咨询时间" width="250">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.consult_list[scope.row.consult_list.length-1].ctime}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="ctime" label="咨询时间" width="160"/>
|
|
|
<el-table-column prop="date" label="操作" fixed="right" width="220">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="edit(scope.row.id)" size="mini" type="primary">回复</el-button>
|
|
|
+ <el-button @click="edit(scope.row)" size="mini" type="primary">回复</el-button>
|
|
|
<el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -54,27 +86,27 @@
|
|
|
:total="total"
|
|
|
@pageChange="gopage"
|
|
|
/>
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="回复内容" prop="reply_content">
|
|
|
- <el-input v-model="form.reply_content" placeholder="" type="textarea" rows="10"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm" size="mini">确 定</el-button>
|
|
|
- <el-button @click="open=false" size="mini">取 消</el-button>
|
|
|
+ <!-- 回复 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body class="replyDiag">
|
|
|
+ <div class="consutlList">
|
|
|
+ <el-row :gutter="1" v-for="(item,index) in form.all_consult_list" :key="index">
|
|
|
+ <el-col :span="3" v-if="item.user_id>0"><img :src="item.user_avatar" alt="" width="45px" height="45px" style="border-radius:5px;"/></el-col>
|
|
|
+ <el-col :span="20" v-if="item.user_id>0"><p style="padding-left:5px;">{{item.content}}</p></el-col>
|
|
|
+ <el-col :span="20" v-if="item.user_id==0"><p style="padding-right:10px;text-align:right;">{{item.reply_content}}</p></el-col>
|
|
|
+ <el-col :span="3" v-if="item.user_id==0"><img src="..\..\assets\wz.jpg" alt="" width="45px" height="45px" style="border-radius:5px;"/></el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 点评 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open1" width="500px" append-to-body>
|
|
|
- <el-form ref="form1" :model="form1" label-width="80px">
|
|
|
- <el-form-item label="顽主点评">
|
|
|
- <el-input v-model="form1.wanzhu_comment" placeholder="" type="textarea" rows="10"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="saveComment" size="mini">确 定</el-button>
|
|
|
- <el-button @click="open1=false" size="mini">取 消</el-button>
|
|
|
+ <el-form ref="form" :model="form" label-width="80px">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-input v-model="form.reply_content" type="textarea" rows="5" placeholder="请输入你要回复的内容..."></el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button type="primary" @click="submitForm">发送</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
@@ -94,7 +126,9 @@ export default {
|
|
|
stock_date:this.getNowDate()
|
|
|
},
|
|
|
form:{
|
|
|
- stock_date:this.getNowDate()
|
|
|
+ stock_date:this.getNowDate(),
|
|
|
+ page:1,
|
|
|
+ page_size:20
|
|
|
},
|
|
|
form1:{},
|
|
|
list:[{},{}],
|
|
@@ -134,7 +168,9 @@ export default {
|
|
|
signupTypeList:[
|
|
|
{id:1,name:"选手"},
|
|
|
{id:2,name:"游客"}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ page:1,
|
|
|
+ total:0
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -207,12 +243,10 @@ export default {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
- edit(id){
|
|
|
- this.title = "回复"
|
|
|
- this.$api.getWanzhuConsultDetail({id:id}).then(res=>{
|
|
|
- this.form = res.data.data
|
|
|
- this.open = true
|
|
|
- })
|
|
|
+ edit(row){
|
|
|
+ this.title = "回复:"+row.user_name
|
|
|
+ this.open = true
|
|
|
+ this.form = row
|
|
|
},
|
|
|
editComment(id){
|
|
|
this.title = "顽主点评"
|
|
@@ -251,10 +285,9 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- console.log(this.form)
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.form.pid = this.form.id;
|
|
|
+ this.form.pid = this.form.consult_list[this.form.consult_list.length-1].id;
|
|
|
this.$api.replyConsult(this.form).then(response => {
|
|
|
if(response.data.code != 0){
|
|
|
this.msgError(response.data.message);
|