Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
f02743bd
Commit
f02743bd
authored
Aug 13, 2021
by
RuoYi
Browse files
代码生成主子表多选行数据
parent
3003bb0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
View file @
f02743bd
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
plain
plain
icon=
"el-icon-download"
icon=
"el-icon-download"
size=
"mini"
size=
"mini"
:loading=
"exportLoading"
:loading=
"exportLoading"
@
click=
"handleExport"
@
click=
"handleExport"
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:export']"
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:export']"
>
导出
</el-button>
>
导出
</el-button>
...
@@ -573,19 +573,18 @@ export default {
...
@@ -573,19 +573,18 @@ export default {
/**
${
subTable
.
functionName
}
删除按钮操作 */
/**
${
subTable
.
functionName
}
删除按钮操作 */
handleDelete
${
subClassName
}()
{
handleDelete
${
subClassName
}()
{
if
(
this
.
checked
${
subClassName
}.
length
==
0
)
{
if
(
this
.
checked
${
subClassName
}.
length
==
0
)
{
this
.
$
alert
(
"请先选择要删除的${subTable.functionName}数据"
,
"提示"
,
{
confirmButtonText:
"确定"
,
}
);
this
.
msgError
(
"
请先选择要删除的
${
subTable
.
functionName
}
数据
"
);
}
else
{
}
else
{
this
.${
subclassName
}
List
.
splice
(
this
.
checked
${
subClassName
}[
0
].
index
-
1
,
1
);
const
${
subclassName
}
List
=
this
.${
subclassName
}
List
;
const
checked
${
subClassName
}
=
this
.
checked
${
subClassName
};
this
.${
subclassName
}
List
=
${
subclassName
}
List
.
filter
(
function
(
item
)
{
return
checked
${
subClassName
}.
indexOf
(
item
.
index
)
==
-
1
});
}
}
},
},
/**
单
选框选中数据 */
/**
复
选框选中数据 */
handle
${
subClassName
}
SelectionChange
(
selection
)
{
handle
${
subClassName
}
SelectionChange
(
selection
)
{
if
(
selection
.
length
>
1
)
{
this
.
checked
${
subClassName
}
=
selection
.
map
(
item
=>
item
.
index
)
this
.$
refs
.${
subclassName
}.
clearSelection
();
this
.$
refs
.${
subclassName
}.
toggleRowSelection
(
selection
.
pop
());
}
else
{
this
.
checked
${
subClassName
}
=
selection
;
}
},
},
#
end
#
end
/** 导出按钮操作 */
/** 导出按钮操作 */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment