From d33eacc1f85ac3a736b33ba4713a19aae466d711 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 05 八月 2022 16:42:53 +0800
Subject: [PATCH] 1.做适应平板显示的内容大小
---
src/views/jcsz/jsqd.vue | 37 +++++++++++++++++++++++--------------
1 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index dec57fa..206278f 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -56,7 +56,7 @@
border
stripe
:height="tableHeight+'px'"
- :style="{width: 100+'%',height:tableHeight+'px'}"
+ :style="{width: 100+'%',height: tableHeight+'px'}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -134,6 +134,7 @@
<el-table-column
label="鎿嶄綔"
fixed="right"
+ width="120"
>
<template slot-scope="{row}">
<div class="operationClass">
@@ -287,10 +288,10 @@
<el-dialog
title="瑙掕壊鍏宠仈鐢ㄦ埛"
:visible.sync="userDialogVisible"
- width="1500px"
+ width="900px"
:close-on-click-modal="false"
top="15vh"
- :fullscreen="isFullscreen"
+ :fullscreen="isIpad"
class="userDialogVisible"
@closed="handleCloseUser"
@close="handleCloseUser"
@@ -305,10 +306,16 @@
<div style="display: flex;min-height: 50px">
<el-form ref="dialogFormUser" inline :model="dialogFormUser" label-width="80px">
<el-form-item label="鐢ㄦ埛缂栫爜">
- <el-input v-model="dialogFormUser.usercode" style="width: 200px" />
+ <el-input
+ v-model="dialogFormUser.usercode"
+ :style="{width:isIpad? '180px':'200px'}"
+ />
</el-form-item>
<el-form-item label="鐢ㄦ埛鍚嶇О">
- <el-input v-model="dialogFormUser.username" style="width: 200px" />
+ <el-input
+ v-model="dialogFormUser.username"
+ :style="{width:isIpad? '180px':'200px'}"
+ />
</el-form-item>
<el-form-item label="鎵�灞炵粍缁�">
<el-cascader
@@ -319,7 +326,7 @@
:append-to-body="false"
:options="StuOrgArr"
:props="defaultProps"
- style="width: 200px;"
+ :style="{width:isIpad? '180px':'200px'}"
@change="dialogCascaderChange"
/>
@@ -330,7 +337,7 @@
v-model="dialogFormUser.isrole"
filterable
:popper-append-to-body="false"
- style="width: 200px"
+ :style="{width:isIpad? '180px':'200px'}"
placeholder="璇烽�夋嫨"
>
<el-option
@@ -362,7 +369,7 @@
:data="dialogFormUserTable"
border
highlight-current-row
- height="300"
+ height="370"
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
:row-key="getRowKey"
@@ -433,7 +440,7 @@
:visible.sync="dialogVisibleRight"
width="800px"
top="15vh"
- :fullscreen="isFullscreen"
+ :fullscreen="isIpad"
:close-on-click-modal="false"
class="dialogVisibleRight"
@closed="handleCloseRight"
@@ -544,7 +551,7 @@
}
}
return {
- isFullscreen: false,
+ isIpad: false,
mainHeight: 0,
tableHeight: 0,
form: {
@@ -813,11 +820,13 @@
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
- console.log(window.innerHeight)
- console.log(window.innerHeight)
this.mainHeight = window.innerHeight - 250
- this.tableHeight = this.mainHeight - 100
- // this.isFullscreen = window.innerHeight < 800
+ this.tableHeight = this.mainHeight - 50
+ if (window.innerHeight < 769) {
+ this.tableHeight = this.tableHeight - 50
+ }
+
+ this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
})
},
/* 璁剧疆妯″潡*/
--
Gitblit v1.9.3