提交 7d235dd2 编写于 作者: huangwensu's avatar huangwensu

添加自适应高度

上级 8a2481c3
......@@ -125,7 +125,7 @@ html,body{
.screenSet{
// width: 163vh !important;
// height: 66vh !important;
height: 430px !important;
// height: 430px !important;
margin: 88px 30px 0px;
overflow: auto;
}
......@@ -134,7 +134,7 @@ html,body{
.screenSet{
// width: 166vh !important;
// height: 78vh !important;
height: 800px !important;
// height: 800px !important;
overflow: auto;
margin: 88px 30px 0px;
}
......
......@@ -36,7 +36,7 @@ service.interceptors.response.use(
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
*/
if (res.code !== '000000' && response.respCode === 200) {
if (res.code !== '000000') {
return Promise.reject('error')
} else {
return response.data
......
......@@ -12,8 +12,8 @@ module.exports = {
// this.token = this.getUrlSearch(location.href, 'token') || (query && query.token) || null
// this.token = this.getUrlKey('token') || (query && query.token) || null
},
mounted() {
mounted: function() {
},
methods: {
getUrlPara(obj) {
......
......@@ -4,6 +4,20 @@ export const containObject = function(...obj1) {
let obj = Object.assign(...obj1)
return obj
}
// 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
}
}
function p_getElm(elmId){
return document.getElementById(elmId)
}
//共通函数
Array.prototype.contains = function (obj) {
if (this.length > 0) {
......
<template>
<div class="blank-wrap screenSet">
<div id="screenSet" class="blank-wrap screenSet">
<div class="blank-content">
<img src="../assets/image/no-content.png"/>
<p>很抱歉,您暂时还没开通工作站功能</p>
......@@ -7,8 +7,17 @@
</div>
</template>
<script>
import * as commonUtil from '../utils/utils'
export default {
data() {
return {
}
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight(100)
}
}
</script>
<style lang="scss">
......
......@@ -6,7 +6,7 @@
:curmbThird="curmbThird"
:jumPathThird="jumPathThird">
</bread-crumb>
<div class="create-content screenSet">
<div class="create-content screenSet" id="screenSet">
<div class="step-content">
<el-steps :active="stepNum" simple>
<span class="step-one" :class="stepNum == 1 ? 'class-1' : 'class-2'">1</span>
......@@ -287,15 +287,11 @@ import BreadCrumb from '../../components/breadcrumb.vue'
import { doUpload, getFilePath } from "../../utils/qiniu-util"
import { validateWord150 } from "../../utils/validate.js"
import { mapGetters } from 'vuex'
import { openLoading, closeLoading, isNotEmptyUtils, isEmptyList } from '../../utils/utils';
import { openLoading, closeLoading, isNotEmptyUtils, isEmptyList } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
// 判断组件是否重名
let validateRepeatWord = function(rule, value, callback, message) {
// const reg = /^[\u4e00-\u9fa5]{2,20}$/
// if(!reg.test(value)) {
// callback(new Error(message))
// return
// }
let req = {
token: vm._token,
name: value,
......@@ -468,6 +464,10 @@ export default {
vm.conditionAnd = vm.resultFlag == 1 && vm.componentStatus != 3 && vm.componentStatus != 4
}
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 根据ID查询组件基本信息
componentBasicInfo() {
......
......@@ -4,7 +4,7 @@
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<div class="component-content screenSet">
<div class="component-content screenSet" id="screenSet">
<div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
......@@ -81,7 +81,8 @@ import BreadCrumb from '../../components/breadcrumb.vue'
import { doUpload, getFilePath } from "../../utils/qiniu-util"
import { validateWord } from "../../utils/validate.js"
import { mapGetters } from 'vuex'
import { openLoading, closeLoading } from '../../utils/utils';
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
export default {
components: {
......@@ -141,6 +142,10 @@ export default {
vm = this
vm.search()
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 列表查询
search() {
......
......@@ -19,7 +19,7 @@
</el-table>
</div>
</el-col>
<el-col class="message screenSet" :span="24">
<el-col class="message screenSet" :span="24" id="screenSet">
<div class="message-title">系统消息 <span>今日消息:{{count}}</span></div>
<div class="message-info" v-if="messageList.length > 0">
<div class="message-item" v-for="(item,index) in messageList" :key="index">
......@@ -47,6 +47,7 @@
import BreadCrumb from '../components/breadcrumb.vue'
import { setTimeout, setInterval } from 'timers'
import { mapGetters } from 'vuex'
import * as commonUtil from '../utils/utils'
let vm = null
export default {
components: {
......@@ -71,6 +72,10 @@ export default {
'_token'
])
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 查看更多
lookMore() {
......
<template>
<div class="slidebar-container">
<div id="slidebar-container" class="slidebar-container">
<el-menu :default-active="onRoutes" class="el-menu-vertical-demo" theme="dark" unique-opened router>
<template v-for="(item,_index) in items">
<template v-if="item.subs">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册