weiximei пре 6 година
родитељ
комит
001c560b10

+ 6
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java Прегледај датотеку

@@ -167,4 +167,10 @@ public class Constant {
167 167
      * 活动
168 168
      */
169 169
     public static final String MESSAGE_TYPE_ACTIVITY = "8";
170
+    
171
+    /**
172
+     * excel后缀
173
+     */
174
+    public static final String SUFFIX_2003 = ".xls";
175
+    public static final String SUFFIX_2007 = ".xlsx";
170 176
 }

+ 17
- 0
CODE/smart-community/property-api/pom.xml Прегледај датотеку

@@ -39,6 +39,23 @@
39 39
 			<artifactId>spring-cloud-starter-openfeign</artifactId>
40 40
 		</dependency>
41 41
 
42
+		<!--解析Excel-->
43
+		<dependency>
44
+			<groupId>org.apache.poi</groupId>
45
+			<artifactId>poi</artifactId>
46
+			<version>3.14</version>
47
+		</dependency>
48
+		<dependency>
49
+			<groupId>org.apache.poi</groupId>
50
+			<artifactId>poi-ooxml</artifactId>
51
+			<version>3.14</version>
52
+		</dependency>
53
+		<dependency>
54
+			<groupId>org.apache.poi</groupId>
55
+			<artifactId>poi-ooxml-schemas</artifactId>
56
+			<version>3.14</version>
57
+		</dependency>
58
+
42 59
 		<dependency>
43 60
 			<groupId>io.springfox</groupId>
44 61
 			<artifactId>springfox-swagger2</artifactId>

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/common/base/BaseController.java Прегледај датотеку

@@ -11,7 +11,7 @@ import javax.servlet.http.HttpSession;
11 11
  * @date 2018-12-18
12 12
  */
13 13
 public class BaseController {
14
-
14
+    
15 15
     /**
16 16
      * 获取 UserElement
17 17
      * @param session

+ 11
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BuildingOwnerInfoController.java Прегледај датотеку

@@ -11,10 +11,13 @@ import io.swagger.annotations.ApiImplicitParam;
11 11
 import io.swagger.annotations.ApiImplicitParams;
12 12
 import io.swagger.annotations.ApiOperation;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PostMapping;
14 15
 import org.springframework.web.bind.annotation.RequestBody;
15 16
 import org.springframework.web.bind.annotation.RequestMapping;
16 17
 import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
17 19
 import org.springframework.web.bind.annotation.RestController;
20
+import org.springframework.web.multipart.MultipartFile;
18 21
 
19 22
 import javax.servlet.http.HttpSession;
20 23
 import java.util.List;
@@ -119,5 +122,13 @@ public class BuildingOwnerInfoController extends BaseController {
119 122
         responseBean = iBuildingOwnerInfoService.getBuildingOrUnitOrNumber(parameter, userElement.getCommunityId());
120 123
         return responseBean;
121 124
     }
125
+    
126
+    @ApiOperation(value = "上传楼栋信息接口", notes = "上传楼栋信息接口")
127
+    @PostMapping(value = "/building/uploadExcel", consumes = "multipart/*", headers = "content-type=multipart/form-data")
128
+    public ResponseBean uploadExcel(@RequestParam("file") MultipartFile file) {
129
+        ResponseBean responseBean = new ResponseBean();
130
+        responseBean = iBuildingOwnerInfoService.getExcelData(file);
131
+        return responseBean;
132
+    }
122 133
 
123 134
 }

+ 12
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBuildingOwnerInfoService.java Прегледај датотеку

@@ -3,8 +3,10 @@ package com.community.huiju.service;
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.huiju.model.BuildingOwnerInfo;
6
+import org.springframework.web.multipart.MultipartFile;
6 7
 
7 8
 import java.util.List;
9
+import java.util.Map;
8 10
 
9 11
 /**
10 12
  * <p>
@@ -47,6 +49,16 @@ public interface IBuildingOwnerInfoService extends IService<BuildingOwnerInfo> {
47 49
      * @param parameter
48 50
      * @return
49 51
      */
52
+
53
+    ResponseBean deleteByIdDatch(List<Integer> ids);
54
+    
55
+    /**
56
+     * 根据excel获取相关信息
57
+     * @param file
58
+     * @return
59
+     */
60
+    ResponseBean getExcelData(MultipartFile file);
61
+
50 62
     ResponseBean getBuildingOrUnitOrNumber(String parameter, Integer communityId);
51 63
 
52 64
 }

+ 104
- 9
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Прегледај датотеку

@@ -2,32 +2,38 @@ package com.community.huiju.service.impl;
2 2
 
3 3
 import com.alibaba.fastjson.JSONObject;
4 4
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
6
-import com.baomidou.mybatisplus.core.enums.SqlMethod;
7 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
8
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
9
-import com.baomidou.mybatisplus.core.toolkit.Constants;
10 6
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
11 7
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8
+import com.community.commom.constant.Constant;
12 9
 import com.community.commom.mode.ResponseBean;
10
+import com.community.commom.utils.AccountValidatorUtil;
13 11
 import com.community.commom.utils.BeanTools;
14 12
 import com.community.huiju.dao.BuildingOwnerInfoMapper;
15 13
 import com.community.huiju.exception.WisdomException;
16 14
 import com.community.huiju.model.BuildingOwnerInfo;
17 15
 import com.community.huiju.service.IBuildingOwnerInfoService;
18
-import com.google.common.collect.Lists;
19 16
 import com.google.common.collect.Maps;
17
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
18
+import org.apache.poi.ss.usermodel.Row;
19
+import org.apache.poi.ss.usermodel.Sheet;
20
+import org.apache.poi.ss.usermodel.Workbook;
21
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
22
+import org.slf4j.Logger;
23
+import org.slf4j.LoggerFactory;
24
+
20 25
 import lombok.extern.slf4j.Slf4j;
21
-import org.apache.ibatis.binding.MapperMethod;
22
-import org.apache.ibatis.session.SqlSession;
23 26
 import org.springframework.beans.factory.annotation.Autowired;
24 27
 import org.springframework.stereotype.Service;
25 28
 import org.springframework.transaction.annotation.Transactional;
29
+import org.springframework.web.multipart.MultipartFile;
26 30
 
27 31
 import java.time.LocalDateTime;
32
+import java.util.ArrayList;
33
+import java.util.HashMap;
28 34
 import java.util.List;
29 35
 import java.util.Map;
30
-import java.util.stream.Collectors;
36
+
31 37
 
32 38
 /**
33 39
  * <p>
@@ -43,7 +49,9 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
43 49
 
44 50
     @Autowired
45 51
     private BuildingOwnerInfoMapper buildingOwnerInfoMapper;
46
-
52
+    
53
+    public static final Logger logger = LoggerFactory.getLogger(BuildingOwnerInfoServiceImpl.class);
54
+    
47 55
     @Override
48 56
     public ResponseBean listQuery(String parameter) {
49 57
 
@@ -191,4 +199,91 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<BuildingOwnerInfoM
191 199
 
192 200
         return responseBean;
193 201
     }
202
+    
203
+    /**
204
+     * 根据excel获取相关信息
205
+     *
206
+     * @param file
207
+     * @return
208
+     */
209
+    @Override
210
+    public ResponseBean getExcelData(MultipartFile file) {
211
+        ResponseBean responseBean = new ResponseBean();
212
+        List<BuildingOwnerInfo> list = new ArrayList<>();
213
+        if (file == null) {
214
+            responseBean.addError("对象不能为空");
215
+            return responseBean;
216
+        }
217
+        //获取文件的名字
218
+        String originalFilename = file.getOriginalFilename();
219
+        Workbook workbook = null;
220
+        try {
221
+            if (originalFilename.endsWith(Constant.SUFFIX_2003)) {
222
+                workbook = new HSSFWorkbook(file.getInputStream());
223
+            } else if (originalFilename.endsWith(Constant.SUFFIX_2007)) {
224
+                workbook = new XSSFWorkbook(file.getInputStream());
225
+            }
226
+        } catch (Exception e) {
227
+            logger.info(originalFilename);
228
+            e.printStackTrace();
229
+            responseBean.addError("格式错误");
230
+            return responseBean;
231
+        }
232
+        if (workbook == null) {
233
+            logger.info(originalFilename);
234
+            responseBean.addError("格式错误");
235
+            return responseBean;
236
+        } else {
237
+            List<String> temBuildingList = new ArrayList<String>();
238
+            List<String> temTelList = new ArrayList<String>();
239
+            //获取一个sheet也就是一个工作簿
240
+            Sheet sheet = workbook.getSheetAt(0);
241
+            int lastRowNum = sheet.getLastRowNum();
242
+            //从第一行开始第一行一般是标题
243
+            for (int j = 3; j <= lastRowNum; j++) {
244
+                Row row = sheet.getRow(j);
245
+                BuildingOwnerInfo buildingOwnerInfo = new BuildingOwnerInfo();
246
+                String building = row.getCell(0).getStringCellValue();
247
+                String unit = row.getCell(1).getStringCellValue();
248
+                String level = row.getCell(2).getStringCellValue();
249
+                String roomNo = row.getCell(3).getStringCellValue();
250
+                String ownerName = row.getCell(4).getStringCellValue();
251
+                String ownerTel = row.getCell(5).getStringCellValue();
252
+                //校验手机号码
253
+                if (!AccountValidatorUtil.isPhone(ownerTel)){
254
+                    responseBean.addError("请输入正确手机号:" + ownerTel);
255
+                    return responseBean;
256
+                }
257
+                String buildingInfo = building + unit + level + roomNo;
258
+                if (temBuildingList.contains(buildingInfo)){
259
+                    logger.info("存在重复房源:{}",buildingInfo);
260
+                    responseBean.addError("存在重复房源:"+ buildingInfo);
261
+                    return responseBean;
262
+                }
263
+                if (temTelList.contains(ownerTel)){
264
+                    logger.info("存在重复手机号:{}",ownerTel);
265
+                    responseBean.addError("存在重复手机号:"+ ownerTel);
266
+                    return responseBean;
267
+                }
268
+                //把数据塞入temList校验是否有重复的数据
269
+                temBuildingList.add(buildingInfo);
270
+                temTelList.add(ownerTel);
271
+                //构建数据
272
+                buildingOwnerInfo.setBuilding(building);
273
+                buildingOwnerInfo.setUnit(unit);
274
+                buildingOwnerInfo.setLevel(level);
275
+                buildingOwnerInfo.setRoomNo(roomNo);
276
+                buildingOwnerInfo.setOwnerName(ownerName);
277
+                buildingOwnerInfo.setOwnerTel(ownerTel);
278
+                list.add(buildingOwnerInfo);
279
+            }
280
+        }
281
+        //构建分页
282
+        Map<String,Object> data = new HashMap<String, Object>();
283
+        data.put("list",list);
284
+        data.put("total",list.size());
285
+        
286
+        responseBean.addSuccess(data);
287
+        return responseBean;
288
+    }
194 289
 }

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/bootstrap.yml Прегледај датотеку

@@ -2,7 +2,7 @@ server:
2 2
   port: 8084
3 3
 spring:
4 4
   application:
5
-    name: eureka-client2
5
+    name: property-api
6 6
   cloud:
7 7
     config:
8 8
       name: application

+ 3
- 2
VUECODE/smart-property-manage/package.json Прегледај датотеку

@@ -17,16 +17,17 @@
17 17
     "axios": "0.18.0",
18 18
     "element-ui": "2.4.6",
19 19
     "file-saver": "^2.0.0-rc.4",
20
+    "jquery": "^2.2.3",
20 21
     "js-cookie": "2.2.0",
21 22
     "normalize.css": "7.0.0",
22 23
     "nprogress": "0.2.0",
24
+    "qs": "^6.6.0",
23 25
     "vue": "2.5.17",
24 26
     "vue-amap": "^0.5.8",
25 27
     "vue-router": "3.0.1",
26 28
     "vuex": "3.0.1",
27 29
     "wangeditor": "^3.1.1",
28
-    "xlsx": "^0.14.0",
29
-    "jquery": "^2.2.3"
30
+    "xlsx": "^0.14.0"
30 31
   },
31 32
   "devDependencies": {
32 33
     "@antv/data-set": "^0.10.1",

+ 16
- 0
VUECODE/smart-property-manage/src/api/batchImport.js Прегледај датотеку

@@ -0,0 +1,16 @@
1
+import request from '@/utils/ajax'
2
+
3
+export function uploadBuildingExcel(query) {
4
+  return new Promise((resolve, reject) => {
5
+    request({
6
+      url: '/building/uploadExcel',
7
+      method: 'post',
8
+      data: query
9
+    }).then((res) => {
10
+      console.log('out')
11
+      resolve(res)
12
+    }).catch((err) => {
13
+      console.log(err)
14
+    })
15
+  })
16
+}

+ 3
- 1
VUECODE/smart-property-manage/src/store/index.js Прегледај датотеку

@@ -5,6 +5,7 @@ import user from './modules/user'
5 5
 import banner from './modules/banner'
6 6
 import community from './modules/community'
7 7
 import trunkIndex from './modules/trunkIndex'
8
+import batchImport from './modules/batchImport'
8 9
 import getters from './getters'
9 10
 
10 11
 Vue.use(Vuex)
@@ -15,7 +16,8 @@ const store = new Vuex.Store({
15 16
     user,
16 17
     community,
17 18
     banner,
18
-    trunkIndex
19
+    trunkIndex,
20
+    batchImport
19 21
   },
20 22
   getters
21 23
 })

+ 38
- 0
VUECODE/smart-property-manage/src/store/modules/batchImport.js Прегледај датотеку

@@ -0,0 +1,38 @@
1
+import { uploadBuildingExcel } from '@/api/batchImport'
2
+
3
+const batchImport = {
4
+  namespaced: true,
5
+  state: {
6
+    total: '',
7
+    temlist: []
8
+  },
9
+
10
+  mutations: {
11
+    SET_LIST: (state, list) => {
12
+      state.temlist = list
13
+    },
14
+    SET_TOTAL: (state, total) => {
15
+      state.total = total
16
+    }
17
+  },
18
+
19
+  actions: {
20
+    UploadBuildingExcel({ commit }, file) {
21
+      console.log(file)
22
+      return new Promise((resolve, reject) => {
23
+        uploadBuildingExcel({ file: file.raw }).then(response => {
24
+          if (response.code === '0') {
25
+            const data = response.data
26
+            commit('SET_LIST', data.list)
27
+            commit('SET_TOTAL', data.total)
28
+          }
29
+          resolve(response)
30
+        }).catch(error => {
31
+          reject(error)
32
+        })
33
+      })
34
+    }
35
+  }
36
+}
37
+
38
+export default batchImport

+ 75
- 0
VUECODE/smart-property-manage/src/utils/ajax.js Прегледај датотеку

@@ -0,0 +1,75 @@
1
+import axios from 'axios'
2
+import qs from 'qs'
3
+import { getToken } from '@/utils/auth'
4
+
5
+const Axios = axios.create({
6
+  baseURL: process.env.BASE_API, // api 的 base_url
7
+  timeout: 60000,
8
+  responseType: 'json',
9
+  withCredentials: true,
10
+  queryData: {},
11
+  urlData: {},
12
+  headerData: '',
13
+  headers: {
14
+    'Content-Type': 'multipart/form-data'
15
+  }
16
+})
17
+
18
+Axios.interceptors.request.use((config) => {
19
+  config.headers['Content-Type'] = config.headerData ? config.headerData : 'multipart/form-data'
20
+  config.headers['X-Auth-Token'] = getToken()
21
+  // config.urlData = { ...config.urlData,  }
22
+  // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
23
+  const urlData = qs.stringify(config.urlData)
24
+  const queryData = qs.stringify(config.queryData)
25
+  // 判断是通过斜杠传参
26
+  if (config.url.indexOf(':') > -1) {
27
+    if (typeof config.urlData === 'object') {
28
+      config.url = replaceURLParams(config.url, config.urlData)
29
+    } else {
30
+      config.url = config.url.slice(0, config.url.indexOf(':')) + urlData
31
+    }
32
+  }
33
+  if (queryData) {
34
+    config.url += '?' + queryData
35
+  }
36
+  if (config.headerData) {
37
+    return config
38
+  } else {
39
+    const fm = new FormData()
40
+    for (const k in config.data) {
41
+      if (Array.isArray(config.data[k])) {
42
+        config.data[k].forEach((v) => {
43
+          fm.append(k, v)
44
+        })
45
+      } else {
46
+        fm.append(k, config.data[k])
47
+      }
48
+    }
49
+    config.data = fm
50
+    return config
51
+  }
52
+}, (error) => {
53
+  console.log(error)
54
+})
55
+
56
+const ajax = (...args) => {
57
+  return new Promise((resolve, reject) => {
58
+    Axios(...args).then(({ data }) => {
59
+      resolve(data)
60
+    }).catch(() => {
61
+      console.log('error')
62
+    })
63
+  })
64
+}
65
+
66
+export default ajax
67
+
68
+export function replaceURLParams(url, params) {
69
+  const args = { ...(params || {}), org: 'MQ' }
70
+
71
+  return Object.keys(args).reduce((acc, k) => { // 此方法对每个元素进行处理
72
+    const re = new RegExp(`:${k}(?!w)`, 'i')
73
+    return acc.replace(re, args[k])
74
+  }, url)
75
+}

+ 77
- 35
VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue Прегледај датотеку

@@ -3,52 +3,41 @@
3 3
   <div class="root">
4 4
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
5 5
       <el-form-item>
6
-        <el-upload
7
-          :on-preview="handlePreview"
8
-          :on-remove="handleRemove"
9
-          :before-remove="beforeRemove"
10
-          :limit="3"
11
-          :on-exceed="handleExceed"
12
-          :file-list="fileList"
13
-          class="upload-demo"
14
-          action="https://jsonplaceholder.typicode.com/posts/"
15
-          multiple>
6
+        <el-upload :on-preview="handlePreview" :on-change="handleChange" :before-upload="beforeUpload" :limit="1" :on-exceed="handleExceed" :file-list="fileList" class="upload-demo" action="" multiple>
16 7
           <el-button style="margin-left: 10px;" size="large" type="primary">下载模板</el-button>
17 8
           <el-button slot="trigger" size="large" type="primary">选取文件并预览</el-button>
18 9
           <el-button style="margin-left: 10px;" size="large" type="success" @click="submitUpload">提交</el-button>
19 10
         </el-upload>
20 11
       </el-form-item>
21 12
     </el-form>
22
-    <el-table
23
-      ref="multipleTable"
24
-      :data="tableData3"
25
-      border
26
-      tooltip-effect="dark"
27
-      style="width: 100%; margin-top: 20px;"
28
-      @selection-change="handleSelectionChange">
13
+    <el-table ref="multipleTable" :data="list" border tooltip-effect="dark" style="width: 100%; margin-top: 20px;" @selection-change="handleSelectionChange">
29 14
       <el-table-column label="栋">
30
-        <template slot-scope="scope">{{ scope.row.date }}</template>
15
+        <template slot-scope="scope">{{ scope.row.building }}</template>
16
+      </el-table-column>
17
+      <el-table-column label="单元">
18
+        <template slot-scope="scope">{{ scope.row.unit }}</template>
19
+      </el-table-column>
20
+      <el-table-column label="楼层">
21
+        <template slot-scope="scope">{{ scope.row.level }}</template>
22
+      </el-table-column>
23
+      <el-table-column label="户号">
24
+        <template slot-scope="scope">{{ scope.row.roomNo }}</template>
25
+      </el-table-column>
26
+      <el-table-column label="业主姓名">
27
+        <template slot-scope="scope">{{ scope.row.ownerName }}</template>
28
+      </el-table-column>
29
+      <el-table-column label="手机号码">
30
+        <template slot-scope="scope">{{ scope.row.ownerTel }}</template>
31 31
       </el-table-column>
32
-      <el-table-column prop="name" label="单元"/>
33
-      <el-table-column prop="address" label="楼层"/>
34
-      <el-table-column prop="address" label="户号"/>
35
-      <el-table-column prop="address" label="业主姓名"/>
36
-      <el-table-column prop="address" label="手机号码"/>
37 32
     </el-table>
38 33
     <div class="block">
39
-      <el-pagination
40
-        :current-page="listQuery.pageNum"
41
-        :page-sizes="[5, 10, 20, 30]"
42
-        :page-size="listQuery.pageSize"
43
-        :total="40"
44
-        layout="total, sizes, prev, pager, next, jumper"
45
-        @size-change="handleSizeChange"
46
-        @current-change="handleCurrentChange"/>
34
+      <el-pagination :current-page="listQuery.pageNum" :page-sizes="[5, 10, 20, 30]" :page-size="listQuery.pageSize" :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" @current-change="handleCurrentChange"/>
47 35
     </div>
48 36
   </div>
49 37
 </template>
50 38
 
51 39
 <script>
40
+import { mapState, mapActions } from 'vuex'
52 41
 export default {
53 42
   data() {
54 43
     return {
@@ -56,39 +45,92 @@ export default {
56 45
         pageNum: 1,
57 46
         pageSize: 20
58 47
       },
48
+      list: [],
59 49
       currentPage4: 4
60 50
     }
61 51
   },
52
+  computed: {
53
+    ...mapState('batchImport', {
54
+      temlist: s => s.temlist,
55
+      total: s => s.total
56
+    })
57
+  },
58
+  created() {
59
+    console.log(mapActions)
60
+  },
62 61
   methods: {
62
+    ...mapActions('batchImport', ['UploadBuildingExcel']),
63 63
     handleSizeChange(val) {
64
+      this.listQuery.pageSize = val
65
+      this.getList()
64 66
       console.log(`每页 ${val} 条`)
65 67
     },
66 68
     handleCurrentChange(val) {
69
+      this.listQuery.pageNum = val
70
+      this.getList()
67 71
       console.log(`当前页: ${val}`)
68 72
     },
69 73
     dialogBatchImport() {
70 74
       this.$router.push({ name: 'batch-import' })
75
+    },
76
+    beforeUpload(file) {
77
+      this.files = file
78
+      const extension = file.name.split('.')[1] === 'xls'
79
+      const extension2 = file.name.split('.')[1] === 'xlsx'
80
+      if (!extension && !extension2) {
81
+        this.$message.warning('上传文件只能是 xls、xlsx格式!')
82
+        return
83
+      }
84
+      return false // 返回false不会自动上传
85
+    },
86
+    handleChange(file) {
87
+      const fileName = file.name
88
+      if (fileName === '') {
89
+        this.$message.warning('请选择要上传的文件!')
90
+        return false
91
+      }
92
+      this.UploadBuildingExcel(file)
93
+        .then(response => {
94
+          console.log('success')
95
+          if (response.code === '1') {
96
+            this.$message.warning(response.message)
97
+          }
98
+          if (response.code === '0') {
99
+            this.$message.success('上传成功')
100
+            this.getList()
101
+          }
102
+        })
103
+        .catch(() => {
104
+          console.log('upload error')
105
+        })
106
+    },
107
+    getList() {
108
+      this.list = this.temlist.slice(
109
+        (this.listQuery.pageNum - 1) * this.listQuery.pageSize,
110
+        this.listQuery.pageNum * this.listQuery.pageSize
111
+      )
112
+      console.log(this.list)
71 113
     }
72 114
   }
73 115
 }
74 116
 </script>
75 117
 
76 118
 <style scoped>
77
-.root{
119
+.root {
78 120
   display: flex;
79 121
   flex-flow: column;
80 122
 }
81
-.form-listQuery{
123
+.form-listQuery {
82 124
   margin-top: 20px;
83 125
   margin-left: 30px;
84 126
 }
85
-.operation{
127
+.operation {
86 128
   display: flex;
87 129
   justify-content: space-between;
88 130
   margin-left: 20px;
89 131
   margin-right: 20px;
90 132
 }
91
-.block{
133
+.block {
92 134
   display: flex;
93 135
   justify-content: flex-end;
94 136
   margin-top: 10px;