Commit 625295a4 authored by “yiyousong”'s avatar “yiyousong”

fix : 修改窗口关联业务

parent dabfcad7
......@@ -181,7 +181,6 @@ export default {
// 确定
handleOk() {
this.$refs.formData.validate(async (valid) => {
console.log(this.form.parentId);
if (valid) {
this.confirmLoading = true;
let res = await saveBusiness({
......
......@@ -54,7 +54,7 @@
}"
:columns="columns"
:data-source="siteBusinessList"
:rowKey="(record) => record.id"
:rowKey="(record) => record.businessId"
:row-selection="{
selectedRowKeys: rowKeys,
onChange: handleChange,
......@@ -193,17 +193,17 @@ export default {
onSelectRow(record, selected) {
if (selected && record.children && record.children.length) {
record.children.forEach((v) => {
this.rowKeys = [...new Set([...this.rowKeys, v.id])];
this.rowKeys = [...new Set([...this.rowKeys, v.businessId])];
});
} else if (!selected && record.children && record.children.length) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id);
this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
record.children.forEach((v) => {
this.rowKeys = this.rowKeys.filter((val) => val != v.id);
this.rowKeys = this.rowKeys.filter((val) => val != v.businessId);
});
} else if (selected && record.parentId) {
this.rowKeys = [...new Set([...this.rowKeys, record.parentId])];
} else if (!selected) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id);
this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
}
},
// 保存窗口关联业务
......@@ -236,4 +236,4 @@ export default {
align-items: center;
justify-content: space-between;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment