Explorar o código

Merge remote-tracking branch 'origin/master' into dev

GouGengquan hai 4 meses
pai
achega
8e9b0c16ac

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 69 - 0
src/directives/zoomMax.js


+ 5 - 0
src/main.js

@@ -20,6 +20,8 @@ import 'vxe-table/lib/style.css'
 import VxeUIPluginRenderElement from '@vxe-ui/plugin-render-element'
 import '@vxe-ui/plugin-render-element/dist/style.css'
 
+import useMaxWindowDirective from '@/directives/zoomMax';
+
 const pinia = createPinia()
 // pinia数据持久化
 pinia.use(piniaPluginPersistedstate)
@@ -36,4 +38,7 @@ app.use(ElementPlus, {
 // 加载VxeUITable对element-plus的兼容插件
 VxeUI.use(VxeUIPluginRenderElement)
 
+// 注册自定义指令
+app.directive('maxWindow', useMaxWindowDirective);
+
 app.use(VxeUI).use(VxeUITable).use(router).use(pinia).mount('#app')

+ 8 - 66
src/views/assets/workbench/eqpt/calculate/importInfo.vue

@@ -48,7 +48,7 @@
         <el-descriptions-item label="评估净值(元)">{{ evaluateNetValueTotal.toFixed(0) }}</el-descriptions-item>
       </el-descriptions>
     </div>
-    <div id="evaluateDiv" class="evaluateDiv">
+    <div id="evaluateDiv" class="evaluateDiv" v-maxWindow>
       <el-button v-if="activeName === 'all'" type="success" style="float:left" @click="saveBatch()">
         <el-icon>
           <DocumentChecked />
@@ -74,10 +74,6 @@
           <Edit />
         </el-icon>批量赋值
       </el-button>
-      <el-button type="primary" style="float:right" @click="fullScreen()">
-        <span v-if="!fullBoolean">全屏</span>
-        <span v-if="fullBoolean">取消</span>
-      </el-button>
       <div class="search">
         <el-input type="number" v-model="eqptDataQuery.sortId" placeholder="请输入序号" clearable style="width: 200px;" />
         <el-input v-model="eqptDataQuery.equipmentName" placeholder="请输入设备名称" clearable style="width: 200px;margin-left: 10px;" />
@@ -93,9 +89,9 @@
         </el-button>
       </div>
       <div>
-        <vxe-toolbar v-show="activeName === 'all'" ref="toolAllTableRef" custom style="padding: 0px;"></vxe-toolbar>
-        <vxe-toolbar v-show="activeName === 'imported'" ref="toolImportedTableRef" custom style="padding: 0px;"></vxe-toolbar>
-        <vxe-toolbar v-show="activeName === 'nonStandard'" ref="toolNonStandardTableRef" custom style="padding: 0px;"></vxe-toolbar>
+        <vxe-toolbar v-show="activeName === 'all'" ref="toolAllTableRef" custom style="padding: 0px;margin-right: 30px"></vxe-toolbar>
+        <vxe-toolbar v-show="activeName === 'imported'" ref="toolImportedTableRef" custom style="padding: 0px;margin-right: 30px"></vxe-toolbar>
+        <vxe-toolbar v-show="activeName === 'nonStandard'" ref="toolNonStandardTableRef" custom style="padding: 0px;margin-right: 30px"></vxe-toolbar>
       </div>
       <vxe-table
         style="margin-top:8px"
@@ -2172,62 +2168,7 @@ export default {
         }
       })
       }
-    },
-    fullScreen() {
-      if(!this.fullBoolean){
-          //如果未全屏,则开启全屏
-          this.fullBoolean = true
-          //获取需要全屏的元素
-          let full = document.getElementById('evaluateDiv')
-          // 加上内边距以免组件贴边
-          full.style.padding = '10px';
-          //开启全屏方法
-          this.toFullscreen(full)
-          //分辨率调整后,重新初始化方法
-          this.init();
-      }else{
-          //如果已全屏,则退出全屏
-          this.fullBoolean = false
-          let full = document.getElementById('evaluateDiv')
-          // 去掉内边距
-          full.style.padding = '0px';
-          //退出全屏方法
-          this.cancelFullscreen()
-          //分辨率调整后,重新初始化方法
-          this.init();
-      }
-    },      
-    //全屏方法
-    toFullscreen(element) {
-        //全屏
-        if (element.requestFullscreen) {
-            element.requestFullscreen()
-        } 
-        //兼容Firefox全屏
-        else if (element.mozRequestFullScreen) {
-            element.mozRequestFullScreen()
-        } 
-        //兼容Chrome Safari Opera全屏
-        else if (element.webkitRequestFullscreen) {
-            element.webkitRequestFullscreen()
-        } 
-        //兼容IE Edge全屏
-        else if (element.msRequestFullscreen) {
-            element.msRequestFullscreen()
-        }
-    }, 
-    //退出全屏
-    cancelFullscreen() {
-        if (document.exitFullscreen) {
-            document.exitFullscreen()
-        } else if (document.mozCancelFullScreen) {
-            document.mozCancelFullScreen()
-        } else if (document.webkitCancelFullScreen) {
-            document.webkitCancelFullScreen()
-        } else if (document.msExitFullscreen) {
-            document.msExitFullscreen()
-        }
-    },
+    }
   },
 }
 </script>
@@ -2267,7 +2208,7 @@ export default {
 }
 
 .uploadDiv {
-  margin-top: 8px;
+  margin-top: 13px;
   width: 15%;
   display: inline-block;
   vertical-align: top;
@@ -2275,7 +2216,8 @@ export default {
 
 .evaluateDiv {
   background-color: white;
-  margin-left: 10px;
+  margin: 5px;
+  margin-bottom: 0px;
   width: 84%;
   display: inline-block;
   vertical-align: top;