|
@@ -134,6 +134,7 @@ import { MessagePlugin } from 'tdesign-vue-next';
|
|
|
import { importExcel } from '@/services/excel';
|
|
|
import { typeOptions } from '@/services/common';
|
|
|
import { cdn } from '@/services/api';
|
|
|
+import { Pen } from '@meta2d/core';
|
|
|
|
|
|
const { modelValue } = defineProps<{
|
|
|
modelValue: any;
|
|
@@ -251,6 +252,20 @@ const onOkAddData = () => {
|
|
|
modelValue.data.push(addDataDialog.data);
|
|
|
} else {
|
|
|
modelValue.data[addDataDialog.index] = addDataDialog.data;
|
|
|
+
|
|
|
+ //更新所有绑定该id的pen label
|
|
|
+ let binds = meta2d.store.bind[addDataDialog.data.id];
|
|
|
+ if (binds) {
|
|
|
+ binds.forEach((item) => {
|
|
|
+ const pen: Pen = meta2d.findOne(item.id);
|
|
|
+ pen.realTimes &&
|
|
|
+ pen.realTimes.forEach((_realTime) => {
|
|
|
+ if (_realTime.key === item.key) {
|
|
|
+ _realTime.bind.label = addDataDialog.data.label;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
addDataDialog.show = false;
|