bug修改
This commit is contained in:
parent
4f12905530
commit
5a424d5409
|
@ -185,7 +185,8 @@
|
|||
// console.log("图形类型",string)
|
||||
// console.log("图形名称",string1)
|
||||
// console.log("图形位置",string2)
|
||||
window.parent.getFigure(string,string1,string2);
|
||||
// numberNew 判断2-模拟区,1-画布区
|
||||
window.parent.getFigure(string,string1,string2,1);
|
||||
}
|
||||
//新增图形传图形id
|
||||
function postFigureId(string){
|
||||
|
|
|
@ -68,9 +68,17 @@
|
|||
style="font-size: 30px; font-weight: bold"
|
||||
v-if="title == '流量' && dataArr && dataArr.length != 0 && dataArr != undefined"
|
||||
>
|
||||
<span style="font-size: 15px">流量</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{
|
||||
cycleAccumulateDataArr[0].flow || cycleAccumulateDataArr[0].flow === 0 ? cycleAccumulateDataArr[0].flow : ' - '
|
||||
<span style="font-size: 15px">流量</span
|
||||
><br />
|
||||
<span style="font-size: 30px; font-weight: bold" v-if="itemData.flowType && itemData.flowType == '出流'">{{
|
||||
cycleAccumulateDataArr[0].out_flow || cycleAccumulateDataArr[0].out_flow === 0
|
||||
? cycleAccumulateDataArr[0].out_flow
|
||||
: ' - '
|
||||
}}</span>
|
||||
<span style="font-size: 30px; font-weight: bold" v-if="itemData.flowType && itemData.flowType == '入流'">{{
|
||||
cycleAccumulateDataArr[0].in_flow || cycleAccumulateDataArr[0].in_flow === 0
|
||||
? cycleAccumulateDataArr[0].in_flow
|
||||
: ' - '
|
||||
}}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</span>
|
||||
</div>
|
||||
|
@ -146,8 +154,15 @@
|
|||
v-if="title == '流量' && dataArr && dataArr.length != 0 && dataArr != undefined"
|
||||
>
|
||||
<span style="font-size: 15px">流量</span><br />
|
||||
<span style="font-size: 30px; font-weight: bold">{{
|
||||
newDataArr[0].flow || newDataArr[0].flow === 0 ? newDataArr[0].flow : ' - '
|
||||
<span style="font-size: 30px; font-weight: bold" v-if="itemData.flowType && itemData.flowType == '出流'">{{
|
||||
newDataArr[0].out_flow || newDataArr[0].out_flow === 0
|
||||
? newDataArr[0].out_flow
|
||||
: ' - '
|
||||
}}</span>
|
||||
<span style="font-size: 30px; font-weight: bold" v-if="itemData.flowType && itemData.flowType == '入流'">{{
|
||||
newDataArr[0].in_flow || newDataArr[0].in_flow === 0
|
||||
? newDataArr[0].in_flow
|
||||
: ' - '
|
||||
}}</span>
|
||||
<span style="font-size: 20px; font-weight: 200">辆</span>
|
||||
</div>
|
||||
|
|
|
@ -1530,7 +1530,7 @@ export default {
|
|||
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
||||
var detId = [];
|
||||
const msgN = JSON.parse(temp);
|
||||
//console.log('cycle_accumulate-周期统计实时累计数据主题', msgN);
|
||||
// console.log('cycle_accumulate-周期统计实时累计数据主题', msgN);
|
||||
this.cycleAccumulateData = msgN;
|
||||
} catch (error) {}
|
||||
break;
|
||||
|
@ -1908,11 +1908,13 @@ export default {
|
|||
}
|
||||
return type;
|
||||
},
|
||||
getFigureD(item, index, indexNew) {
|
||||
getFigureD(item, index, indexNew,numberNew) {
|
||||
//console.log('图形类型', item);
|
||||
//console.log('初始图形名称', index);
|
||||
this.startFigureName = index;
|
||||
//console.log('图形位置', indexNew);
|
||||
// numberNew 1-画布区 2-模拟区
|
||||
this.numberNew = numberNew
|
||||
this.dialogFormVisible = true;
|
||||
this.switchValue = 0;
|
||||
this.typeCheckList = [
|
||||
|
|
|
@ -554,7 +554,16 @@
|
|||
}}</span
|
||||
>
|
||||
<span style="font-size: 14px" v-if="i.componentType == '车头时距'">秒</span>
|
||||
<span style="font-size: 14px" v-if="i.componentType == '速度'">秒</span>
|
||||
<span style="font-size: 14px" v-if="i.componentType == '速度'">
|
||||
<span
|
||||
v-if="
|
||||
(i.triggerData.speed && i.triggerData.speed != -1) ||
|
||||
i.triggerData.speed === 0
|
||||
"
|
||||
>
|
||||
{{ i.triggerData.speed > 0 || i.triggerData.speed === 0 ? 'km/h' : 'pix/s' }}
|
||||
</span>
|
||||
</span>
|
||||
<span style="font-size: 14px" v-if="i.componentType == '类型'"></span>
|
||||
<span style="font-size: 14px" v-if="i.componentType == '流量'">辆</span>
|
||||
<span
|
||||
|
@ -1291,6 +1300,26 @@
|
|||
:default-expanded-keys="defaultExpanded"
|
||||
>
|
||||
<span class="custom-childTree-node" slot-scope="{ node, data }">
|
||||
<template v-if="addChartTitle == '添加图表'">
|
||||
<span v-if="node.level != 4"> {{ node.label }}</span>
|
||||
<el-checkbox-group
|
||||
v-model="checkList"
|
||||
:disabled="disabledCheckList.includes(`${node.label},${node.parent.data.componentId},${node.parent.parent.parent.data.videoId}`)"
|
||||
v-else
|
||||
@change="changeChild(data, node)"
|
||||
>
|
||||
<el-checkbox
|
||||
:label="
|
||||
!data.componentId
|
||||
? node.label + ',' + node.parent.data.componentId + ',' + node.parent.parent.parent.data.videoId
|
||||
: data.componentId + ',' + node.parent.parent.parent.data.videoId
|
||||
"
|
||||
>
|
||||
{{ node.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-if="addChartTitle == '添加分析项'">
|
||||
<span v-if="node.level != 3"> {{ node.label }}</span>
|
||||
<el-checkbox-group
|
||||
v-model="checkList"
|
||||
|
@ -1308,7 +1337,7 @@
|
|||
{{ node.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
</template>
|
||||
<!-- <el-checkbox-group
|
||||
v-model="data.checked"
|
||||
v-else
|
||||
|
@ -2040,32 +2069,70 @@ export default {
|
|||
getChartComponent().then((res) => {
|
||||
//吧子数组变成想要的
|
||||
let transformedData = res.data.data.map((item) => {
|
||||
let newData = {
|
||||
videoId: item.videoId,
|
||||
videoName: item.videoName,
|
||||
data: item.data.map((subItem) => {
|
||||
let presentationForms = subItem.presentationForm.split(',');
|
||||
return {
|
||||
componentId: subItem.componentId,
|
||||
componentName: subItem.componentName,
|
||||
interfaceComponentId: subItem.interfaceComponentId,
|
||||
presentationForm: subItem.presentationForm,
|
||||
// let newData = {
|
||||
// videoId: item.videoId,
|
||||
// videoName: item.videoName,
|
||||
// data: item.data.map((subItem) => {
|
||||
// let presentationForms = subItem.presentationForm.split(',');
|
||||
// return {
|
||||
// componentId: subItem.componentId,
|
||||
// componentName: subItem.componentName,
|
||||
// interfaceComponentId: subItem.interfaceComponentId,
|
||||
// presentationForm: subItem.presentationForm,
|
||||
// data: presentationForms.map((form) => ({ videoName: form }))
|
||||
// };
|
||||
// })
|
||||
// };
|
||||
// return newData;
|
||||
const newData = item.data.reduce((acc, obj) => {
|
||||
const existingData = acc.find((entry) => entry.combinationName === obj.combinationName);
|
||||
let presentationForms = obj.presentationForm.split(',');
|
||||
if (existingData) {
|
||||
existingData.data.push({
|
||||
componentId: obj.componentId,
|
||||
componentName: obj.componentName,
|
||||
interfaceComponentId: obj.interfaceComponentId,
|
||||
presentationForm: obj.presentationForm,
|
||||
data: presentationForms.map((form) => ({ videoName: form }))
|
||||
});
|
||||
} else {
|
||||
acc.push({
|
||||
combinationName: obj.combinationName,
|
||||
data: [
|
||||
{
|
||||
componentId: obj.componentId,
|
||||
componentName: obj.componentName,
|
||||
interfaceComponentId: obj.interfaceComponentId,
|
||||
presentationForm: obj.presentationForm,
|
||||
data: presentationForms.map((form) => ({ videoName: form }))
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
return {
|
||||
...item,
|
||||
data: newData
|
||||
};
|
||||
})
|
||||
};
|
||||
return newData;
|
||||
});
|
||||
this.renameField(transformedData, 'combinationName', 'videoName');
|
||||
this.renameField(transformedData, 'componentName', 'videoName');
|
||||
this.addCheckedField(transformedData);
|
||||
this.addChildThreeData = transformedData;
|
||||
// this.addChildThreeData.map((item) => {
|
||||
// item.data.map((key) => {
|
||||
// key.data = key.data.filter((d) => d.videoName != '数值');
|
||||
// });
|
||||
// });
|
||||
this.addChildThreeData.map((item) => {
|
||||
item.data.map((key) => {
|
||||
key.data = key.data.filter((d) => d.videoName != '数值');
|
||||
key.data.map((t) => {
|
||||
t.data = t.data.filter((d) => d.videoName != '数值');
|
||||
});
|
||||
});
|
||||
//console.log(this.addChildThreeData, ' this.addChildThreeData');
|
||||
});
|
||||
// console.log(this.addChildThreeData, ' this.addChildThreeData');
|
||||
});
|
||||
this.addThreeNodeData.data = data;
|
||||
this.addThreeNodeData.node = node;
|
||||
|
@ -2078,7 +2145,7 @@ export default {
|
|||
}).then((res) => {
|
||||
res.data.data.forEach((item) => {
|
||||
this.checkList.push(`${item.presentationForm},${item.analogAreaComponentId},${item.videoId}`);
|
||||
this.disabledCheckList.push(`${item.analogAreaComponentId},${item.videoId}`);
|
||||
this.disabledCheckList.push(`${item.presentationForm},${item.analogAreaComponentId},${item.videoId}`);
|
||||
this.defaultExpanded.push(item.analogAreaComponentId);
|
||||
// item.data.forEach((subItem) => {
|
||||
// const labels = subItem.presentationForm.split(",");
|
||||
|
@ -2091,6 +2158,8 @@ export default {
|
|||
// });
|
||||
// });
|
||||
});
|
||||
// console.log(this.disabledCheckList, ' this.disabledCheckList');
|
||||
// console.log(this.checkList, ' this.disabledCheckList');
|
||||
});
|
||||
} else if (node.level == 4) {
|
||||
this.addChartTitle = '添加分析项';
|
||||
|
|
Loading…
Reference in New Issue