wangxingcheng před 3 roky
rodič
revize
d5b9300497

+ 25 - 0
src/api/system/config.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+export function getList(params) {
+  return request({
+    url: '/config/getList',
+    method: 'get',
+    params,
+  })
+}
+
+export function doEdit(data) {
+  return request({
+    url: '/config/doEdit',
+    method: 'post',
+    data,
+  })
+}
+
+export function doDelete(data) {
+  return request({
+    url: '/config/doDelete',
+    method: 'post',
+    data,
+  })
+}

+ 10 - 1
src/main.js

@@ -1,3 +1,11 @@
+/*
+ * @Author: wanglj 471442253@qq.com
+ * @Date: 2023-01-04 16:23:23
+ * @LastEditors: wanglj
+ * @LastEditTime: 2023-01-05 10:36:59
+ * @Description: file content
+ * @FilePath: \opms_frontend\src\main.js
+ */
 import Vue from 'vue'
 import App from './App'
 import i18n from './i18n'
@@ -5,13 +13,14 @@ import store from './store'
 import router from './router'
 import '@/vab'
 
-import { parseTime, translateDataToTree, resetForm } from '@/utils'
+import { parseTime, translateDataToTree, resetForm, formatPrice } from '@/utils'
 import dictApi from '@/api/system/dict'
 
 Vue.prototype.parseTime = parseTime
 Vue.prototype.translateDataToTree = translateDataToTree
 Vue.prototype.getDicts = dictApi.getDictDataByType
 Vue.prototype.resetForm = resetForm
+Vue.prototype.formatPrice = formatPrice
 
 Vue.config.productionTip = false
 new Vue({

+ 11 - 0
src/utils/index.js

@@ -264,3 +264,14 @@ export function resetForm(refName) {
     this.$refs[refName].resetFields()
   }
 }
+
+/**
+ * @description 金额格式化
+ * @param price {Number} 金额
+ * @param currency {String} 币种 CNY 人民币;USD 美元;EUR 欧元
+ * @returns {String} 格式化后的字符串
+ */
+export function formatPrice(price, currency = 'CNY') {
+  if (!price) price = 0
+  return price.toLocaleString('zh-CN', { style: 'currency', currency })
+}

+ 7 - 4
src/vab/components/VabQueryForm/index.vue

@@ -27,16 +27,19 @@
   .vab-query-form {
     ::v-deep {
       .el-form-item:first-child {
-        margin: 0 0 $base-margin/2 0 !important;
+        // margin: 0 0 $base-margin/2 0 !important;
+        margin-bottom: $base-margin/2 !important;
       }
-
       .el-form-item + .el-form-item {
-        margin: 0 0 $base-margin/2 0 !important;
-
+        // margin: 0 0 $base-margin/2 0 !important;
+        margin-bottom: $base-margin/2 !important;
         .el-button {
           margin: 0 0 0 10px !important;
         }
       }
+      .el-form-item {
+        margin-right: $base-margin/2;
+      }
 
       .top-panel {
         @include panel;

+ 40 - 0
src/vab/styles/default.scss

@@ -4123,3 +4123,43 @@ $--background-color-base: $base-color-background;
   background-color: transparent;
   border: none;
 }
+
+.el-tree {
+  padding-top: 10px;
+  .custom-tree-node {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    font-size: 14px;
+    padding-right: 8px;
+    span:first-child {
+      flex:1;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      width:0;
+    }
+  }
+  .el-tree-node__content {
+    height: 36px;
+    border-radius: 4px;
+    overflow: hidden;
+  }
+  .el-tree-node:focus > .el-tree-node__content {
+    /*设置选中的样式 */
+    background-color: #dde9ff !important;
+  }
+
+  .el-tree-node__content:hover {
+    /*设置鼠标飘过的颜色 */
+    background: #eaf9ff !important;
+    color: #007bff;
+  }
+
+  .el-tree-node.is-current > .el-tree-node__content {
+    /*current选中的样式 */
+    color: #4d95fd;
+    font-weight: bold;
+    background-color: #dde9ff !important;
+  }
+}

+ 19 - 9
src/views/base/distributor/index.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="user-management-container">
-    <el-row :gutter="20">
-      <el-col :span="4" :xs="24">
+    <el-row :gutter="20" type="flex">
+      <el-col :span="6">
         <div class="head-container">
           <span style="font-size: 25px">所属区域</span>
         </div>
-        <div class="head-container">
+        <div class="tree-container">
           <el-tree
             ref="tree"
             :data="deptOptions"
@@ -15,22 +15,26 @@
             :filter-node-method="filterNode"
             highlight-current
             :props="defaultProps"
-            @node-click="handleNodeClick" />
+            @node-click="handleNodeClick">
+            <span slot-scope="{ node }" class="custom-tree-node">
+              <span>{{ node.label }}</span>
+              <span>
+                <i class="el-icon-more"></i>
+              </span>
+            </span>
+          </el-tree>
         </div>
       </el-col>
-
-      <el-col :span="20" :xs="24">
+      <el-col :span="18">
         <vab-query-form>
           <vab-query-form-left-panel :span="20">
             <el-form :inline="true" :model="queryForm" @submit.native.prevent>
               <el-form-item>
                 <el-input v-model.trim="queryForm.distCode" clearable placeholder="经销商编码" />
               </el-form-item>
-              &nbsp;
               <el-form-item>
                 <el-input v-model.trim="queryForm.distName" clearable placeholder="经销商名称" />
               </el-form-item>
-              &nbsp;
               <el-form-item>
                 <el-input v-model.trim="queryForm.belongSale" clearable placeholder="所属销售" />
               </el-form-item>
@@ -68,6 +72,12 @@
               <span>{{ row[item.prop] }}</span>
             </template>
           </el-table-column>
+
+          <vab-query-form-right-panel :span="6">
+            <el-button icon="el-icon-search" type="primary" @click="queryData">查询</el-button>
+            <el-button icon="el-icon-plus" type="primary" @click="handleEdit($event)">新建</el-button>
+          </vab-query-form-right-panel>
+
           <el-table-column align="center" label="操作" show-overflow-tooltip width="85">
             <template #default="{ row }">
               <el-button type="text" @click="handleEdit(row)">编辑</el-button>
@@ -254,6 +264,7 @@
     },
   }
 </script>
+
 <style>
   .el-tree-node:focus > .el-tree-node__content {
     /*设置选中的样式 */
@@ -273,4 +284,3 @@
     background-color: #dde9ff !important;
   }
 </style>
->

+ 1 - 1
src/views/customer/components/Allocate.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 14:34:34
  * @LastEditors: wanglj
- * @LastEditTime: 2022-12-29 11:26:07
+ * @LastEditTime: 2023-01-05 09:15:25
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\components\allocate.vue
 -->

+ 1 - 1
src/views/customer/components/Merge.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-27 09:33:48
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-04 18:06:10
+ * @LastEditTime: 2023-01-05 09:15:31
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\components\Merge.vue
 -->

+ 1 - 1
src/views/customer/components/Transfer.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 15:00:19
  * @LastEditors: wanglj
- * @LastEditTime: 2022-12-26 17:23:50
+ * @LastEditTime: 2023-01-05 09:15:39
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\components\Transfer.vue
 -->

+ 12 - 8
src/views/customer/detail.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 09:30:47
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-04 18:05:59
+ * @LastEditTime: 2023-01-05 11:50:51
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\detail.vue
 -->
@@ -22,7 +22,7 @@
               </template>
               <template v-else>
                 <el-button @click="handleReceive">领取客户</el-button>
-                <el-button @click="$refs.allocate.visible = true">分配客户</el-button>
+                <el-button @click="handleAllocate">分配客户</el-button>
               </template>
             </span>
           </h3>
@@ -137,22 +137,22 @@
                 {{ abstract.business }}
               </el-descriptions-item>
               <el-descriptions-item label="商机总额">
-                {{ abstract.businessTotal }}
+                {{ formatPrice(abstract.businessTotal) }}
               </el-descriptions-item>
               <el-descriptions-item label="成交次数">
                 {{ abstract.dealCotal }}
               </el-descriptions-item>
               <el-descriptions-item label="成交总额">
-                {{ abstract.dealTotal }}
+                {{ formatPrice(abstract.dealTotal) }}
               </el-descriptions-item>
               <el-descriptions-item label="回款总额">
-                {{ abstract.paymentTotal }}
+                {{ formatPrice(abstract.paymentTotal) }}
               </el-descriptions-item>
               <el-descriptions-item label="未回款总额">
-                {{ abstract.notPaymentTotal }}
+                {{ formatPrice(abstract.notPaymentTotal) }}
               </el-descriptions-item>
               <el-descriptions-item label="开票总额" :span="24">
-                {{ abstract.drawTotal }}
+                {{ formatPrice(abstract.drawTotal) }}
               </el-descriptions-item>
               <el-descriptions-item label="备注" :span="24">
                 {{ detail.remark }}
@@ -255,7 +255,7 @@
     <Contact ref="contact" @contactSave="contactSave" />
     <Edit ref="edit" @customerSave="customerSave" />
     <!-- 分配客户 -->
-    <Allocate ref="allocate" />
+    <Allocate ref="allocate" @refresh="back" />
     <!-- 转移客户 -->
     <Shift ref="shift" @refresh="back" />
     <!-- 移入公海 -->
@@ -483,6 +483,10 @@
           })
           .catch(() => {})
       },
+      handleAllocate() {
+        this.$refs.allocate.ids = [parseInt(this.id)]
+        this.$refs.allocate.visible = true
+      },
       customerSave() {
         this.init()
         this.getDynamics()

+ 9 - 2
src/views/customer/list.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 16:34:37
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-04 18:05:48
+ * @LastEditTime: 2023-01-05 13:39:44
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\list.vue
 -->
@@ -87,7 +87,7 @@
         show-overflow-tooltip
         :sortable="item.sortable">
         <template #default="{ row }">
-          <el-button v-if="item.prop === 'custName'" style="font-size: 14px" type="text" @click="handleDetail(row)">
+          <el-button v-if="item.prop === 'custName'" class="link-button" type="text" @click="handleDetail(row)">
             {{ row.custName }}
           </el-button>
           <span v-else-if="item.prop === 'custStatus'">
@@ -344,4 +344,11 @@
 
 <style lang="scss" scoped>
   $base: '.list';
+  .link-button {
+    font-size: 14px;
+    width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
 </style>

+ 9 - 2
src/views/customer/openSea.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-15 15:38:21
  * @LastEditors: wanglj
- * @LastEditTime: 2023-01-04 18:05:32
+ * @LastEditTime: 2023-01-05 11:38:01
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\openSea.vue
 -->
@@ -66,7 +66,7 @@
         show-overflow-tooltip
         :sortable="item.sortable">
         <template #default="{ row }">
-          <el-button v-if="item.prop === 'custName'" style="font-size: 14px" type="text" @click="handleDetail(row)">
+          <el-button v-if="item.prop === 'custName'" class="link-button" type="text" @click="handleDetail(row)">
             {{ row.custName }}
           </el-button>
           <span v-else-if="item.prop === 'custStatus'">
@@ -391,4 +391,11 @@
 
 <style lang="scss" scoped>
   $base: '.open-sea';
+  .link-button {
+    font-size: 14px;
+    width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
 </style>

+ 21 - 42
src/views/plat/task/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="user-management-container">
-    <el-row :gutter="20">
-      <el-col :span="2">
-        <span>操作类型</span>
+    <el-row :gutter="20" type="flex">
+      <el-col :span="6">
+        <span class="type">操作类型</span>
         <div style="margin-top: 25px; cursor: pointer" @click="search('1')">
           <i class="el-icon-message-solid" style="margin-right: 10px"></i>
           我的待办({{ statisticsForm.toDoNumber }})
@@ -15,10 +15,8 @@
           <i class="el-icon-folder-checked" style="margin-right: 10px"></i>
           我处理的({{ statisticsForm.completedNumber }})
         </div>
-        <div style="margin-top: 50px">督办类型</div>
-        <div style="margin-top: 20px; cursor: pointer" @click="searchType('')">
-          全部
-        </div>
+        <div class="type" style="margin-top: 50px">督办类型</div>
+        <div style="margin-top: 20px; cursor: pointer" @click="searchType('')">全部</div>
         <div
           v-for="item in types"
           :key="item.dictCode"
@@ -27,28 +25,19 @@
           {{ item.dictLabel }}
         </div>
       </el-col>
-      <el-col :span="22">
+      <el-col :span="18">
         <el-row :gutter="10" style="margin-bottom: 10px">
           <el-col :span="4">
-            <el-input
-              v-model.trim="queryForm.taskTitle"
-              clearable
-              placeholder="请输入督办标题" />
+            <el-input v-model.trim="queryForm.taskTitle" clearable placeholder="请输入督办标题" />
           </el-col>
           <el-col :span="12">
-            <el-button icon="el-icon-search" type="primary" @click="queryData">
-              查询
-            </el-button>
-            <el-button icon="el-icon-refresh-right" @click="reset">
-              重置
-            </el-button>
+            <el-button icon="el-icon-search" type="primary" @click="queryData">查询</el-button>
+            <el-button icon="el-icon-refresh-right" @click="reset">重置</el-button>
           </el-col>
         </el-row>
         <vab-query-form>
           <vab-query-form-left-panel :span="12">
-            <el-button icon="el-icon-plus" type="primary" @click="handleAdd">
-              添加
-            </el-button>
+            <el-button icon="el-icon-plus" type="primary" @click="handleAdd">添加</el-button>
           </vab-query-form-left-panel>
           <vab-query-form-right-panel :span="12">
             <el-button icon="el-icon-download" @click="exportData" />
@@ -56,7 +45,7 @@
           </vab-query-form-right-panel>
         </vab-query-form>
         <!-- 主页面 -->
-        <el-table v-loading="listLoading" border :data="list" :height="height">
+        <el-table v-loading="listLoading" border :data="list" height="calc(100vh - 340px)">
           <el-table-column
             v-for="(item, index) in finallyColumns"
             :key="index"
@@ -76,18 +65,11 @@
               <span v-else-if="item.prop === 'isOverdue'">
                 {{ row.isOverdue === '10' ? '否' : '是' }}
               </span>
-              <span
-                v-else-if="
-                  item.prop === 'mainUserId' || item.prop === 'supervisorUserId'
-                ">
+              <span v-else-if="item.prop === 'mainUserId' || item.prop === 'supervisorUserId'">
                 {{ userMap[row[item.prop]] }}
               </span>
               <span
-                v-else-if="
-                  item.prop === 'taskStartDate' ||
-                  item.prop === 'taskEndDate' ||
-                  item.prop === 'createdTime'
-                ">
+                v-else-if="item.prop === 'taskStartDate' || item.prop === 'taskEndDate' || item.prop === 'createdTime'">
                 {{ parseTime(row[item.prop]) }}
               </span>
               <span v-else>{{ row[item.prop] }}</span>
@@ -99,9 +81,7 @@
             </template>
           </el-table-column>
           <template #empty>
-            <el-image
-              class="vab-data-empty"
-              :src="require('@/assets/empty_images/data_empty.png')" />
+            <el-image class="vab-data-empty" :src="require('@/assets/empty_images/data_empty.png')" />
           </template>
         </el-table>
         <el-pagination
@@ -115,11 +95,7 @@
       </el-col>
     </el-row>
     <!-- 新建督办 -->
-    <taskAdd
-      :do-refresh="doRefresh"
-      :self-visible.sync="addDialogVisible"
-      :types="types"
-      :users="users" />
+    <taskAdd :do-refresh="doRefresh" :self-visible.sync="addDialogVisible" :types="types" :users="users" />
     <!-- 查看详情 -->
     <taskDetail
       :do-refresh="doRefresh"
@@ -253,9 +229,7 @@
         return this.$baseTableHeight(1)
       },
       finallyColumns() {
-        return this.columns.filter((item) =>
-          this.checkList.includes(item.label)
-        )
+        return this.columns.filter((item) => this.checkList.includes(item.label))
       },
     },
     async created() {
@@ -405,3 +379,8 @@
     },
   }
 </script>
+<style lang="scss" scoped>
+  .type {
+    font-weight: bold;
+  }
+</style>

+ 62 - 0
src/views/system/config/components/ConfigEdit.vue

@@ -0,0 +1,62 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogFormVisible" width="500px" @close="close">
+    <el-form ref="form" label-width="80px" :model="form" :rules="rules">
+      <el-form-item label="标题" prop="title">
+        <el-input v-model="form.title" />
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="close">取 消</el-button>
+      <el-button type="primary" @click="save">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { doEdit } from '@/api/system/config'
+
+  export default {
+    name: 'ConfigEdit',
+    data() {
+      return {
+        form: {
+          title: '',
+        },
+        rules: {
+          title: [{ required: true, trigger: 'blur', message: '请输入标题' }],
+        },
+        title: '',
+        dialogFormVisible: false,
+      }
+    },
+    created() {},
+    methods: {
+      showEdit(row) {
+        if (!row) {
+          this.title = '添加'
+        } else {
+          this.title = '编辑'
+          this.form = Object.assign({}, row)
+        }
+        this.dialogFormVisible = true
+      },
+      close() {
+        this.$refs['form'].resetFields()
+        this.form = this.$options.data().form
+        this.dialogFormVisible = false
+      },
+      save() {
+        this.$refs['form'].validate(async (valid) => {
+          if (valid) {
+            const { msg } = await doEdit(this.form)
+            this.$baseMessage(msg, 'success')
+            this.$emit('fetch-data')
+            this.close()
+          } else {
+            return false
+          }
+        })
+      },
+    },
+  }
+</script>

+ 206 - 0
src/views/system/config/index.vue

@@ -0,0 +1,206 @@
+<template>
+  <div class="config-container">
+    <vab-query-form>
+      <vab-query-form-left-panel :span="12">
+        <el-button icon="el-icon-plus" type="primary" @click="handleEdit">添加</el-button>
+        <el-button icon="el-icon-delete" type="danger" @click="handleDelete">批量删除</el-button>
+      </vab-query-form-left-panel>
+      <vab-query-form-right-panel :span="12">
+        <el-popover popper-class="custom-table-checkbox" trigger="hover">
+          <el-checkbox-group v-model="checkList">
+            <vab-draggable v-bind="dragOptions" :list="columns">
+              <div v-for="(item, index) in columns" :key="item + index">
+                <vab-icon icon="drag-drop-line" />
+                <el-checkbox :disabled="item.disableCheck === true" :label="item.label" />
+              </div>
+            </vab-draggable>
+          </el-checkbox-group>
+          <template #reference>
+            <el-button icon="el-icon-setting" style="margin: 0 0 10px 0 !important" type="primary">
+              可拖拽列设置
+            </el-button>
+          </template>
+        </el-popover>
+      </vab-query-form-right-panel>
+    </vab-query-form>
+
+    <el-table
+      v-loading="listLoading"
+      border
+      :data="list"
+      :height="$baseTableHeight(1)"
+      @selection-change="setSelectRows">
+      <el-table-column align="center" show-overflow-tooltip type="selection" />
+      <el-table-column
+        v-for="(item, index) in finallyColumns"
+        :key="index"
+        align="center"
+        :label="item.label"
+        :prop="item.prop"
+        :sortable="item.sortable"
+        :width="item.width" />
+
+      <el-table-column align="center" label="操作" width="85">
+        <template #default="{ row }">
+          <el-button type="text" @click="handleEdit(row)">编辑</el-button>
+          <el-button type="text" @click="handleDelete(row)">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      background
+      :current-page="queryForm.pageNo"
+      :layout="layout"
+      :page-size="queryForm.pageSize"
+      :total="total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange" />
+    <edit ref="edit" @fetch-data="fetchData" />
+  </div>
+</template>
+
+<script>
+  import { getList, doDelete } from '@/api/system/config'
+  import Edit from './components/ConfigEdit'
+  import VabDraggable from 'vuedraggable'
+
+  export default {
+    name: 'Config',
+    components: { Edit, VabDraggable },
+    data() {
+      return {
+        checkList: [],
+        columns: [
+          {
+            prop: 'id',
+            label: '参数主键',
+            type: 'int',
+            width: 'auto',
+          },
+          {
+            prop: 'config_name',
+            label: '参数名称',
+            type: 'varchar',
+            width: 'auto',
+          },
+          {
+            prop: 'config_key',
+            label: '参数键名',
+            type: 'varchar',
+            width: 'auto',
+          },
+          {
+            prop: 'config_value',
+            label: '参数键值',
+            type: 'varchar',
+            width: 'auto',
+          },
+          {
+            prop: 'config_type',
+            label: '系统内置',
+            type: 'varchar',
+            width: 'auto',
+          },
+          {
+            prop: 'remark',
+            label: '备注',
+            type: 'text',
+            width: 'auto',
+          },
+          {
+            prop: 'created_name',
+            label: '创建人',
+            type: 'varchar',
+            width: 'auto',
+          },
+          {
+            prop: 'created_time',
+            label: '创建时间',
+            type: 'datetime',
+            width: 'auto',
+          },
+        ],
+        list: [],
+        listLoading: false,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        selectRows: '',
+        queryForm: {
+          pageNo: 1,
+          pageSize: 10,
+          title: '',
+        },
+      }
+    },
+    computed: {
+      dragOptions() {
+        return {
+          animation: 600,
+          group: 'description',
+        }
+      },
+      finallyColumns() {
+        return this.columns.filter((item) => this.checkList.includes(item.label))
+      },
+    },
+    created() {
+      for (const elem of this.columns) {
+        this.checkList.push(elem.label)
+      }
+      // this.fetchData()
+    },
+    methods: {
+      setSelectRows(val) {
+        this.selectRows = val
+      },
+      handleEdit(row) {
+        if (row.id) {
+          this.$refs['edit'].showEdit(row)
+        } else {
+          this.$refs['edit'].showEdit()
+        }
+      },
+      handleDelete(row) {
+        if (row.id) {
+          this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+            const { msg } = await doDelete({ ids: row.id })
+            this.$baseMessage(msg, 'success')
+            await this.fetchData()
+          })
+        } else {
+          if (this.selectRows.length > 0) {
+            const ids = this.selectRows.map((item) => item.id).join()
+            this.$baseConfirm('你确定要删除选中项吗', null, async () => {
+              const { msg } = await doDelete({ ids })
+              this.$baseMessage(msg, 'success')
+              await this.fetchData()
+            })
+          } else {
+            this.$baseMessage('未选中任何行', 'error')
+            return false
+          }
+        }
+      },
+      handleSizeChange(val) {
+        this.queryForm.pageSize = val
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.queryForm.pageNo = val
+        this.fetchData()
+      },
+      queryData() {
+        this.queryForm.pageNo = 1
+        this.fetchData()
+      },
+      async fetchData() {
+        this.listLoading = true
+        const { data } = await getList(this.queryForm)
+        const { list, total } = data
+        this.list = list
+        this.total = total
+        this.listLoading = false
+      },
+    },
+  }
+</script>