修复计算结果图形化显示不正确问题
This commit is contained in:
parent
75c83930c3
commit
26de84817b
@ -211,7 +211,6 @@ onMounted(() => {
|
||||
rowHeight: 100,
|
||||
},
|
||||
getDragNode: (sourceNode:any) => {
|
||||
console.log('1111')
|
||||
let node:any = sourceNode
|
||||
if (node.data && node.data.lineStyle) {
|
||||
// 应用管线样式到连接线
|
||||
@ -342,12 +341,11 @@ onMounted(() => {
|
||||
if(node.store.data.attrs.text.text == '圆柱槽'){
|
||||
deviceTypetype.value = 'CylindricalTank'
|
||||
node.size(110, 140)
|
||||
const width = node.size().width
|
||||
node.attr('image/xlink:href', '/assets/11.png')
|
||||
node.attr('image/width', 105)
|
||||
node.attr('image/height', 135)
|
||||
node.attr('label/refY', 140)
|
||||
node.attr('label/refX', width/2)
|
||||
node.attr('label/refX', 0.5)
|
||||
node.attr('label/textAnchor', 'middle')
|
||||
}else if(node.store.data.attrs.text.text == '扁平槽'){
|
||||
deviceTypetype.value = 'FlatTank'
|
||||
|
||||
@ -128,10 +128,6 @@ function exportExportsClick(){
|
||||
{{ scope.row[item.key] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column v-if="getIf(selectData,'diameter')" prop="diameter" label="直径cm" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="getIf(selectData,'height')" prop="height" label="高度cm" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="getIf(selectData,'width')" prop="width" label="宽度cm" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="getIf(selectData,'length')" prop="length" label="长度cm" min-width="100"></el-table-column> -->
|
||||
<el-table-column v-if="getIf(selectData,'volume')" prop="volume" label="体积(单位:L)" min-width="160"></el-table-column>
|
||||
<el-table-column v-if="getIf(selectData,'flow_rate')" prop="flow_rate" label="流量(单位:m3/h)" min-width="160"></el-table-column>
|
||||
<el-table-column v-if="getIf(selectData,'pulse_velocity')" prop="pulse_velocity" label="脉冲速度(单位:Hz)" min-width="160"></el-table-column>
|
||||
|
||||
@ -137,6 +137,8 @@ function getScenarioResults(){
|
||||
selecteTime.value = customImageData.value[i].scenarioResults[sliderIndex.value].step
|
||||
sliderValues.value = tempSliderValues
|
||||
addAttrText(customImageData.value[i],sliderIndex.value,selectedData.value)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -149,7 +151,7 @@ function addAttrText(item:any,index:any,useData:any){
|
||||
graph.addNode({
|
||||
shape: 'rect-text',
|
||||
x: item.position.x ,
|
||||
y: item.position.y + 160,
|
||||
y: item.position.y + item.attrs.label.refY + 20,
|
||||
width: 100,
|
||||
height: 30,
|
||||
attrs: {
|
||||
@ -170,7 +172,7 @@ function addAttrText(item:any,index:any,useData:any){
|
||||
graph.addNode({
|
||||
shape: 'image-node',
|
||||
x: item.position.x + 135 ,
|
||||
y: item.position.y + 166,
|
||||
y: item.position.y + item.attrs.label.refY + 26,
|
||||
width: 14,
|
||||
height: 14,
|
||||
correlationId: item.id,
|
||||
@ -190,7 +192,7 @@ function addAttrText(item:any,index:any,useData:any){
|
||||
graph.addNode({
|
||||
shape: 'image-node',
|
||||
x: item.position.x + 110 ,
|
||||
y: item.position.y + 166,
|
||||
y: item.position.y + item.attrs.label.refY + 26,
|
||||
width: 14,
|
||||
height: 14,
|
||||
correlationId: item.id,
|
||||
@ -239,7 +241,7 @@ const result = [...deviceResult,...materialResult]
|
||||
graph.addNode({
|
||||
shape: 'rect-text',
|
||||
x: item.position.x,
|
||||
y: item.position.y + 183 + i * 25,
|
||||
y: item.position.y + item.attrs.label.refY + 44 + i * 25,
|
||||
width: 260,
|
||||
height: 30,
|
||||
// label: data[i].name + ':' + data[i].value,
|
||||
@ -493,9 +495,9 @@ onMounted(() => {
|
||||
refY: 0,
|
||||
},
|
||||
label: {
|
||||
refX: 45,
|
||||
refX: 0.5,
|
||||
refY: 80,
|
||||
textAnchor: 'start',
|
||||
textAnchor: 'middle',
|
||||
textVerticalAnchor: 'top',
|
||||
fontSize: 14,
|
||||
fill: '#000',
|
||||
@ -882,12 +884,6 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗
|
||||
</div>
|
||||
<div id="graph-container" style="width: 100%; height: calc(100% - 60px);">
|
||||
<div class="context-menu" v-if="isMenuShow" :style="{left: left +'px', top: top+'px'}">
|
||||
<!-- <img src="@/assets/x6/info.png" alt="图标" title="设备信息" style="cursor: pointer;" @click="EditdeviceClick">
|
||||
<img src="@/assets/x6/material.png" alt="图标" title="物料信息" style="cursor: pointer;" @click="MaterialModelClick">
|
||||
<img src="@/assets/x6/change.png" alt="图标" title="变动设置" style="cursor: pointer;" @click="ChangesettingsClick">
|
||||
<img src="@/assets/x6/copy.png" alt="图标" title="复制" style="cursor: pointer;" @click="copyNode">
|
||||
<img src="@/assets/x6/del.png" alt="图标" title="删除" style="cursor: pointer;"
|
||||
@click="deleteNode"> -->
|
||||
</div>
|
||||
<div class="viewx6-DisplaySettingsButton" @click="ChangesettingsClick">显示设置</div>
|
||||
</div>
|
||||
@ -940,18 +936,7 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<div
|
||||
style="width: 100%;position: absolute;bottom: 20px;z-index: 10; display: flex; justify-content: center;">
|
||||
<!-- <el-slider v-if="sliderValues.length>0" v-model="selecteTime" :format-tooltip="formatTooltip"
|
||||
:min="0"
|
||||
:max="sliderValues.length - 1"
|
||||
:step="1"
|
||||
:marks="sliderMarks"
|
||||
show-stops size="large"
|
||||
@change="handleTimeChange"
|
||||
style="width: 80%;"
|
||||
/> -->
|
||||
|
||||
<div style="width: 100%;position: absolute;bottom: 20px;z-index: 10; display: flex; justify-content: center;">
|
||||
<el-slider v-if="sliderValues.length>0" v-model="selecteTime" :format-tooltip="formatTooltip"
|
||||
:min="0"
|
||||
:max="sliderValues.length - 1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user