update 查询条件没应用上的问题
This commit is contained in:
@@ -9,23 +9,45 @@
|
||||
<!-- <head-form :form-config="headFormConfig" @headBtnClick="btnClick" /> -->
|
||||
<BaseSearchForm :head-config="headConfig" @btn-click="handleBtnClick" />
|
||||
|
||||
<BaseListTable v-loading="tableLoading" :table-config="tableConfig.table" :column-config="tableConfig.column"
|
||||
:table-data="dataList" @operate-event="handleOperate" @load-sub="handleLoadSub"
|
||||
<BaseListTable
|
||||
v-loading="tableLoading"
|
||||
:table-config="tableConfig.table"
|
||||
:column-config="tableConfig.column"
|
||||
:table-data="dataList"
|
||||
@operate-event="handleOperate"
|
||||
@load-sub="handleLoadSub"
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
<el-pagination class="mt-5 flex justify-end" @size-change="handleSizeChange" @current-change="handlePageChange"
|
||||
:current-page.sync="page" :page-sizes="[1, 5, 10, 20, 50, 100]" :page-size="size" :total="totalPage"
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
:current-page.sync="page"
|
||||
:page-sizes="[1, 5, 10, 20, 50, 100]"
|
||||
:page-size="size"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
<!-- :current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize" -->
|
||||
|
||||
<DialogWithMenu ref="edit-dialog" v-if="dialogType === DIALOG_WITH_MENU" :dialog-visible.sync="dialogVisible"
|
||||
:configs="dialogConfigs" @refreshDataList="handleRefreshDatalist" />
|
||||
|
||||
<DialogJustForm ref="add-sub-dialog" :dialog-visible.sync="subdialogVisible" :configs="subdialogConfigs"
|
||||
<DialogWithMenu
|
||||
ref="edit-dialog"
|
||||
v-if="dialogType === DIALOG_WITH_MENU"
|
||||
:dialog-visible.sync="dialogVisible"
|
||||
:configs="dialogConfigs"
|
||||
@refreshDataList="handleRefreshDatalist" />
|
||||
|
||||
<DialogUpload ref="upload-dialog" v-if="uploadDialogVisible" title="导入原料" filename="bomTemplate.xlsx"
|
||||
<DialogJustForm
|
||||
ref="add-sub-dialog"
|
||||
:dialog-visible.sync="subdialogVisible"
|
||||
:configs="subdialogConfigs"
|
||||
@refreshDataList="handleRefreshDatalist" />
|
||||
|
||||
<DialogUpload
|
||||
ref="upload-dialog"
|
||||
v-if="uploadDialogVisible"
|
||||
title="导入原料"
|
||||
filename="bomTemplate.xlsx"
|
||||
@refresh-list="getList" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -159,6 +181,7 @@ export default {
|
||||
],
|
||||
},
|
||||
},
|
||||
cachedSearchCondition: {}
|
||||
};
|
||||
},
|
||||
inject: ["urls"],
|
||||
@@ -197,9 +220,9 @@ export default {
|
||||
const params = queryParams
|
||||
? { ...queryParams, page: this.page, limit: this.size }
|
||||
: {
|
||||
page: this.page,
|
||||
limit: this.size,
|
||||
};
|
||||
page: this.page,
|
||||
limit: this.size,
|
||||
};
|
||||
|
||||
if (!queryParams && this.listQueryExtra.length) {
|
||||
this.listQueryExtra.map((name) => {
|
||||
@@ -263,7 +286,7 @@ export default {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => { });
|
||||
.catch((err) => {});
|
||||
}
|
||||
case "edit": {
|
||||
this.openDialog(data); /** data is ==> id */
|
||||
@@ -302,7 +325,7 @@ export default {
|
||||
|
||||
handleRefreshDatalist() {
|
||||
// location.reload();
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
|
||||
openUploadDialog() {
|
||||
@@ -320,7 +343,8 @@ export default {
|
||||
this.openDialog();
|
||||
break;
|
||||
case "查询": {
|
||||
this.getList(payload);
|
||||
Object.assign(this.cachedSearchCondition, payload)
|
||||
this.getList(this.cachedSearchCondition);
|
||||
break;
|
||||
}
|
||||
case "导入":
|
||||
@@ -328,23 +352,23 @@ export default {
|
||||
break;
|
||||
case "同步":
|
||||
this.$message({
|
||||
message: '正在同步...',
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
this.$refs['cursor-loading-ref'].style.cursor = 'wait'
|
||||
message: "正在同步...",
|
||||
type: "success",
|
||||
duration: 1000,
|
||||
});
|
||||
this.$refs["cursor-loading-ref"].style.cursor = "wait";
|
||||
|
||||
return this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: res.code === 0 ? 'succes' : 'error',
|
||||
duration: 1500
|
||||
, onClose: () => {
|
||||
this.getList()
|
||||
this.$refs['cursor-loading-ref'].style.cursor = 'unset'
|
||||
}
|
||||
})
|
||||
})
|
||||
type: res.code === 0 ? "succes" : "error",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList();
|
||||
this.$refs["cursor-loading-ref"].style.cursor = "unset";
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -353,12 +377,12 @@ export default {
|
||||
// val 是新值
|
||||
this.page = 1;
|
||||
this.size = val;
|
||||
this.getList();
|
||||
this.getList(this.cachedSearchCondition);
|
||||
},
|
||||
|
||||
handlePageChange(val) {
|
||||
// val 是新值
|
||||
this.getList();
|
||||
this.getList(this.cachedSearchCondition);
|
||||
},
|
||||
|
||||
/** 打开对话框 */
|
||||
|
||||
Reference in New Issue
Block a user