|
@@ -5,13 +5,17 @@
|
|
|
<span>{{ detail.createdate }}</span>
|
|
|
</div>
|
|
|
<div class="detail-content" v-if="detail.items">
|
|
|
- <div class="content-item" style="margin-bottom:20px" v-for="item in detail.items">
|
|
|
+ <!-- <div class="content-item" v-for="item in detail.items">
|
|
|
<p class="normal-title" style="margin-bottom:10px">{{ item.title }}</p>
|
|
|
<div v-if="item.content[0]">
|
|
|
- <p v-for="(item2,index) in item.content[0].content" style="font-size:12px">{{ item2 }}</p>
|
|
|
+ <div v-for="(item2,index) in item.content[0].content" style="font-size:12px">
|
|
|
+ <span v-if="item2">{{ item2 }}</span>
|
|
|
+ <span style="font-size:12px;color:#cccccc" v-else>暂无</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <span v-else>暂无</span>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
+ <div class="content-box"></div>
|
|
|
+ <div class="kong"></div>
|
|
|
<file-item
|
|
|
:marginRight="10"
|
|
|
:rowCount="5"
|
|
@@ -26,6 +30,8 @@
|
|
|
|
|
|
<script>
|
|
|
import FileItem from '@/SManagement/orderclue/components/file/index2'
|
|
|
+import { P } from '@antv/g2plot'
|
|
|
+import { log } from '@antv/g2plot/lib/utils'
|
|
|
export default {
|
|
|
components:{FileItem},
|
|
|
data () {
|
|
@@ -45,14 +51,42 @@ export default {
|
|
|
this.detail = res.data
|
|
|
this.detail.attinfos = this.fileType.fileList(this.detail.attinfos)
|
|
|
if (this.detail.items) {
|
|
|
+ let frag = document.createDocumentFragment()
|
|
|
this.detail.items.forEach(item => {
|
|
|
- if (item.content.length) {
|
|
|
- if (item.title == '数据统计') {
|
|
|
- item.content[0].content = [item.content[0].content]
|
|
|
- } else {
|
|
|
- item.content[0].content = item.content[0].content.split('\n')
|
|
|
+ if (item.title == '数据统计') {
|
|
|
+ let reg = new RegExp('\n','g')
|
|
|
+ item.content[0].content = item.content[0].content.replace(reg,'')
|
|
|
+ }
|
|
|
+ let box = document.createElement('div')
|
|
|
+ box.className = 'content-item'
|
|
|
+ box.style = 'margin-bottom:20px'
|
|
|
+ let title = document.createElement('p')
|
|
|
+ title.style = 'margin-bottom:20px'
|
|
|
+ title.className = 'normal-title'
|
|
|
+ title.innerText = item.title
|
|
|
+ box.appendChild(title)
|
|
|
+ let content = document.createElement('div')
|
|
|
+ if (item.content[0]) {
|
|
|
+ content.style = item.content[0].content ? 'font-size:12px' : 'font-size:12px;color:#cccccc'
|
|
|
+ content.innerText = item.content[0].content || '暂无'
|
|
|
+ box.appendChild(content)
|
|
|
+ frag.appendChild(box)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let child = document.getElementsByClassName('content-item')
|
|
|
+ if (child.length) {
|
|
|
+ console.log('触发',child);
|
|
|
+ for (let index = 0; index < child.length; index++) {
|
|
|
+ child[index].remove()
|
|
|
}
|
|
|
}
|
|
|
+ document.getElementsByClassName('content-box')[0].remove()
|
|
|
+ let contentBox = document.createElement('div')
|
|
|
+ contentBox.className = 'content-box'
|
|
|
+ contentBox.appendChild(frag)
|
|
|
+ document.getElementsByClassName('detail-content')[0].insertBefore(contentBox,document.getElementsByClassName('kong')[0])
|
|
|
})
|
|
|
}
|
|
|
console.log(this.detail.items);
|
|
@@ -90,12 +124,13 @@ export default {
|
|
|
margin-left:15px;
|
|
|
}
|
|
|
.content-item {
|
|
|
- margin-bottom: 20px;
|
|
|
+ margin-bottom: 20px !important;
|
|
|
}
|
|
|
.content-item p:nth-of-type(2) {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.normal-title{
|
|
|
font-size: 14px;
|
|
|
+ margin-bottom:10px
|
|
|
}
|
|
|
</style>
|