XMLWAN hace 4 años
padre
commit
a96d52f64e
Se han modificado 2 ficheros con 37 adiciones y 7 borrados
  1. 5 1
      src/api/common/common.js
  2. 32 6
      src/xt_pages/qcd/statisticalConfiguration.vue

+ 5 - 1
src/api/common/common.js Ver fichero

@@ -34,7 +34,11 @@ export function saveConfiguration(data) {
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 42
   return request({
39 43
     url: 'com/api/getconfigurationlist',
40 44
     method: 'get',

+ 32 - 6
src/xt_pages/qcd/statisticalConfiguration.vue Ver fichero

@@ -16,18 +16,20 @@
16 16
       <div class="configTable">
17 17
         <el-table :data="configuraData" border style="width: 100%">
18 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 20
           </el-table-column>
21 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 23
           </el-table-column>
24 24
           <el-table-column prop="address" label="范围">
25 25
              <template slot-scope="scope">{{ scope.row.min_range }} - {{scope.row.large_range}}</template>
26 26
           </el-table-column>
27 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 32
             </el-table-column>
30
-            <el-table-column prop="address" label="排序"></el-table-column>
31 33
           <el-table-column label="操作" width="180">
32 34
             <template slot-scope="scope">
33 35
               <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -35,6 +37,17 @@
35 37
             </template>
36 38
           </el-table-column>
37 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 51
       </div>
39 52
 
40 53
       <el-dialog title="新增" :visible.sync="newDialog">
@@ -152,7 +165,10 @@ export default {
152 165
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
153 166
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
154 167
         large_range:[{required:true,message:"指控范围不能为空"}]
155
-      }
168
+      },
169
+      page:1,
170
+      limit:10,
171
+      total:0,
156 172
     };
157 173
   },
158 174
   methods: {
@@ -216,12 +232,22 @@ export default {
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 243
     getConfigurationList(){
220
-      getConfigurationList().then(response=>{
244
+      getConfigurationList(this.limit,this.page).then(response=>{
221 245
         if(response.data.state === 1){
222 246
           var configurationlist = response.data.data.configurationlist
223 247
           console.log("列表",configurationlist)
224 248
           this.configuraData = configurationlist
249
+          var total = response.data.data.total
250
+          console.log("total",total)
225 251
         }
226 252
       })
227 253
     }