liuqiao 1 жил өмнө
parent
commit
4a86e6331a

+ 11 - 8
src/view/components/InfoAnimation.vue

@@ -237,7 +237,7 @@ const cocodeIndex = ref(0);
 const cocodeIsInit = ref("false");
 //滑块
 function sliderchange(val) {
-  newcount.value=count.value;
+  //newcount.value=count.value;
   fcon.step = count.value;
   // console.log(count.value);
   // vtkScalarRead();
@@ -373,7 +373,9 @@ function regionchange(val) {
 }
 // aid获取
 const accident5 = (val) => {
+
   aid.value = val;
+  resultactiveName.value = "first";
   // console.log(aid.value);
   // console.log("props.classradio", props.classradio);
   if (props.classradio == "Fire") {
@@ -564,10 +566,9 @@ function vtkShow() {
 
   mapper.setInputData(fcon.polydata);
   getMinMax(scalarArray);
-  mapper.setScalarRange(parseFloat(min.value.toFixed(3)), parseFloat(max.value.toFixed(3))); //设置范围
+   mapper.setScalarRange(parseFloat(min.value.toFixed(3)), parseFloat(max.value.toFixed(3))); //设置范围
   // actor.setMapper(mapper);
   scalarBarActor.setAxisLabel(formInline.value.region);
-  // scalarBarActor.update();
   mapper.clearColorArrays(); //强制重建颜色
   actor.getProperty().setOpacity(count.value); //设置错误的透明度使得页面重新加载  不设置不刷新页面
 
@@ -588,20 +589,22 @@ function getMinMax(scalars) {
       max.value = scalar;
     }
   }
-  console.log("max,min:", max.value, min.value);
+  // console.log("max,min:", max.value, min.value);
 }
 
 const handleClick = (Tab, val) => {
-  console.log(Tab.props.name);
-  if (Tab.props.name == "first") {
+  resultactiveName.value=Tab.props.name;
+  if (resultactiveName.value == "first") {
     timing.value = setInterval(() => {
       const timestamp = new Date().getTime();
       newtime.value = timestampToTime(timestamp);
+      console.log(   newtime.value );
       reddate(new Date());
     }, 1000);
-  } else if (Tab.props.name == "second") {
+ 
+  } else if ( resultactiveName.value == "second") {
     clearInterval(timing.value);
-  } else if (Tab.props.name == "third") {
+  } else if ( resultactiveName.value== "third") {
     clearInterval(timing.value);
   }
 };