Browse Source

添加台账行数输入框宽度修改

zhangyu 5 years ago
parent
commit
c1f0c88a13

+ 1 - 1
src/components/business_space/dialogs/addDialog/businessDialog.vue

@@ -34,7 +34,7 @@
               <el-input
                 v-model="addNum"
                 placeholder="增加个数"
-                style="width:90px;float:right;"
+                style="width:50px;float:right;"
                 size="small"
               ></el-input>
             </div>

+ 1 - 1
src/components/dialogs/addDialog/businessDialog.vue

@@ -34,7 +34,7 @@
               <el-input
                 v-model="addNum"
                 placeholder="增加个数"
-                style="width:90px;float:right;"
+                style="width:50px;float:right;"
                 size="small"
               ></el-input>
             </div>

+ 1 - 1
src/components/dialogs/addDialog/dialogAssets.vue

@@ -21,7 +21,7 @@
               <span>当前选择的设备族:{{deviceType.facility}}</span>
               <div style="width:350px;float:right;overflow:hidden;">
                 <span>增加</span>
-                <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
+                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
               </div>

+ 1 - 1
src/components/dialogs/addDialog/dialogDevice.vue

@@ -30,7 +30,7 @@
               <!-- 增加 -->
               <div style="float:right;overflow:hidden;">
                 <span>增加</span>
-                <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
+                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
               </div>

+ 1 - 1
src/components/dialogs/addDialog/dialogSystem.vue

@@ -22,7 +22,7 @@
               <span>当前选择的设备族:{{deviceType.facility}}</span>
               <div style="width:500px;float:right;overflow:hidden;">
                 <span>增加</span>
-                <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
+                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
                 <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>

+ 1 - 1
src/components/ledger/addDialog/dialogAssets.vue

@@ -23,7 +23,7 @@
               <span>当前选择的设备族:{{deviceType.facility}}</span>
               <div style="float:right;overflow:hidden;">
                 <span>增加</span>
-                <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
+                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
               </div>

+ 1 - 1
src/components/ledger/addDialog/dialogDevice.vue

@@ -28,7 +28,7 @@
               <!-- 增加 -->
               <div style="width:360px;float:right;overflow:hidden;">
                 <span>增加</span>
-                <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
+                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
               </div>

+ 1 - 1
src/components/ledger/addDialog/dialogSystem.vue

@@ -24,7 +24,7 @@
               <span>当前选择的设备族:{{deviceType.facility}}</span>
               <div style="width:500px;float:right;overflow:hidden;">
                 <span>增加</span>
-                <el-input v-model="addNum" style="width:40px;" placeholder="增加个数" size="small"></el-input>
+                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
                 <span>个{{deviceType.facility}}</span>
                 <el-button size="small" @click="addMain">增加</el-button>
                 <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>

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

@@ -99,7 +99,6 @@ import zhCN from 'handsontable-pro/languages/zh-CN'
 // import "@/assets/js/chosen.jquery.min";
 // import "@/assets/js/handsontable-chosen-editor";
 
-
 export default {
   components: {
     qrcode, //二维码页面
@@ -795,6 +794,7 @@ export default {
     },
     //获取被筛选掉的行号
     trimmedRows() {
+      debugger
       var plugin = this.hot.getPlugin("trimRows").trimmedRows;
       let dataLength = this.tableData.length;
       let dataArr = new Array();

+ 36 - 25
src/components/ledger/handsontables/device.vue

@@ -104,16 +104,16 @@ import systemType from "@/components/dialogs/list/systemType"
 import myPagination from "@/components/ledger/lib/myPagination";
 import detailsDialog from "@/components/ledger/lib/detailsDia"
 import changeRea from "@/components/dialogs/changeRea"
+import { mapGetters, mapActions } from "vuex";
 //图片查看
 import lookPic from "@/components/ledger/lib/lookImages"
-//下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
-import { mapGetters, mapActions } from "vuex";
-
 import Handsontable from "handsontable-pro"
 import 'handsontable-pro/dist/handsontable.full.css'
 import zhCN from 'handsontable-pro/languages/zh-CN';
+//下拉插件
+// import "@/assets/js/chosen.jquery.min";
+// import "@/assets/js/handsontable-chosen-editor";
+
 export default {
   props: ["myParam"],
   components: {
@@ -134,6 +134,15 @@ export default {
     lookPic,
     myCascader
   },
+  created() { },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+    showTypes() {
+      return this.onlyRead ?
+        [{ value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }] :
+        [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }]
+    }
+  },
   data() {
     return {
       options: [{
@@ -189,15 +198,6 @@ export default {
       addData: {}, //添加设备选择的设备类型
     };
   },
-  created() { },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-    showTypes() {
-      return this.onlyRead ?
-        [{ value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }] :
-        [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }]
-    }
-  },
   methods: {
     //获取表头
     getHeaderData(code) {
@@ -221,7 +221,6 @@ export default {
     },
     //获取主体数据
     getTableData() {
-      let _this = this
       this.loading = true
       //type存在发送请求
       if (!!this.mess.deviceId) {
@@ -244,18 +243,18 @@ export default {
         }
         getEquipTableCon(param, res => {
           this.loading = false;
-          _this.tableData = res.Content;
-          _this.copyMain = tools.deepCopy(res.Content);
-          _this.page.total = res.Total;
-          if (_this.hot) {
-            _this.hot.destroy();
-            _this.hot = null;
+          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 (res.Content && res.Content.length) {
+          if (this.tableData && this.tableData.length) {
             if (this.onlyRead) {
-              this.getBatch(res.Content)
+              this.getBatch(this.tableData)
             }
-            _this.initTable();
+            this.initTable();
           }
         })
       }
@@ -458,7 +457,8 @@ export default {
         afterChange: this.handleUpdataTable, //修改后
         afterFilter: this.trimmedRows, //排序前
         afterRemoveRow: this.handleDeleteTableRow, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
+        afterOnCellMouseDown: this.eventClick, //鼠标点击
+        // beforeColumnSort: this.sort
       });
       let pro = document.getElementById("hot-display-license-info");
       if (!!pro) {
@@ -466,6 +466,17 @@ 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) {
       //点击的是表头

+ 1 - 1
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -3,7 +3,7 @@
     <el-row class="right">
       <!-- <span style="float:left;">当前选择的部件类型:{{page.total || '--'}}</span> -->
       <span>增加</span>
-      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
       <span>个竖井</span>
       <el-button @click="handleAddTableRow">增加</el-button>
     </el-row>

+ 1 - 1
src/views/ledger/facility/addfacility.vue

@@ -10,7 +10,7 @@
         <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
       </div>
       <span>增加</span>
-      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
       <span>个{{category.name}}</span>
       <el-button @click="handleAddTableRow">增加</el-button>
     </el-row>

+ 1 - 1
src/views/ledger/facility/partsmanage/addparts/index.vue

@@ -11,7 +11,7 @@
         </el-option>
       </el-select>
       <span>增加</span>
-      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
       <span>个{{category.Name}}</span>
       <el-button @click="handleAddTableRow">增加</el-button>
     </el-row>

+ 1 - 1
src/views/ledger/property/addproperty.vue

@@ -7,7 +7,7 @@
         <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
       </div>
       <span>增加</span>
-      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
       <span>个{{category.name}}</span>
       <el-button @click="handleAddTableRow">增加</el-button>
     </el-row>

+ 1 - 1
src/views/ledger/rentlist/rentadd/index.vue

@@ -3,7 +3,7 @@
     <el-row class="right">
       <!-- <span style="float:left;">当前选择的部件类型:{{page.total || '--'}}</span> -->
       <span>增加</span>
-      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
       <span>个租户</span>
       <el-button @click="handleAddTableRow">增加</el-button>
     </el-row>

+ 1 - 1
src/views/ledger/system/addsystem.vue

@@ -10,7 +10,7 @@
         <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
       </div>
       <span>增加</span>
-      <el-input v-model="addNum" style="width:40px;" size="small"></el-input>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
       <span>个{{category.CategoryName}}</span>
       <el-button @click="handleAddTableRow">增加</el-button>
     </el-row>