Showing
8 changed files
with
30 additions
and
42 deletions
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | <sidebar class="sidebar-container" | 4 | <sidebar class="sidebar-container" |
| 5 | :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> | 5 | :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> |
| 6 | <div :class="{ hasTagsView: needTagsView }" class="main-container"> | 6 | <div :class="{ hasTagsView: needTagsView }" class="main-container"> |
| 7 | - <div :class="{ 'fixed-header': fixedHeader }"> | 7 | + <div :class="{ 'fixed-header': fixedHeader }" ref="headerRef"> |
| 8 | <navbar /> | 8 | <navbar /> |
| 9 | <tags-view v-if="needTagsView" /> | 9 | <tags-view v-if="needTagsView" /> |
| 10 | </div> | 10 | </div> | ... | ... |
| ... | @@ -46,8 +46,11 @@ export default { | ... | @@ -46,8 +46,11 @@ export default { |
| 46 | } | 46 | } |
| 47 | }, | 47 | }, |
| 48 | getBlockCurrentHeight() { | 48 | getBlockCurrentHeight() { |
| 49 | - let height = this.$refs.appMainBlock.$el.clientHeight; | 49 | + let appHeaderHeight = this.$refs.headerRef.clientHeight; |
| 50 | - this.$store.dispatch("app/setAppMainBlockCH", height); | 50 | + let appMainHeight = this.$refs.appMainBlock.$el.clientHeight; |
| 51 | + this.$store.dispatch("app/setAppHeaderBlockCH", appHeaderHeight); | ||
| 52 | + this.$store.dispatch("app/setAppMainBlockCH", appMainHeight); | ||
| 53 | + console.log(appHeaderHeight); | ||
| 51 | }, | 54 | }, |
| 52 | }, | 55 | }, |
| 53 | }; | 56 | }; | ... | ... |
| ... | @@ -2,6 +2,7 @@ const getters = { | ... | @@ -2,6 +2,7 @@ const getters = { |
| 2 | sidebar: (state) => state.app.sidebar, | 2 | sidebar: (state) => state.app.sidebar, |
| 3 | size: (state) => state.app.size, | 3 | size: (state) => state.app.size, |
| 4 | device: (state) => state.app.device, | 4 | device: (state) => state.app.device, |
| 5 | + appHeaderBlockClientHeight: (state) => state.app.headerBlockClientHeight, | ||
| 5 | appMainBlockClientHeight: (state) => state.app.appMainBlockClientHeight, | 6 | appMainBlockClientHeight: (state) => state.app.appMainBlockClientHeight, |
| 6 | visitedViews: (state) => state.tagsView.visitedViews, | 7 | visitedViews: (state) => state.tagsView.visitedViews, |
| 7 | cachedViews: (state) => state.tagsView.cachedViews, | 8 | cachedViews: (state) => state.tagsView.cachedViews, | ... | ... |
| ... | @@ -10,40 +10,43 @@ const state = { | ... | @@ -10,40 +10,43 @@ const state = { |
| 10 | device: "desktop", | 10 | device: "desktop", |
| 11 | //size: Cookies.get('size') || 'medium' | 11 | //size: Cookies.get('size') || 'medium' |
| 12 | size: localStorage.getItem("size") || "medium", | 12 | size: localStorage.getItem("size") || "medium", |
| 13 | - appMainBlockClientHeight: null | 13 | + headerBlockClientHeight: null, |
| 14 | + appMainBlockClientHeight: null, | ||
| 14 | }; | 15 | }; |
| 15 | 16 | ||
| 16 | const mutations = { | 17 | const mutations = { |
| 17 | - TOGGLE_SIDEBAR: state => { | 18 | + TOGGLE_SIDEBAR: (state) => { |
| 18 | - state.sidebar.opened = !state.sidebar.opened | 19 | + state.sidebar.opened = !state.sidebar.opened; |
| 19 | - state.sidebar.withoutAnimation = false | 20 | + state.sidebar.withoutAnimation = false; |
| 20 | if (state.sidebar.opened) { | 21 | if (state.sidebar.opened) { |
| 21 | //Cookies.set('sidebarStatus', 1) | 22 | //Cookies.set('sidebarStatus', 1) |
| 22 | - localStorage.setItem('sidebarStatus', 1) | 23 | + localStorage.setItem("sidebarStatus", 1); |
| 23 | } else { | 24 | } else { |
| 24 | // Cookies.set('sidebarStatus', 0) | 25 | // Cookies.set('sidebarStatus', 0) |
| 25 | - localStorage.setItem('sidebarStatus', 0) | 26 | + localStorage.setItem("sidebarStatus", 0); |
| 26 | } | 27 | } |
| 27 | }, | 28 | }, |
| 28 | CLOSE_SIDEBAR: (state, withoutAnimation) => { | 29 | CLOSE_SIDEBAR: (state, withoutAnimation) => { |
| 29 | //Cookies.set('sidebarStatus', 0) | 30 | //Cookies.set('sidebarStatus', 0) |
| 30 | - localStorage.setItem('sidebarStatus', 0) | 31 | + localStorage.setItem("sidebarStatus", 0); |
| 31 | - state.sidebar.opened = false | 32 | + state.sidebar.opened = false; |
| 32 | - state.sidebar.withoutAnimation = withoutAnimation | 33 | + state.sidebar.withoutAnimation = withoutAnimation; |
| 33 | }, | 34 | }, |
| 34 | TOGGLE_DEVICE: (state, device) => { | 35 | TOGGLE_DEVICE: (state, device) => { |
| 35 | - state.device = device | 36 | + state.device = device; |
| 36 | }, | 37 | }, |
| 37 | SET_SIZE: (state, size) => { | 38 | SET_SIZE: (state, size) => { |
| 38 | - state.size = size | 39 | + state.size = size; |
| 39 | //Cookies.set('size', size) | 40 | //Cookies.set('size', size) |
| 40 | - localStorage.setItem('size', size) | 41 | + localStorage.setItem("size", size); |
| 42 | + }, | ||
| 43 | + SET_APPHEADERBLOCKCH: (state, height) => { | ||
| 44 | + state.headerBlockClientHeight = height; | ||
| 41 | }, | 45 | }, |
| 42 | SET_APPMAINBLOCKCH: (state, height) => { | 46 | SET_APPMAINBLOCKCH: (state, height) => { |
| 43 | state.appMainBlockClientHeight = height; | 47 | state.appMainBlockClientHeight = height; |
| 44 | }, | 48 | }, |
| 45 | - | 49 | +}; |
| 46 | -} | ||
| 47 | 50 | ||
| 48 | const actions = { | 51 | const actions = { |
| 49 | toggleSideBar({ commit }) { | 52 | toggleSideBar({ commit }) { |
| ... | @@ -58,6 +61,9 @@ const actions = { | ... | @@ -58,6 +61,9 @@ const actions = { |
| 58 | setSize({ commit }, size) { | 61 | setSize({ commit }, size) { |
| 59 | commit("SET_SIZE", size); | 62 | commit("SET_SIZE", size); |
| 60 | }, | 63 | }, |
| 64 | + setAppHeaderBlockCH({ commit }, height) { | ||
| 65 | + commit("SET_APPHEADERBLOCKCH", height); | ||
| 66 | + }, | ||
| 61 | setAppMainBlockCH({ commit }, height) { | 67 | setAppMainBlockCH({ commit }, height) { |
| 62 | commit("SET_APPMAINBLOCKCH", height); | 68 | commit("SET_APPMAINBLOCKCH", height); |
| 63 | }, | 69 | }, | ... | ... |
| ... | @@ -424,21 +424,12 @@ export function restTableHeight($refs) { | ... | @@ -424,21 +424,12 @@ export function restTableHeight($refs) { |
| 424 | if (key == "ylTable") { | 424 | if (key == "ylTable") { |
| 425 | $refs[key].$children.map((item) => { | 425 | $refs[key].$children.map((item) => { |
| 426 | if (item.$el.id == "group-btn") { | 426 | if (item.$el.id == "group-btn") { |
| 427 | - // console.log("group-btn:", getPropertyValue(item.$el)); | ||
| 428 | // table表格组合按钮 | 427 | // table表格组合按钮 |
| 429 | heigth += getPropertyValue(item.$el); | 428 | heigth += getPropertyValue(item.$el); |
| 430 | heigth += item.$el.clientHeight; | 429 | heigth += item.$el.clientHeight; |
| 431 | } else if (item.$el.className == "el-pagination is-background") { | 430 | } else if (item.$el.className == "el-pagination is-background") { |
| 432 | // table表格组合分页 | 431 | // table表格组合分页 |
| 433 | if (item.$el.offsetParent.className == "pagination-container") { | 432 | if (item.$el.offsetParent.className == "pagination-container") { |
| 434 | - // console.log( | ||
| 435 | - // "pagination:", | ||
| 436 | - // getPropertyValue(item.$el.offsetParent) | ||
| 437 | - // ); | ||
| 438 | - // console.log( | ||
| 439 | - // "paginationClientHeight:", | ||
| 440 | - // getPropertyValue(item.$el.offsetParent.clientHeight) | ||
| 441 | - // ); | ||
| 442 | heigth += getPropertyValue(item.$el.offsetParent); | 433 | heigth += getPropertyValue(item.$el.offsetParent); |
| 443 | heigth += item.$el.offsetParent.clientHeight; | 434 | heigth += item.$el.offsetParent.clientHeight; |
| 444 | } | 435 | } |
| ... | @@ -448,22 +439,14 @@ export function restTableHeight($refs) { | ... | @@ -448,22 +439,14 @@ export function restTableHeight($refs) { |
| 448 | if ($refs[key].hasOwnProperty("$el")) { | 439 | if ($refs[key].hasOwnProperty("$el")) { |
| 449 | heigth += $refs[key].$el.clientHeight; | 440 | heigth += $refs[key].$el.clientHeight; |
| 450 | heigth += getPropertyValue($refs[key].$el); | 441 | heigth += getPropertyValue($refs[key].$el); |
| 451 | - // console.log( | ||
| 452 | - // "ruleForm:", | ||
| 453 | - // $refs[key].$el.clientHeight, | ||
| 454 | - // getPropertyValue($refs[key].$el) | ||
| 455 | - // ); | ||
| 456 | } else { | 442 | } else { |
| 457 | - // console.log("ruleForm:", $refs[key]); | ||
| 458 | heigth += $refs[key].$el.clientHeight; | 443 | heigth += $refs[key].$el.clientHeight; |
| 459 | heigth += getPropertyValue($refs[key]); | 444 | heigth += getPropertyValue($refs[key]); |
| 460 | } | 445 | } |
| 461 | } | 446 | } |
| 462 | } else if (key == "formHeaderRef") { | 447 | } else if (key == "formHeaderRef") { |
| 463 | - // console.log("formHeaderRef:", getPropertyValue($refs[key])); | ||
| 464 | heigth += getPropertyValue($refs[key]); | 448 | heigth += getPropertyValue($refs[key]); |
| 465 | } | 449 | } |
| 466 | }); | 450 | }); |
| 467 | - // console.log("heigth:", heigth); | ||
| 468 | return heigth; | 451 | return heigth; |
| 469 | } | 452 | } | ... | ... |
| ... | @@ -33,6 +33,7 @@ import YlTable from "@/components/YlTable"; | ... | @@ -33,6 +33,7 @@ import YlTable from "@/components/YlTable"; |
| 33 | import { formConfig } from "./formConfig"; | 33 | import { formConfig } from "./formConfig"; |
| 34 | import { tableAttr, columnHeader } from "./tableConfig"; | 34 | import { tableAttr, columnHeader } from "./tableConfig"; |
| 35 | import { restTableHeight, sortList } from "@/utils"; | 35 | import { restTableHeight, sortList } from "@/utils"; |
| 36 | +import store from '@/store' | ||
| 36 | import { | 37 | import { |
| 37 | findAllEtesRules, // ET86查询 | 38 | findAllEtesRules, // ET86查询 |
| 38 | deleteEtesRuleById, // 删除 | 39 | deleteEtesRuleById, // 删除 |
| ... | @@ -74,6 +75,7 @@ export default { | ... | @@ -74,6 +75,7 @@ export default { |
| 74 | this.tableAttr.maxHeight = | 75 | this.tableAttr.maxHeight = |
| 75 | window.innerHeight - restTableHeight(this.$refs); | 76 | window.innerHeight - restTableHeight(this.$refs); |
| 76 | }); | 77 | }); |
| 78 | + console.log(store.getters.appHeaderBlockClientHeight) | ||
| 77 | }, | 79 | }, |
| 78 | methods: { | 80 | methods: { |
| 79 | // ET86查询 | 81 | // ET86查询 |
| ... | @@ -100,11 +102,6 @@ export default { | ... | @@ -100,11 +102,6 @@ export default { |
| 100 | if (code == 200) { | 102 | if (code == 200) { |
| 101 | const valid = data.list.filter((item) => item.status == "1"); // 有效 | 103 | const valid = data.list.filter((item) => item.status == "1"); // 有效 |
| 102 | const invalid = data.list.filter((item) => item.status == "0"); // 无效 | 104 | const invalid = data.list.filter((item) => item.status == "0"); // 无效 |
| 103 | - // valid.reverse(); // 有效航班修改时间排序 | ||
| 104 | - // invalid.reverse(); // | ||
| 105 | - // const newValid = sortList(valid, "originOfFlightNo"); // 有效原航班按字母排序 | ||
| 106 | - // const newInvalid = sortList(invalid, "originOfFlightNo"); | ||
| 107 | - // this.tableData = newValid.concat(newInvalid); | ||
| 108 | this.tableData = valid.concat(invalid); | 105 | this.tableData = valid.concat(invalid); |
| 109 | this.pageConfig.total = data.total; | 106 | this.pageConfig.total = data.total; |
| 110 | } | 107 | } | ... | ... |
| ... | @@ -324,7 +324,7 @@ export default { | ... | @@ -324,7 +324,7 @@ export default { |
| 324 | queryRoute(obj).then(res => { | 324 | queryRoute(obj).then(res => { |
| 325 | if (res.code === 200) { | 325 | if (res.code === 200) { |
| 326 | res.data.list.map(item=>{ | 326 | res.data.list.map(item=>{ |
| 327 | - if(item.isEtesRoute == "N"){ | 327 | + if(item.isEtesRoute == "N" || item.isEtesRoute == null){ |
| 328 | item.isEtesRoute = false; | 328 | item.isEtesRoute = false; |
| 329 | }else{ | 329 | }else{ |
| 330 | item.isEtesRoute = true; | 330 | item.isEtesRoute = true; | ... | ... |
-
Please register or login to post a comment