bugfix 0706 zentao
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
<el-pagination
|
||||
v-if="navigator"
|
||||
class="mt-5 flex justify-end"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
@@ -50,7 +51,11 @@
|
||||
filename="bomTemplate.xlsx"
|
||||
@refresh-list="getList"
|
||||
@uploadSuccess="getList"
|
||||
@destroy-dialog="() => { uploadDialogVisible = false }" />
|
||||
@destroy-dialog="
|
||||
() => {
|
||||
uploadDialogVisible = false;
|
||||
}
|
||||
" />
|
||||
<Overlay v-if="overlayVisible" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -81,6 +86,10 @@ export default {
|
||||
Overlay,
|
||||
},
|
||||
props: {
|
||||
navigator: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
tableConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
@@ -126,11 +135,11 @@ export default {
|
||||
this.refreshLayoutKey = this.layoutTable();
|
||||
},
|
||||
watch: {
|
||||
page: val => {
|
||||
console.log('page changed:', val)
|
||||
page: (val) => {
|
||||
console.log("page changed:", val);
|
||||
},
|
||||
size: val => {
|
||||
console.log('size changed:', val)
|
||||
size: (val) => {
|
||||
console.log("size changed:", val);
|
||||
},
|
||||
triggerUpdate(val, oldVal) {
|
||||
if (val && val !== oldVal) {
|
||||
@@ -157,7 +166,7 @@ export default {
|
||||
refreshLayoutKey: null,
|
||||
uploadDialogVisible: false,
|
||||
overlayVisible: false,
|
||||
cachedSearchCondition: {}
|
||||
cachedSearchCondition: {},
|
||||
};
|
||||
},
|
||||
inject: ["urls"],
|
||||
@@ -177,7 +186,7 @@ export default {
|
||||
? { ...queryParams, page: this.page, limit: this.size }
|
||||
: {
|
||||
page: this.page,
|
||||
limit: this.size
|
||||
limit: this.size,
|
||||
};
|
||||
|
||||
if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) {
|
||||
@@ -189,7 +198,7 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
this.cachedSearchCondition = Object.assign({}, params)
|
||||
this.cachedSearchCondition = Object.assign({}, params);
|
||||
}
|
||||
|
||||
this.$http[this.urls.pageIsPostApi ? "post" : "get"](
|
||||
@@ -231,6 +240,8 @@ export default {
|
||||
id: item._id ?? item.id,
|
||||
}));
|
||||
this.totalPage = res.data.total;
|
||||
} else if (Array.isArray(res.data)) {
|
||||
this.dataList = res.data
|
||||
} else {
|
||||
this.dataList.splice(0);
|
||||
this.totalPage = 0;
|
||||
@@ -273,7 +284,7 @@ export default {
|
||||
promptName = data[deleteConfig.promptField];
|
||||
}
|
||||
|
||||
let currenPageListLength = this.dataList.length
|
||||
let currenPageListLength = this.dataList.length;
|
||||
// 确认是否删除
|
||||
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
@@ -296,8 +307,8 @@ export default {
|
||||
// this.page = 1;
|
||||
// this.size =
|
||||
// "defaultPageSize" in this.tableConfig.column ? this.tableConfig.column.defaultPageSize : 20;
|
||||
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1
|
||||
|
||||
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
|
||||
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message({
|
||||
@@ -359,7 +370,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
case "view-attachment-justform-version": {
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
break;
|
||||
}
|
||||
case "view-recipe": {
|
||||
@@ -573,7 +584,7 @@ export default {
|
||||
this.openDialog();
|
||||
return;
|
||||
}
|
||||
case "查询": {
|
||||
case "查询": {
|
||||
if (typeof payload === "object") {
|
||||
// BaseSearchForm 给这个组件传递了数据
|
||||
Object.assign(this.cachedSearchCondition, payload);
|
||||
|
||||
Reference in New Issue
Block a user