|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-dialog v-model="isOpen" append-to-body width="950" @close="closeOpen">
|
|
|
+ <el-dialog v-model="isOpen" append-to-body width="950" @close="closeOpen" class="tank">
|
|
|
<template #header>
|
|
|
<div class="my-header">
|
|
|
<div class="title">历史版本列表 — {{ name }}</div>
|
|
|
@@ -13,7 +13,7 @@
|
|
|
v-if="treeData.length>0"
|
|
|
>
|
|
|
<div
|
|
|
- v-for="(item, index) in treeData"
|
|
|
+ v-for="(item, index) in treeData.value"
|
|
|
:key="index"
|
|
|
class="list-item list-item-dot"
|
|
|
:class="{
|
|
|
@@ -29,17 +29,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else style="text-align: center;">暂无历史版本记录</div>
|
|
|
- <pagination
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer" style="display: flex;align-items: center;justify-content: space-between;">
|
|
|
+ <pagination
|
|
|
v-show="total > 0"
|
|
|
:total="total"
|
|
|
v-model:page="pageNum"
|
|
|
v-model:limit="pageSize"
|
|
|
@pagination="getList"
|
|
|
- style="width: 70%;height: 62px;"
|
|
|
+ style="width: 70%;"
|
|
|
/>
|
|
|
- </div>
|
|
|
- <template #footer>
|
|
|
- <span class="dialog-footer">
|
|
|
<el-button @click="closeOpen" class="cancel-button">关闭</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
@@ -104,8 +105,7 @@ watch(
|
|
|
(newValue) => {
|
|
|
isOpen.value = newValue;
|
|
|
}
|
|
|
-);
|
|
|
-const treeData =ref([])
|
|
|
+);const treeData = reactive([]);
|
|
|
watchEffect(() => {
|
|
|
if(props.fileUserTreeData.length>0){
|
|
|
treeData.value = props.fileUserTreeData.reverse();
|
|
|
@@ -115,12 +115,14 @@ watchEffect(() => {
|
|
|
});
|
|
|
const getList=async()=>{
|
|
|
console.log('page', pageNum.value)
|
|
|
- nextTick(async ()=>{
|
|
|
- const resHistory = await listVersion({pageNum:pageNum.value,pageSize:pageSize.value,docId: props.docId })
|
|
|
- treeData.value =resHistory.rows
|
|
|
- total.value=resHistory.total
|
|
|
-
|
|
|
- })
|
|
|
+ try {
|
|
|
+ const resHistory = await listVersion({ pageNum: pageNum.value, pageSize: pageSize.value, docId: props.docId });
|
|
|
+ treeData.value = resHistory.rows;
|
|
|
+ console.log('treeData.value', treeData.value);
|
|
|
+ total.value = resHistory.total;
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ }
|
|
|
}
|
|
|
//树
|
|
|
const clickData = ref({});
|
|
|
@@ -139,6 +141,7 @@ const clickList = (index) => {
|
|
|
};
|
|
|
|
|
|
const closeOpen = () => {
|
|
|
+ console.log('first', isOpen.value)
|
|
|
isOpen.value = false;
|
|
|
emit("changeMsgClose", false, "");
|
|
|
};
|
|
|
@@ -216,6 +219,7 @@ const closeOpen = () => {
|
|
|
border: none;
|
|
|
width: 120px;
|
|
|
height: 32px;
|
|
|
+ z-index: 999;
|
|
|
}
|
|
|
.main-conts {
|
|
|
border: none;
|
|
|
@@ -223,6 +227,6 @@ const closeOpen = () => {
|
|
|
}
|
|
|
:deep(.pagination-container .el-pagination){
|
|
|
left:25px;
|
|
|
-bottom: 22px;
|
|
|
+bottom: 36px;
|
|
|
}
|
|
|
</style>
|