Browse Source

:alien: Updating code due to external API changes.移除Vue原型链上的validatenull,filterForm,vaildData三个方法,因为avue已经内置支持或提供相同行为

lishangbu 6 năm trước cách đây
mục cha
commit
5b44739bb8

+ 1 - 7
src/main.js

@@ -8,7 +8,7 @@ import './permission' // 权限
 import './error' // 日志
 import router from './router/router'
 import store from './store'
-import { filterForm, loadStyle, vaildData } from './util/util'
+import { loadStyle } from './util/util'
 import * as urls from '@/config/env'
 import { iconfontUrl, iconfontVersion } from '@/config/env'
 import * as filters from './filters' // 全局filter
@@ -19,12 +19,6 @@ import basicContainer from './components/basic-container/main'
 // 插件 json 展示
 import vueJsonTreeView from 'vue-json-tree-view'
 
-import { validatenull } from '@/util/validate'
-
-Vue.prototype.validatenull = validatenull
-Vue.prototype.filterForm = filterForm
-Vue.prototype.vaildData = vaildData
-
 Vue.use(router)
 
 Vue.use(vueJsonTreeView)

+ 3 - 3
src/page/logs/index.vue

@@ -5,12 +5,12 @@
     <template slot="menuLeft">
       <el-button
         type="primary"
-        size="small"
+        size="mini"
         icon="el-icon-upload"
         @click="send">上传服务器</el-button>
       <el-button
         type="danger"
-        size="small"
+        size="mini"
         icon="el-icon-delete"
         @click="clear">清空本地日志</el-button>
     </template>
@@ -19,7 +19,7 @@
       slot="type">
       <el-tag
         type="danger"
-        size="small">{{ scope.label }}</el-tag>
+        size="mini">{{ scope.label }}</el-tag>
     </template>
     <template
       slot-scope="props"

+ 3 - 3
src/views/admin/dict/index.vue

@@ -164,7 +164,7 @@ export default {
        *
        **/
     handleUpdate: function(row, index, done) {
-      putObj(this.filterForm(row)).then(() => {
+      putObj(row).then(() => {
         this.tableData.splice(index, 1, Object.assign({}, row))
         this.$message({
           showClose: true,
@@ -182,7 +182,7 @@ export default {
        *
        **/
     handleSave: function(row, done) {
-      addObj(this.filterForm(row)).then(() => {
+      addObj(row).then(() => {
         this.tableData.push(Object.assign({}, row))
         this.$message({
           showClose: true,
@@ -218,7 +218,7 @@ export default {
       })
     },
     searchChange(form) {
-      this.getList(this.page, this.filterForm(form))
+      this.getList(this.page, form)
     },
     /**
        * 加载 字典项

+ 2 - 2
src/views/admin/param/index.vue

@@ -123,7 +123,7 @@ export default {
        *
        **/
     handleSave: function(row, done) {
-      addObj(this.filterForm(row)).then(data => {
+      addObj(row).then(data => {
         this.tableData.push(Object.assign({}, row))
         this.$message({
           showClose: true,
@@ -138,7 +138,7 @@ export default {
        * 搜索回调
        */
     searchChange(form) {
-      this.getList(this.page, this.filterForm(form))
+      this.getList(this.page, form)
     },
     /**
        * 刷新回调

+ 1 - 1
src/views/admin/role/index.vue

@@ -178,7 +178,7 @@ export default {
     },
     handleFilter(param) {
       this.page.page = 1
-      this.getList(this.page, this.filterForm(param))
+      this.getList(this.page, param)
     },
     handleCreate() {
       this.$refs.crud.rowAdd()

+ 3 - 3
src/views/admin/tenant/index.vue

@@ -103,7 +103,7 @@ export default {
        *
        **/
     handleUpdate: function(row, index, done, loading) {
-      putObj(this.filterForm(row)).then(data => {
+      putObj(row).then(data => {
         this.tableData.splice(index, 1, Object.assign({}, row))
         this.$message({
           showClose: true,
@@ -123,7 +123,7 @@ export default {
        *
        **/
     handleSave: function(row, done, loading) {
-      addObj(this.filterForm(row)).then(data => {
+      addObj(row).then(data => {
         this.tableData.push(Object.assign({}, row))
         this.$message({
           showClose: true,
@@ -140,7 +140,7 @@ export default {
        * 搜索回调
        */
     searchChange(form) {
-      this.getList(this.page, this.filterForm(form))
+      this.getList(this.page, form)
     },
     /**
        * 刷新回调

+ 1 - 1
src/views/admin/user/index.vue

@@ -221,7 +221,7 @@ export default {
     },
     handleFilter(param) {
       this.page.page = 1
-      this.getList(this.page, this.filterForm(param))
+      this.getList(this.page, param)
     },
     handleRefreshChange() {
       this.getList(this.page)

+ 1 - 1
src/views/daemon/job-log/index.vue

@@ -86,7 +86,7 @@ export default {
        * 检索查询
        */
     handleFilter(params) {
-      this.queryParams = this.filterForm(params)
+      this.queryParams = params
       this.getList(this.page)
     },
     /**

+ 1 - 1
src/views/daemon/job-manage/index.vue

@@ -229,7 +229,7 @@ export default {
        * 定时任务检索查询分页查询
        */
     handleFilter(params) {
-      this.queryParams = this.filterForm(params)
+      this.queryParams = params
       this.getList(this.page)
     },
     /**

+ 1 - 1
src/views/gen/index.vue

@@ -143,7 +143,7 @@ export default {
       fetchList(Object.assign({
         current: page.currentPage,
         size: page.pageSize
-      }, this.filterForm(this.q))).then(response => {
+      }, this.q)).then(response => {
         this.tableData = response.data.data.records
         this.page.total = response.data.data.total
         this.tableLoading = false

+ 1 - 1
src/views/mp/wxfansmsg/index.vue

@@ -165,7 +165,7 @@ export default {
     },
     handleResSave: function(row, done) {
       row.fansMsgId = this.msgId
-      addResObj(this.filterForm(row)).then(() => {
+      addResObj(row).then(() => {
         this.$message({
           showClose: true,
           message: '发送成功',

+ 1 - 1
src/views/pay/paychannel/index.vue

@@ -150,7 +150,7 @@ export default {
              * 搜索回调
              */
     searchChange(form) {
-      this.getList(this.page, this.filterForm(form))
+      this.getList(this.page,form)
     },
     /**
              * 刷新回调