formui-vue2-vistastory 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@
11
11
  v-bind:removeFileds="[]"
12
12
  v-bind:queryParams="queryParams"
13
13
  v-bind:fieldGroupType="1"
14
- v-on:updateQueryParams="goByParam"
14
+ v-on:updateQueryParams="updateQueryParams"
15
15
  v-on:search="queryData">
16
16
  <template v-slot:btns="slotProps">
17
17
  </template>
@@ -33,6 +33,7 @@
33
33
 
34
34
  import formuiService from './service/formui/FormuiService.js'
35
35
  import FormUiTable from './FormUiTable.vue'
36
+ import FormUiQueryParam from './FormUiQueryParam.vue'
36
37
  import formuiConfig from './formuiConfig.js'
37
38
 
38
39
 
@@ -56,7 +57,7 @@ export default {
56
57
  }
57
58
  },
58
59
  components: {
59
- FormUiTable
60
+ FormUiTable,FormUiQueryParam
60
61
  },
61
62
  data() {
62
63
  return {
@@ -75,6 +76,7 @@ export default {
75
76
 
76
77
  this.loadData()
77
78
  },
79
+
78
80
  beforeRouteUpdate(to) {
79
81
  this.queryParams.pageNo = to.query.pageNo
80
82
  this.loadData()
@@ -84,17 +86,32 @@ export default {
84
86
  this.queryParams.pageNo = data - 1
85
87
  this.goByParam()
86
88
  },
89
+ updateQueryParams: function (queryParams) {
90
+ this.queryParams = queryParams
91
+
92
+ },
87
93
  goByParam() {
88
- delete this.queryParams.methodName
94
+ let that=this
95
+ delete this.queryParams.methodName
96
+ // delete this.queryParams['tableName']
97
+ let paramJson=JSON.parse(JSON.stringify(this.queryParams))
98
+ // console.log('path:'+that.$route.path)
99
+ let srcPath=that.$route.path;
89
100
  this.$router.push({
90
- query: this.queryParams
91
- })
101
+ path: that.$route.path+'1'
102
+ });
103
+ this.$router.replace({
104
+ path:srcPath,
105
+ query:paramJson
106
+ });
107
+
108
+
92
109
  },
93
110
  queryData(queryParams) {
94
111
  if (queryParams) {
95
112
  this.queryParams = queryParams
96
113
  }
97
-
114
+ this.goByParam()
98
115
  this.$refs['formUiTableRef'].loadData(this.queryParams)
99
116
  },
100
117
  loadData(queryParamsUpdate) {
@@ -109,7 +126,7 @@ export default {
109
126
  }
110
127
 
111
128
  formuiService.getFormUiSimpleTable(this,this.queryParams, (resp) => {
112
- console.log('resp', resp)
129
+ //console.log('resp', resp)
113
130
  this.tableConfig = resp
114
131
  }, (err) => {})
115
132
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formui-vue2-vistastory",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "formui-vue2-vistastory",
5
5
  "author": "vistastory <vistastory@126.com>",
6
6
  "private": false,
@@ -16,7 +16,7 @@
16
16
  "moment": "^2.24.0",
17
17
  "qs": "^6.6.0",
18
18
  "vue": "^2.5.2",
19
- "vue-router": "^3.5.1",
19
+ "vue-router": "^3.6.5",
20
20
  "vuex": "^3.1.1"
21
21
  },
22
22
  "devDependencies": {