Commit fa3aae0a authored by 罗林杰's avatar 罗林杰

修改驳回原因

parent f9c7e3ce
......@@ -162,7 +162,8 @@
<el-form ref="deviceFormRef" :model="form" label-position="right" label-width="auto">
<div class="item">
<div>
<img class="avatarSize" :src="form.avatarImg" alt="Avatar" mode="aspectFill">
<img v-if="form.avatarImg" class="avatarSize" :src="form.avatarImg" alt="" mode="aspectFill">
<img v-else class="avatarSize" src="../../assets/image/avatar.jpg" alt="">
</div>
<div class="center">
<template>
......@@ -174,35 +175,45 @@
</div>
<el-row :gutter="20">
<el-col :span="24">
<div style="font-size: 15px;padding-left: 45px;padding-bottom: 20px;" class="content">{{ form.content }}</div>
<div style="font-size: 15px;padding-left: 20px;padding-bottom: 20px;" class="content">{{ form.content }}</div>
</el-col>
<div>
<!-- 当没有图片时 -->
<div v-if="!form.url || form.url.length === 0" style="text-align: center; color: #999;" />
<!-- 当图片数量为1时 -->
<div v-else-if="form.url.length === 1" style="margin-left: 60px">
<img :src="form.url[0]" alt="Avatar" class="avatar1">
<div v-else-if="form.url.length === 1" style="margin-left: 150px">
<img :src="form.url[0]" alt="" class="avatar1">
</div>
<!-- 当图片数量为4或6时,上下两排展示 -->
<div v-else-if="form.url.length === 4 || form.url.length === 2" style="padding-left: 40px">
<el-row v-for="(row, rowIndex) in Math.ceil(form.url.length / 2)" :key="rowIndex" :gutter="2">
<div v-else-if=" form.url.length === 2" style="padding-left: 40px">
<el-row v-for="(row, rowIndex) in Math.ceil(form.url.length / 2)" :key="rowIndex" :gutter="1">
<el-col v-for="(imagePath, index) in form.url.slice(rowIndex * 2, rowIndex * 2 + 2)" :key="index" :span="12">
<div style="padding-left: 20px;">
<img :src="imagePath" alt="Avatar" class="avatar3">
<div style="margin-left: -15px">
<img :src="imagePath" alt="" class="avatar3">
</div>
</el-col>
</el-row>
</div>
<!-- 当图片数量为4或6时,上下两排展示 -->
<div v-else-if="form.url.length === 4 " style="padding-left: 40px">
<el-row v-for="(row, rowIndex) in Math.ceil(form.url.length / 2)" :key="rowIndex" :gutter="1">
<el-col v-for="(imagePath, index) in form.url.slice(rowIndex * 2, rowIndex * 2 + 2)" :key="index" :span="12">
<div style="margin-left: -10px">
<img :src="imagePath" alt="" class="avatar5">
</div>
</el-col>
</el-row>
</div>
<!-- 当图片数量为5, 7, 8或9时,按九宫格显示 -->
<el-row v-else :gutter="2" style="padding-left: 40px">
<el-row v-else :gutter="2" style="padding-left: 50px">
<el-col v-for="(imagePath, index) in form.url" :key="index" :span="8">
<div style="padding-left: 20px">
<img :src="imagePath" alt="Avatar" class="avatar2">
<div style="margin-left: -20px">
<img :src="imagePath" alt="" class="avatar2">
</div>
</el-col>
</el-row>
</div>
<div style="font-size: 12px;color: #8c8c93;padding-left: 60px;padding-top: 10px">
<div style="font-size: 12px;color: #8c8c93;padding-left: 30px;padding-top: 10px">
<span>{{ form.createDate }}</span>
</div>
<div class="commentTitle">
......@@ -222,7 +233,8 @@
<div v-if="index !== null" style="border-top: 1px solid #dadada; margin: 5px 0 7px;" />
<div style="display: flex; justify-content: space-between; align-items: center;" class="commentHeader">
<div style="display: flex; align-items: center;padding-bottom: 10px">
<img style="margin-top: -40px" :src="comment.avatarUrl" alt="Avatar" class="avatarSize">
<img v-if="comment.avatarUrl" style="margin-top: -40px" :src="comment.avatarUrl" alt="" class="avatarSize">
<img v-else class="avatarSize" style="margin-top: -40px" src="../../assets/image/avatar.jpg" alt="">
<div style="padding-left: 10px">
<span style="font-size: 15px;font-weight: bold">{{ comment.memCode }}:</span>
<div style="flex: 1;margin-top: 10px ">
......@@ -242,7 +254,8 @@
<div v-if="replyIndex !== null" style="border-top: 1px solid #dadada; margin: 5px 0 7px;" />
<div style="display: flex; justify-content: space-between; align-items: center;" class="commentHeader">
<div style="display: flex; align-items: center;">
<img style="margin-top: -40px" :src="reply.avatarUrl" alt="Avatar" class="avatarSize">
<img v-if="reply.avatarUrl" style="margin-top: -40px" :src="reply.avatarUrl" alt="" class="avatarSize">
<img v-else class="avatarSize" style="margin-top: -40px" src="../../assets/image/avatar.jpg" alt="">
<div style="padding-left: 10px">
<span style="font-size: 15px;font-weight: bold">{{ reply.memCode }}:</span>
<div style="flex: 1;margin-top: 10px ">
......@@ -275,6 +288,7 @@
<el-col :span="24">
<el-input
v-model.trim="form.remarks"
:disabled="!isEdit"
label="驳回意见"
type="textarea"
show-word-limit
......@@ -286,7 +300,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancelRejection">取 消</el-button>
<el-button class="cancelBtn" type="primary" @click="handleChange('2')">驳 回</el-button>
<el-button v-if="isEdit" class="cancelBtn" type="primary" @click="handleChange('2')">驳 回</el-button>
</div>
</el-dialog>
......@@ -909,18 +923,60 @@ export default {
height: 32px;
border-radius: 50%
}
.commentsSection {
margin-top: 20px;
.commentTree {
list-style-type: none;
padding-left: 0;
.commentItem {
padding: 10px;
.avatar {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 10px;
}
.commentContent {
margin-bottom: 5px;
}
.replies {
list-style-type: none;
.replyItem {
padding: 5px;
}
.avatar {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 10px;
}
}
.el-input {
margin-top: 5px;
}
}
}
}
.avatar1 {
width: 300px;
height: 250px;
display: block;
}
.avatar2 {
width: 160px;
width: 170px;
height: 130px;
display: block;
}
.avatar3 {
width: 245px;
width: 263px;
height: 200px;
display: block;
}
......@@ -929,6 +985,12 @@ export default {
height: 178px;
display: block;
}
.avatar5 {
width: 255px;
height: 200px;
padding-top: 4px;
display: block;
}
.commentTitle{
display: flex;
justify-content: space-between;
......@@ -941,4 +1003,15 @@ export default {
padding-right: 15px
}
}
.item {
display: flex;
justify-content: space-between;
padding: 5px 0 20px 0;
margin-left: 5px;
margin-right: 10px;
.center {
margin: 10px 10px;
flex: 1;
}
}
</style>
......@@ -208,6 +208,7 @@
</div>
</el-row>
<div class="commentsSection">
<el-alert v-if="!isEdit && queryParams.examStatus === '2'" :closable="false">驳回原因:{{ form.remarks }}</el-alert>
<ul v-if="form.articleCommentVOList" class="commentTree">
<li v-for="(comment, index) in form.articleCommentVOList" :key="index" class="commentItem">
<div v-if="index !== null" style="border-top: 1px solid #dadada; margin: 5px 0 7px;" />
......@@ -257,7 +258,6 @@
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="!isEdit && queryParams.examStatus === '2'" class="submitBtn" type="primary" @click="rejection">驳回原因</el-button>
<el-button v-if="!isEdit" class="cancelBtn" @click="cancel">取 消</el-button>
<el-button v-if="isEdit" class="cancelBtn" @click="rejection">驳 回</el-button>
<el-button v-if="isEdit" class="cancelBtn" type="primary" @click="handleChange('1')">通 过</el-button>
......@@ -496,6 +496,11 @@ export default {
}
})
}
// 处理驳回原因
if (this.form.remarks !== '' && this.form.remarks !== null) {
const message = JSON.parse(this.form.remarks)
this.form.remarks = message[0].msg
}
this.title = '动态详情'
this.open = true
this.isEdit = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment