|
@@ -70,33 +70,24 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<div class="pagination">
|
|
<div class="pagination">
|
|
- <el-pagination v-if="total>pageSize"
|
|
|
|
- :current-page.sync="currentPage"
|
|
|
|
|
|
+ <el-pagination :current-page.sync="currentPage"
|
|
@current-change="currentChange"
|
|
@current-change="currentChange"
|
|
background
|
|
background
|
|
:page-size="pageSize"
|
|
:page-size="pageSize"
|
|
- layout="total,prev, pager, next, jumper"
|
|
|
|
|
|
+ :page-sizes="pageSizeArr"
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ :layout="pageLayout"
|
|
:total="total">
|
|
:total="total">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
- <!-- <div class="pagination">
|
|
|
|
- <el-pagination v-if="total>pageSize"
|
|
|
|
- :current-page.sync="currentPage"
|
|
|
|
- @current-change="currentChange"
|
|
|
|
- background
|
|
|
|
- :page-size="pageSize"
|
|
|
|
- layout="total,prev, pager, next, jumper"
|
|
|
|
- :total="total">
|
|
|
|
- </el-pagination>
|
|
|
|
- </div> -->
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import api from '@api/icss.js';
|
|
import api from '@api/icss.js';
|
|
|
|
+import config from '@api/config.js';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'ChemicalAndCommonMapping', //化验大小项和公表维护
|
|
name: 'ChemicalAndCommonMapping', //化验大小项和公表维护
|
|
@@ -110,12 +101,18 @@ export default {
|
|
uniqueName:''
|
|
uniqueName:''
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
- pageSize: 10,
|
|
|
|
|
|
+ pageSize: config.pageSize,
|
|
|
|
+ pageSizeArr:config.pageSizeArr,
|
|
|
|
+ pageLayout:config.pageLayout,
|
|
total: 0,
|
|
total: 0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getDataList()
|
|
|
|
|
|
+ const that = this;
|
|
|
|
+ //返回时避免参数未赋值就获取列表
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ that.getDataList();
|
|
|
|
+ });
|
|
|
|
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -133,6 +130,10 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleSizeChange(val){
|
|
|
|
+ this.pageSize = val;
|
|
|
|
+ this.getDataList();
|
|
|
|
+ },
|
|
getDataList(isTurnPage) {
|
|
getDataList(isTurnPage) {
|
|
const param = this.getFilterItems(isTurnPage);
|
|
const param = this.getFilterItems(isTurnPage);
|
|
this.searched = true;
|
|
this.searched = true;
|
|
@@ -150,16 +151,20 @@ export default {
|
|
addRelation() {
|
|
addRelation() {
|
|
const pam = this.searched ? {
|
|
const pam = this.searched ? {
|
|
currentPage: this.currentPage,
|
|
currentPage: this.currentPage,
|
|
|
|
+ pageSize:this.pageSize,
|
|
filter: this.filter
|
|
filter: this.filter
|
|
- } : {currentPage: this.currentPage};
|
|
|
|
|
|
+ } : {currentPage: this.currentPage,
|
|
|
|
+ pageSize:this.pageSize};
|
|
this.$router.push({name: 'AddChemicalAndCommonMapping', params: pam})
|
|
this.$router.push({name: 'AddChemicalAndCommonMapping', params: pam})
|
|
},
|
|
},
|
|
modifyRelation(row) {
|
|
modifyRelation(row) {
|
|
const item = Object.assign({},row);
|
|
const item = Object.assign({},row);
|
|
const pam = this.searched ? {
|
|
const pam = this.searched ? {
|
|
currentPage: this.currentPage,
|
|
currentPage: this.currentPage,
|
|
|
|
+ pageSize:this.pageSize,
|
|
filter: this.filter
|
|
filter: this.filter
|
|
- } : {currentPage: this.currentPage};
|
|
|
|
|
|
+ } : {currentPage: this.currentPage,
|
|
|
|
+ pageSize:this.pageSize};
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: 'AddChemicalAndCommonMapping',
|
|
name: 'AddChemicalAndCommonMapping',
|
|
params: Object.assign(pam, {isEdit: true, data: item})
|
|
params: Object.assign(pam, {isEdit: true, data: item})
|