Browse Source

debug41,42,46

zishan-an 1 year ago
parent
commit
77e40f005d

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "private": true,
   "scripts": {
     
-    "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
+    "serve": " vue-cli-service serve",
     "build": "vue-cli-service build"
   },
   "dependencies": {

+ 43 - 1
src/api/index.js

@@ -55,6 +55,14 @@ export function cooperatorList(pageNum,pageSize) {
     });
 }
 
+export function selectCooperator(pageNum,pageSize,cooperatorName) {
+    return request.post('/cooperator/selectCooperator',{
+        pageNum:pageNum,
+        pageSize:pageSize,
+        cooperatorName:cooperatorName,
+    });
+}
+
 export function findCooperatorListByName(name) {
     return request.get('/cooperator/findCooperatorListByName?name=' + name);
 }
@@ -80,6 +88,14 @@ export function fieldTemplateList(pageNum,pageSize) {
         pageSize:pageSize,
     });
 }
+export function selectTemplate(pageNum,pageSize,templateName) {
+    return request.post('/fieldtemplate/selectTemplate',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            templateName:templateName,
+        });
+}
 export function fieldTemplateLists() {
     return request.get('/fieldtemplate/fieldTemplateList');
 
@@ -91,6 +107,17 @@ export function cooperatorProductList(pageNum,pageSize){
             pageSize:pageSize,
         });
 }
+
+export function selectCoopProduct(pageNum,pageSize,productName){
+    return request.post('/cooperator_product/selectCoopProduct',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            productName:productName,
+
+        });
+}
+
 export function getCooperatorByModel(pageNum,pageSize,modelNo){
     return request.post('/cooperator_product/getCooperatorByModel',
         {
@@ -260,6 +287,14 @@ export function fieldListBase(pageNum,pageSize)
         pageSize:pageSize,
     });
 }
+export function selectFieldListBase(pageNum,pageSize,nameZh)
+{
+    return request.post('/selectFieldListBase',        {
+        pageNum:pageNum,
+        pageSize:pageSize,
+        nameZh:nameZh,
+    });
+}
 export function fieldListDerive(pageNum,pageSize)
 {
     return request.post('/fieldListDerive',        {
@@ -267,7 +302,14 @@ export function fieldListDerive(pageNum,pageSize)
         pageSize:pageSize,
     });
 }
-
+export function selectFieldListDerive(pageNum,pageSize,nameZh)
+{
+    return request.post('/selectFieldListDerive',        {
+        pageNum:pageNum,
+        pageSize:pageSize,
+        nameZh:nameZh,
+    });
+}
 
 export function fieldDel(id) {
     return request.delete('/filed-delete?id=' + id);

+ 61 - 25
src/views/system/cooperatorInfo.vue

@@ -59,7 +59,7 @@
                             :page-size="pagesize"
                             :page-sizes="[5,10,15]"
                             layout="total,jumper,prev, pager, next,sizes"
-                            :total=totalSize>
+                            :total=showSize>
               </el-pagination>
             </div>
             
@@ -73,7 +73,7 @@
 
 import {
   getList,
-  userInfo, partnerList, roleDel
+  userInfo, partnerList, roleDel, selectCooperator
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -91,8 +91,12 @@ export default {
       currentPage: 1,
       pagesize:10,
       cooperatorData : [],
+      selectCooperatorData : [],
+
       cooperatorShowData : [],
       totalSize:'',
+      showSize:'',
+
       selected1: true,
       selected2: false,
       selected3: false,
@@ -117,6 +121,8 @@ export default {
           this.cooperatorShowData = this.cooperatorData
           var j = parseInt(res.data.cooperator_List.total)
           this.totalSize = j
+          this.showSize = this.totalSize
+
           console.log(this.cooperatorShowData[0])
         }
     )
@@ -163,27 +169,46 @@ export default {
 
     handleCurrentChange:function(currentPage){
       this.currentPage=currentPage;
-      cooperatorList(this.currentPage,this.pagesize).then(
-          res=>
-          {
-            this.cooperatorData=res.data.cooperator_List.list;
-            this.cooperatorShowData = this.cooperatorData
+      if(!this.input) {
+        cooperatorList(this.currentPage, this.pagesize).then(
+            res => {
+              this.cooperatorData = res.data.cooperator_List.list;
+              this.cooperatorShowData = this.cooperatorData
+
+            }
+        )
+      }
+      else {
+        selectCooperator(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectCooperatorData=res.data.select_cooperator_List.list;
+              this.cooperatorShowData = this.selectCooperatorData
 
-            // console.log(this.cooperatorShowData[0].cooperatorName)
-          }
-      )
+            }
+        )
+      }
     },
     handleSizeChange:function(size){
       this.pagesize=size;
-      cooperatorList(this.currentPage,this.pagesize).then(
-          res=>
-          {
-            this.cooperatorData=res.data.cooperator_List.list;
-            this.cooperatorShowData = this.cooperatorData
+      if(!this.input) {
+        cooperatorList(this.currentPage, this.pagesize).then(
+            res => {
+              this.cooperatorData = res.data.cooperator_List.list;
+              this.cooperatorShowData = this.cooperatorData
+            }
+        )
+      }
+      else {
+        selectCooperator(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectCooperatorData=res.data.select_cooperator_List.list;
+              this.cooperatorShowData = this.selectCooperatorData
 
-            // console.log(this.cooperatorShowData[0].cooperatorName)
-          }
-      )
+            }
+        )
+      }
     },
     async getTableData(){
       try {
@@ -252,15 +277,26 @@ export default {
     filterTable(){
       if (this.input.trim() === '') {
         // 如果输入框为空,显示所有数据
-        this.cooperatorShowData = this.cooperatorData
+        cooperatorList(this.currentPage, this.pagesize).then(
+            res => {
+              this.cooperatorData = res.data.cooperator_List.list;
+              this.cooperatorShowData = this.cooperatorData
+            }
+        )
+        this.showSize = this.totalSize
+
       } else {
         // 否则,只显示与输入文本匹配的数据
-        this.cooperatorShowData = this.cooperatorData.filter(item =>
-        {
-            const values = Object.values(item);
-            const str = values.join(' ').toLowerCase();
-            return str.includes(this.input.toLowerCase());
-        });
+        selectCooperator(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectCooperatorData=res.data.select_cooperator_List.list;
+              this.cooperatorShowData = this.selectCooperatorData
+              var l = parseInt(res.data.select_cooperator_List.total)
+              this.showSize = l
+              console.log(this.cooperatorShowData)
+            }
+        )
       }
     },
 

+ 63 - 36
src/views/system/cooperatorProductInfo.vue

@@ -21,7 +21,7 @@
       <div class="line-between-divs"></div>
       <el-main  style="height: 80vh;">
         <div class = "filter-container">
-          <el-input v-model="input" placeholder="产品编号/产品名称/合作方名称" style="width: 30%" size="small" clearable/>
+          <el-input v-model="input" placeholder="产品名称" style="width: 30%" size="small" clearable/>
           <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
         </div>      <el-divider></el-divider>
 
@@ -74,7 +74,7 @@
                          :page-sizes="[5,10,15]"
 
                          layout="total,jumper,prev, pager, next,sizes"
-                        :total=totalSize >
+                        :total=showSize >
           </el-pagination>
         </div>
         
@@ -91,7 +91,7 @@
 
 import store from "@/store";
 import request from '@/utils/request.js'
-import { fieldInfo, modelInfo } from '../../api';
+import {fieldInfo, modelInfo, selectCoopProduct} from '../../api';
 import {
   cooperatorProductList
 } from '@/api/index.js'
@@ -110,8 +110,11 @@ export default {
       pagesize:10,
 
       totalSize:'',
+      showSize:'',
 
       cooperatorProductData : [],
+      selectCooperatorProductData : [],
+
       cooperatorProductDataShow:[],
       selected1: true,
       selected2: false,
@@ -137,6 +140,7 @@ export default {
           this.cooperatorProductDataShow = this.cooperatorProductData
           var j = parseInt(res.data.cooperator_Product_List.total)
           this.totalSize = j
+          this.showSize = this.totalSize
           // console.log(this.cooperatorShowData[0].cooperatorName)
         }
     )
@@ -188,38 +192,48 @@ export default {
 
     handleCurrentChange:function(currentPage){
       this.currentPage=currentPage;
-      cooperatorProductList(this.currentPage,this.pagesize).then(
-          res=>
-          {
-            this.cooperatorProductData=res.data.cooperator_Product_List.list;
-            this.cooperatorProductDataShow = this.cooperatorProductData
+      if(!this.input){
+        cooperatorProductList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.cooperatorProductData=res.data.cooperator_Product_List.list;
+              this.cooperatorProductDataShow = this.cooperatorProductData
+            }
+        )}
+      else {
+        selectCoopProduct(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectCooperatorProductData=res.data.select_cooperator_Product_List.list;
+              this.cooperatorProductDataShow = this.selectCooperatorProductData
 
-            // console.log(this.cooperatorShowData[0].cooperatorName)
-          }
-      )
+            }
+        )
+      }
     },
     handleSizeChange:function(size){
       this.pagesize=size;
-      cooperatorProductList(this.currentPage,this.pagesize).then(
-          res=>
-          {
-            this.cooperatorProductData=res.data.cooperator_Product_List.list;
-            this.cooperatorProductDataShow = this.cooperatorProductData
+      if(!this.input){
+        cooperatorProductList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.cooperatorProductData=res.data.cooperator_Product_List.list;
+              this.cooperatorProductDataShow = this.cooperatorProductData
+            }
+        )}
+      else {
+        selectCoopProduct(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectCooperatorProductData=res.data.select_cooperator_Product_List.list;
+              this.cooperatorProductDataShow = this.selectCooperatorProductData
 
-            // console.log(this.cooperatorShowData[0].cooperatorName)
-          }
-      )
+              console.log(this.select_cooperator_Product_List)
+            }
+        )
+      }
     },
-    // gotolink1()
-    // {
-    //   this.$router.replace('/cooperatorProductInfo');
-    //   this.selected1 = false;
-    //   this.selected2 = true;
-    //   this.selected3 = true;
-    //   this.selected4 = false;
-    //   this.selected5 = true;
-    //   this.selected6 = false;
-    // },
+
     gotolink2()
     {
       //指定跳转地址
@@ -256,15 +270,28 @@ export default {
     filterTable(){
       if (this.input.trim() === '') {
         // 如果输入框为空,显示所有数据
-        this.cooperatorProductData = this.getTableData();
+        // this.cooperatorProductData = this.getTableData();
+        cooperatorProductList(this.currentPage,this.pagesize).then(
+            res=>
+            {
+              this.cooperatorProductData=res.data.cooperator_Product_List.list;
+              this.cooperatorProductDataShow = this.cooperatorProductData
+            }
+        )
+        this.showSize = this.totalSize
+
       } else {
         // 否则,只显示与输入文本匹配的数据
-        this.cooperatorProductData = this.cooperatorProductData.filter(item =>
-        {
-            const values = Object.values(item);
-            const str = values.join(' ').toLowerCase();
-            return str.includes(this.input.toLowerCase());
-        });
+        selectCoopProduct(this.currentPage,this.pagesize,this.input).then(
+            res=>
+            {
+              this.selectCooperatorProductData=res.data.select_cooperator_Product_List.list;
+              this.cooperatorProductDataShow = this.selectCooperatorProductData
+              var l = parseInt(res.data.select_cooperator_Product_List.total)
+              this.showSize = l
+              console.log(this.select_cooperator_Product_List)
+            }
+        )
       }
     },
 

+ 58 - 24
src/views/system/fieldDerive.vue

@@ -21,7 +21,7 @@
 
       <el-main>
         <div class = "filter-container">
-          <el-input v-model="input" placeholder="字段名称" style="width: 30%" size="small" clearable/>
+          <el-input v-model="input" placeholder="衍生字段名称" style="width: 30%" size="small" clearable/>
           <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
           <el-button type="primary" round @click="onButtonClickAdd" size="small" style="margin-left: 350px">新增</el-button>
         </div>
@@ -101,7 +101,7 @@
                                :page-sizes="[5,10,15]"
 
                                layout="total,jumper,prev, pager, next,sizes"
-                               :total=deriveTotal >
+                               :total=showDeriveTotal >
                 </el-pagination>
               </el-tab-pane>
         </el-tabs>
@@ -115,7 +115,7 @@
 
 import {
   getList,
-  userInfo, partnerList, roleDel, fieldListDerive,fieldDel
+  userInfo, partnerList, roleDel, fieldListDerive,fieldDel,selectFieldListDerive
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -140,8 +140,11 @@ export default {
 
       fieldList : [],
       fieldDerive:[],
+      selectFieldDerive:[],
+
       fieldDeriveShow:[],
       deriveTotal:'',
+      showDeriveTotal:'',
 
       selected1: true,
       selected2: false,
@@ -170,6 +173,7 @@ export default {
           this.fieldDeriveShow = this.fieldDerive
           var k = parseInt(res.data.fieldListDerive.total)
           this.deriveTotal = k
+          this.showDeriveTotal = this.deriveTotal
           console.log(this.fieldDerive)
         }
     )
@@ -234,29 +238,48 @@ export default {
 
     handleCurrentChange2:function(currentPage){
       this.currentPage2=currentPage;
+      if(!this.input){
       fieldListDerive(this.currentPage2,this.pagesize2).then(
           res=>
           {
             this.fieldDerive=res.data.fieldListDerive.list;
-
             this.fieldDeriveShow = this.fieldDerive
-
-            console.log(this.fieldDerive)
           }
-      )
+      )}
+      else {
+        selectFieldListDerive(this.currentPage2,this.pagesize2,this.input).then(
+            res=>
+            {
+              this.selectFieldDerive=res.data.selectFieldListDerive.list;
+              this.fieldDeriveShow = this.selectFieldDerive
+
+            }
+        )
+      }
     },
     handleSizeChange2:function(size){
       this.pagesize2=size;
-      fieldListDerive(this.currentPage2,this.pagesize2).then(
-          res=>
-          {
-            this.fieldDerive=res.data.fieldListDerive.list;
-
-            this.fieldDeriveShow = this.fieldDerive
-
-            console.log(this.fieldDerive)
-          }
-      )
+      if(!this.input){
+        fieldListDerive(this.currentPage2,this.pagesize2).then(
+            res=>
+            {
+              this.fieldDerive=res.data.fieldListDerive.list;
+
+              this.fieldDeriveShow = this.fieldDerive
+
+            }
+        )}
+      else {
+        selectFieldListDerive(this.currentPage2,this.pagesize2,this.input).then(
+            res=>
+            {
+              this.selectFieldDerive=res.data.selectFieldListDerive.list;
+
+              this.fieldDeriveShow = this.selectFieldDerive
+
+            }
+        )
+      }
     },
 
     async getTableData(){
@@ -355,15 +378,26 @@ export default {
     filterTable(){
       if (this.input.trim() === '') {
         // 如果输入框为空,显示所有数据
-        this.fieldDerive = this.getTableData();
+        fieldListDerive(this.currentPage2,this.pagesize2).then(
+            res=>
+            {
+              this.fieldDerive=res.data.fieldListDerive.list;
+              this.fieldDeriveShow = this.fieldDerive
+            }
+        )
+        this.showDeriveTotal = this.deriveTotal
       } else {
         // 否则,只显示与输入文本匹配的数据
-        this.fieldDerive = this.fieldDerive.filter(item =>
-        {
-            const values = Object.values(item);
-            const str = values.join(' ').toLowerCase();
-            return str.includes(this.input.toLowerCase());
-        });
+        selectFieldListDerive(this.currentPage2,this.pagesize2,this.input).then(
+            res=>
+            {
+              this.selectFieldDerive=res.data.selectFieldListDerive.list;
+
+              this.fieldDeriveShow = this.selectFieldDerive
+              var k = parseInt(res.data.selectFieldListDerive.total)
+              this.showDeriveTotal = k
+            }
+        )
       }
     },
 

+ 53 - 98
src/views/system/fieldInfo.vue

@@ -21,7 +21,7 @@
 
       <el-main>
         <div class = "filter-container">
-          <el-input v-model="input" placeholder="字段名称" style="width: 30%" size="small" clearable/>
+          <el-input v-model="input" placeholder="基础字段名称" style="width: 30%" size="small" clearable/>
           <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
         </div>
         <el-divider></el-divider>
@@ -88,81 +88,11 @@
                                :page-sizes="[5,10,15]"
 
                                layout="total,jumper,prev, pager, next,sizes"
-                               :total=baseTotal >
+                               :total=showBaseTotal >
                 </el-pagination>
               </el-tab-pane>
           <el-tab-pane label="衍生字段" name="second">
-            <el-table :data="fieldDeriveShow" style="width: 100%;" stripe>
-              <el-table-column align="center" label="编号" >
-                <template v-slot="{row}">
-                  <span>{{ row.fieldNo}}</span>
-                </template>
-              </el-table-column>
-
-
-              <el-table-column align="center" label="字段名称(中文)">
-                <template v-slot="{row}">
-                  <span>{{ row.nameZh}}</span>
-                </template>
-              </el-table-column>
-
-              <el-table-column align="center" label="字段名称(英文)" >
-                <template v-slot="{row}">
-                  <span>{{ row.name}}</span>
-                </template>
-              </el-table-column>
-
-              <el-table-column align="center" label="提取逻辑" >
-                <template v-slot="{row}">
-                  <span>{{ row.fetchLogic}}</span>
-                </template>
-              </el-table-column>
-
-              <el-table-column align="center" label="类型" >
-                <template v-slot="{row}">
-                  <span>{{ row.type}}</span>
-                </template>
-              </el-table-column>
-
-              <el-table-column align="center" label="字段状态" >
-                <template v-slot="{row}">
-                  <span>{{ row.status}}</span>
-                </template>
-              </el-table-column>
-
-              <el-table-column align="center" label="创建者" >
-                <template v-slot="{row}">
-                  <span>{{ row.createBy}}</span>
-                </template>
-              </el-table-column>
 
-              <el-table-column align="center" label="创建时间">
-                <template v-slot="{row}">
-                  <span>{{ row.createTime}}</span>
-                </template>
-              </el-table-column>
-
-              <el-table-column align="center" label="操作" >
-                <template v-slot="{row}">
-                  <el-button size="mini" type="primary" @click="edit(row)">编辑</el-button>
-                  <el-button size="mini" type="danger" @click="delete(row.id)">删除</el-button>
-
-                </template>
-              </el-table-column>
-
-
-
-            </el-table>
-            <el-pagination background
-                           @size-change="handleSizeChange2"
-                           @current-change="handleCurrentChange2"
-                           :current-page="currentPage2"
-                           :page-sizes="[5,10,15]"
-
-                           :page-size="pagesize2"
-                           layout="total,jumper,prev, pager, next,sizes"
-                           :total=deriveTotal >
-            </el-pagination>
           </el-tab-pane>
 
 
@@ -179,7 +109,7 @@
 
 import {
   getList,
-  userInfo, partnerList, fieldDel, fieldTemplateList
+  userInfo, partnerList, fieldDel, fieldTemplateList, selectFieldListBase
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -206,13 +136,11 @@ export default {
       pagesize3:5,
       fieldList : [],
       fieldBase:[],
+      selectFieldBase:[],
+
       fieldBaseShow:[],
-      fieldDerive:[],
       baseTotal:'',
-      deriveTotal:'',
-
-      fieldDeriveShow:[],
-
+      showBaseTotal:'',
       fieldExtra:[],
       selected3: false,
       selected4: true,
@@ -231,7 +159,6 @@ export default {
   mounted() 
   {
     //待修改
-
     fieldListBase(this.currentPage1,this.pagesize1).then(
         res=>
         {
@@ -239,6 +166,7 @@ export default {
           this.fieldBaseShow = this.fieldBase
           var j = parseInt(res.data.fieldListBase.total)
           this.baseTotal = j
+          this.showBaseTotal = this.baseTotal
           console.log(this.fieldBase)
         }
     )
@@ -355,28 +283,44 @@ export default {
 
     handleCurrentChange1:function(currentPage){
       this.currentPage1=currentPage;
-
+      if(!this.input){
       fieldListBase(this.currentPage1,this.pagesize1).then(
           res=>
           {
             this.fieldBase=res.data.fieldListBase.list;
             this.fieldBaseShow = this.fieldBase
 
-            console.log(this.fieldBase)
           }
-      )
+      )}
+      else {
+        selectFieldListBase(this.currentPage1,this.pagesize1,this.input).then(
+            res=>
+            {
+              this.selectFieldBase=res.data.selectFieldListBase.list;
+              this.fieldBaseShow = this.selectFieldBase
+            }
+        )
+      }
     },
     handleSizeChange1:function(size){
       this.pagesize1=size;
-      fieldListBase(this.currentPage1,this.pagesize1).then(
-          res=>
-          {
-            this.fieldBase=res.data.fieldListBase.list;
-            this.fieldBaseShow = this.fieldBase
-
-            console.log(this.fieldBase)
-          }
-      )
+      if(!this.input){
+        fieldListBase(this.currentPage1,this.pagesize1).then(
+            res=>
+            {
+              this.fieldBase=res.data.fieldListBase.list;
+              this.fieldBaseShow = this.fieldBase
+            }
+        )}
+      else {
+        selectFieldListBase(this.currentPage1,this.pagesize1,this.input).then(
+            res=>
+            {
+              this.selectFieldBase=res.data.selectFieldListBase.list;
+              this.fieldBaseShow = this.selectFieldBase
+            }
+        )
+      }
     },
     handleCurrentChange2:function(currentPage){
       this.currentPage2=currentPage;
@@ -432,15 +376,26 @@ export default {
     filterTable(){
       if (this.input.trim() === '') {
         // 如果输入框为空,显示所有数据
-        this.fieldBaseShow = this.fieldBase;
+        fieldListBase(this.currentPage1,this.pagesize1).then(
+            res=>
+            {
+              this.fieldBase=res.data.fieldListBase.list;
+              this.fieldBaseShow = this.fieldBase
+            }
+        )
+        this.showBaseTotal = this.baseTotal;
       } else {
         // 否则,只显示与输入文本匹配的数据
-        this.fieldBaseShow = this.fieldBase.filter(item =>
-        {
-            const values = Object.values(item);
-            const str = values.join(' ').toLowerCase();
-            return str.includes(this.input.toLowerCase());
-        });
+        selectFieldListBase(this.currentPage1,this.pagesize1,this.input).then(
+            res=>
+            {
+              this.selectFieldBase=res.data.selectFieldListBase.list;
+              this.fieldBaseShow = this.selectFieldBase
+              var j = parseInt(res.data.selectFieldListBase.total)
+              this.showBaseTotal = j
+              console.log(this.selectFieldBase)
+            }
+        )
       }
     },
 

+ 54 - 34
src/views/system/fieldTemplate.vue

@@ -82,7 +82,7 @@
 
                            :page-size="pagesize1"
                             layout="total,jumper,prev, pager, next,sizes"
-                            :total=totalSize >
+                            :total=showSize >
             </el-pagination>
           </el-tab-pane>
 
@@ -99,7 +99,7 @@
 
 import {
   getList,
-  userInfo, partnerList, templateDel
+  userInfo, partnerList, templateDel,selectTemplate
 } from '@/api/index.js'
 import store from "@/store";
 import request from '@/utils/request.js'
@@ -127,6 +127,8 @@ export default {
       pagesize1:10,
 
       templateData : [],
+      selectTemplateData : [],
+
       templateDataShow : [],
 
       selected1: true,
@@ -137,7 +139,9 @@ export default {
       selected6: true,
       input:'',
       isRouterAlive:true,
-      totalSize:''
+      totalSize:'',
+      showSize:'',
+
     }
   },
   watch: {},
@@ -156,13 +160,10 @@ export default {
 
           this.templateData=res.data.field_template_list.list;
           this.templateDataShow = this.templateData
-
           var j = parseInt(res.data.field_template_list.total)
           this.totalSize = j
+          this.showSize = this.totalSize
 
-          console.log(this.totalSize)
-
-          console.log(this.templateDataShow)
         }
     )
   },
@@ -280,35 +281,43 @@ export default {
 
     handleCurrentChange1:function(currentPage){
       this.currentPage1=currentPage;
+      if(!this.input){
       fieldTemplateList(this.currentPage1,this.pagesize1).then(
           res=>
           {
-            console.log(this.currentPage1)
-
             this.templateData=res.data.field_template_list.list;
             this.templateDataShow = this.templateData
-
-
-
-            console.log(this.templateDataShow)
           }
-      )
+      )}
+      else {
+        selectTemplate(this.currentPage1,this.pagesize1,this.input).then(
+            res=>
+            {
+              this.selectTemplateData=res.data.select_field_template_list.list;
+              this.templateDataShow = this.selectTemplateData
+            }
+        )
+      }
     },
     handleSizeChange1:function(size){
       this.pagesize1=size;
-      fieldTemplateList(this.currentPage1,this.pagesize1).then(
-          res=>
-          {
-            console.log(this.currentPage1)
-
-            this.templateData=res.data.field_template_list.list;
-            this.templateDataShow = this.templateData
-
-
-
-            console.log(this.templateDataShow)
-          }
-      )
+      if(!this.input){
+        fieldTemplateList(this.currentPage1,this.pagesize1).then(
+            res=>
+            {
+              this.templateData=res.data.field_template_list.list;
+              this.templateDataShow = this.templateData
+            }
+        )}
+      else {
+        selectTemplate(this.currentPage1,this.pagesize1,this.input).then(
+            res=>
+            {
+              this.selectTemplateData=res.data.select_field_template_list.list;
+              this.templateDataShow = this.selectTemplateData
+            }
+        )
+      }
     },
 
     async getTableData(){
@@ -355,15 +364,26 @@ export default {
     filterTable(){
       if (this.input.trim() === '') {
         // 如果输入框为空,显示所有数据
-        this.templateDataShow = this.templateData;
+        fieldTemplateList(this.currentPage1,this.pagesize1).then(
+            res=>
+            {
+              this.templateData=res.data.field_template_list.list;
+              this.templateDataShow = this.templateData
+            }
+        )
+        this.showSize = this.totalSize
       } else {
         // 否则,只显示与输入文本匹配的数据
-        this.templateDataShow = this.templateData.filter(item =>
-        {
-            const values = Object.values(item);
-            const str = values.join(' ').toLowerCase();
-            return str.includes(this.input.toLowerCase());
-        });
+        selectTemplate(this.currentPage1,this.pagesize1,this.input).then(
+            res=>
+            {
+              this.selectTemplateData=res.data.select_field_template_list.list;
+              this.templateDataShow = this.selectTemplateData
+              var j = parseInt(res.data.select_field_template_list.total)
+              this.showSize = j
+
+            }
+        )
       }
     },