|
@@ -119,7 +119,7 @@ let aid = ref()
|
|
|
let vtkObj = {}
|
|
|
let max, min;
|
|
|
watch(
|
|
|
- () => [formInline.region, count.value, aid.value],
|
|
|
+ () => [formInline.value.region, count.value, aid.value],
|
|
|
(newVal, oldVal) => {
|
|
|
|
|
|
if(initFlag){
|
|
@@ -212,20 +212,20 @@ function generateTicks(numberOfTicks) {
|
|
|
}
|
|
|
}
|
|
|
function vtkShow() {
|
|
|
- formInline.region="Pressure";
|
|
|
+ // formInline.region="Pressure";
|
|
|
console.log("执行了1111")
|
|
|
const scalarBarActor = vtkObj.scalarBarActor
|
|
|
const mapper = vtkObj.jgMapper
|
|
|
const actor = vtkObj.jgActor
|
|
|
const fcon = vtkObj.fcon
|
|
|
// console.log(props.region)
|
|
|
- const scalarArray = fcon.scalar.get(formInline.region)
|
|
|
+ const scalarArray = fcon.scalar.get(formInline.value.region)
|
|
|
if (!scalarArray || !fcon.polydata) {
|
|
|
return
|
|
|
}
|
|
|
console.log(" fcon.polydata.getNumberOfPoints():", fcon.polydata.getNumberOfPoints());
|
|
|
const dataArray = vtkDataArray.newInstance({
|
|
|
- name: formInline.region,
|
|
|
+ name: formInline.value.region,
|
|
|
size: fcon.polydata.getNumberOfPoints()
|
|
|
})
|
|
|
// console.log(dataArray);
|
|
@@ -234,10 +234,10 @@ function vtkShow() {
|
|
|
mapper.setInputData(fcon.polydata)
|
|
|
getMinMax(scalarArray)
|
|
|
mapper.setScalarRange(parseFloat(min.toFixed(3)), parseFloat(max.toFixed(3))) //设置范围
|
|
|
- scalarBarActor.setAxisLabel(formInline.region)
|
|
|
+ scalarBarActor.setAxisLabel(formInline.value.region)
|
|
|
|
|
|
mapper.clearColorArrays() //强制重建颜色
|
|
|
- // actor.getProperty().setOpacity(props.count) //设置错误的透明度使得页面重新加载 不设置不刷新页面
|
|
|
+ actor.getProperty().setOpacity(count.value) //设置错误的透明度使得页面重新加载 不设置不刷新页面
|
|
|
|
|
|
|
|
|
vtkObj.renderWindow.getRenderer().addActor(scalarBarActor)
|
|
@@ -340,7 +340,7 @@ const newtime = () => {
|
|
|
}
|
|
|
}
|
|
|
function sliderchange(val) {
|
|
|
- vtkObj.fcon = createGassControl();
|
|
|
+
|
|
|
const fcon = vtkObj.fcon
|
|
|
|
|
|
suspendshow.value = false
|
|
@@ -371,7 +371,6 @@ function vtkGridRead() {
|
|
|
}).catch((err) => { })
|
|
|
}
|
|
|
function vtkScalarRead(step) {
|
|
|
- strResultFormatlist.value = [];
|
|
|
arr=[];
|
|
|
let i=0;
|
|
|
const fcon = vtkObj.fcon
|
|
@@ -379,6 +378,7 @@ function vtkScalarRead(step) {
|
|
|
.getScalrsByStep(step)
|
|
|
.then((result) => {
|
|
|
// console.log(fcon.scalar)
|
|
|
+ strResultFormatlist.value = [];
|
|
|
fcon.scalar.forEach((value, key) => {
|
|
|
//arr.push(key)
|
|
|
i=i+1
|
|
@@ -389,7 +389,7 @@ function vtkScalarRead(step) {
|
|
|
|
|
|
});
|
|
|
})
|
|
|
- console.log( strResultFormatlist.value);
|
|
|
+ console.log(strResultFormatlist.value);
|
|
|
vtkShow()
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -398,7 +398,7 @@ function vtkScalarRead(step) {
|
|
|
}
|
|
|
//深度监视
|
|
|
const regionchange=(val)=>{
|
|
|
- formInline.region=val;
|
|
|
+ formInline.value.region=val;
|
|
|
}
|
|
|
const quding=()=>{
|
|
|
isexpdialog.value=false;
|