|
|
@@ -6,24 +6,73 @@
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div v-for="items in traceComments" :key="items" class="media">
|
|
|
+ <div v-for="item in traceComments" :key="item.id" class="media">
|
|
|
<div class="media-body">
|
|
|
- <div>
|
|
|
- <!-- eslint-disable-next-line -->
|
|
|
- <div v-html="items.content" />
|
|
|
-
|
|
|
- </div>
|
|
|
- <div v-if="items.attachments != '' && items.attachments != undefined">
|
|
|
- <div
|
|
|
- v-for="item in split(items.attachments)"
|
|
|
- :key="item"
|
|
|
- @click="download(item)"
|
|
|
- >
|
|
|
- <a>{{ item }}</a>
|
|
|
+ <div class="commentClass">
|
|
|
+ <AuthImage
|
|
|
+ :auth-src="getImgSrc(item.imageName)"
|
|
|
+ class="media-object thumbnail m-image"
|
|
|
+ style="height: 120px"
|
|
|
+ />
|
|
|
+ <div class="commentDetail">
|
|
|
+ <div class="common">
|
|
|
+ <span class="media-heading">
|
|
|
+ {{ item.createdName }}
|
|
|
+ <a-tag style="font-size: 12px; margin: 0 18px" color="red">评论人</a-tag>
|
|
|
+ </span>
|
|
|
+ <span class="media-heading">
|
|
|
+ {{
|
|
|
+ item.carbonCopyUserIds ? item.carbonCopyUserIds : "暂无通知人"
|
|
|
+ }}
|
|
|
+ <a-tag style="font-size: 12px; margin: 0 18px" color="orange">通知人</a-tag>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="common">
|
|
|
+ <span style="font-size: 12px">{{ item.created }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="common">
|
|
|
+ <span>主题</span>
|
|
|
+ <p>{{ item.theme }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="common">
|
|
|
+ <span>评论的内容</span>
|
|
|
+ <!-- eslint-disable-next-line -->
|
|
|
+ <div v-html="item.content" />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="item.attachments != '' && item.attachments != undefined"
|
|
|
+ class="common"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="file in split(item.attachments)"
|
|
|
+ :key="file"
|
|
|
+ class="files"
|
|
|
+ @click="download(file)"
|
|
|
+ >
|
|
|
+ <!-- <a><FileTextOutlined style="margin-right: 12px" />{{ file }}</a> -->
|
|
|
+ <svg
|
|
|
+ id="mx_n_1708679906318"
|
|
|
+ t="1708679906318"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="4949"
|
|
|
+ width="16"
|
|
|
+ height="16"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z"
|
|
|
+ fill="#3D3D3D"
|
|
|
+ p-id="4950"
|
|
|
+ />
|
|
|
+ </svg>
|
|
|
+ <a style="margin-left: 12px"> {{ file }}</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <br />
|
|
|
- {{ items.created }}
|
|
|
+ <a-divider />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -32,17 +81,20 @@
|
|
|
<script>
|
|
|
import Common from '../../common/Common.js';
|
|
|
import { DownloadService } from 'pc-component-v3';
|
|
|
+import AuthImage from '../../widget/AuthImage.vue';
|
|
|
+import { FileTextOutlined } from '@ant-design/icons-vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
-
|
|
|
DownloadService,
|
|
|
+ AuthImage,
|
|
|
+ FileTextOutlined,
|
|
|
},
|
|
|
// props: ['traceId', 'trace'],
|
|
|
props: {
|
|
|
traceId: {
|
|
|
type: String,
|
|
|
default: null,
|
|
|
- },
|
|
|
+ },
|
|
|
trace: {
|
|
|
type: String,
|
|
|
default: null,
|
|
|
@@ -54,6 +106,7 @@ export default {
|
|
|
traceComments: [],
|
|
|
className: 'com.leanwo.prodog.system.model.CurdWindowComment',
|
|
|
uuid: '',
|
|
|
+ userClassName: 'com.leanwo.prodog.base.model.User',
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -72,6 +125,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取图片路径
|
|
|
+ getImgSrc: function (imageName) {
|
|
|
+ var _self = this;
|
|
|
+ if (imageName == undefined || imageName == '') {
|
|
|
+ return '/static/assets/client-base-v4/image/no-image.png';
|
|
|
+ }
|
|
|
+ return Common.getThumbnailImageSrc(_self.userClassName, imageName);
|
|
|
+ },
|
|
|
/**
|
|
|
* 根据追踪表Id获取评论
|
|
|
* @author GuoZhiBo 20171201
|
|
|
@@ -79,7 +140,9 @@ export default {
|
|
|
getTraceComment: function () {
|
|
|
var _self = this;
|
|
|
$.ajax({
|
|
|
- url: Common.getApiURL('CurdWindowCommentResource/queryCurdWindowComment'),
|
|
|
+ url: Common.getApiURL(
|
|
|
+ 'CurdWindowCommentResource/queryCurdWindowComment',
|
|
|
+ ),
|
|
|
type: 'get',
|
|
|
dataType: 'json',
|
|
|
async: false,
|
|
|
@@ -118,37 +181,40 @@ export default {
|
|
|
var _self = this;
|
|
|
DownloadService.fileDownload(_self.className, fileName);
|
|
|
},
|
|
|
- /**
|
|
|
- * 获取图片地址
|
|
|
- * @param {String} item 图片名称
|
|
|
- * @return {String} 图片URL地址
|
|
|
- */
|
|
|
- getImageSrc: function (item) {
|
|
|
- var _self = this;
|
|
|
- if (item != undefined && item != null) {
|
|
|
- return Common.getImageSrc(
|
|
|
- 'com.leanwo.prodog.system.model.CurdWindowComment',
|
|
|
- item,
|
|
|
- );
|
|
|
- } else {
|
|
|
- return '';
|
|
|
- }
|
|
|
- },
|
|
|
- /**
|
|
|
- * 获取图片地址
|
|
|
- */
|
|
|
- getImageSrcName: function (imageName) {
|
|
|
- return Common.getImageSrc('com.leanwo.prodog.model.base.User', imageName);
|
|
|
- },
|
|
|
-
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.headDiv{
|
|
|
+.headDiv {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
+.commentClass {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.commentDetail {
|
|
|
+ margin-left: 24px;
|
|
|
+}
|
|
|
+.common {
|
|
|
+ padding-bottom: 10px;
|
|
|
+}
|
|
|
+:deep(p) {
|
|
|
+ margin-left: 24px;
|
|
|
+ margin-bottom: 0px !important;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 90%;
|
|
|
+}
|
|
|
+span {
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.ant-divider-horizontal {
|
|
|
+ margin: 6px 0;
|
|
|
+}
|
|
|
+.files {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-self: start;
|
|
|
+}
|
|
|
</style>
|