提交 5a763bf7 作者: 毛细亚

优化违规记录界面样式与交互

上级 0f750f9d
<template> <template>
<div class="violationRecord"> <div class="violationRecord">
<el-form <el-form v-loading="loading" class="violationRecordContent" label-width="90px">
v-loading="loading"
class="violationRecordContent"
label-width="90px"
>
<div v-if="violationList.length > 0"> <div v-if="violationList.length > 0">
<div <div v-for="(item, index) in violationList" :key="index" class="contentItem">
v-for="(item, index) in violationList"
:key="index"
class="contentItem"
>
<el-form-item label="违规时间:"> <el-form-item label="违规时间:">
<p>{{ item.violation_time }}</p> <p>{{ item.violation_time }}</p>
</el-form-item> </el-form-item>
...@@ -31,15 +23,9 @@ ...@@ -31,15 +23,9 @@
<el-form-item label="是否允许申诉:"> <el-form-item label="是否允许申诉:">
<p class="error">{{ item.appeal_name }}</p> <p class="error">{{ item.appeal_name }}</p>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="item.remake != ''" label="详情:">
v-if="item.remake != ''"
label="详情:"
>
<!-- AI自动封禁 --> <!-- AI自动封禁 -->
<div <div v-if="item.information_type === 6" class="remarkType">
v-if="item.information_type === 6"
class="remarkType"
>
<p> <p>
<span class="label">所属项目:</span><span>{{ item.newRemake.project || "" }}</span> <span class="label">所属项目:</span><span>{{ item.newRemake.project || "" }}</span>
</p> </p>
...@@ -66,68 +52,31 @@ ...@@ -66,68 +52,31 @@
</p> </p>
</div> </div>
<!-- 其他类型 --> <!-- 其他类型 -->
<div <div v-else class="remarkType">
v-else <div v-if="item.remake.indexOf('src=') !== -1" class="remakeImage">
class="remarkType"
>
<div
v-if="item.remake.indexOf('src=') !== -1"
class="remakeImage"
>
<p class="watchDetails"> <p class="watchDetails">
<el-button <el-button type="text" icon="el-icon-view" size="medium"
type="text"
icon="el-icon-view"
size="medium"
style="z-index: 1; position: relative; margin-left: 5px" style="z-index: 1; position: relative; margin-left: 5px"
@click="showRemake(item.remake)" @click="showRemake(item.remake)">查看大图</el-button>
>查看大图</el-button>
</p> </p>
<p class="remakeDetails" v-html="item.remake"></p> <p class="remakeDetails" v-html="item.remake"></p>
</div> </div>
<div <div v-else class="remakeImage">
v-else
class="remakeImage"
>
<p class="remakeDetails" v-html="item.remake"></p> <p class="remakeDetails" v-html="item.remake"></p>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<!-- 命中统计表格 --> <!-- 命中统计表格 -->
<div v-if="item && item.newRemake && item.newRemake.hit"> <div v-if="item && item.newRemake && item.newRemake.hit">
<div <div class="title" style="font-weight: 600; margin-bottom: 10px">
class="title"
style="font-weight: 600; margin-bottom: 10px"
>
命中统计 命中统计
</div> </div>
<el-table <el-table :data="item.newRemake.hit" size="medium" style="width: 100%" class="hit-statistics-table">
:data="item.newRemake.hit" <el-table-column prop="content" label="文本内容" show-overflow-tooltip />
size="medium" <el-table-column prop="type" label="命中类型" width="120" />
style="width: 100%" <el-table-column prop="key" label="关键字" width="120" show-overflow-tooltip />
class="hit-statistics-table" <el-table-column label="时间" width="180">
>
<el-table-column
prop="content"
label="文本内容"
show-overflow-tooltip
/>
<el-table-column
prop="type"
label="命中类型"
width="120"
/>
<el-table-column
prop="key"
label="关键字"
width="120"
show-overflow-tooltip
/>
<el-table-column
label="时间"
width="180"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span>{{ $moment(row.time).format("YYYY-MM-DD HH:mm:ss") }}</span> <span>{{ $moment(row.time).format("YYYY-MM-DD HH:mm:ss") }}</span>
</template> </template>
...@@ -136,29 +85,16 @@ ...@@ -136,29 +85,16 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 无数据状态 --> <!-- 无数据状态 -->
<div <div v-if="!loading && violationList.length == 0" class="noContent rowFlex allCenter">
v-if="!loading && violationList.length == 0"
class="noContent rowFlex allCenter"
>
<noContent title="暂无数据" description="当前没有任何数据,请稍后再试或联系管理员" /> <noContent title="暂无数据" description="当前没有任何数据,请稍后再试或联系管理员" />
</div> </div>
</el-form> </el-form>
<!-- 查看大图弹窗 --> <!-- 查看大图弹窗 -->
<el-dialog <el-dialog title="查看大图" :visible.sync="imageLayer" width="320px" center append-to-body @close="imageLayer = false">
title="查看大图" <div v-html="imageSrc" class="layerImage"></div>
:visible.sync="imageLayer"
width="320px"
center
append-to-body
@close="imageLayer = false"
>
<div
v-html="imageSrc"
class="layerImage"
></div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -188,13 +124,13 @@ export default { ...@@ -188,13 +124,13 @@ export default {
...mapState("game", ["accountSelect"]), ...mapState("game", ["accountSelect"]),
}, },
mounted() { mounted() {
this.requestViolationList() this.requestViolationList()
}, },
methods: { methods: {
memberChange() { memberChange() {
this.requestViolationList() this.requestViolationList()
}, },
handleRemark(remark) { handleRemark(remark) {
try { try {
const remarkObj = JSON.parse(JSON.parse(remark.replace(/\r\n\t/g, ""))); const remarkObj = JSON.parse(JSON.parse(remark.replace(/\r\n\t/g, "")));
...@@ -204,12 +140,12 @@ export default { ...@@ -204,12 +140,12 @@ export default {
return remark; return remark;
} }
}, },
showRemake(remake) { showRemake(remake) {
this.imageSrc = remake; this.imageSrc = remake;
this.imageLayer = true; this.imageLayer = true;
}, },
requestViolationList() { requestViolationList() {
const data = { const data = {
account_type: 1, account_type: 1,
...@@ -262,8 +198,8 @@ export default { ...@@ -262,8 +198,8 @@ export default {
height: 100%; height: 100%;
background: #fff; background: #fff;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
.violationRecordContent { .violationRecordContent {
width: 100%; width: 100%;
padding: 20px; padding: 20px;
...@@ -274,10 +210,11 @@ export default { ...@@ -274,10 +210,11 @@ export default {
border-bottom: 1px dashed #ebeef5; border-bottom: 1px dashed #ebeef5;
margin-bottom: 20px; margin-bottom: 20px;
padding-bottom: 20px; padding-bottom: 20px;
::v-deep .el-form-item__label{
::v-deep .el-form-item__label {
line-height: 40px; line-height: 40px;
} }
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
...@@ -304,11 +241,11 @@ export default { ...@@ -304,11 +241,11 @@ export default {
.hit-statistics-table { .hit-statistics-table {
margin-top: 10px; margin-top: 10px;
margin-bottom: 20px; margin-bottom: 20px;
::v-deep .el-table__header-wrapper th { ::v-deep .el-table__header-wrapper th {
background-color: #f7f8fa; background-color: #f7f8fa;
} }
::v-deep .el-button--text { ::v-deep .el-button--text {
color: #3491FA; color: #3491FA;
} }
...@@ -317,22 +254,22 @@ export default { ...@@ -317,22 +254,22 @@ export default {
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 8px; margin-bottom: 8px;
} }
::v-deep .el-form-item__label { ::v-deep .el-form-item__label {
color: #86909C; color: #86909C;
font-weight: 500; font-weight: 500;
} }
::v-deep .el-form-item__content { ::v-deep .el-form-item__content {
color: #333; color: #333;
} }
.title { .title {
color: #333; color: #333;
font-size: 16px; font-size: 16px;
position: relative; position: relative;
padding-left: 10px; padding-left: 10px;
&:before { &:before {
content: ''; content: '';
position: absolute; position: absolute;
...@@ -345,15 +282,15 @@ export default { ...@@ -345,15 +282,15 @@ export default {
border-radius: 3px; border-radius: 3px;
} }
} }
::v-deep .el-dialog__header { ::v-deep .el-dialog__header {
padding: 15px 20px; padding: 15px 20px;
background-color: #f7f8fa; background-color: #f7f8fa;
} }
::v-deep .el-button--text { ::v-deep .el-button--text {
color: #3491FA; color: #3491FA;
&:hover { &:hover {
color: #5ba8fb; color: #5ba8fb;
} }
...@@ -362,6 +299,7 @@ export default { ...@@ -362,6 +299,7 @@ export default {
.remakeDetails { .remakeDetails {
word-break: break-all; word-break: break-all;
::v-deep img { ::v-deep img {
max-width: 200px; max-width: 200px;
max-height: 200px; max-height: 200px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论