XMLWAN il y a 4 ans
Parent
révision
a96d52f64e
2 fichiers modifiés avec 37 ajouts et 7 suppressions
  1. 5 1
      src/api/common/common.js
  2. 32 6
      src/xt_pages/qcd/statisticalConfiguration.vue

+ 5 - 1
src/api/common/common.js Voir le fichier

34
   })
34
   })
35
 }
35
 }
36
 
36
 
37
-export function getConfigurationList(params) {
37
+export function getConfigurationList(limit, page) {
38
+  const params = {
39
+    limit: limit,
40
+    page: page
41
+  }
38
   return request({
42
   return request({
39
     url: 'com/api/getconfigurationlist',
43
     url: 'com/api/getconfigurationlist',
40
     method: 'get',
44
     method: 'get',

+ 32 - 6
src/xt_pages/qcd/statisticalConfiguration.vue Voir le fichier

16
       <div class="configTable">
16
       <div class="configTable">
17
         <el-table :data="configuraData" border style="width: 100%">
17
         <el-table :data="configuraData" border style="width: 100%">
18
           <el-table-column prop="date" label="检验检查大项" width="180">
18
           <el-table-column prop="date" label="检验检查大项" width="180">
19
-              <template slot-scope="scope">{{ scope.row.inspection_major }}</template>
19
+              <template slot-scope="scope">{{ scope.row.project_name }}</template>
20
           </el-table-column>
20
           </el-table-column>
21
           <el-table-column prop="name" label="检查小项" width="180">
21
           <el-table-column prop="name" label="检查小项" width="180">
22
-             <template slot-scope="scope">{{ scope.row.inspection_minor }}</template>
22
+             <template slot-scope="scope">{{ scope.row.item_name }}</template>
23
           </el-table-column>
23
           </el-table-column>
24
           <el-table-column prop="address" label="范围">
24
           <el-table-column prop="address" label="范围">
25
              <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
25
              <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
26
           </el-table-column>
26
           </el-table-column>
27
            <el-table-column prop="address" label="单位">
27
            <el-table-column prop="address" label="单位">
28
-              <template slot-scope="scope">{{ scope.row.min_range }}</template>
28
+              <template slot-scope="scope">{{ scope.row.unit }}</template>
29
+            </el-table-column>
30
+            <el-table-column prop="address" label="排序">
31
+                <template slot-scope="scope">{{ scope.row.sort }}</template>
29
             </el-table-column>
32
             </el-table-column>
30
-            <el-table-column prop="address" label="排序"></el-table-column>
31
           <el-table-column label="操作" width="180">
33
           <el-table-column label="操作" width="180">
32
             <template slot-scope="scope">
34
             <template slot-scope="scope">
33
               <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
35
               <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
35
             </template>
37
             </template>
36
           </el-table-column>
38
           </el-table-column>
37
         </el-table>
39
         </el-table>
40
+
41
+          <el-pagination
42
+              @size-change="handleSizeChange"
43
+              @current-change="handleCurrentChange"
44
+              :page-sizes="[10, 20, 30, 100]"
45
+              :page-size="10"
46
+              background
47
+              style="margin-top:20px;float: right"
48
+              layout="total, sizes, prev, pager, next, jumper"
49
+              :total="total">
50
+          </el-pagination>
38
       </div>
51
       </div>
39
 
52
 
40
       <el-dialog title="新增" :visible.sync="newDialog">
53
       <el-dialog title="新增" :visible.sync="newDialog">
152
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
165
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
153
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
166
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
154
         large_range:[{required:true,message:"指控范围不能为空"}]
167
         large_range:[{required:true,message:"指控范围不能为空"}]
155
-      }
168
+      },
169
+      page:1,
170
+      limit:10,
171
+      total:0,
156
     };
172
     };
157
   },
173
   },
158
   methods: {
174
   methods: {
216
         }
232
         }
217
       })
233
       })
218
     },
234
     },
235
+   handleSizeChange(limit) {
236
+     // this.listQuery.limit = limit;
237
+      this.getConfigurationList();
238
+    },
239
+    handleCurrentChange(page) {
240
+     // this.listQuery.page = page;
241
+      this.getConfigurationList();
242
+    },
219
     getConfigurationList(){
243
     getConfigurationList(){
220
-      getConfigurationList().then(response=>{
244
+      getConfigurationList(this.limit,this.page).then(response=>{
221
         if(response.data.state === 1){
245
         if(response.data.state === 1){
222
           var configurationlist = response.data.data.configurationlist
246
           var configurationlist = response.data.data.configurationlist
223
           console.log("列表",configurationlist)
247
           console.log("列表",configurationlist)
224
           this.configuraData = configurationlist
248
           this.configuraData = configurationlist
249
+          var total = response.data.data.total
250
+          console.log("total",total)
225
         }
251
         }
226
       })
252
       })
227
     }
253
     }