openatc-components 0.5.29 → 0.5.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/index.js +137 -137
- package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +2 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +10 -4
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/en.js +6 -2
- package/src/i18n/language/ru.js +6 -2
- package/src/i18n/language/zh.js +6 -2
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +2 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +10 -4
- package/src/utils/phasedesc.js +135 -0
- package/src/views/intersection.vue +1 -1
- package/package/kisscomps/components/OptimizeKanban/index.js +0 -2
- package/package/kisscomps/components/OptimizeKanban/index.vue +0 -369
- package/package/kisscomps/components/StageOptimize/index.vue +0 -310
- package/src/node_modules/.package_versions.json +0 -1
package/package.json
CHANGED
package/src/i18n/language/en.js
CHANGED
|
@@ -1603,7 +1603,7 @@ const en = {
|
|
|
1603
1603
|
'importsizeerror': 'Picture size exceeds 10MB, please re import!',
|
|
1604
1604
|
'importtypeerror': 'Picture format error, please import again!',
|
|
1605
1605
|
'importcrosspicture': 'Intersection Map',
|
|
1606
|
-
'againimport': '
|
|
1606
|
+
'againimport': 'Import Map',
|
|
1607
1607
|
'motorway': 'Motorway',
|
|
1608
1608
|
'bicyclelane': 'Non motorized Lane',
|
|
1609
1609
|
'pedcrossing': 'Ped crossing',
|
|
@@ -1680,7 +1680,11 @@ const en = {
|
|
|
1680
1680
|
'angle': 'Angle',
|
|
1681
1681
|
'basicinfo': 'Basic information',
|
|
1682
1682
|
'importfilesuccess': 'Import of JSON file succeeded!',
|
|
1683
|
-
'holographiclaneid': 'Holographic Laneid'
|
|
1683
|
+
'holographiclaneid': 'Holographic Laneid',
|
|
1684
|
+
'defaultShowQuhua': 'Overview page displays the channelized map default',
|
|
1685
|
+
'exportFile': 'Export to file',
|
|
1686
|
+
'lockMap': 'Lock the base map',
|
|
1687
|
+
'unlockMap': 'Unlock the base map'
|
|
1684
1688
|
},
|
|
1685
1689
|
'faultlevelCode': {
|
|
1686
1690
|
'1': 'General failure',
|
package/src/i18n/language/ru.js
CHANGED
|
@@ -1392,7 +1392,7 @@ const ru = {
|
|
|
1392
1392
|
'importsizeerror': 'Размер изображения превышает 10 Мб, повторите импорт!',
|
|
1393
1393
|
'importtypeerror': 'Ошибка формата изображения, повторите импорт!',
|
|
1394
1394
|
'importcrosspicture': 'Импортировать изображение перекрестка',
|
|
1395
|
-
'againimport': '
|
|
1395
|
+
'againimport': 'Импорт фонового изображения',
|
|
1396
1396
|
'motorway': 'Полоса для моторных транспортных средств',
|
|
1397
1397
|
'bicyclelane': 'Полоса для немоторизованных транспортных средств',
|
|
1398
1398
|
'pedcrossing': 'Пешеходный переход',
|
|
@@ -1469,7 +1469,11 @@ const ru = {
|
|
|
1469
1469
|
'angle': 'Угол поворота',
|
|
1470
1470
|
'basicinfo': 'Базовая информация',
|
|
1471
1471
|
'importfilesuccess': 'Импорт файла параметров успешен!',
|
|
1472
|
-
'holographiclaneid': 'ID голографической полосы'
|
|
1472
|
+
'holographiclaneid': 'ID голографической полосы',
|
|
1473
|
+
'defaultShowQuhua': 'Обзор по умолчанию отображает канализационную карту',
|
|
1474
|
+
'exportFile': 'экспортировать в файл',
|
|
1475
|
+
'lockMap': 'зафиксировать фоновое изображение',
|
|
1476
|
+
'unlockMap': 'разблокировать базовую карту'
|
|
1473
1477
|
},
|
|
1474
1478
|
'faultlevelCode': {
|
|
1475
1479
|
'1': 'Общая неисправность',
|
package/src/i18n/language/zh.js
CHANGED
|
@@ -1600,7 +1600,7 @@ const zh = {
|
|
|
1600
1600
|
'importsizeerror': '图片大小超过10Mb,请重新导入!',
|
|
1601
1601
|
'importtypeerror': '图片格式错误,请重新导入!',
|
|
1602
1602
|
'importcrosspicture': '路口底图',
|
|
1603
|
-
'againimport': '
|
|
1603
|
+
'againimport': '导入底图',
|
|
1604
1604
|
'motorway': '机动车道',
|
|
1605
1605
|
'bicyclelane': '非机动车道',
|
|
1606
1606
|
'pedcrossing': '人行横道',
|
|
@@ -1677,7 +1677,11 @@ const zh = {
|
|
|
1677
1677
|
'angle': '旋转角度',
|
|
1678
1678
|
'basicinfo': '基础信息',
|
|
1679
1679
|
'importfilesuccess': '导入参数文件成功!',
|
|
1680
|
-
'holographiclaneid': '全息车道id'
|
|
1680
|
+
'holographiclaneid': '全息车道id',
|
|
1681
|
+
'defaultShowQuhua': '总览默认显示渠化图',
|
|
1682
|
+
'exportFile': '导出为文件',
|
|
1683
|
+
'lockMap': '锁定底图',
|
|
1684
|
+
'unlockMap': '解锁底图'
|
|
1681
1685
|
},
|
|
1682
1686
|
'faultlevelCode': {
|
|
1683
1687
|
'1': '一般故障',
|
|
@@ -51,7 +51,7 @@ import { getMessageByCode } from '../../../utils/responseMessage.js'
|
|
|
51
51
|
import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
52
52
|
import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
|
|
53
53
|
// import { getTheme } from '../../../utils/auth'
|
|
54
|
-
import {
|
|
54
|
+
import { getPhaseImages } from '../../../utils/phasedesc.js'
|
|
55
55
|
import PedSvg from './svg/pedSvg'
|
|
56
56
|
|
|
57
57
|
import CrossDirectionConflictList from '../../../utils/conflictList.js'
|
|
@@ -394,6 +394,7 @@ export default {
|
|
|
394
394
|
getPhaseDirIcon (list) {
|
|
395
395
|
let idarr = []
|
|
396
396
|
let dirlist = []
|
|
397
|
+
const images = getPhaseImages(this.$i18n)
|
|
397
398
|
for (let i = 0; i < list.length; i++) {
|
|
398
399
|
if (list[i].id <= 16 && idarr.indexOf(list[i].id) === -1) {
|
|
399
400
|
idarr.push(list[i].id)
|
|
@@ -36,8 +36,14 @@
|
|
|
36
36
|
:disabled="!isSeletable"
|
|
37
37
|
@click="clickOpen"
|
|
38
38
|
>{{$t('openatccomponents.channelizationmap.againimport')}}</el-button>
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
<el-tooltip
|
|
40
|
+
:content="!isLockedCrossMap ? $t('openatccomponents.channelizationmap.lockMap') : $t('openatccomponents.channelizationmap.unlockMap')"
|
|
41
|
+
placement="bottom"
|
|
42
|
+
effect="dark"
|
|
43
|
+
>
|
|
44
|
+
<i class="lock-map el-icon-unlock" v-if="!isLockedCrossMap" @click="handleLockCrossMap()"></i>
|
|
45
|
+
<i class="lock-map el-icon-lock" v-if="isLockedCrossMap" @click="handleLockCrossMap()"></i>
|
|
46
|
+
</el-tooltip>
|
|
41
47
|
</div>
|
|
42
48
|
|
|
43
49
|
<div class="draw-to-sketchpad">
|
|
@@ -95,10 +101,10 @@
|
|
|
95
101
|
<!-- <el-button type="primary" @click="cancledraw()">{{$t('openatccomponents.button.Cancel')}}</el-button> -->
|
|
96
102
|
<el-button type="primary" @click="savedraw()">{{$t('openatccomponents.button.save')}}</el-button>
|
|
97
103
|
<el-button type="primary" @click="importFromFile()">{{$t('openatccomponents.main.import')}}</el-button>
|
|
98
|
-
<el-button type="primary" @click="exportToFile()">{{$t('openatccomponents.
|
|
104
|
+
<el-button type="primary" @click="exportToFile()">{{$t('openatccomponents.channelizationmap.exportFile')}}</el-button>
|
|
99
105
|
<el-switch
|
|
100
106
|
v-model="isDefaultShowQuhua"
|
|
101
|
-
active-text="
|
|
107
|
+
:active-text="$t('openatccomponents.channelizationmap.defaultShowQuhua')">
|
|
102
108
|
</el-switch>
|
|
103
109
|
</div>
|
|
104
110
|
</div>
|
package/src/utils/phasedesc.js
CHANGED
|
@@ -160,3 +160,138 @@ export function getPhaseDesc (list, i18n) {
|
|
|
160
160
|
}
|
|
161
161
|
return str
|
|
162
162
|
}
|
|
163
|
+
|
|
164
|
+
export function getPhaseImages (i18n) {
|
|
165
|
+
const images = [{
|
|
166
|
+
id: 1,
|
|
167
|
+
name: i18n.t('openatccomponents.overview.es')
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 2,
|
|
171
|
+
name: i18n.t('openatccomponents.overview.el')
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: 3,
|
|
175
|
+
name: i18n.t('openatccomponents.overview.er')
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: 4,
|
|
179
|
+
name: i18n.t('openatccomponents.overview.eb')
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: 5,
|
|
183
|
+
name: i18n.t('openatccomponents.overview.ws')
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: 6,
|
|
187
|
+
name: i18n.t('openatccomponents.overview.wl')
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 7,
|
|
191
|
+
name: i18n.t('openatccomponents.overview.wr')
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 8,
|
|
195
|
+
name: i18n.t('openatccomponents.overview.wb')
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 9,
|
|
199
|
+
name: i18n.t('openatccomponents.overview.ns')
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: 10,
|
|
203
|
+
name: i18n.t('openatccomponents.overview.nl')
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: 11,
|
|
207
|
+
name: i18n.t('openatccomponents.overview.nr')
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 12,
|
|
211
|
+
name: i18n.t('openatccomponents.overview.nb')
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 13,
|
|
215
|
+
name: i18n.t('openatccomponents.overview.ss')
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: 14,
|
|
219
|
+
name: i18n.t('openatccomponents.overview.sl')
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: 15,
|
|
223
|
+
zname: '南右转',
|
|
224
|
+
name: i18n.t('openatccomponents.overview.sr')
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: 16,
|
|
228
|
+
zname: '南掉头',
|
|
229
|
+
name: i18n.t('openatccomponents.overview.sb')
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: 17,
|
|
233
|
+
name: i18n.t('openatccomponents.overview.ses')
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: 18,
|
|
237
|
+
name: i18n.t('openatccomponents.overview.sel')
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: 19,
|
|
241
|
+
name: i18n.t('openatccomponents.overview.ser')
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: 20,
|
|
245
|
+
name: i18n.t('openatccomponents.overview.seb')
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
id: 21,
|
|
249
|
+
name: i18n.t('openatccomponents.overview.sws')
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: 22,
|
|
253
|
+
name: i18n.t('openatccomponents.overview.swl')
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 23,
|
|
257
|
+
name: i18n.t('openatccomponents.overview.swr')
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: 24,
|
|
261
|
+
name: i18n.t('openatccomponents.overview.swb')
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: 25,
|
|
265
|
+
name: i18n.t('openatccomponents.overview.nes')
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: 26,
|
|
269
|
+
name: i18n.t('openatccomponents.overview.nel')
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: 27,
|
|
273
|
+
name: i18n.t('openatccomponents.overview.ner')
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
id: 28,
|
|
277
|
+
name: i18n.t('openatccomponents.overview.neb')
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: 29,
|
|
281
|
+
name: i18n.t('openatccomponents.overview.nws')
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
id: 30,
|
|
285
|
+
name: i18n.t('openatccomponents.overview.nwl')
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: 31,
|
|
289
|
+
name: i18n.t('openatccomponents.overview.nwr')
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: 32,
|
|
293
|
+
name: i18n.t('openatccomponents.overview.nwb')
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
return images
|
|
297
|
+
}
|
|
@@ -182,7 +182,7 @@ export default {
|
|
|
182
182
|
// agentId: '12007_390',
|
|
183
183
|
// agentId: '12014',
|
|
184
184
|
reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
185
|
-
Token: '
|
|
185
|
+
Token: 'eyJraWQiOiIxNzY4ODk2MzEzMDM5IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc2ODg5OTkxMywiaWF0IjoxNzY4ODkyNzEzfQ.lZCLSqkVFSEHD8zJf5Fzs-LH1BpMs50Q22idq47sG5Y',
|
|
186
186
|
// agentId: '30003-352',
|
|
187
187
|
// reqUrl: 'https://kints-dev.devdolphin.com/openatc',
|
|
188
188
|
// Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
|
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020 kedacom
|
|
3
|
-
* OpenATC is licensed under Mulan PSL v2.
|
|
4
|
-
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
5
|
-
* You may obtain a copy of Mulan PSL v2 at:
|
|
6
|
-
* http://license.coscl.org.cn/MulanPSL2
|
|
7
|
-
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
8
|
-
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
9
|
-
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
-
* See the Mulan PSL v2 for more details.
|
|
11
|
-
**/
|
|
12
|
-
<template>
|
|
13
|
-
<div class="kanbanOptimize">
|
|
14
|
-
<div v-if="this.nowNumber === 1" class="optimizetype">
|
|
15
|
-
<span>{{$t('openatccomponents.pattern.optimizetype')}}</span>
|
|
16
|
-
<el-select v-model="value" clearable :placeholder="$t('openatccomponents.common.select')">
|
|
17
|
-
<el-option
|
|
18
|
-
v-for="item in typeOptions"
|
|
19
|
-
:key="item.value"
|
|
20
|
-
:label="$t('openatccomponents.overview.type' + item.value)"
|
|
21
|
-
:value="item.value"
|
|
22
|
-
>
|
|
23
|
-
</el-option>
|
|
24
|
-
</el-select>
|
|
25
|
-
<span class="optimiNum">{{$t('openatccomponents.pattern.optimizecycle')}}</span>
|
|
26
|
-
<el-input v-model="optimizecycle" clearable :placeholder="$t('openatccomponents.common.enter')"></el-input>
|
|
27
|
-
<!-- <el-button type="primary" @click="onOptimizeClick()">{{$t('openatccomponents.pattern.inoptimize')}}</el-button> -->
|
|
28
|
-
</div>
|
|
29
|
-
<div class="common-board-column" :style="{marginTop:this.nowNumber === 1 ? 0 : '50px',marginLeft:this.nowNumber === 1 ? 0 : 0}">
|
|
30
|
-
<div class="common-board-column-header">
|
|
31
|
-
{{headerText}}
|
|
32
|
-
</div>
|
|
33
|
-
<div class="openatccomponents-board-table-header">
|
|
34
|
-
<el-row :gutter="13">
|
|
35
|
-
<el-col :span="4">{{this.$t('openatccomponents.overview.phase')}}
|
|
36
|
-
</el-col>
|
|
37
|
-
<el-col :span="10">{{this.$t('openatccomponents.overview.flow')}}
|
|
38
|
-
</el-col>
|
|
39
|
-
<el-col :span="10">{{this.$t('openatccomponents.overview.saturationflow')}}
|
|
40
|
-
</el-col>
|
|
41
|
-
</el-row>
|
|
42
|
-
</div>
|
|
43
|
-
<draggable
|
|
44
|
-
class="common-board-column-content"
|
|
45
|
-
:list="list"
|
|
46
|
-
:options="options">
|
|
47
|
-
<div class="common-board-item" v-for="element in list" :key="element.id">
|
|
48
|
-
<el-row :gutter="13">
|
|
49
|
-
<el-col :span="4">
|
|
50
|
-
<el-tooltip class="item" effect="dark" placement="left">
|
|
51
|
-
<div slot="content">{{element.name}}</div>
|
|
52
|
-
<div class="common-phase-description">
|
|
53
|
-
<xdrdirselector Width="70px" Height="70px" Widths="58px" Heights="58px" :Datas="styles" :Data="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
|
|
54
|
-
</div>
|
|
55
|
-
</el-tooltip>
|
|
56
|
-
</el-col>
|
|
57
|
-
<el-col :span="10">
|
|
58
|
-
<el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="element.flowperhour" ref="type" :disabled="element.mode === 7"></el-input-number>
|
|
59
|
-
</el-col>
|
|
60
|
-
<el-col :span="10">
|
|
61
|
-
<el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="element.saturation" ref="types" :disabled="element.mode === 7"></el-input-number>
|
|
62
|
-
</el-col>
|
|
63
|
-
</el-row>
|
|
64
|
-
</div>
|
|
65
|
-
</draggable>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
<script>
|
|
70
|
-
import draggable from 'vuedraggable'
|
|
71
|
-
import { getDuration } from '@/api/cross'
|
|
72
|
-
import xdrdirselector from '@/components/XRDDirSelector'
|
|
73
|
-
|
|
74
|
-
export default {
|
|
75
|
-
name: 'patternOptimize',
|
|
76
|
-
components: {
|
|
77
|
-
draggable,
|
|
78
|
-
xdrdirselector
|
|
79
|
-
},
|
|
80
|
-
data () {
|
|
81
|
-
return {
|
|
82
|
-
showStyle: {
|
|
83
|
-
left: '7px',
|
|
84
|
-
top: '0px'
|
|
85
|
-
},
|
|
86
|
-
styles: {
|
|
87
|
-
left: '7px',
|
|
88
|
-
top: '0px'
|
|
89
|
-
},
|
|
90
|
-
typeOptions: [{
|
|
91
|
-
value: 'flow-split-opt'
|
|
92
|
-
}, {
|
|
93
|
-
value: 'cycle-opt'
|
|
94
|
-
}],
|
|
95
|
-
value: 'flow-split-opt',
|
|
96
|
-
optimizecycle: 0
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
props: {
|
|
100
|
-
headerText: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: 'Header'
|
|
103
|
-
},
|
|
104
|
-
id: {
|
|
105
|
-
type: Number
|
|
106
|
-
},
|
|
107
|
-
rings: {
|
|
108
|
-
type: Array
|
|
109
|
-
},
|
|
110
|
-
nowNumber: {
|
|
111
|
-
type: Number
|
|
112
|
-
},
|
|
113
|
-
phaseList: {
|
|
114
|
-
type: Array
|
|
115
|
-
},
|
|
116
|
-
options: {
|
|
117
|
-
type: Object,
|
|
118
|
-
default () {
|
|
119
|
-
return {}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
list: {
|
|
123
|
-
type: Array,
|
|
124
|
-
default () {
|
|
125
|
-
return []
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
// index: {
|
|
129
|
-
// type: Number
|
|
130
|
-
// },
|
|
131
|
-
ISActiveMask: {
|
|
132
|
-
type: Boolean,
|
|
133
|
-
default: true
|
|
134
|
-
},
|
|
135
|
-
// 当phase的描述为空时,显示的图形颜色。
|
|
136
|
-
MaskColor: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: '#000000'
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
created () {
|
|
142
|
-
// this.addMinSplit()
|
|
143
|
-
this.addMin()
|
|
144
|
-
},
|
|
145
|
-
computed () {
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
watch: {
|
|
149
|
-
list: {
|
|
150
|
-
handler: function () {
|
|
151
|
-
// let list = this.$refs.type
|
|
152
|
-
// let flow = this.$refs.types
|
|
153
|
-
// console.log(this.list, 'list')
|
|
154
|
-
// let cycle = 0
|
|
155
|
-
// let n = this.index
|
|
156
|
-
// for (let i = 0; i < list.length; i++) {
|
|
157
|
-
// cycle = cycle + Number(list[i].currentValue)
|
|
158
|
-
// }
|
|
159
|
-
// const globalParamModel = this.$store.getters.globalParamModel
|
|
160
|
-
// // let MaxCycle = globalParamModel.getParamsByType('patternList')[n].cycle
|
|
161
|
-
// let pattern = globalParamModel.getParamsByType('patternList')[n]
|
|
162
|
-
// globalParamModel.getParamsByType('patternList')[n].cycle = this.getMaxCycle(pattern)
|
|
163
|
-
// this.addMinSplit()
|
|
164
|
-
// this.$emit('handleSplit', n)
|
|
165
|
-
},
|
|
166
|
-
deep: true
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
methods: {
|
|
170
|
-
onOptimizeClick () {
|
|
171
|
-
let msg = this.$t('openatccomponents.pattern.algorithmEngineOptimization')
|
|
172
|
-
const loading = this.$loading({
|
|
173
|
-
lock: true,
|
|
174
|
-
text: msg,
|
|
175
|
-
spinner: 'el-icon-loading',
|
|
176
|
-
background: 'rgba(0, 0, 0, 0.7)'
|
|
177
|
-
})
|
|
178
|
-
setTimeout(() => {
|
|
179
|
-
loading.close()
|
|
180
|
-
this.handeleOptimizeClick()
|
|
181
|
-
}, 1000)
|
|
182
|
-
},
|
|
183
|
-
handeleOptimizeClick () {
|
|
184
|
-
let newPha = []
|
|
185
|
-
for (let i = 0; i < this.rings.length; i++) {
|
|
186
|
-
newPha.push(...this.rings[i])
|
|
187
|
-
}
|
|
188
|
-
let phaseData = newPha.map(item => {
|
|
189
|
-
return {
|
|
190
|
-
id: item.id,
|
|
191
|
-
flowperhour: item.flowperhour,
|
|
192
|
-
saturation: item.saturation
|
|
193
|
-
}
|
|
194
|
-
})
|
|
195
|
-
let patternList = this.$store.state.globalParam.tscParam.patternList
|
|
196
|
-
let pattern = patternList.filter((item) => item.id === this.id)[0]
|
|
197
|
-
let reqData = {
|
|
198
|
-
'type': this.value,
|
|
199
|
-
'optcycle': this.optimizecycle ? this.optimizecycle : 0,
|
|
200
|
-
'phaseList': this.phaseList,
|
|
201
|
-
'pattern': pattern,
|
|
202
|
-
'phases': phaseData
|
|
203
|
-
}
|
|
204
|
-
let isValidata = []
|
|
205
|
-
for (let j = 0; j < newPha.length; j++) {
|
|
206
|
-
let comNum = (newPha[j].length / 4) * 1700 * 0.8
|
|
207
|
-
isValidata.push(newPha[j].flowperhour > comNum)
|
|
208
|
-
}
|
|
209
|
-
if (isValidata.includes(true)) {
|
|
210
|
-
this.$confirm(this.$t('openatccomponents.overview.maxFlow'),
|
|
211
|
-
this.$t('openatccomponents.common.alarm'), {
|
|
212
|
-
confirmButtonText: this.$t('eopenatccomponentsdge.common.confirm'),
|
|
213
|
-
cancelButtonText: this.$t('openatccomponents.common.cancel'),
|
|
214
|
-
type: 'warning'
|
|
215
|
-
}).then(() => {
|
|
216
|
-
getDuration(reqData).then(data => {
|
|
217
|
-
if (data.data.success) {
|
|
218
|
-
this.$message({
|
|
219
|
-
type: 'success',
|
|
220
|
-
message: this.$t('openatccomponents.pattern.success')
|
|
221
|
-
})
|
|
222
|
-
for (let i = 0; i < this.rings.length; i++) {
|
|
223
|
-
for (let j = 0; j < this.rings[i].length; j++) {
|
|
224
|
-
for (let h = 0; h < data.data.data.phase.length; h++) {
|
|
225
|
-
if (this.rings[i][j].id === data.data.data.phase[h].id) {
|
|
226
|
-
this.rings[i][j].value = data.data.data.phase[h].duration
|
|
227
|
-
// this.rings[i][j].cycle = data.data.data.phase[h].cycle
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}).catch(error => {
|
|
234
|
-
console.log(error)
|
|
235
|
-
})
|
|
236
|
-
}).catch(() => {
|
|
237
|
-
})
|
|
238
|
-
} else {
|
|
239
|
-
getDuration(reqData).then(data => {
|
|
240
|
-
if (data.data.success) {
|
|
241
|
-
this.$message({
|
|
242
|
-
type: 'success',
|
|
243
|
-
message: this.$t('openatccomponents.pattern.success')
|
|
244
|
-
})
|
|
245
|
-
for (let i = 0; i < this.rings.length; i++) {
|
|
246
|
-
for (let j = 0; j < this.rings[i].length; j++) {
|
|
247
|
-
for (let h = 0; h < data.data.data.phase.length; h++) {
|
|
248
|
-
if (this.rings[i][j].id === data.data.data.phase[h].id) {
|
|
249
|
-
this.rings[i][j].value = data.data.data.phase[h].duration
|
|
250
|
-
// this.rings[i][j].cycle = data.data.data.phase[h].cycle
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}).catch(error => {
|
|
257
|
-
console.log(error)
|
|
258
|
-
})
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
addMin () {
|
|
262
|
-
for (let i of this.list) {
|
|
263
|
-
if (!i.flowperhour || !i.saturation) {
|
|
264
|
-
i.length = this.list.length
|
|
265
|
-
i.flowperhour = 0
|
|
266
|
-
i.saturation = 1700
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
// addMinSplit () {
|
|
271
|
-
// const globalParamModel = this.$store.getters.globalParamModel
|
|
272
|
-
// let phaseList = globalParamModel.getParamsByType('phaseList')
|
|
273
|
-
// for (let ls of this.list) {
|
|
274
|
-
// let phase = phaseList.filter((item) => {
|
|
275
|
-
// return item.id === ls.id
|
|
276
|
-
// })[0]
|
|
277
|
-
// if (!phase.redyellow) {
|
|
278
|
-
// phase.redyellow = 0
|
|
279
|
-
// }
|
|
280
|
-
// if (!phase.yellow) {
|
|
281
|
-
// phase.yellow = 0
|
|
282
|
-
// }
|
|
283
|
-
// if (!phase.redclear) {
|
|
284
|
-
// phase.redclear = 0
|
|
285
|
-
// }
|
|
286
|
-
// if (!phase.flashgreen) {
|
|
287
|
-
// phase.flashgreen = 0
|
|
288
|
-
// }
|
|
289
|
-
// if (!phase.phasewalk) {
|
|
290
|
-
// phase.phasewalk = 0
|
|
291
|
-
// }
|
|
292
|
-
// if (!phase.pedclear) {
|
|
293
|
-
// phase.pedclear = 0
|
|
294
|
-
// }
|
|
295
|
-
// // let temp1 = phase.redyellow + phase.yellow + phase.redclear + phase.flashgreen // 绿信比的最小值要大于最小绿+黄灯+全红+绿闪
|
|
296
|
-
// // let temp2 = phase.phasewalk + phase.pedclear
|
|
297
|
-
// // if (temp1 > temp2) {
|
|
298
|
-
// // ls.minSplit = temp1
|
|
299
|
-
// // } else {
|
|
300
|
-
// // ls.minSplit = temp2
|
|
301
|
-
// // }
|
|
302
|
-
// // if (ls.mode !== 7 && ls.value < ls.minSplit) {
|
|
303
|
-
// // ls.value = ls.minSplit
|
|
304
|
-
// // }
|
|
305
|
-
// // let temp1 = phase.yellow + phase.redclear + phase.flashgreen // 绿信比的最小值要大于最小绿+黄灯+全红+绿闪
|
|
306
|
-
// let temp1 = phase.yellow + phase.redclear + phase.mingreen
|
|
307
|
-
// let temp2 = phase.yellow + phase.redclear + phase.phasewalk + phase.pedclear
|
|
308
|
-
// ls.minSplit = temp1 > temp2 ? temp1 : temp2
|
|
309
|
-
// if (ls.mode !== 7 && ls.value < ls.minSplit) {
|
|
310
|
-
// ls.value = ls.minSplit
|
|
311
|
-
// this.$message.error(this.$t('openatccomponents.pattern.splitCheckMsg'))
|
|
312
|
-
// }
|
|
313
|
-
// }
|
|
314
|
-
// },
|
|
315
|
-
// getMaxCycle (pattern) {
|
|
316
|
-
// let rings = pattern.rings
|
|
317
|
-
// let maxCycle = 0
|
|
318
|
-
// for (let ring of rings) {
|
|
319
|
-
// if (ring.length === 0) continue
|
|
320
|
-
// let cycle = 0
|
|
321
|
-
// for (let r of ring) {
|
|
322
|
-
// if (r.mode === 7) { // 忽略相位不计周期
|
|
323
|
-
// continue
|
|
324
|
-
// }
|
|
325
|
-
// cycle = cycle + r.value
|
|
326
|
-
// }
|
|
327
|
-
// if (cycle > maxCycle) {
|
|
328
|
-
// maxCycle = cycle
|
|
329
|
-
// }
|
|
330
|
-
// }
|
|
331
|
-
// return maxCycle
|
|
332
|
-
// },
|
|
333
|
-
// doChange (val) {
|
|
334
|
-
// // if (val.mode === 7) {
|
|
335
|
-
// // val.value = 0
|
|
336
|
-
// // } else {
|
|
337
|
-
// // val.value = 30
|
|
338
|
-
// // }
|
|
339
|
-
// }
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
</script>
|
|
343
|
-
<style lang="scss" scoped>
|
|
344
|
-
.col-content {
|
|
345
|
-
width: 100%;
|
|
346
|
-
}
|
|
347
|
-
.kanbanOptimize {
|
|
348
|
-
.common-board-column {
|
|
349
|
-
max-width: unset !important;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
.optimizetype{
|
|
353
|
-
// float: left;
|
|
354
|
-
font-size: 14PX;
|
|
355
|
-
margin:0 0 10PX 0;
|
|
356
|
-
.el-input {
|
|
357
|
-
width: 80PX;
|
|
358
|
-
}
|
|
359
|
-
.el-select{
|
|
360
|
-
width: 145PX;
|
|
361
|
-
}
|
|
362
|
-
.el-button {
|
|
363
|
-
margin-left: 10PX;
|
|
364
|
-
}
|
|
365
|
-
.optimiNum {
|
|
366
|
-
padding-left: 10PX;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
</style>
|