|
@@ -88,6 +88,7 @@
|
|
|
<script>
|
|
|
import api from '@api/icss.js';
|
|
|
import config from '@api/config.js';
|
|
|
+import utils from '@api/utils.js';
|
|
|
|
|
|
export default {
|
|
|
name: 'ChemicalAndCommonMapping', //化验大小项和公表维护
|
|
@@ -133,21 +134,29 @@ export default {
|
|
|
methods: {
|
|
|
handleSizeChange(val){
|
|
|
this.pageSize = val;
|
|
|
+ this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
|
|
|
this.getDataList();
|
|
|
},
|
|
|
getDataList(isTurnPage) {
|
|
|
const param = this.getFilterItems(isTurnPage);
|
|
|
this.searched = true;
|
|
|
- api.getLisMappingPage(param).then((res) => {
|
|
|
- if(res.data.code == '0') {
|
|
|
- this.list = res.data.data.records
|
|
|
- }
|
|
|
- this.total = res.data.data.total;
|
|
|
- if(this.inCurrentPage!==undefined){
|
|
|
- this.currentPage=this.inCurrentPage;
|
|
|
- this.inCurrentPage = undefined;
|
|
|
- }
|
|
|
- })
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
+ api.getLisMappingPage(param).then((res) => {
|
|
|
+ loading.close()
|
|
|
+ if(res.data.code == '0') {
|
|
|
+ this.list = res.data.data.records
|
|
|
+ }
|
|
|
+ this.total = res.data.data.total;
|
|
|
+ if(this.inCurrentPage!==undefined){
|
|
|
+ this.currentPage=this.inCurrentPage;
|
|
|
+ this.inCurrentPage = undefined;
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
filterDatas() {
|
|
|
this.currentPage = 1;
|