From 439d4b5ff70255d92519e9af9b0438efe3b6f57f Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期一, 14 二月 2022 18:24:09 +0800
Subject: [PATCH] 新增底库返回新增的库
---
src/pages/library/index/App.vue | 9 ++
src/pages/library/components/baseList.vue | 113 ++++++++++++++++---------------------
src/pages/library/components/addBase.vue | 1
3 files changed, 56 insertions(+), 67 deletions(-)
diff --git a/src/pages/library/components/addBase.vue b/src/pages/library/components/addBase.vue
index 009f6f7..5a1b3d8 100644
--- a/src/pages/library/components/addBase.vue
+++ b/src/pages/library/components/addBase.vue
@@ -306,7 +306,6 @@
bwType: this.form.bwType,
enable: this.form.enable,
tableDesc: this.form.tableDesc,
- // isSync: this.form.isSync,
});
if (res.success === true) {
this.$notify({
diff --git a/src/pages/library/components/baseList.vue b/src/pages/library/components/baseList.vue
index 106d8ce..4c8d585 100644
--- a/src/pages/library/components/baseList.vue
+++ b/src/pages/library/components/baseList.vue
@@ -6,28 +6,28 @@
<el-collapse v-model="activeNames">
<el-collapse-item name="1" class="el-collapse-item__wrap">
<template slot="title">
- <img v-if="title === '鍚屾搴�'" src="/images/library/鍚屾搴�2.png" alt="" srcset="">
- <img v-else src="/images/library/鏈湴搴�2.png" alt="" srcset="">
+ <img
+ v-if="title === '鍚屾搴�'"
+ src="/images/library/鍚屾搴�2.png"
+ alt=""
+ srcset=""
+ />
+ <img v-else src="/images/library/鏈湴搴�2.png" alt="" srcset="" />
<span class="m5">{{ title }}</span>
- <el-tooltip
- content="娣诲姞鍚屾搴�"
- placement="top"
- >
+ <el-tooltip content="娣诲姞鍚屾搴�" placement="top">
<!-- popper-class="atooltip" -->
- <span
- class="iconfont icontianjiaku-09"
- style="
- font-size: 22px;
- color: #666666;
- position: absolute;
- right: 10px;
- "
- @click.stop="add('sync')"
- v-if="isShow('library:set')"
- ></span>
+ <span
+ class="iconfont icontianjiaku-09"
+ style="
+ font-size: 22px;
+ color: #666666;
+ position: absolute;
+ right: 10px;
+ "
+ @click.stop="add('sync')"
+ v-if="isShow('library:set')"
+ ></span>
</el-tooltip>
-
-
</template>
<div class="max-height">
<el-row
@@ -60,10 +60,9 @@
</p>
</el-col>
<el-col :span="10" :offset="1">
-
<div
class="status-dot"
- :class="item.enable == 1 ?'status-dot-active':''"
+ :class="item.enable == 1 ? 'status-dot-active' : ''"
:style="item.enable == 1 ? { background: '#4E94FF' } : {}"
></div>
</el-col>
@@ -87,26 +86,21 @@
</el-collapse-item>
<el-collapse-item name="2" class="el-collapse-item__wrap">
<template slot="title">
- <img src="/images/library/鏈湴搴�2.png" alt="" srcset="">
+ <img src="/images/library/鏈湴搴�2.png" alt="" srcset="" />
<span class="m5">{{ titleB }}</span>
- <el-tooltip
- content="娣诲姞鍚屾搴�"
- placement="top"
-
- >
- <span
- class="iconfont icontianjiaku-09"
- style="
- font-size: 22px;
- color: #666666;
- position: absolute;
- right: 10px;
- "
- @click.stop="add('local')"
- v-if="isShow('library:set')"
- ></span>
+ <el-tooltip content="娣诲姞鍚屾搴�" placement="top">
+ <span
+ class="iconfont icontianjiaku-09"
+ style="
+ font-size: 22px;
+ color: #666666;
+ position: absolute;
+ right: 10px;
+ "
+ @click.stop="add('local')"
+ v-if="isShow('library:set')"
+ ></span>
</el-tooltip>
-
</template>
<div class="max-height">
<el-row
@@ -137,10 +131,9 @@
</p>
</el-col>
<el-col :span="10" :offset="1">
-
<div
class="status-dot"
- :class="item.enable == 1 ?'status-dot-active':''"
+ :class="item.enable == 1 ? 'status-dot-active' : ''"
:style="item.enable == 1 ? { background: '#4E94FF' } : {}"
></div>
</el-col>
@@ -211,6 +204,15 @@
add(type) {
this.$emit("changeShow", null, type);
},
+ clickLast(type) {
+ this.$nextTick(() => {
+ this.clickCategory(
+ this.syncTableList.length - 1,
+ type,
+ this.syncTableList[this.syncTableList.length - 1]
+ );
+ });
+ },
clickCategory(index, type, item) {
this.categoryIndex = type + index;
// 璋冪敤鍒囨崲鍙充晶闈㈡澘鐨勫嚱鏁板苟涓斿垏鎹㈢埗缁勪欢涓璱sSelected鐨勫�艰鍙︿竴涓粍浠舵竻闄よ閫変腑鐘舵��
@@ -249,25 +251,6 @@
return false;
}
},
- // dateCompare(dateString, compareDateString) {
- // // dateString:褰撳墠鏃堕棿
- // // compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
- // if (this.isEmpty(dateString)) {
- // return;
- // }
- // if (this.isEmpty(compareDateString)) {
- // return 1;
- // }
- // var dateTime = this.dateParse(dateString).getTime();
- // var compareDateTime = this.dateParse(compareDateString).getTime();
- // if (compareDateTime > dateTime) {
- // return 1;
- // } else if (compareDateTime === dateTime) {
- // return 0;
- // } else {
- // return -1;
- // }
- // },
},
props: {
listWidth: {
@@ -333,9 +316,10 @@
font-size: 14px;
}
.out-div {
- max-height: 100%; height: 100%;
- .el-collapse-item__header{
- position:relative;
+ max-height: 100%;
+ height: 100%;
+ .el-collapse-item__header {
+ position: relative;
}
.el-collapse-item__wrap {
will-change: height;
@@ -351,7 +335,8 @@
.el-row {
border-radius: 9px;
background: rgba(239, 241, 245, 0.35);
- margin-bottom: 4px; min-height: 72px;
+ margin-bottom: 4px;
+ min-height: 72px;
box-sizing: border-box;
padding: 10px 5px;
}
diff --git a/src/pages/library/index/App.vue b/src/pages/library/index/App.vue
index 4eeaa41..7cc2173 100644
--- a/src/pages/library/index/App.vue
+++ b/src/pages/library/index/App.vue
@@ -5,14 +5,14 @@
<div class="resize-bar"></div>
<!-- <div class="resize-line"></div> -->
<div class="resize-save">
- <base-list
+ <baseList
ref="baseSync"
:title="`鍚屾搴揱"
type="sync"
:isSelected="isSelected"
@getList="getPersonList"
@changeShow="changeToAdd"
- ></base-list>
+ ></baseList>
</div>
</div>
<div class="bg-white ml20 data-right-box">
@@ -119,6 +119,9 @@
} else {
this.baseForEdit = {};
this.breeadCrumb[1].name = "娣诲姞搴曞簱";
+ // this.$nextTick(() => {
+ // this.$refs.baseSync.clickLast(type)
+ // })
}
this.syncType = type;
this.showList = false;
@@ -133,6 +136,8 @@
},
closeAdd() {
this.showList = true;
+ this.$refs.baseSync.clickLast(this.syncType)
+
},
},
props: {
--
Gitblit v1.8.0