update 0727 docs

This commit is contained in:
lb
2023-07-27 16:41:02 +08:00
parent ce29b3ca9b
commit f0c1691775
5 changed files with 227 additions and 155 deletions

View File

@@ -12,6 +12,7 @@
@operate-event="handleOperate"
:current-page="page"
:current-size="size"
@select="handleTableSelect"
:refresh-layout-key="refreshLayoutKey" />
<el-pagination
@@ -173,6 +174,7 @@ export default {
overlayVisible: false,
cachedSearchCondition: {},
needAttachmentDialog: false,
tableSelectedIds: [],
};
},
inject: ["urls"],
@@ -276,6 +278,10 @@ export default {
return Math.random();
},
handleTableSelect(ids) {
this.tableSelectedIds = [...ids];
},
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
@@ -334,7 +340,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ",data)
console.log("[edit] ", data);
this.openDialog(data); /** data is ==> id */
break;
}
@@ -605,6 +611,14 @@ export default {
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "批量同步":
this.overlayVisible = true;
this.$http.post(this.urls.syncUrl, this.tableSelectedIds).then(({ data: res }) => {
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
res.code == 0 && this.getList();
this.overlayVisible = false;
});
break;
case "新增":
this.openDialog();
break;