Browse Source

Merge branch 'master' into bfmanage

haojianlong 5 years ago
parent
commit
00eb959d1d

+ 4 - 4
src/components/ledger/handsontables/assets.vue

@@ -249,10 +249,6 @@ export default {
           })
           this.copyMain = tools.deepCopy(this.tableData)
           this.page.total = res.Total
-          if (this.hot) {
-            this.hot.destroy()
-            this.hot = null
-          }
           if (this.tableData && this.tableData.length) {
             // if (this.onlyRead) {
             //   this.getBatch(this.tableData)
@@ -484,6 +480,10 @@ export default {
     initTable() {
       var container = document.getElementById("handsontable");
       let winHeight = document.documentElement.clientHeight;
+      if (this.hot) {
+        this.hot.destroy();
+        this.hot = null;
+      }
       this.hot = new Handsontable(container, {
         data: this.tableData,
         fixedColumnsLeft: 4,

+ 5 - 17
src/components/ledger/handsontables/device.vue

@@ -246,10 +246,6 @@ export default {
           this.tableData = res.Content;
           this.copyMain = tools.deepCopy(this.tableData);
           this.page.total = res.Total;
-          if (this.hot) {
-            this.hot.destroy();
-            this.hot = null;
-          }
           if (this.tableData && this.tableData.length) {
             if (this.onlyRead) {
               this.getBatch(this.tableData)
@@ -425,6 +421,10 @@ export default {
     initTable() {
       var container = document.getElementById("handsontable");
       let winHeight = document.documentElement.clientHeight;
+      if (this.hot) {
+        this.hot.destroy();
+        this.hot = null;
+      }
       this.hot = new Handsontable(container, {
         data: this.tableData,
         fixedColumnsLeft: 6,
@@ -457,8 +457,7 @@ export default {
         afterChange: this.handleUpdataTable, //修改后
         afterFilter: this.trimmedRows, //排序前
         afterRemoveRow: this.handleDeleteTableRow, //右键删除
-        afterOnCellMouseDown: this.eventClick, //鼠标点击
-        // beforeColumnSort: this.sort
+        afterOnCellMouseDown: this.eventClick //鼠标点击
       });
       let pro = document.getElementById("hot-display-license-info");
       if (!!pro) {
@@ -466,17 +465,6 @@ export default {
       }
       this.isLoading = false;
     },
-    // sort(currentSortConfig, destinationSortConfigs){
-    //   const columnSortPlugin = this.hot.getPlugin('columnSorting');
-    //   debugger
-    //   columnSortPlugin.setSortConfig(destinationSortConfigs);
-    //   debugger
-    //   // const newData = ... // Calculated data set, ie. from an AJAX call.
-
-    //   // this.loadData(newData);
-
-    //   return false; // The blockade for the default sort action.
-    // },
     //表格中的点击
     eventClick(el, rowArr) {
       //点击的是表头

+ 4 - 4
src/components/ledger/handsontables/system.vue

@@ -195,10 +195,6 @@ export default {
           _this.tableData = res.Content;
           _this.copyMain = tools.deepCopy(res.Content);
           _this.page.total = res.Total;
-          if (_this.hot) {
-            _this.hot.destroy();
-            _this.hot = null;
-          }
           if (res.Content && res.Content.length) {
             if (this.onlyRead) {
               this.getBatch(res.Content)
@@ -332,6 +328,10 @@ export default {
     initTable() {
       var container = document.getElementById("handsontable");
       let winHeight = document.documentElement.clientHeight;
+      if (this.hot) {
+        this.hot.destroy();
+        this.hot = null;
+      }
       this.hot = new Handsontable(container, {
         data: this.tableData,
         fixedColumnsLeft: 4,

+ 0 - 6
src/framework/layout/PageSidebar.vue

@@ -88,10 +88,4 @@ export default {
     components: {}
 }
 </script>
-<style>
-.page-sidebar-wrapper .el-menu-item, .el-submenu__title {
-    height: 40px;
-    line-height: 40px;
-}
-</style>
 

+ 4 - 0
src/framework/style/theme.scss

@@ -44,12 +44,16 @@ $pageHeaderBackground: #2b3643;
                         color: $colorWhite !important;
                     }
                     .el-submenu__title {
+                        height: 40px;
+                        line-height: 40px;
                         &:hover {
                             background: #000;
                         }
                     }
                 }
                 .sidebar-menu-item.el-menu-item {
+                    height: 40px;
+                    line-height: 40px;
                     &:hover {
                         background: #000;
                     }

+ 2 - 2
src/utils/handsontable/notShow.js

@@ -1017,7 +1017,7 @@ const showTools = {
             }
         }
 
-        if (item.InputMode == "D1" || item.InputMode == "E1") { //单选输入
+        if (item.InputMode == "D1" || item.InputMode == "E1" || item.InputMode == "D1L") { //单选输入
             return {
                 data: item.Path,
                 renderer: tools.customDropdownRenderer,
@@ -1128,7 +1128,7 @@ const showTools = {
             }
         }
 
-        if (item.InputMode == "D1" || item.InputMode == "E1") { //单选输入
+        if (item.InputMode == "D1" || item.InputMode == "E1" || item.InputMode == "D1L") { //单选输入
             return {
                 data: item.Path,
                 renderer: tools.customDropdownRenderer,