This commit is contained in:
Zhang HaoYang 2023-12-28 02:11:23 +08:00
parent a877721a8b
commit a479cb17b9
2 changed files with 58 additions and 25 deletions

View File

@ -51,8 +51,7 @@
<span style="font-size:30px;font-family: STHupo">{{ UrlObj.name }}</span><br/> <span style="font-size:30px;font-family: STHupo">{{ UrlObj.name }}</span><br/>
<div class="NavInfo"> <div class="NavInfo">
<span style="width:200px">创建时间{{ Cdate }}</span><br/> <span style="width:200px">创建时间{{ Cdate }}</span><br/>
<span style="width:200px">创建用户{{}}</span><br/> <span style="width:200px">所属标签{{BelongTo}}</span><br/>
<span style="width:200px">所属标签小视频</span><br/>
<div style="display: flex;flex-direction: row"> <div style="display: flex;flex-direction: row">
<div class="little-Circle" id="readNum" style=" margin-left:15px;"> <div class="little-Circle" id="readNum" style=" margin-left:15px;">
<el-tooltip placement="top" width="150" <el-tooltip placement="top" width="150"
@ -72,24 +71,31 @@
<div class="MyPopover" slot="content"> <div class="MyPopover" slot="content">
<span style="font-size:12px !important;">{{UrlObj.name}}总星级</span><br/><br/> <span style="font-size:12px !important;">{{UrlObj.name}}总星级</span><br/><br/>
<div style="width:100% ;text-align: center;"> <div style="width:100% ;text-align: center;">
<span style="font-size:20px"></span> <span style="font-size:20px">
<el-rate
v-model="SumStar"
disabled
score-template="{value}"
>
</el-rate>
</span>
<br/> <br/>
<span>评分 3.8</span> <span>评分{{SumStar}} </span>
</div> </div>
</div> </div>
<i class="el-icon-star-on" id="little-Circle-content" style=" padding:5.5px; "></i> <i class="el-icon-star-on" id="little-Circle-content" style=" padding:5.5px; "></i>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="little-Circle" id="Rank" style="margin-left:15px;" @click="WarnToAdmin()"> <!-- <div class="little-Circle" id="Rank" style="margin-left:15px;" @click="WarnToAdmin()">-->
<el-tooltip placement="top" width="150" <!-- <el-tooltip placement="top" width="150"-->
trigger="hover" <!-- trigger="hover"-->
effect="dark" close-delay="2000"> <!-- effect="dark" close-delay="2000">-->
<div class="MyPopover" slot="content"> <!-- <div class="MyPopover" slot="content">-->
<span style="font-size:12px !important;">向管理员反馈问题</span><br/><br/> <!-- <span style="font-size:12px !important;">向管理员反馈问题</span><br/><br/>-->
</div> <!-- </div>-->
<i class="el-icon-warning" id="little-Circle-content" style=" padding:5px; "></i> <!-- <i class="el-icon-warning" id="little-Circle-content" style=" padding:5px; "></i>-->
</el-tooltip> <!-- </el-tooltip>-->
</div> <!-- </div>-->
</div> </div>
</div> </div>
</div> </div>
@ -129,8 +135,10 @@
</div> </div>
</div> </div>
<!--用户评论--> <!--用户评论-->
<div v-show="update" id="用户评论" class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;"> <div v-show="update" id="用户评论" class="JustBack" style="width:670px;
<div class="JustBack" style="width:670px;height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;"> height:auto;display:flex; flex-direction: column; flex-wrap: nowrap;">
<div style="width:670px;height:auto;display:flex;
flex-direction: column; flex-wrap: nowrap;">
<div style="width:670px;color: var(--theme-color)"> <div style="width:670px;color: var(--theme-color)">
<div class="HeadLine" style="margin-top:30px"> <div class="HeadLine" style="margin-top:30px">
<div class="HeadSquare"></div> <div class="HeadSquare"></div>
@ -200,7 +208,8 @@
<el-button type="success" class="el-icon-chat-dot-square" size="medium" plain circle <el-button type="success" class="el-icon-chat-dot-square" size="medium" plain circle
style="margin-top:6px;margin-left:70px" @click="addReply(item.id)"> style="margin-top:6px;margin-left:70px" @click="addReply(item.id)">
</el-button> </el-button>
<el-rate v-model="item.rating" disabled style="margin-top:10px"></el-rate>
<span style="font-size:18px;font-family: STHupo;line-height:40px;margin-left:20px" >评价: &nbsp;</span>
</div> </div>
<!--子评论--> <!--子评论-->
<div v-for="(item2,index2) in rootId_AllComment[item.id]" :key="index2" > <div v-for="(item2,index2) in rootId_AllComment[item.id]" :key="index2" >
@ -242,7 +251,6 @@
</div> </div>
</el-card> </el-card>
</div> </div>
<UserComment></UserComment>
</el-card> </el-card>
</div> </div>
</div> </div>
@ -263,7 +271,7 @@
<el-form ref="form" :rules="rules" class="login_container" :model="form" <el-form ref="form" :rules="rules" class="login_container" :model="form"
style="margin-top:-10px" status-icon label-width="100px" > style="margin-top:-10px" status-icon label-width="100px" >
<el-form-item label="回复内容" prop="content"> <el-form-item label="回复内容" prop="content">
<el-input v-model="form.content" placeholder='回复内容' clearable></el-input> <el-input type="textarea" style="width:200px" v-model="form.content" placeholder='回复内容' clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用户id" prop="userId" style="display: none"> <el-form-item label="用户id" prop="userId" style="display: none">
<el-input v-model="form.userId" placeholder='用户id' clearable ></el-input> <el-input v-model="form.userId" placeholder='用户id' clearable ></el-input>
@ -349,6 +357,10 @@ export default {
openAddCategory:false, openAddCategory:false,
// //
rootid:'', rootid:'',
//
BelongTo:'',
//
SumStar:'',
// //
form:{ form:{
urlId:'', urlId:'',
@ -369,10 +381,12 @@ export default {
mounted() { mounted() {
// this.GetAllComment(); // this.GetAllComment();
this.GetAllComment(); this.GetAllComment();
this.GetAllCate();
}, },
created() { created() {
this.UrlId = this.$route.query.uid; this.UrlId = this.$route.query.uid;
this.GetNav(this.UrlId); this.GetNav(this.UrlId);
if(this.UrlId){ if(this.UrlId){
this.ViewByTime(this.UrlId) this.ViewByTime(this.UrlId)
} }
@ -505,7 +519,7 @@ export default {
type: 'success', type: 'success',
offset: 50 offset: 50
}); });
this.reload(); this.closeDialog();
this.form = { this.form = {
urlId:'', urlId:'',
userId:'', userId:'',
@ -607,6 +621,22 @@ export default {
} }
} }
, ,
//
// /UrlAndCate/returnCateByUserId
GetAllCate(){
let _this = this;
axios.get('/api/UrlAndCate/returnCateByUserId', {
params: {
userId:_this.userId
}
}).then(function (res) {
Object.keys(res.data.data).forEach(key => {
if(res.data.data[key].id == _this.UrlObj.cateId){
_this.BelongTo = res.data.data[key].name;
}
})
})
},
// //
GetAllComment(){ GetAllComment(){
let _this = this; let _this = this;
@ -619,14 +649,17 @@ export default {
_this.form.userId = _this.userId; _this.form.userId = _this.userId;
_this.form.urlId = _this.UrlId; _this.form.urlId = _this.UrlId;
_this.form.rootCommentId = 0; _this.form.rootCommentId = 0;
// //
// //
var sum = 0;
Object.keys(res.data).forEach(key => { Object.keys(res.data).forEach(key => {
sum = sum+ res.data[key].rating;
_this.rootId_AllComment[res.data[key].id] = []; _this.rootId_AllComment[res.data[key].id] = [];
_this.func0(res.data[key],res.data[key].id); _this.func0(res.data[key],res.data[key].id);
}) })
_this.SumStar = sum / _this.allcomment.length;
console.log(_this.SumStar);
}) })
}, },
// 访 // 访
ViewByTime(id) { ViewByTime(id) {

View File

@ -394,11 +394,11 @@ export default {
name: this.form.name, name: this.form.name,
weigh: this.form.weigh, weigh: this.form.weigh,
icon:this.form.icon, icon:this.form.icon,
cate_id:this.form.cate_id, cateId:this.form.cate_id,
status: this.form.status, status: this.form.status,
need_login: this.form.need_login, need_login: this.form.need_login,
is_need_agent:this.form.is_need_agent, isNeedAgent:this.form.is_need_agent,
userId: this.form.userId, url: this.form.url,
desc: this.form.desc, desc: this.form.desc,
} }
}).then(function (res) { }).then(function (res) {