perf: 优化二级列表拖动效果、提取公共方法
This commit is contained in:
@@ -588,18 +588,18 @@ li{
|
|||||||
}
|
}
|
||||||
.main-list {
|
.main-list {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transition: .4s height, .4s transform;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.main-list.main-list-with-sub {
|
.main-list.main-list-with-sub {
|
||||||
transform: translate3d(0,0,0);
|
|
||||||
height: calc(50% - 4px);
|
height: calc(50% - 4px);
|
||||||
}
|
}
|
||||||
.sub-list {
|
.sub-list {
|
||||||
height: calc(50% - 4px);
|
height: calc(50% - 4px);
|
||||||
transition: .4s height;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.main-and-sub-transition {
|
||||||
|
transition: .4s height;
|
||||||
|
}
|
||||||
.sub-list-resize {
|
.sub-list-resize {
|
||||||
margin: 0 -6px;
|
margin: 0 -6px;
|
||||||
border-top: 1px solid #aaa;
|
border-top: 1px solid #aaa;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<span>
|
<span>
|
||||||
<!-- 副列表 -->
|
<!-- 副列表 -->
|
||||||
<div @mousedown="listResize" class="sub-list-resize" v-if="showSubList && !isFullScreen">一</div>
|
<div @mousedown="listResize" class="sub-list-resize" v-if="showSubList && !isFullScreen">一</div>
|
||||||
<div class="sub-list" v-if="showSubList">
|
<div class="sub-list sub-list-transition" v-if="showSubList">
|
||||||
<!--窗口大小控制-->
|
<!--窗口大小控制-->
|
||||||
<div class="sub-list-window-control">
|
<div class="sub-list-window-control">
|
||||||
<!--退出全屏-->
|
<!--退出全屏-->
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||||
<div class="top-tools" v-show="mainResizeShow">
|
<div class="top-tools" v-show="mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||||
<div class="top-tool-search float-right">
|
<div class="top-tool-search float-right">
|
||||||
@@ -113,9 +113,11 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
name: "alert-config",
|
name: "alert-config",
|
||||||
data() {
|
data() {
|
||||||
|
vm = this;
|
||||||
return {
|
return {
|
||||||
/*二级列表相关*/
|
/*二级列表相关*/
|
||||||
ruleDetail: {},
|
ruleDetail: {},
|
||||||
@@ -275,73 +277,6 @@
|
|||||||
this.showSubList = true;
|
this.showSubList = true;
|
||||||
this.targetTab = 'alertMessage';
|
this.targetTab = 'alertMessage';
|
||||||
},
|
},
|
||||||
// 鼠标拖动二级列表
|
|
||||||
listResize(e) {
|
|
||||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
|
||||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//得到点击时俩dom的初始高度:
|
|
||||||
let mainInitialHeight = mainListDom.offsetHeight;
|
|
||||||
let subInitialHeight = subListDom.offsetHeight;
|
|
||||||
//点击时鼠标的Y轴位置
|
|
||||||
let mouseInitialY = e.clientY;
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
document.onmousemove = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
//得到鼠标拖动的距离
|
|
||||||
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
||||||
|
|
||||||
//往上方拖动:
|
|
||||||
if (e.clientY < mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
//往下方拖动:
|
|
||||||
if (e.clientY > mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主、副列表最小高度限制为15px
|
|
||||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
||||||
mainListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(mainListDom.style.height) <= 15){
|
|
||||||
mainListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
||||||
subListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) <= 15){
|
|
||||||
subListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
//当主副列表可视区域小于一定值时,不展示内容
|
|
||||||
if(parseInt(mainListDom.style.height) <= 100){
|
|
||||||
if (_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.onmouseup = () => {
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
elementsetShow(s, e) {
|
elementsetShow(s, e) {
|
||||||
this.showElementSet = true;
|
this.showElementSet = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -483,34 +418,17 @@
|
|||||||
}
|
}
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
exitFullScreen() {
|
// 全屏
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//主列表
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
||||||
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
||||||
setTimeout(() => {
|
|
||||||
this.isFullScreen = false;
|
|
||||||
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
||||||
this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
||||||
this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
},
|
|
||||||
fullScreen() {
|
fullScreen() {
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
this.$bottomBoxWindow.fullScreen(vm);
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
},
|
||||||
this.isFullScreen = true;
|
// 退出全屏
|
||||||
//主列表
|
exitFullScreen() {
|
||||||
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
||||||
document.querySelector(".main-list-with-sub").style.height = '0';
|
},
|
||||||
this.mainResizeShow = false;
|
// 鼠标拖动二级列表
|
||||||
//副列表
|
listResize(e) {
|
||||||
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
},
|
},
|
||||||
viewAlertType: function (type, typeObj) {
|
viewAlertType: function (type, typeObj) {
|
||||||
this.closeViews();
|
this.closeViews();
|
||||||
@@ -582,45 +500,7 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.inTransform = n;
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
if (!n) {
|
|
||||||
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
||||||
this.isFullScreen = false;
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-show");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.add("pagination-top-hide");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
paginationTop.classList.add("display-none");
|
|
||||||
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
||||||
}, 210);
|
|
||||||
|
|
||||||
// 主列表恢复全屏
|
|
||||||
this.mainResizeShow = this.subResizeShow = true;
|
|
||||||
document.querySelector('.main-list').style.height = "";
|
|
||||||
//副列表高度清空
|
|
||||||
document.querySelector(".sub-list").style.height = '';
|
|
||||||
} else {
|
|
||||||
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
setTimeout(() => {
|
|
||||||
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-hide");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.add("pagination-top-show");
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
alertRuleForMessage: {
|
alertRuleForMessage: {
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||||
<div class="top-tools" v-show="mainResizeShow">
|
<div class="top-tools" v-show="mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||||
<div class="top-tool-search margin-r-20"><search-input :searchMsg="searchMsg" @search="search" :inTransform="inTransform"></search-input></div>
|
<div class="top-tool-search margin-r-20"><search-input :searchMsg="searchMsg" @search="search" :inTransform="inTransform"></search-input></div>
|
||||||
@@ -188,7 +188,10 @@
|
|||||||
<button class="to-top" v-show="showTopBtn" @click="$toTop"><i class="nz-icon nz-icon-top"></i></button>
|
<button class="to-top" v-show="showTopBtn" @click="$toTop"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<bottom-box v-if="showSubList" :show-sub-list="showSubList" :subResizeShow="subResizeShow" :obj="alertMsgAsset" :isFullScreen="isFullScreen" :from="'asset'" :targetTab="targetTab" :detail="assetDetail"
|
<bottom-box v-if="showSubList" :show-sub-list="showSubList" :subResizeShow="subResizeShow" :obj="alertMsgAsset" :isFullScreen="isFullScreen" :from="'asset'" :targetTab="targetTab" :detail="assetDetail"
|
||||||
@closeSubList="showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
@closeSubList="showSubList = false"
|
||||||
|
@fullScreen="fullScreen"
|
||||||
|
@exitFullScreen="exitFullScreen"
|
||||||
|
@listResize="listResize" ></bottom-box>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asset-box :edit-unit-show='editUnitShow' @refreshData="flushData" @sendStateData="tabControl"
|
<asset-box :edit-unit-show='editUnitShow' @refreshData="flushData" @sendStateData="tabControl"
|
||||||
@@ -210,7 +213,7 @@
|
|||||||
import bus from "../../../libs/bus";
|
import bus from "../../../libs/bus";
|
||||||
import exportXLSX from "../../common/exportXLSX";
|
import exportXLSX from "../../common/exportXLSX";
|
||||||
import endpointStatusPop from "./endpointStatusPop";
|
import endpointStatusPop from "./endpointStatusPop";
|
||||||
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
name: "asset",
|
name: "asset",
|
||||||
components:{
|
components:{
|
||||||
@@ -218,6 +221,7 @@
|
|||||||
'endpoint-status-pop':endpointStatusPop,
|
'endpoint-status-pop':endpointStatusPop,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
vm = this;
|
||||||
return {
|
return {
|
||||||
/*二级页面相关*/
|
/*二级页面相关*/
|
||||||
assetDetail: [], //asset详情
|
assetDetail: [], //asset详情
|
||||||
@@ -448,45 +452,7 @@
|
|||||||
}, 50);
|
}, 50);
|
||||||
},
|
},
|
||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.inTransform = n;
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
if (!n) {
|
|
||||||
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
||||||
this.isFullScreen = false;
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-show");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.add("pagination-top-hide");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
paginationTop.classList.add("display-none");
|
|
||||||
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
||||||
}, 210);
|
|
||||||
|
|
||||||
// 主列表恢复全屏
|
|
||||||
this.mainResizeShow = this.subResizeShow = true;
|
|
||||||
document.querySelector('.main-list').style.height = "";
|
|
||||||
//副列表高度清空
|
|
||||||
document.querySelector(".sub-list").style.height = '';
|
|
||||||
} else {
|
|
||||||
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
setTimeout(() => {
|
|
||||||
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-hide");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.add("pagination-top-show");
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
alertMsgAsset: {
|
alertMsgAsset: {
|
||||||
deep: true,
|
deep: true,
|
||||||
@@ -496,101 +462,14 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 鼠标拖动二级列表
|
fullScreen() {
|
||||||
listResize(e) {
|
this.$bottomBoxWindow.fullScreen(vm);
|
||||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
|
||||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//得到点击时俩dom的初始高度:
|
|
||||||
let mainInitialHeight = mainListDom.offsetHeight;
|
|
||||||
let subInitialHeight = subListDom.offsetHeight;
|
|
||||||
//点击时鼠标的Y轴位置
|
|
||||||
let mouseInitialY = e.clientY;
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
document.onmousemove = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
//得到鼠标拖动的距离
|
|
||||||
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
||||||
|
|
||||||
//往上方拖动:
|
|
||||||
if (e.clientY < mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
//往下方拖动:
|
|
||||||
if (e.clientY > mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主、副列表最小高度限制为15px
|
|
||||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
||||||
mainListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(mainListDom.style.height) <= 15){
|
|
||||||
mainListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
||||||
subListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) <= 15){
|
|
||||||
subListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
//当主副列表可视区域小于一定值时,不展示内容
|
|
||||||
if(parseInt(mainListDom.style.height) <= 100){
|
|
||||||
if (_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.onmouseup = () => {
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
exitFullScreen() {
|
exitFullScreen() {
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//主列表
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
||||||
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
||||||
setTimeout(() => {
|
|
||||||
this.isFullScreen = false;
|
|
||||||
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
||||||
this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
||||||
this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
},
|
},
|
||||||
fullScreen() {
|
listResize(e) {
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
this.isFullScreen = true;
|
|
||||||
//主列表
|
|
||||||
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = '0';
|
|
||||||
this.mainResizeShow = false;
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
|
||||||
},
|
},
|
||||||
dcSelectAll(val) { //DC全选
|
dcSelectAll(val) { //DC全选
|
||||||
if (this.checkListData.length > 0) {
|
if (this.checkListData.length > 0) {
|
||||||
@@ -618,7 +497,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.module = module;
|
this.module = module;
|
||||||
console.info(this.module);
|
|
||||||
this.$refs.moduleBox.show(true);
|
this.$refs.moduleBox.show(true);
|
||||||
},
|
},
|
||||||
getAssetModuleList(id) {
|
getAssetModuleList(id) {
|
||||||
@@ -965,7 +843,6 @@
|
|||||||
if (pageSize != 'undefined' && pageSize != null) {
|
if (pageSize != 'undefined' && pageSize != null) {
|
||||||
this.pageObj.pageSize = pageSize
|
this.pageObj.pageSize = pageSize
|
||||||
}
|
}
|
||||||
console.log('pageSize:'+this.pageObj.pageSize)
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
//左侧dc列表初始选中状态
|
//左侧dc列表初始选中状态
|
||||||
if (this.$store.state.assetData.selectedData.length > 0) {
|
if (this.$store.state.assetData.selectedData.length > 0) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<!-- 主页面 -->
|
<!-- 主页面 -->
|
||||||
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||||
<!-- 顶部工具栏 -->
|
<!-- 顶部工具栏 -->
|
||||||
<div class="top-tools" v-show="mainResizeShow">
|
<div class="top-tools" v-show="mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||||
@@ -182,9 +182,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
name: "account",
|
name: "account",
|
||||||
data() {
|
data() {
|
||||||
|
vm = this;
|
||||||
return {
|
return {
|
||||||
//底部上滑框相关
|
//底部上滑框相关
|
||||||
mainListHeight: '', //主列表高度
|
mainListHeight: '', //主列表高度
|
||||||
@@ -308,101 +310,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 全屏
|
||||||
|
fullScreen() {
|
||||||
|
this.$bottomBoxWindow.fullScreen(vm);
|
||||||
|
},
|
||||||
|
// 退出全屏
|
||||||
|
exitFullScreen() {
|
||||||
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
||||||
|
},
|
||||||
// 鼠标拖动二级列表
|
// 鼠标拖动二级列表
|
||||||
listResize(e) {
|
listResize(e) {
|
||||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//得到点击时俩dom的初始高度:
|
|
||||||
let mainInitialHeight = mainListDom.offsetHeight;
|
|
||||||
let subInitialHeight = subListDom.offsetHeight;
|
|
||||||
//点击时鼠标的Y轴位置
|
|
||||||
let mouseInitialY = e.clientY;
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
document.onmousemove = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
//得到鼠标拖动的距离
|
|
||||||
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
||||||
|
|
||||||
//往上方拖动:
|
|
||||||
if (e.clientY < mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
//往下方拖动:
|
|
||||||
if (e.clientY > mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主、副列表最小高度限制为15px
|
|
||||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
||||||
mainListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(mainListDom.style.height) <= 15){
|
|
||||||
mainListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
||||||
subListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) <= 15){
|
|
||||||
subListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
//当主副列表可视区域小于一定值时,不展示内容
|
|
||||||
if(parseInt(mainListDom.style.height) <= 100){
|
|
||||||
if (_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.onmouseup = () => {
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exitFullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//主列表
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
||||||
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
||||||
setTimeout(() => {
|
|
||||||
this.isFullScreen = false;
|
|
||||||
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
||||||
this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
||||||
this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
},
|
|
||||||
fullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
this.isFullScreen = true;
|
|
||||||
//主列表
|
|
||||||
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = '0';
|
|
||||||
this.mainResizeShow = false;
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
|
||||||
},
|
},
|
||||||
jumpTo(data, id) {
|
jumpTo(data, id) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -659,45 +577,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.inTransform = n;
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
if (!n) {
|
|
||||||
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
||||||
this.isFullScreen = false;
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-show");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.add("pagination-top-hide");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
paginationTop.classList.add("display-none");
|
|
||||||
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
||||||
}, 210);
|
|
||||||
|
|
||||||
// 主列表恢复全屏
|
|
||||||
this.mainResizeShow = this.subResizeShow = true;
|
|
||||||
document.querySelector('.main-list').style.height = "";
|
|
||||||
//副列表高度清空
|
|
||||||
document.querySelector(".sub-list").style.height = '';
|
|
||||||
} else {
|
|
||||||
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
setTimeout(() => {
|
|
||||||
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-hide");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.add("pagination-top-show");
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--dc table start-->
|
<!--dc table start-->
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||||
<div class="top-tools" v-show="mainResizeShow">
|
<div class="top-tools" v-show="mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
@@ -153,9 +153,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
name: "dc",
|
name: "dc",
|
||||||
data() {
|
data() {
|
||||||
|
vm = this;
|
||||||
return {
|
return {
|
||||||
/*二级列表相关*/
|
/*二级列表相关*/
|
||||||
targetTab: '', //展示二级列表中的哪个页签
|
targetTab: '', //展示二级列表中的哪个页签
|
||||||
@@ -279,102 +281,6 @@
|
|||||||
this.$store.commit('setHeaderTable', data);
|
this.$store.commit('setHeaderTable', data);
|
||||||
this.tablelable = data;
|
this.tablelable = data;
|
||||||
},
|
},
|
||||||
// 鼠标拖动二级列表
|
|
||||||
listResize(e) {
|
|
||||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
|
||||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//得到点击时俩dom的初始高度:
|
|
||||||
let mainInitialHeight = mainListDom.offsetHeight;
|
|
||||||
let subInitialHeight = subListDom.offsetHeight;
|
|
||||||
//点击时鼠标的Y轴位置
|
|
||||||
let mouseInitialY = e.clientY;
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
document.onmousemove = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
//得到鼠标拖动的距离
|
|
||||||
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
||||||
|
|
||||||
//往上方拖动:
|
|
||||||
if (e.clientY < mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
//往下方拖动:
|
|
||||||
if (e.clientY > mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主、副列表最小高度限制为15px
|
|
||||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
||||||
mainListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(mainListDom.style.height) <= 15){
|
|
||||||
mainListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
||||||
subListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) <= 15){
|
|
||||||
subListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
//当主副列表可视区域小于一定值时,不展示内容
|
|
||||||
if(parseInt(mainListDom.style.height) <= 100){
|
|
||||||
if (_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.onmouseup = () => {
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exitFullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//主列表
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
||||||
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
||||||
setTimeout(() => {
|
|
||||||
this.isFullScreen = false;
|
|
||||||
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
||||||
this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
||||||
this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
},
|
|
||||||
fullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
this.isFullScreen = true;
|
|
||||||
//主列表
|
|
||||||
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = '0';
|
|
||||||
this.mainResizeShow = false;
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
|
||||||
},
|
|
||||||
jumpTo(data, id) {
|
jumpTo(data, id) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/" + data,
|
path: "/" + data,
|
||||||
@@ -402,6 +308,18 @@
|
|||||||
this.targetTab = "detail";
|
this.targetTab = "detail";
|
||||||
this.showSubList = true;
|
this.showSubList = true;
|
||||||
},
|
},
|
||||||
|
// 全屏
|
||||||
|
fullScreen() {
|
||||||
|
this.$bottomBoxWindow.fullScreen(vm);
|
||||||
|
},
|
||||||
|
// 退出全屏
|
||||||
|
exitFullScreen() {
|
||||||
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
||||||
|
},
|
||||||
|
// 鼠标拖动二级列表
|
||||||
|
listResize(e) {
|
||||||
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
|
},
|
||||||
convertToDetail(obj) {
|
convertToDetail(obj) {
|
||||||
let detail = [];
|
let detail = [];
|
||||||
detail.push({label: this.$t("overall.name"), value: obj.name});
|
detail.push({label: this.$t("overall.name"), value: obj.name});
|
||||||
@@ -507,45 +425,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.inTransform = n;
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
if (!n) {
|
|
||||||
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
||||||
this.isFullScreen = false;
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-show");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.add("pagination-top-hide");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
paginationTop.classList.add("display-none");
|
|
||||||
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
||||||
}, 210);
|
|
||||||
|
|
||||||
// 主列表恢复全屏
|
|
||||||
this.mainResizeShow = this.subResizeShow = true;
|
|
||||||
document.querySelector('.main-list').style.height = "";
|
|
||||||
//副列表高度清空
|
|
||||||
document.querySelector(".sub-list").style.height = '';
|
|
||||||
} else {
|
|
||||||
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
setTimeout(() => {
|
|
||||||
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-hide");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.add("pagination-top-show");
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||||
<div class="top-tools" v-show="mainResizeShow">
|
<div class="top-tools" v-show="mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
@@ -188,10 +188,11 @@
|
|||||||
import {host} from '../../common/js/validate';
|
import {host} from '../../common/js/validate';
|
||||||
import {port} from '../../common/js/validate';
|
import {port} from '../../common/js/validate';
|
||||||
|
|
||||||
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
name: "prom",
|
name: "prom",
|
||||||
data() {
|
data() {
|
||||||
|
vm = this;
|
||||||
return {
|
return {
|
||||||
//底部上滑框相关
|
//底部上滑框相关
|
||||||
mainTableHeight: this.$tableHeight.normal, //主列表table高度
|
mainTableHeight: this.$tableHeight.normal, //主列表table高度
|
||||||
@@ -349,101 +350,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 全屏
|
||||||
|
fullScreen() {
|
||||||
|
this.$bottomBoxWindow.fullScreen(vm);
|
||||||
|
},
|
||||||
|
// 退出全屏
|
||||||
|
exitFullScreen() {
|
||||||
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
||||||
|
},
|
||||||
// 鼠标拖动二级列表
|
// 鼠标拖动二级列表
|
||||||
listResize(e) {
|
listResize(e) {
|
||||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//得到点击时俩dom的初始高度:
|
|
||||||
let mainInitialHeight = mainListDom.offsetHeight;
|
|
||||||
let subInitialHeight = subListDom.offsetHeight;
|
|
||||||
//点击时鼠标的Y轴位置
|
|
||||||
let mouseInitialY = e.clientY;
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
document.onmousemove = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
//得到鼠标拖动的距离
|
|
||||||
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
||||||
|
|
||||||
//往上方拖动:
|
|
||||||
if (e.clientY < mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
//往下方拖动:
|
|
||||||
if (e.clientY > mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主、副列表最小高度限制为15px
|
|
||||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
||||||
mainListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(mainListDom.style.height) <= 15){
|
|
||||||
mainListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
||||||
subListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) <= 15){
|
|
||||||
subListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
//当主副列表可视区域小于一定值时,不展示内容
|
|
||||||
if(parseInt(mainListDom.style.height) <= 100){
|
|
||||||
if (_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.onmouseup = () => {
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exitFullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//主列表
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
||||||
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
||||||
setTimeout(() => {
|
|
||||||
this.isFullScreen = false;
|
|
||||||
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
||||||
this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
||||||
this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
},
|
|
||||||
fullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
this.isFullScreen = true;
|
|
||||||
//主列表
|
|
||||||
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = '0';
|
|
||||||
this.mainResizeShow = false;
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
|
||||||
},
|
},
|
||||||
convertToDetail(obj) {
|
convertToDetail(obj) {
|
||||||
let detail = [];
|
let detail = [];
|
||||||
@@ -811,45 +728,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.inTransform = n;
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
if (!n) {
|
|
||||||
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
||||||
this.isFullScreen = false;
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-show");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.add("pagination-top-hide");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
paginationTop.classList.add("display-none");
|
|
||||||
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
||||||
}, 210);
|
|
||||||
|
|
||||||
// 主列表恢复全屏
|
|
||||||
this.mainResizeShow = this.subResizeShow = true;
|
|
||||||
document.querySelector('.main-list').style.height = "";
|
|
||||||
//副列表高度清空
|
|
||||||
document.querySelector(".sub-list").style.height = '';
|
|
||||||
} else {
|
|
||||||
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
setTimeout(() => {
|
|
||||||
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-hide");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.add("pagination-top-show");
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<!--endpoint-->
|
<!--endpoint-->
|
||||||
<div class="content-right">
|
<div class="content-right">
|
||||||
<!-- 主列表 -->
|
<!-- 主列表 -->
|
||||||
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
<div class="main-list main-and-sub-transition" :class="{'main-list-with-sub': showSubList}">
|
||||||
<div class="top-tools" v-show="mainResizeShow">
|
<div class="top-tools" v-show="mainResizeShow">
|
||||||
<!--<div class="pagination-top"></div>-->
|
<!--<div class="pagination-top"></div>-->
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': showSubList}">
|
||||||
@@ -149,6 +149,8 @@
|
|||||||
import exportXLSX from "../../common/exportXLSX";
|
import exportXLSX from "../../common/exportXLSX";
|
||||||
import loading from "../../common/loading";
|
import loading from "../../common/loading";
|
||||||
import chartDataFormat from "../../charts/chartDataFormat";
|
import chartDataFormat from "../../charts/chartDataFormat";
|
||||||
|
|
||||||
|
var vm;
|
||||||
export default {
|
export default {
|
||||||
name: "project2",
|
name: "project2",
|
||||||
components: {
|
components: {
|
||||||
@@ -156,6 +158,7 @@
|
|||||||
'loading': loading,
|
'loading': loading,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
vm = this;
|
||||||
let temp = this;
|
let temp = this;
|
||||||
return {
|
return {
|
||||||
endpointDetail: [],
|
endpointDetail: [],
|
||||||
@@ -519,101 +522,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 全屏
|
||||||
|
fullScreen() {
|
||||||
|
this.$bottomBoxWindow.fullScreen(vm);
|
||||||
|
},
|
||||||
|
// 退出全屏
|
||||||
|
exitFullScreen() {
|
||||||
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
||||||
|
},
|
||||||
// 鼠标拖动二级列表
|
// 鼠标拖动二级列表
|
||||||
listResize(e) {
|
listResize(e) {
|
||||||
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//得到点击时俩dom的初始高度:
|
|
||||||
let mainInitialHeight = mainListDom.offsetHeight;
|
|
||||||
let subInitialHeight = subListDom.offsetHeight;
|
|
||||||
//点击时鼠标的Y轴位置
|
|
||||||
let mouseInitialY = e.clientY;
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
document.onmousemove = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
//得到鼠标拖动的距离
|
|
||||||
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
||||||
|
|
||||||
//往上方拖动:
|
|
||||||
if (e.clientY < mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
//往下方拖动:
|
|
||||||
if (e.clientY > mouseInitialY) {
|
|
||||||
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
||||||
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 主、副列表最小高度限制为15px
|
|
||||||
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
||||||
mainListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(mainListDom.style.height) <= 15){
|
|
||||||
mainListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
||||||
subListDom.style.height = contentRightHeight-15+'px';
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.style.height) <= 15){
|
|
||||||
subListDom.style.height = 15+'px';
|
|
||||||
}
|
|
||||||
//当主副列表可视区域小于一定值时,不展示内容
|
|
||||||
if(parseInt(mainListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.mainResizeShow) {
|
|
||||||
_this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
||||||
if (_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!_this.subResizeShow) {
|
|
||||||
_this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
document.onmouseup = () => {
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exitFullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
//主列表
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
||||||
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
||||||
setTimeout(() => {
|
|
||||||
this.isFullScreen = false;
|
|
||||||
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
||||||
this.mainResizeShow = true;
|
|
||||||
}
|
|
||||||
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
||||||
this.subResizeShow = true;
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
},
|
|
||||||
fullScreen() {
|
|
||||||
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
||||||
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
||||||
this.isFullScreen = true;
|
|
||||||
//主列表
|
|
||||||
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
|
||||||
document.querySelector(".main-list-with-sub").style.height = '0';
|
|
||||||
this.mainResizeShow = false;
|
|
||||||
//副列表
|
|
||||||
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
|
||||||
},
|
},
|
||||||
elementsetShow(s, e) {
|
elementsetShow(s, e) {
|
||||||
var eventfixed = {
|
var eventfixed = {
|
||||||
@@ -952,45 +871,7 @@
|
|||||||
this.getModuleList(this.currentProject.id);
|
this.getModuleList(this.currentProject.id);
|
||||||
},
|
},
|
||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.inTransform = n;
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
if (!n) {
|
|
||||||
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
||||||
this.isFullScreen = false;
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-show");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.add("pagination-top-hide");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
paginationTop.classList.add("display-none");
|
|
||||||
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
||||||
}, 210);
|
|
||||||
|
|
||||||
// 主列表恢复全屏
|
|
||||||
this.mainResizeShow = this.subResizeShow = true;
|
|
||||||
document.querySelector('.main-list').style.height = "";
|
|
||||||
//副列表高度清空
|
|
||||||
document.querySelector(".sub-list").style.height = '';
|
|
||||||
} else {
|
|
||||||
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
||||||
//移动分页组件的位置
|
|
||||||
let paginationTop = document.querySelector(".pagination-top");
|
|
||||||
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
||||||
paginationTop.classList.remove("display-none");
|
|
||||||
setTimeout(() => {
|
|
||||||
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
||||||
paginationTop.classList.remove("pagination-top-hide");
|
|
||||||
}
|
|
||||||
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
||||||
paginationTop.classList.add("pagination-top-show");
|
|
||||||
}
|
|
||||||
}, 210);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
curEndpoint: {
|
curEndpoint: {
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import router from './router'
|
|||||||
import VueResource from 'vue-resource'
|
import VueResource from 'vue-resource'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import {post, get, put, del} from './http.js'
|
import {post, get, put, del} from './http.js'
|
||||||
import {toTop, clickoutside, scrollBar} from './tools.js'
|
import {toTop, clickoutside, scrollBar, bottomBoxWindow} from './tools.js'
|
||||||
|
|
||||||
import Pagination from "./components/common/pagination"; //引入全局分页组件
|
import Pagination from "./components/common/pagination"; //引入全局分页组件
|
||||||
import searchInput from "./components/common/searchInput"; //搜索框组件
|
import searchInput from "./components/common/searchInput"; //搜索框组件
|
||||||
@@ -69,6 +69,7 @@ Vue.prototype.$get = get;
|
|||||||
Vue.prototype.$put = put;
|
Vue.prototype.$put = put;
|
||||||
Vue.prototype.$delete = del;
|
Vue.prototype.$delete = del;
|
||||||
Vue.prototype.$toTop = toTop; //toTop置顶按钮方法
|
Vue.prototype.$toTop = toTop; //toTop置顶按钮方法
|
||||||
|
Vue.prototype.$bottomBoxWindow = bottomBoxWindow; //底部上滑框控制
|
||||||
Vue.prototype.$tableHeight = { //列表页表格的高度
|
Vue.prototype.$tableHeight = { //列表页表格的高度
|
||||||
normal: 'calc(100% - 100px)', //常规高度,特例在下方定义
|
normal: 'calc(100% - 100px)', //常规高度,特例在下方定义
|
||||||
openSubList: { //打开二级列表后的高度
|
openSubList: { //打开二级列表后的高度
|
||||||
|
|||||||
@@ -167,3 +167,147 @@ export const scrollBar = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const bottomBoxWindow = {
|
||||||
|
// 鼠标拖动二级列表
|
||||||
|
listResize(vm, e) {
|
||||||
|
console.info(vm);
|
||||||
|
console.info(e);
|
||||||
|
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
||||||
|
let subListDom = document.querySelector(".sub-list"); //副列表
|
||||||
|
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
||||||
|
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
||||||
|
//得到点击时俩dom的初始高度:
|
||||||
|
let mainInitialHeight = mainListDom.offsetHeight;
|
||||||
|
let subInitialHeight = subListDom.offsetHeight;
|
||||||
|
//点击时鼠标的Y轴位置
|
||||||
|
let mouseInitialY = e.clientY;
|
||||||
|
|
||||||
|
document.onmousemove = (e) => {
|
||||||
|
mainListDom.classList.remove('main-and-sub-transition');
|
||||||
|
subListDom.classList.remove('main-and-sub-transition');
|
||||||
|
e.preventDefault();
|
||||||
|
//得到鼠标拖动的距离
|
||||||
|
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
||||||
|
|
||||||
|
//往上方拖动:
|
||||||
|
if (e.clientY < mouseInitialY) {
|
||||||
|
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
||||||
|
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
||||||
|
}
|
||||||
|
//往下方拖动:
|
||||||
|
if (e.clientY > mouseInitialY) {
|
||||||
|
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
||||||
|
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主、副列表最小高度限制为15px
|
||||||
|
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
||||||
|
mainListDom.style.height = contentRightHeight-15+'px';
|
||||||
|
}
|
||||||
|
if(parseInt(mainListDom.style.height) <= 15){
|
||||||
|
mainListDom.style.height = 15+'px';
|
||||||
|
}
|
||||||
|
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
||||||
|
subListDom.style.height = contentRightHeight-15+'px';
|
||||||
|
}
|
||||||
|
if(parseInt(subListDom.style.height) <= 15){
|
||||||
|
subListDom.style.height = 15+'px';
|
||||||
|
}
|
||||||
|
//当主副列表可视区域小于一定值时,不展示内容
|
||||||
|
if(parseInt(mainListDom.style.height) <= 100){
|
||||||
|
if (vm.mainResizeShow) {
|
||||||
|
vm.mainResizeShow = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!vm.mainResizeShow) {
|
||||||
|
vm.mainResizeShow = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(parseInt(subListDom.offsetHeight) <= 100){
|
||||||
|
if (vm.subResizeShow) {
|
||||||
|
vm.subResizeShow = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!vm.subResizeShow) {
|
||||||
|
vm.subResizeShow = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.onmouseup = () => {
|
||||||
|
mainListDom.classList.add('main-and-sub-transition');
|
||||||
|
subListDom.classList.add('main-and-sub-transition');
|
||||||
|
document.onmousemove = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
exitFullScreen(vm) {
|
||||||
|
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
||||||
|
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
||||||
|
//主列表
|
||||||
|
document.querySelector(".main-list-with-sub").style.height = vm.mainListHeight ? vm.mainListHeight + 'px' : 'calc(50% - 4px)';
|
||||||
|
|
||||||
|
//副列表
|
||||||
|
document.querySelector(".sub-list").style.height = vm.mainListHeight ? contentRightHeight-vm.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
||||||
|
setTimeout(() => {
|
||||||
|
vm.isFullScreen = false;
|
||||||
|
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
||||||
|
vm.mainResizeShow = true;
|
||||||
|
}
|
||||||
|
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
||||||
|
vm.subResizeShow = true;
|
||||||
|
}
|
||||||
|
}, 210);
|
||||||
|
},
|
||||||
|
fullScreen(vm) {
|
||||||
|
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
||||||
|
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
||||||
|
vm.isFullScreen = true;
|
||||||
|
//主列表
|
||||||
|
vm.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
||||||
|
document.querySelector(".main-list-with-sub").style.height = '0';
|
||||||
|
vm.mainResizeShow = false;
|
||||||
|
//副列表
|
||||||
|
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
||||||
|
},
|
||||||
|
showSubListWatch(vm, n) {
|
||||||
|
vm.inTransform = n;
|
||||||
|
if (!n) {
|
||||||
|
vm.mainTableHeight = vm.$tableHeight.normal; //重置table的高度
|
||||||
|
vm.isFullScreen = false;
|
||||||
|
//移动分页组件的位置
|
||||||
|
let paginationTop = document.querySelector(".pagination-top");
|
||||||
|
let paginationBottom = document.querySelector(".pagination-bottom");
|
||||||
|
paginationTop.classList.remove("display-none");
|
||||||
|
if (paginationTop.classList.contains("pagination-top-show")) {
|
||||||
|
paginationTop.classList.remove("pagination-top-show");
|
||||||
|
}
|
||||||
|
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
||||||
|
paginationTop.classList.add("pagination-top-hide");
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
paginationTop.classList.add("display-none");
|
||||||
|
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
||||||
|
}, 210);
|
||||||
|
|
||||||
|
// 主列表恢复全屏
|
||||||
|
vm.mainResizeShow = vm.subResizeShow = true;
|
||||||
|
document.querySelector('.main-list').style.height = "";
|
||||||
|
//副列表高度清空
|
||||||
|
document.querySelector(".sub-list").style.height = '';
|
||||||
|
} else {
|
||||||
|
vm.mainTableHeight = vm.$tableHeight.openSubList.mainList; //重置table高度
|
||||||
|
//移动分页组件的位置
|
||||||
|
let paginationTop = document.querySelector(".pagination-top");
|
||||||
|
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
||||||
|
paginationTop.classList.remove("display-none");
|
||||||
|
setTimeout(() => {
|
||||||
|
if (paginationTop.classList.contains("pagination-top-hide")) {
|
||||||
|
paginationTop.classList.remove("pagination-top-hide");
|
||||||
|
}
|
||||||
|
if (!paginationTop.classList.contains("pagination-top-show")) {
|
||||||
|
paginationTop.classList.add("pagination-top-show");
|
||||||
|
}
|
||||||
|
}, 210);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user