Forráskód Böngészése

修改大屏弹窗高度

xzxwsk 3 hónapja
szülő
commit
fae237e936

+ 7 - 4
projects/src/main/webapp/asset/css/style_new.css

@@ -163,11 +163,11 @@
 
 .class_ls { padding: 10px 20px; background: #fff; }
 .class_ls .juli { display: inline-block; margin-bottom: 5px; padding: 5px 10px; color: #314b69; background: #f1fbf8; border-radius: 5px; }
-.class_ls .lanse-first { color: #02b77e;font-family: "Times New Roman", Times, serif; }
-.class_ls .second_line .lanse-first { color: #E156A2;font-family: "Times New Roman", Times, serif; }
-.new-roman{font-family: "Times New Roman", Times, serif;}
+.class_ls .lanse-first { color: #02b77e; font-family: "Times New Roman", Times, serif; }
+.class_ls .second_line .lanse-first { color: #E156A2; font-family: "Times New Roman", Times, serif; }
+.class_ls .new-roman { font-family: "Times New Roman", Times, serif; }
 
-.export { display: block; position: relative; top: 0; right: auto; margin: 0 0 10px; padding: 0px 7px 0px 15px; height: 32px; line-height: 32px; overflow: hidden; border-radius: 4px; background-color: #007EFF; }
+.export { display: block; position: relative; top: 0; right: auto; margin: 5px 0; padding: 0px 7px 0px 15px; height: 32px; line-height: 32px; overflow: hidden; border-radius: 4px; background-color: #007EFF; }
 .export img { margin-right: 3px; filter: drop-shadow(#fff 100px 0); transform: translateX(-100px); }
 
 .export-item > button { cursor: pointer; }
@@ -208,4 +208,7 @@
 .tab-group .btn.active { font-weight: bold; color: #007EFF; background: linear-gradient(180deg, #BFDDFF 0%, #FFFFFF 100%); border: none; }
 .tab-group .layui-btn-normal { margin: 5px 5px 0 0; padding: 3px 10px; background: #007EFF; color: #fff; border-radius: 5px; line-height: 24px; height: auto; }
 
+.is-full { overflow: hidden; }
+.is-full .layui-layer-content { height: calc(100% - 50px) !important; }
+
 /*# sourceMappingURL=style_new.css.map */

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
projects/src/main/webapp/asset/css/style_new.css.map


+ 27 - 0
projects/src/main/webapp/asset/js/debounce.js

@@ -0,0 +1,27 @@
+let timeout = null
+
+/**
+ * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
+ *
+ * @param {Function} func 要执行的回调函数
+ * @param {Number} wait 延时的时间
+ * @param {Boolean} immediate 是否立即执行
+ * @return null
+ */
+function debounce(func, wait = 500, immediate = false) {
+    // 清除定时器
+    if (timeout !== null) clearTimeout(timeout)
+    // 立即执行,此类情况一般用不到
+    if (immediate) {
+        const callNow = !timeout
+        timeout = setTimeout(() => {
+            timeout = null
+        }, wait)
+        if (callNow) typeof func === 'function' && func()
+    } else {
+        // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
+        timeout = setTimeout(() => {
+            typeof func === 'function' && func()
+        }, wait)
+    }
+}

+ 1 - 1
projects/src/main/webapp/asset/js/index.js

@@ -71,7 +71,7 @@ const eventNameMap = {
 };
 
 // eslint-disable-next-line import/no-mutable-exports
-let screenfull = {
+var screenfull = {
   // eslint-disable-next-line default-param-last
   request(element = document.documentElement, options) {
     return new Promise((resolve, reject) => {

+ 8 - 1
projects/src/main/webapp/asset/sass/style_new.scss

@@ -733,7 +733,7 @@
   position: relative;
   top: 0;
   right: auto;
-  margin: 0 0 10px;
+  margin: 5px 0;
   padding: 0px 7px 0px 15px;
   height: 32px;
   line-height: 32px;
@@ -876,3 +876,10 @@
     height: auto;
   }
 }
+
+.is-full {
+  overflow: hidden;
+  .layui-layer-content {
+    height: calc(100% - 50px) !important;
+  }
+}

+ 2 - 2
projects/src/main/webapp/vmodules/statics/analysisScreen_four.jsp

@@ -633,7 +633,7 @@
         var opt = {
             title: "项目台账",
             width: window.screen.availWidth - (flag ? 0 : 200),
-            height: window.screen.availHeight - (flag ? 95 : 180),
+            height: window.screen.availHeight - (flag ? 95 : -35),
             content: App.getUrl(projTz),
             maxmin: false,
             skin: "bigScreenDialog",
@@ -993,7 +993,7 @@
         // 点击把整体全屏
         // 获取按钮元素
         const fullscreenButton = document.getElementById('fullscreenButton');
-        const fullscreenElement = document.getElementById('fullscreenElement');
+        const fullscreenElement = document.body;
 
         console.log(fullscreenButton, fullscreenElement)
         // 处理按钮点击事件,切换全屏与取消全屏

+ 2 - 1
projects/src/main/webapp/vmodules/statics/layer/projInfo_new.jsp

@@ -436,6 +436,7 @@
                         ]]
                         break;
                 }
+                const screenfull = window.parent.screenfull
                 layui.table.render({
                     elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
                     even: true,
@@ -446,7 +447,7 @@
                     cols: columns,
                     data: self.dataList,
                     fixed: true,
-                    height: window.screen.availHeight - 260,
+                    height: window.screen.availHeight - (screenfull?.isFullscreen ? 130 : 260),
                     done: function (res, curr, count) {
                         res.data.forEach(function (item, index) {
                             if (index % 2 == 0) {

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott