Переглянути джерело

reactor:热点和时间选择展示全部名称;

zhangchong 1 рік тому
батько
коміт
2729eb7b7e
1 змінених файлів з 10 додано та 10 видалено
  1. 10 10
      src/components/Hotspot/index.vue

+ 10 - 10
src/components/Hotspot/index.vue

@@ -154,13 +154,13 @@ const loadNode = async (node: any, resolve: any) => {
 		if (showCheckbox) {
 			treeRef.value.setCheckedKeys(modelValue);
 			const nodes = treeRef.value.getCheckedNodes();
-			if (type === 'hotspot') state.name = nodes.map((item: any) => item.hotSpotName).join(',') ?? '';
-			else state.name = nodes.map((item: any) => item.eventName).join(',') ?? '';
+			if (type === 'hotspot') state.name = nodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
+			else state.name = nodes.map((item: any) => item.eventFullName).join(',') ?? '';
 		} else {
 			treeRef.value.setCurrentKey(modelValue);
 			const currentNode = treeRef.value.getNode(modelValue);
-			if (type === 'hotspot') state.name = currentNode.data.hotSpotName;
-			else state.name = currentNode.data.eventName;
+			if (type === 'hotspot') state.name = currentNode.data.hotSpotFullName;
+			else state.name = currentNode.data.eventFullName;
 		}
 		loading.value = false;
 	} catch (e) {
@@ -211,8 +211,8 @@ const nodeClick = async (val: any, node: any) => {
 		state.externalArr = [];
 		state.external = [];
 		state.externalArr = getParentId(node, state.external);
-		if (type === 'hotspot') state.name = val.hotSpotName;
-		else state.name = val.eventName;
+		if (type === 'hotspot') state.name = val.hotSpotFullName;
+		else state.name = val.eventFullName;
 		state.id = val.id;
 		emit('update:modelValue', val.id);
 		emit('choose', { externalArr: state.externalArr, ...val });
@@ -222,8 +222,8 @@ const nodeClick = async (val: any, node: any) => {
 	state.externalArr = [];
 	state.external = [];
 	state.externalArr = getParentId(node, state.external);
-	if (type === 'hotspot') state.name = val.hotSpotName;
-	else state.name = val.eventName;
+	if (type === 'hotspot') state.name = val.hotSpotFullName;
+	else state.name = val.eventFullName;
 	state.id = val.id;
 	emit('update:modelValue', val.id);
 	emit('choose', { externalArr: state.externalArr, ...val });
@@ -237,8 +237,8 @@ const checkChange = (val: any, e: any) => {
 	state.checkedKeys = e.checkedKeys;
 	state.checkedNodes = e.checkedNodes;
 	state.id = e.checkedKeys;
-	if (type === 'hotspot') state.name = e.checkedNodes.map((item: any) => item.hotSpotName).join(',') ?? '';
-	else state.name = e.checkedNodes.map((item: any) => item.eventName).join(',') ?? '';
+	if (type === 'hotspot') state.name = e.checkedNodes.map((item: any) => item.hotSpotFullName).join(',') ?? '';
+	else state.name = e.checkedNodes.map((item: any) => item.eventFullName).join(',') ?? '';
 	if (props.externalArr.length) {
 		state.externalArr = props.externalArr.concat(getParentId(current, state.external));
 	} else {