Elements-SY

modify

......@@ -4,7 +4,7 @@
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<div :class="{ 'fixed-header': fixedHeader }" ref="headerRef">
<navbar />
<tags-view v-if="needTagsView" />
</div>
......
......@@ -46,8 +46,11 @@ export default {
}
},
getBlockCurrentHeight() {
let height = this.$refs.appMainBlock.$el.clientHeight;
this.$store.dispatch("app/setAppMainBlockCH", height);
let appHeaderHeight = this.$refs.headerRef.clientHeight;
let appMainHeight = this.$refs.appMainBlock.$el.clientHeight;
this.$store.dispatch("app/setAppHeaderBlockCH", appHeaderHeight);
this.$store.dispatch("app/setAppMainBlockCH", appMainHeight);
console.log(appHeaderHeight);
},
},
};
......
......@@ -2,6 +2,7 @@ const getters = {
sidebar: (state) => state.app.sidebar,
size: (state) => state.app.size,
device: (state) => state.app.device,
appHeaderBlockClientHeight: (state) => state.app.headerBlockClientHeight,
appMainBlockClientHeight: (state) => state.app.appMainBlockClientHeight,
visitedViews: (state) => state.tagsView.visitedViews,
cachedViews: (state) => state.tagsView.cachedViews,
......
......@@ -10,40 +10,43 @@ const state = {
device: "desktop",
//size: Cookies.get('size') || 'medium'
size: localStorage.getItem("size") || "medium",
appMainBlockClientHeight: null
headerBlockClientHeight: null,
appMainBlockClientHeight: null,
};
const mutations = {
TOGGLE_SIDEBAR: state => {
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
TOGGLE_SIDEBAR: (state) => {
state.sidebar.opened = !state.sidebar.opened;
state.sidebar.withoutAnimation = false;
if (state.sidebar.opened) {
//Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
localStorage.setItem("sidebarStatus", 1);
} else {
// Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
localStorage.setItem("sidebarStatus", 0);
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
//Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
localStorage.setItem("sidebarStatus", 0);
state.sidebar.opened = false;
state.sidebar.withoutAnimation = withoutAnimation;
},
TOGGLE_DEVICE: (state, device) => {
state.device = device
state.device = device;
},
SET_SIZE: (state, size) => {
state.size = size
state.size = size;
//Cookies.set('size', size)
localStorage.setItem('size', size)
localStorage.setItem("size", size);
},
SET_APPHEADERBLOCKCH: (state, height) => {
state.headerBlockClientHeight = height;
},
SET_APPMAINBLOCKCH: (state, height) => {
state.appMainBlockClientHeight = height;
},
}
};
const actions = {
toggleSideBar({ commit }) {
......@@ -58,6 +61,9 @@ const actions = {
setSize({ commit }, size) {
commit("SET_SIZE", size);
},
setAppHeaderBlockCH({ commit }, height) {
commit("SET_APPHEADERBLOCKCH", height);
},
setAppMainBlockCH({ commit }, height) {
commit("SET_APPMAINBLOCKCH", height);
},
......
......@@ -424,21 +424,12 @@ export function restTableHeight($refs) {
if (key == "ylTable") {
$refs[key].$children.map((item) => {
if (item.$el.id == "group-btn") {
// console.log("group-btn:", getPropertyValue(item.$el));
// table表格组合按钮
heigth += getPropertyValue(item.$el);
heigth += item.$el.clientHeight;
} else if (item.$el.className == "el-pagination is-background") {
// table表格组合分页
if (item.$el.offsetParent.className == "pagination-container") {
// console.log(
// "pagination:",
// getPropertyValue(item.$el.offsetParent)
// );
// console.log(
// "paginationClientHeight:",
// getPropertyValue(item.$el.offsetParent.clientHeight)
// );
heigth += getPropertyValue(item.$el.offsetParent);
heigth += item.$el.offsetParent.clientHeight;
}
......@@ -448,22 +439,14 @@ export function restTableHeight($refs) {
if ($refs[key].hasOwnProperty("$el")) {
heigth += $refs[key].$el.clientHeight;
heigth += getPropertyValue($refs[key].$el);
// console.log(
// "ruleForm:",
// $refs[key].$el.clientHeight,
// getPropertyValue($refs[key].$el)
// );
} else {
// console.log("ruleForm:", $refs[key]);
heigth += $refs[key].$el.clientHeight;
heigth += getPropertyValue($refs[key]);
}
}
} else if (key == "formHeaderRef") {
// console.log("formHeaderRef:", getPropertyValue($refs[key]));
heigth += getPropertyValue($refs[key]);
}
});
// console.log("heigth:", heigth);
return heigth;
}
......
......@@ -49,8 +49,6 @@ export const formConfig = [
label: "无效",
},
],
label: "有效",
value: "1",
},
colWidth: "18%",
labelWidth: "70px",
......
......@@ -33,6 +33,7 @@ import YlTable from "@/components/YlTable";
import { formConfig } from "./formConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import { restTableHeight, sortList } from "@/utils";
import store from '@/store'
import {
findAllEtesRules, // ET86查询
deleteEtesRuleById, // 删除
......@@ -74,6 +75,7 @@ export default {
this.tableAttr.maxHeight =
window.innerHeight - restTableHeight(this.$refs);
});
console.log(store.getters.appHeaderBlockClientHeight)
},
methods: {
// ET86查询
......@@ -100,11 +102,6 @@ export default {
if (code == 200) {
const valid = data.list.filter((item) => item.status == "1"); // 有效
const invalid = data.list.filter((item) => item.status == "0"); // 无效
// valid.reverse(); // 有效航班修改时间排序
// invalid.reverse(); //
// const newValid = sortList(valid, "originOfFlightNo"); // 有效原航班按字母排序
// const newInvalid = sortList(invalid, "originOfFlightNo");
// this.tableData = newValid.concat(newInvalid);
this.tableData = valid.concat(invalid);
this.pageConfig.total = data.total;
}
......
......@@ -324,7 +324,7 @@ export default {
queryRoute(obj).then(res => {
if (res.code === 200) {
res.data.list.map(item=>{
if(item.isEtesRoute == "N"){
if(item.isEtesRoute == "N" || item.isEtesRoute == null){
item.isEtesRoute = false;
}else{
item.isEtesRoute = true;
......