OD弹框优化,默认选择一个

This commit is contained in:
qiudan 2023-12-15 17:54:01 +08:00
parent 171574b13a
commit af5e7b9d7c
1 changed files with 21 additions and 7 deletions

View File

@ -353,7 +353,9 @@
</el-slider>
</div>
</el-form-item>
<!-- <el-form-item label="单位:" ></el-form-item> -->
<el-form-item label="" v-if="componentForm.componentType == 'OD'">
<div style="color:red;line-height: normal;">注意OD组件消耗性能极高可能会造成分析延迟起点个数*终点个数值不要太大!</div>
</el-form-item>
<el-form-item label="起点:" :required="true" v-if="componentForm.componentType == 'OD'">
<el-checkbox-group v-model="componentForm.startSection" @change="handleCheckedStartSection">
<el-checkbox v-for="item in sectionals" :label="item.graphicName" :key="item.graphicId">{{
@ -1154,7 +1156,7 @@ export default {
'detection' + this.number,
'img' + this.number,
'TargetAnalysisStatusData',
'TrafficAnalysisStatusData',
'TrafficAnalysisStatusData'
];
// console.log('test1/indexnumber-',this.number)
window.PubScribe(this.topicSends, this.number, this.realInfo, false, this.$route.query.id);
@ -1170,7 +1172,7 @@ export default {
'trigger-' + this.$route.query.id,
'cycle_time-' + this.$route.query.id,
'cycle_statistics-' + this.$route.query.id,
'cycle_accumulate-' + this.$route.query.id,
'cycle_accumulate-' + this.$route.query.id
];
// console.log('test1/indexnumber-',this.number)
window.PubScribe(this.topicSends, this.number, this.realInfo, false, this.$route.query.id);
@ -1802,8 +1804,10 @@ export default {
this.sectionals.forEach((items) => {
startSectionArr.push(items.graphicName);
});
this.componentForm.startSection = startSectionArr;
this.handleCheckedStartSection(startSectionArr)
if (startSectionArr.length > 0) {
this.componentForm.startSection = [startSectionArr[0]];
this.handleCheckedStartSection([startSectionArr[0]]);
}
}
if (res.data.data.endSectionIds != '') {
//console.log('endSectionIds', res.data.data.endSectionIds);
@ -1825,8 +1829,10 @@ export default {
this.sectionals.forEach((items) => {
endSectionArr.push(items.graphicName);
});
this.componentForm.endSection = endSectionArr;
this.handleCheckedendSection(endSectionArr)
if (endSectionArr.length > 0) {
this.componentForm.endSection = [endSectionArr[0]];
this.handleCheckedendSection([endSectionArr[0]]);
}
}
if (this.componentForm.presentationForm != '') {
var arr = [];
@ -2553,6 +2559,10 @@ export default {
// console.log('', value);
var startSectionIdArr = [];
var startSectionNameArr = [];
if (value.length == 0) {
this.componentForm.startSectionIds = '';
this.componentForm.startSectionNames = '';
}
value.forEach((item) => {
this.sectionals.forEach((items) => {
if (item == items.graphicName) {
@ -2571,6 +2581,10 @@ export default {
//console.log('', value);
var endSectionIdArr = [];
var endSectionNameArr = [];
if (value.length == 0) {
this.componentForm.endSectionIds = '';
this.componentForm.endSectionNames = '';
}
value.forEach((item) => {
this.sectionals.forEach((items) => {
if (item == items.graphicName) {