From c7bd1a3fd46b5d5f887ce4f674387294ee1e8ccd Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 31 十月 2023 17:09:29 +0800
Subject: [PATCH] 添加手机校验

---
 src/views/Admin/sameLevel.vue |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/views/Admin/sameLevel.vue b/src/views/Admin/sameLevel.vue
index 23317e6..aa1738d 100644
--- a/src/views/Admin/sameLevel.vue
+++ b/src/views/Admin/sameLevel.vue
@@ -4,12 +4,15 @@
       <a-col :span="4">
         <a-button v-if="unittype && unittype !== null" type="primary" @click="editData('add',{})">新增用户</a-button>
       </a-col>
-      <a-col :span="20" v-if="unittype == null || !unittype">
-        <a-row type="flex" justify="end" :gutter="12">
-          <a-col :span="4">
-            <a-cascader :options="areaData" v-model="areaVal" placeholder="行政规划" expandTrigger="hover" :fieldNames="fieldNames" changeOnSelect @change="onChange" style="width: 100%"/>
+      <a-col :span="20">
+        <a-row type="flex" justify="end" :gutter="14">
+          <a-col :span="6">
+            <a-input v-model="search.searchParams.company" placeholder="单位名称" style="width: 100%"/>
           </a-col>
-          <a-col :span="4">
+          <a-col :span="6" v-if="unittype == null || !unittype">
+            <a-cascader :options="areaData" v-model="areaVal" placeholder="所属区域" expandTrigger="hover" :fieldNames="fieldNames" changeOnSelect @change="onChange" style="width: 100%"/>
+          </a-col>
+          <a-col :span="6">
             <a-button type="primary" @click="getUserList">查询</a-button>
             <a-button style="margin-left: 12px" @click="resetSearch">重置</a-button>
           </a-col>
@@ -17,7 +20,7 @@
       </a-col>
     </a-row>
     <div class="table-cont">
-      <a-table :columns="columns" :data-source="tableData" :pagination="pagination" :rowKey="record=>record.name" bordered>
+      <a-table :columns="columns" :data-source="tableData" :pagination="pagination" :rowKey="record=>record.id" bordered>
         <template #unittype="unittype">
           <a-tag
               :color="unittype === 1 ? 'purple' : unittype === 2 ? 'blue' : unittype === 3 ? 'cyan' : 'green'"
@@ -60,6 +63,7 @@
         pageIndex: 1,
         pageSize: 10,
         searchParams:{
+          company: '',
           province: '',
           city: '',
           area: '',
@@ -96,6 +100,7 @@
         },
         {
           title: '操作',
+          width: '12%',
           key: 'action',
           scopedSlots: { customRender: 'action' }
         },
@@ -127,7 +132,7 @@
   methods:{
     async getUserList(){
       const t = this
-      if(t.search.searchParams.province == '' && t.search.searchParams.city == '' && t.search.searchParams.area == '' ){
+      if(t.search.searchParams.province == '' && t.search.searchParams.city == '' && t.search.searchParams.area == '' && t.search.searchParams.company == ''){
         const {searchParams,...data} = t.search
         const res = await getRecipient(data)
         if(res.data.code == 100){
@@ -163,6 +168,7 @@
         pageIndex: 1,
         pageSize: 10,
         searchParams:{
+          company: '',
           province: '',
           city: '',
           area: '',
@@ -229,6 +235,7 @@
     onChange(value) {
       const t = this
       t.search.searchParams = {
+        company: '',
         province: '',
         city: '',
         area: '',

--
Gitblit v1.9.2