浏览代码

fix(*): currency组件bug处理;异步获取字典数据导出控制台报错和前端数据错误问题;前端分页信息中当前也json字段错误

likai 2 年之前
父节点
当前提交
64e43ab269

+ 0 - 1
src/api/base/distr/distr.js

@@ -1,7 +1,6 @@
 import micro_request from '@/utils/micro_request'
 
 const basePath = process.env.VUE_APP_ParentPath
-console.log(basePath)
 export default {
   login(query) {
     return micro_request.postRequest(basePath, 'Auth', 'Login', query)

+ 0 - 1
src/api/base/product.js

@@ -1,7 +1,6 @@
 import micro_request from '@/utils/micro_request'
 
 const basePath = process.env.VUE_APP_ParentPath
-console.log(basePath)
 export default {
   // 获取列表
   getList(query) {

+ 0 - 1
src/api/base/region/region.js

@@ -1,7 +1,6 @@
 import micro_request from '@/utils/micro_request'
 
 const basePath = process.env.VUE_APP_ParentPath
-console.log(basePath)
 export default {
   login(query) {
     return micro_request.postRequest(basePath, 'Auth', 'Login', query)

+ 0 - 1
src/api/system/user.js

@@ -1,7 +1,6 @@
 import micro_request from '@/utils/micro_request'
 
 const basePath = process.env.VUE_APP_AdminPath
-console.log(basePath)
 export default {
   login(query) {
     return micro_request.postRequestWithClientInfo(basePath, 'Auth', 'Login', query)

+ 5 - 1
src/components/currency/index.vue

@@ -32,10 +32,14 @@
         num: '',
       }
     },
+    watch: {
+      value() {
+        this.num = this.formatPrice(this.value)
+      },
+    },
     mounted() {
       this.num = this.formatPrice(this.value)
     },
-
     methods: {
       returnNum() {
         if (this.num) {

+ 2 - 2
src/components/select/SelectBusiness.vue

@@ -51,7 +51,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -205,7 +205,7 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
     },

+ 2 - 2
src/components/select/SelectBusinessContact.vue

@@ -32,7 +32,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -186,7 +186,7 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
     },

+ 2 - 2
src/components/select/SelectCustomer.vue

@@ -51,7 +51,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -215,7 +215,7 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
     },

+ 2 - 2
src/components/select/SelectCustomerContact.vue

@@ -51,7 +51,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -214,7 +214,7 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
     },

+ 2 - 2
src/components/select/SelectDistributor.vue

@@ -46,7 +46,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -205,7 +205,7 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
     },

+ 2 - 2
src/components/select/SelectProduct.vue

@@ -46,7 +46,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -206,7 +206,7 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
     },

+ 2 - 8
src/store/modules/routes.js

@@ -66,14 +66,8 @@ const actions = {
     if (authentication === 'all') {
       const { data: data } = await menuApi.getTree()
       let list = data
-      if (!isArray(list))
-        Vue.prototype.$baseMessage(
-          '路由格式返回有误!',
-          'error',
-          'vab-hey-message-error'
-        )
-      if (list[list.length - 1].path !== '*')
-        list.push({ path: '*', redirect: '/404', meta: { hidden: true } })
+      if (!isArray(list)) Vue.prototype.$baseMessage('路由格式返回有误!', 'error', 'vab-hey-message-error')
+      if (list[list.length - 1].path !== '*') list.push({ path: '*', redirect: '/404', meta: { hidden: true } })
       routes = convertRouter(list)
     }
     // 根据权限和rolesControl过滤路由

+ 0 - 2
src/views/base/distributor/components/DistrEdit.vue

@@ -179,7 +179,6 @@
           this.title = '编辑'
 
           this.form = Object.assign({}, row)
-          console.log('回显', this.form)
           //  this.pid = this.form.provinceId
           // this.form.provinceId = this.form.provinceDesc
         }
@@ -196,7 +195,6 @@
       },
       async getProvinceInfo() {
         const { data: data } = await distrApi.getProvinceInfo({})
-        console.log('区域', data.list)
         this.district = data.list
       },
       selectDistrict(id) {

+ 0 - 2
src/views/base/distributor/index.vue

@@ -179,7 +179,6 @@
         return this.$baseTableHeight(1)
       },
       finallyColumns() {
-        console.log('finallyColums')
         return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },
@@ -190,7 +189,6 @@
     methods: {
       async getTree() {
         const { data: data } = await distrApi.getTree({})
-        console.log('区域', data.list)
         this.deptOptions = data.list
       },
       // 筛选节点

+ 0 - 2
src/views/base/product/components/ProductEdit.vue

@@ -120,9 +120,7 @@
         } else {
           this.title = '编辑产品信息'
           let params = { id }
-          console.log('params----', params)
           const [err, res] = await to(productApi.getDetails(params))
-          console.log(res)
           if (err) return
           if (res.data) {
             this.editForm = res.data

+ 0 - 1
src/views/base/product/index.vue

@@ -167,7 +167,6 @@
         return this.$baseTableHeight(1)
       },
       finallyColumns() {
-        console.log('finallyColums')
         return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },

+ 0 - 2
src/views/base/region/components/RegionEdit.vue

@@ -55,7 +55,6 @@
     },
     methods: {
       setRegion(id) {
-        console.log('setRegionnid', id)
         this.form.regionId = id
       },
       async getRegion() {
@@ -71,7 +70,6 @@
       },
       async getProvinceInfo() {
         const { data: data } = await distrApi.getProvinceInfo({})
-        console.log('区域', data.list)
         this.district = data.list
       },
       selectDistrict(id) {

+ 0 - 2
src/views/base/region/index.vue

@@ -174,7 +174,6 @@
         return this.$baseTableHeight(10)
       },
       finallyColumns() {
-        console.log('finallyColums')
         return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },
@@ -209,7 +208,6 @@
         const { data: data } = await regionApi.getRegion({})
         var first_id = data.list[0].id
 
-        console.log('区域', first_id)
         this.deptOptions = data.list
         this.queryForm.regionId = first_id //data.list[0].id
         this.$refs['edit'].setRegion(first_id)

+ 4 - 4
src/views/collection/index.vue

@@ -202,13 +202,13 @@
         return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },
-    mounted() {
-      this.getOptions()
+    async mounted() {
+      await this.getOptions()
       this.queryData()
     },
     methods: {
-      getOptions() {
-        Promise.all([this.getDicts('collection_type')])
+      async getOptions() {
+        await Promise.all([this.getDicts('collection_type')])
           .then(([collectionType]) => {
             this.collectionTypeOption = collectionType.data.values || []
           })

+ 4 - 4
src/views/contract/components/DetailsCollection.vue

@@ -191,15 +191,15 @@
       }
     },
 
-    mounted() {
-      this.getOptions()
+    async mounted() {
+      await this.getOptions()
       this.getCollectionList()
       this.getCollectionPlaneList()
     },
 
     methods: {
-      getOptions() {
-        Promise.all([this.getDicts('collection_type')])
+      async getOptions() {
+        await Promise.all([this.getDicts('collection_type')])
           .then(([collectionType]) => {
             this.collectionTypeOption = collectionType.data.values || []
           })

+ 4 - 4
src/views/contract/components/DetailsInvoice.vue

@@ -128,14 +128,14 @@
       }
     },
 
-    mounted() {
-      this.getOptions()
+    async mounted() {
+      await this.getOptions()
       this.getInvoiceList()
     },
 
     methods: {
-      getOptions() {
-        Promise.all([this.getDicts('invoice_type')])
+      async getOptions() {
+        await Promise.all([this.getDicts('invoice_type')])
           .then(([invoiceType]) => {
             this.invoiceTypeData = invoiceType.data.values || []
           })

+ 5 - 5
src/views/contract/invoice.vue

@@ -44,7 +44,7 @@
         :sortable="item.sortable">
         <template #default="{ row }">
           <span v-if="item.prop == 'invoiceType'">
-            <!-- {{ invoiceTypeData.filter((item) => item.key == row.invoiceType)[0].value || '-' }} -->
+            {{ invoiceTypeData.filter((item) => item.key == row.invoiceType)[0].value || '-' }}
           </span>
           <span v-else-if="item.prop == 'approStatus'">
             {{ row.approStatus == '10' ? '未通过' : '已通过' }}
@@ -169,8 +169,8 @@
         return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },
-    mounted() {
-      this.getOptions()
+    async mounted() {
+      await this.getOptions()
       this.queryData()
     },
 
@@ -186,8 +186,8 @@
       setSelectRows(val) {
         this.selectRows = val.map((item) => item.id)
       },
-      getOptions() {
-        Promise.all([this.getDicts('invoice_type')])
+      async getOptions() {
+        await Promise.all([this.getDicts('invoice_type')])
           .then(([invoiceType]) => {
             this.invoiceTypeData = invoiceType.data.values || []
           })

+ 1 - 1
src/views/proj/business/components/DetailsContact.vue

@@ -80,7 +80,7 @@
       return {
         queryForm: {
           cuctName: undefined,
-          pageNo: 1,
+          pageNum: 1,
           pageSize: 9999,
         },
         listLoading: false,

+ 1 - 1
src/views/proj/business/components/DetailsContract.vue

@@ -45,7 +45,7 @@
         busId: undefined,
         queryForm: {
           contractName: undefined,
-          pageNo: 1,
+          pageNum: 1,
           pageSize: 9999,
         },
         listLoading: false,

+ 4 - 4
src/views/proj/business/index.vue

@@ -93,7 +93,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -175,7 +175,7 @@
         total: 0,
         selectRows: '',
         queryForm: {
-          pageNo: 1,
+          pageNum: 1,
           pageSize: 10,
           nboName: undefined,
           custName: undefined,
@@ -273,11 +273,11 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
       queryData() {
-        this.queryForm.pageNo = 1
+        this.queryForm.pageNum = 1
         this.fetchData()
       },
       /** 重置按钮操作 */

+ 4 - 4
src/views/system/config/index.vue

@@ -49,7 +49,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -126,7 +126,7 @@
         total: 0,
         selectRows: '',
         queryForm: {
-          pageNo: 1,
+          pageNum: 1,
           pageSize: 10,
           title: '',
         },
@@ -186,11 +186,11 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
       queryData() {
-        this.queryForm.pageNo = 1
+        this.queryForm.pageNum = 1
         this.fetchData()
       },
       async fetchData() {

+ 4 - 4
src/views/system/loginLog/index.vue

@@ -77,7 +77,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -150,7 +150,7 @@
         total: 0,
         selectRows: '',
         queryForm: {
-          pageNo: 1,
+          pageNum: 1,
           pageSize: 10,
           title: '',
         },
@@ -208,11 +208,11 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
       queryData() {
-        this.queryForm.pageNo = 1
+        this.queryForm.pageNum = 1
         this.fetchData()
       },
       async fetchData() {

+ 0 - 1
src/views/work/order/index.vue

@@ -147,7 +147,6 @@
         return this.$baseTableHeight(1)
       },
       finallyColumns() {
-        console.log('finallyColums')
         return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },

+ 4 - 4
template/index.hbs

@@ -39,7 +39,7 @@
     </el-table>
     <el-pagination
       background
-      :current-page="queryForm.pageNo"
+      :current-page="queryForm.pageNum"
       :layout="layout"
       :page-size="queryForm.pageSize"
       :total="total"
@@ -68,7 +68,7 @@
         total: 0,
         selectRows: '',
         queryForm: {
-          pageNo: 1,
+          pageNum: 1,
           pageSize: 10,
           title: '',
         },
@@ -121,11 +121,11 @@
         this.fetchData()
       },
       handleCurrentChange(val) {
-        this.queryForm.pageNo = val
+        this.queryForm.pageNum = val
         this.fetchData()
       },
       queryData() {
-        this.queryForm.pageNo = 1
+        this.queryForm.pageNum = 1
         this.fetchData()
       },
       async fetchData() {