|
@@ -138,7 +138,6 @@ export default {
|
|
|
},
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
next(vm => {
|
|
|
- //const pm = to.param;
|
|
|
Object.assign(vm, to.params);
|
|
|
})
|
|
|
},
|
|
@@ -151,8 +150,8 @@ export default {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
- getDataList() {
|
|
|
- const param = this.getFilterItems();
|
|
|
+ getDataList(isTurnPage) {
|
|
|
+ const param = this.getFilterItems(isTurnPage);
|
|
|
this.searched = true;
|
|
|
api.diagBasePage(param).then((res) => {
|
|
|
this.list = res.data.data.records
|
|
@@ -225,14 +224,17 @@ export default {
|
|
|
},
|
|
|
currentChange(next) {
|
|
|
this.currentPage = next;
|
|
|
- this.getDataList();
|
|
|
+ this.getDataList(true);
|
|
|
// if (this.cacheData[next]) { //如果已请求过该页数据,则使用缓存不重复请求
|
|
|
// this.list = this.cacheData[next];
|
|
|
// } else {
|
|
|
// this.getDataList();
|
|
|
// }
|
|
|
},
|
|
|
- getFilterItems() {
|
|
|
+ getFilterItems(isTurnPage) {
|
|
|
+ if(isTurnPage&&!this.searched){
|
|
|
+ this.clearFilter();
|
|
|
+ };
|
|
|
const param = {
|
|
|
current: this.currentPage,
|
|
|
size: this.pageSize,
|
|
@@ -252,7 +254,13 @@ export default {
|
|
|
type:type||'warning'
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ clearFilter(){
|
|
|
+ this.filter={
|
|
|
+ disName: '', //诊断名称
|
|
|
+ modifier: '', //操作人
|
|
|
+ hasQuestion: '', //有无问题词
|
|
|
+ };
|
|
|
+ },
|
|
|
showConfirmDialog(msg,resolve){
|
|
|
this.$alert(msg, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -267,11 +275,7 @@ export default {
|
|
|
if(res.data.code=='0'){
|
|
|
if(!this.searched){
|
|
|
//未点确认时清空搜索条件
|
|
|
- this.filter={
|
|
|
- disName: '', //诊断名称
|
|
|
- modifier: '', //操作人
|
|
|
- hasQuestion: '', //有无问题词
|
|
|
- };
|
|
|
+ this.clearFilter();
|
|
|
}
|
|
|
if(this.list.length==1){
|
|
|
//当前在最后一页且只有一条数据时,删除后跳到前一页
|