yunxing %!s(int64=4) %!d(string=hai) anos
pai
achega
7398268a93
Modificáronse 3 ficheiros con 13 adicións e 5 borrados
  1. 2 1
      src/utils/format.js
  2. 2 2
      src/views/other/gcfzDialog.vue
  3. 9 2
      src/views/other/zhsxOtherTable2.vue

+ 2 - 1
src/utils/format.js

@@ -24,7 +24,8 @@ const number_format = (number, decimals, dec_point, thousands_sep) => {
         s = "",
         toFixedFix = function(n, prec) {
             var k = Math.pow(10, prec)
-            return "" + Math.ceil(n * k) / k
+            // TODO: 四舍五入 还是进位
+            return "" + Math.round(n * k) / k
         }
 
     s = (prec ? toFixedFix(n, prec) : "" + Math.round(n)).split(".")

+ 2 - 2
src/views/other/gcfzDialog.vue

@@ -68,7 +68,7 @@ export default {
         },
         changeEmit(val) {
             console.log(val)
-            if (val.floors && val.floors != '全部') {
+            if (val.floors) {
                 this.floors = val.floors
             }
             if (val.searVal) {
@@ -88,7 +88,7 @@ export default {
                 page: this.page,
                 size: this.size,
             }
-            if (this.floors) {
+            if (this.floors !== '全部') {
                 getParams.floor = this.floors
             }
             if (this.searVal) {

+ 9 - 2
src/views/other/zhsxOtherTable2.vue

@@ -138,7 +138,14 @@ export default {
             return (this.page - 1) * this.size + index + 1
         },
         // 第三方
-        dsfjc() {
+        /**
+         *@param { boolean } resetPage 是否重置页码,分页时不重置页码, 下拉菜单会传数组,下方判断时用 !== false
+         */
+        dsfjc(resetPage) {
+            // console.log(resetPage)
+            if (resetPage !== false) {
+                this.page = 1
+            }
             let getParams = {
                 plazaId: this.$store.state.plazaId,
                 page: this.page,
@@ -167,7 +174,7 @@ export default {
         },
         pageChanged(page) {
             this.page = page
-            this.dsfjc()
+            this.dsfjc(false)
         },
         //第三方任务
         innerTable(row) {