|
@@ -134,7 +134,10 @@
|
|
:visible="true"
|
|
:visible="true"
|
|
class="data-link-dialog"
|
|
class="data-link-dialog"
|
|
header="变量绑定"
|
|
header="变量绑定"
|
|
- @close="dataBindDialog.show = false"
|
|
|
|
|
|
+ @cancel="
|
|
|
|
+ dataBindDialog.data.binds = dataBindDialog.bkBinds;
|
|
|
|
+ dataBindDialog.show = false;
|
|
|
|
+ "
|
|
@confirm="dataBindDialog.show = false"
|
|
@confirm="dataBindDialog.show = false"
|
|
:width="700"
|
|
:width="700"
|
|
>
|
|
>
|
|
@@ -145,6 +148,7 @@
|
|
v-for="(tag, index) in dataBindDialog.data.binds"
|
|
v-for="(tag, index) in dataBindDialog.data.binds"
|
|
:key="index"
|
|
:key="index"
|
|
:content="tag.id"
|
|
:content="tag.id"
|
|
|
|
+ trigger="click"
|
|
>
|
|
>
|
|
<t-tag class="mr-8 mb-8" closable @close="onRemoveBind(index)">
|
|
<t-tag class="mr-8 mb-8" closable @close="onRemoveBind(index)">
|
|
{{ tag.label }}
|
|
{{ tag.label }}
|
|
@@ -417,7 +421,8 @@ const onBind = (item: any) => {
|
|
for (const i of item.binds) {
|
|
for (const i of item.binds) {
|
|
dataBindDialog.selectedIds.push(i.id);
|
|
dataBindDialog.selectedIds.push(i.id);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ dataBindDialog.bkBinds = [];
|
|
|
|
+ dataBindDialog.bkBinds.push(...item.binds);
|
|
dataBindDialog.show = true;
|
|
dataBindDialog.show = true;
|
|
|
|
|
|
getDataSet();
|
|
getDataSet();
|
|
@@ -455,7 +460,6 @@ const onChangePagination = (pageInfo: any) => {
|
|
|
|
|
|
const onSelectBindsChange = (value: string[], options: any) => {
|
|
const onSelectBindsChange = (value: string[], options: any) => {
|
|
dataBindDialog.selectedIds = value;
|
|
dataBindDialog.selectedIds = value;
|
|
- console.log(options);
|
|
|
|
|
|
|
|
if (options.type === 'check') {
|
|
if (options.type === 'check') {
|
|
for (const item of options.selectedRowData) {
|
|
for (const item of options.selectedRowData) {
|
|
@@ -486,6 +490,15 @@ const onSelectBindsChange = (value: string[], options: any) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const onRemoveBind = (index: number) => {
|
|
|
|
+ dataBindDialog.data.binds.splice(index, 1);
|
|
|
|
+
|
|
|
|
+ dataBindDialog.selectedIds = [];
|
|
|
|
+ for (const i of dataBindDialog.data.binds) {
|
|
|
|
+ dataBindDialog.selectedIds.push(i.id);
|
|
|
|
+ }
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
<style lang="postcss" scoped>
|
|
<style lang="postcss" scoped>
|
|
.props {
|
|
.props {
|