|
@@ -31,13 +31,17 @@
|
|
</el-tree>
|
|
</el-tree>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col v-show="showMatterView" :span="1" :xs="24" class="matter-content" >
|
|
|
|
- <i class="el-icon-d-arrow-right"
|
|
|
|
|
|
+ <el-col :span="1" :xs="24" class="matter-content" style="margin-left: 10px;">
|
|
|
|
+ <i v-show="showMatterView" class="el-icon-d-arrow-right"
|
|
style="color: #409eff; cursor: pointer; position: absolute; top: 49%; transform: translateX(50%);"
|
|
style="color: #409eff; cursor: pointer; position: absolute; top: 49%; transform: translateX(50%);"
|
|
- @click="changeView"
|
|
|
|
|
|
+ @click="changeView(false)"
|
|
title="展开"></i>
|
|
title="展开"></i>
|
|
|
|
+ <i v-show="!showMatterView" class="el-icon-d-arrow-left"
|
|
|
|
+ style="color: #409eff; cursor: pointer; position: absolute; top: 49%; transform: translateX(50%);"
|
|
|
|
+ @click="changeView(true)"
|
|
|
|
+ title="收起"></i>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="showMatterView ? 22 : 15" :xs="24" class="matter-content" style="margin-left: 10px;">
|
|
|
|
|
|
+ <el-col :span="showMatterView ? 22 : 14" :xs="24" class="matter-content" style="margin-left: 10px;">
|
|
<template v-if="preQuestionPart">
|
|
<template v-if="preQuestionPart">
|
|
<div class="matter-title-h" style="font-style: italic; color: #00afff; margin-bottom: -10px;" :title="currMatter.itemName">
|
|
<div class="matter-title-h" style="font-style: italic; color: #00afff; margin-bottom: -10px;" :title="currMatter.itemName">
|
|
<i class="el-icon-collection"></i> {{ currMatter.itemName }}
|
|
<i class="el-icon-collection"></i> {{ currMatter.itemName }}
|
|
@@ -78,22 +82,22 @@
|
|
</el-row>
|
|
</el-row>
|
|
<el-row style="margin-top: 20px;">
|
|
<el-row style="margin-top: 20px;">
|
|
<label style="color: #00afff;">三、材料说明</label>
|
|
<label style="color: #00afff;">三、材料说明</label>
|
|
- <div class="matter-material" style="display: flex; align-items: center;">
|
|
|
|
|
|
+ <div class="matter-material" style="display: flex;">
|
|
<div style="width: 30%;">
|
|
<div style="width: 30%;">
|
|
- <ul>
|
|
|
|
- <li v-for="item in currMaterial.materialList" @click="handleMaterialItem(item)"
|
|
|
|
- style="padding: 5px; cursor: pointer; color: #4285f4;">
|
|
|
|
|
|
+ <ul class="material-list">
|
|
|
|
+ <li v-for="item in currMaterial.materialList" @click="handleMaterialItem($event, item)"
|
|
|
|
+ class="material-item">
|
|
{{ item.listName }}
|
|
{{ item.listName }}
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="material-line" :style="lineHeight"></div>
|
|
<div class="material-line" :style="lineHeight"></div>
|
|
- <div class="material-content" style="width: 69%; padding: 10px;">
|
|
|
|
- <div v-show="showMaterialInfo">
|
|
|
|
- <template v-if="!currMaterialInfo.memo && (!currMaterialInfo.imgList || currMaterialInfo.imgList.length == 0)">
|
|
|
|
|
|
+ <div style="width: 69%; padding: 10px;">
|
|
|
|
+ <div v-show="showMaterialInfo" class="material-content">
|
|
|
|
+ <template v-if="!hasRichTextContent(currMaterialInfo.memo) && (!currMaterialInfo.imgList || currMaterialInfo.imgList.length == 0)">
|
|
<div style="margin: 10px; color: #aea6a3">暂无数据</div>
|
|
<div style="margin: 10px; color: #aea6a3">暂无数据</div>
|
|
</template>
|
|
</template>
|
|
- <template v-if="currMaterialInfo.memo">
|
|
|
|
|
|
+ <template v-if="hasRichTextContent(currMaterialInfo.memo)">
|
|
<label>审查要点</label>
|
|
<label>审查要点</label>
|
|
<div v-html="currMaterialInfo.memo" style="margin: 10px;"></div>
|
|
<div v-html="currMaterialInfo.memo" style="margin: 10px;"></div>
|
|
</template>
|
|
</template>
|
|
@@ -285,6 +289,7 @@
|
|
},
|
|
},
|
|
/** 左侧树节点单击事件 **/
|
|
/** 左侧树节点单击事件 **/
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
|
|
+ let _this = this;
|
|
if (!data.isMatter) {
|
|
if (!data.isMatter) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -296,7 +301,7 @@
|
|
loadingInstance.close()
|
|
loadingInstance.close()
|
|
const matterData = response.data
|
|
const matterData = response.data
|
|
this.currMatter = matterData
|
|
this.currMatter = matterData
|
|
- this.showMatterView = true
|
|
|
|
|
|
+ // this.showMatterView = true
|
|
if (this.sidebar.opened) {
|
|
if (this.sidebar.opened) {
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
}
|
|
}
|
|
@@ -312,6 +317,10 @@
|
|
this.showMaterialInfo = false
|
|
this.showMaterialInfo = false
|
|
this.currMaterial = matterData.material ? matterData.material : {}
|
|
this.currMaterial = matterData.material ? matterData.material : {}
|
|
this.dealWithPrintInfo()
|
|
this.dealWithPrintInfo()
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ let listHeight = document.getElementsByClassName('material-list')[0].clientHeight
|
|
|
|
+ _this.lineHeight = 'height: ' + listHeight + 'px;'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -329,8 +338,8 @@
|
|
/**
|
|
/**
|
|
* 切换视图显示
|
|
* 切换视图显示
|
|
*/
|
|
*/
|
|
- changeView() {
|
|
|
|
- this.showMatterView = false
|
|
|
|
|
|
+ changeView(flag) {
|
|
|
|
+ this.showMatterView = flag
|
|
},
|
|
},
|
|
/** 一次性告知单模板
|
|
/** 一次性告知单模板
|
|
* {$year}:当前年
|
|
* {$year}:当前年
|
|
@@ -432,9 +441,25 @@
|
|
}
|
|
}
|
|
return deptItem
|
|
return deptItem
|
|
},
|
|
},
|
|
|
|
+ /** 检查富文本是否有内容 */
|
|
|
|
+ hasRichTextContent(htmlContent) {
|
|
|
|
+ if (!htmlContent) return false;
|
|
|
|
+ // 去除HTML标签,只保留纯文本
|
|
|
|
+ let textContent = htmlContent.replace(/<[^>]*>/g, '');
|
|
|
|
+ // 去除空白字符(包括空格、制表符、换行符等)
|
|
|
|
+ let trimmedTextContent = textContent.trim();
|
|
|
|
+ // 判断纯文本内容是否非空
|
|
|
|
+ return trimmedTextContent !== '';
|
|
|
|
+ },
|
|
/** 材料清单点击事件 **/
|
|
/** 材料清单点击事件 **/
|
|
- handleMaterialItem(item) {
|
|
|
|
|
|
+ handleMaterialItem(e, item) {
|
|
let _this = this
|
|
let _this = this
|
|
|
|
+ const targetElement = e.target;
|
|
|
|
+ this.$el.querySelectorAll('.material-item').forEach(el => {
|
|
|
|
+ el.classList.remove('material-selected');
|
|
|
|
+ });
|
|
|
|
+ targetElement.classList.add('material-selected');
|
|
|
|
+
|
|
this.showMaterialInfo = true
|
|
this.showMaterialInfo = true
|
|
if (item) {
|
|
if (item) {
|
|
let imgList = item.imgs ? item.imgs.split('*') : []
|
|
let imgList = item.imgs ? item.imgs.split('*') : []
|
|
@@ -443,6 +468,7 @@
|
|
} else {
|
|
} else {
|
|
this.currMaterialInfo = {}
|
|
this.currMaterialInfo = {}
|
|
}
|
|
}
|
|
|
|
+
|
|
let count = 0;
|
|
let count = 0;
|
|
let checkContentHeight = setInterval(function() {
|
|
let checkContentHeight = setInterval(function() {
|
|
_this.loadImgSuccess()
|
|
_this.loadImgSuccess()
|
|
@@ -452,6 +478,11 @@
|
|
},
|
|
},
|
|
loadImgSuccess() {
|
|
loadImgSuccess() {
|
|
let height = document.getElementsByClassName('material-content')[0].clientHeight
|
|
let height = document.getElementsByClassName('material-content')[0].clientHeight
|
|
|
|
+ let listHeight = document.getElementsByClassName('material-list')[0].clientHeight
|
|
|
|
+ if (height < listHeight) {
|
|
|
|
+ height = listHeight
|
|
|
|
+ }
|
|
|
|
+ console.log(height, listHeight)
|
|
this.lineHeight = 'height: ' + height + 'px;'
|
|
this.lineHeight = 'height: ' + height + 'px;'
|
|
},
|
|
},
|
|
/** 查询远程桌面列表 */
|
|
/** 查询远程桌面列表 */
|
|
@@ -552,6 +583,18 @@
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
padding: 10px;
|
|
padding: 10px;
|
|
|
|
+ word-wrap: break-word;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .material-item {
|
|
|
|
+ padding: 5px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ color: #82848a;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .material-selected {
|
|
|
|
+ color: #4285f4;
|
|
|
|
+ text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
|
|
.custom-tree-node {
|
|
.custom-tree-node {
|