|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-dialog v-model="isOpen" append-to-body width="700">
|
|
|
+ <el-dialog v-model="isOpen" append-to-body width="700" @close="closeOpen">
|
|
|
<template #header>
|
|
|
<div class="my-header">
|
|
|
<div class="title">历史版本列表 — {{ name }}</div>
|
|
|
@@ -11,32 +11,30 @@
|
|
|
class="main-cont-left"
|
|
|
style="display: flex; flex-direction: column; margin-top: 16px"
|
|
|
>
|
|
|
- <div class="main-line">
|
|
|
<div
|
|
|
v-for="(item, index) in treeData.data"
|
|
|
:key="index"
|
|
|
class="list-item list-item-dot"
|
|
|
- :class="{ 'active-list-item': clickIndex == index }"
|
|
|
+ :class="{ 'active-list-item list-item-dot-active': clickIndex == index }"
|
|
|
@click="clickList(index)"
|
|
|
>
|
|
|
<div>
|
|
|
<span style="padding-left: 24px">{{ item.createTime }}</span>
|
|
|
</div>
|
|
|
<!-- 显示节点标签 -->
|
|
|
- <img :src="eyes" @click="previewFileClick(index)" class="eyes" />
|
|
|
+ <img :src="eyes" @click="previewFileClick(item)" class="eyes"/>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button @click="isOpen = false" class="cancel-button"
|
|
|
+ <el-button @click="closeOpen" class="cancel-button"
|
|
|
>关闭</el-button
|
|
|
>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <!-- <FileEdit :docId="docId" :copyRow="copyRow"></FileEdit> -->
|
|
|
+ <FileEdit :docId="docId" :copyRow="copyRow" :isEdit="false"></FileEdit>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
@@ -97,12 +95,20 @@ const handleNodeClick = (data) => {
|
|
|
clickData.value = data;
|
|
|
};
|
|
|
const clickIndex = ref("");
|
|
|
-const previewFileClick = (index) => {
|
|
|
- clickIndex.value = index;
|
|
|
+const emit = defineEmits(["changeMsgClose"]);
|
|
|
+//点击预览
|
|
|
+const previewFileClick = (item) => {
|
|
|
+ emit("changeMsgClose", true,item);
|
|
|
+ isOpen.value= false
|
|
|
};
|
|
|
const clickList = (index) => {
|
|
|
clickIndex.value = index;
|
|
|
};
|
|
|
+
|
|
|
+const closeOpen=()=>{
|
|
|
+ isOpen.value= false
|
|
|
+ emit("changeMsgClose", false,'');
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
@import "@/assets/styles/tree-common.scss";
|
|
|
@@ -124,6 +130,7 @@ const clickList = (index) => {
|
|
|
.eyes {
|
|
|
width: 22px;
|
|
|
height: 22px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
.list-item {
|
|
|
display: flex;
|
|
|
@@ -149,17 +156,31 @@ const clickList = (index) => {
|
|
|
height: 14px;
|
|
|
}
|
|
|
|
|
|
-.list-item-dot::after {
|
|
|
+.list-item:not(:first-child)::after {
|
|
|
content: "";
|
|
|
position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 32;
|
|
|
+ top: 0%;
|
|
|
+ left: 2.3%;
|
|
|
transform: translate(0, -50%);
|
|
|
width: 1px;
|
|
|
- height: 100%;
|
|
|
+ height: 50%;
|
|
|
background-color: #c1cce3; /* 连线的颜色 */
|
|
|
}
|
|
|
+.list-item-dot-active::before{
|
|
|
+ background-image: url("@/assets/images/active-circle.png");
|
|
|
+}
|
|
|
+
|
|
|
.active-list-item {
|
|
|
background: #f5f7f9;
|
|
|
}
|
|
|
+.cancel-button{
|
|
|
+ background: #2E6BC8;
|
|
|
+ color: #fff;
|
|
|
+ border: none;
|
|
|
+ width: 120px;
|
|
|
+ height: 32px;
|
|
|
+}
|
|
|
+.main-conts{
|
|
|
+ border: none;
|
|
|
+}
|
|
|
</style>
|