openatc-components 0.1.31 → 0.1.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -44,11 +44,12 @@
44
44
  <!-- 关闭拖拽调整顺序 -->
45
45
  <div v-if="!Draggable" class="common-board-column-content">
46
46
  <div class="common-board-item" v-for="element in list" :key="element.id">
47
+ <!-- {{element}} -->
47
48
  <div class="common-contentcolumn phase">
48
49
  <el-tooltip class="item" effect="dark" placement="left">
49
50
  <div slot="content">{{element.name}}</div>
50
51
  <div class="common-phase-description">
51
- <patternwalksvg :sidewalkPhaseData="sidewalkPhaseData" :showWalk="element.peddirection" Width="38" Height="40"></patternwalksvg>
52
+ <!-- <patternwalksvg :sidewalkPhaseData="sidewalkPhaseData" :showWalk="element.peddirection" Width="38" Height="40"></patternwalksvg> -->
52
53
  <xdrdirselector Width="40px"
53
54
  Height="40px"
54
55
  :showlist="element.desc"
@@ -69,14 +70,14 @@
69
70
  import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
70
71
  import draggable from 'vuedraggable'
71
72
  // import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
72
- import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
73
+ // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
73
74
 
74
75
  export default {
75
76
  name: 'common-kanban',
76
77
  components: {
77
78
  draggable,
78
- xdrdirselector,
79
- patternwalksvg
79
+ xdrdirselector
80
+ // patternwalksvg
80
81
  },
81
82
  props: {
82
83
  headerText: {
@@ -14,11 +14,11 @@
14
14
  <div class="phase-box" v-for="(item, index) in overlaplList" :key="index">
15
15
  <div class="single-phase" @click="selectPhase(index, item)" :class="preselectPhase == item.id ? 'single-phase-select' : ''">
16
16
  <div class="ped-icon">
17
- <PatternWalkSvg v-if="item.peddirection && item.peddirection.length" :showWalk="getshowped(item.peddirection)" Width="42" Height="44" />
17
+ <!-- <PatternWalkSvg v-if="item.peddirection && item.peddirection.length" :showWalk="getshowped(item.peddirection)" Width="42" Height="44" /> -->
18
18
  </div>
19
19
 
20
20
  <div class="phase-icon" v-if="item.direction">
21
- <xdr-dir-selector Width="44px" Height="44px" :showlist="getShowlist(item.direction)" :roadDirection="roadDirection"></xdr-dir-selector>
21
+ <xdr-dir-selector Width="44px" Height="44px" :showlist="getShowlist(item)" :roadDirection="roadDirection"></xdr-dir-selector>
22
22
  </div>
23
23
  </div>
24
24
  <div class="single-phase-name">{{$t('openatccomponents.channelizationmap.phase') + item.id}}</div>
@@ -103,13 +103,24 @@ export default {
103
103
  })
104
104
  return phaseDireacitonArr
105
105
  },
106
- getShowlist (direction) {
107
- return direction.map(dir => {
108
- return {
109
- id: dir,
110
- color: '#606266'
111
- }
112
- })
106
+ getShowlist (data) {
107
+ if (data.direction && data.direction.length > 0) {
108
+ return data.direction.map(dir => {
109
+ return {
110
+ id: dir,
111
+ peddirection: this.getshowped(data.peddirection),
112
+ color: '#606266'
113
+ }
114
+ })
115
+ } else {
116
+ return [
117
+ {
118
+ id: '',
119
+ peddirection: this.getshowped(data.peddirection),
120
+ color: '#606266'
121
+ }
122
+ ]
123
+ }
113
124
  },
114
125
  getshowped (peddirection) {
115
126
  let peddirarr = peddirection.map(peddir => ({
@@ -14,11 +14,11 @@
14
14
  <div class="phase-box" v-for="(item, index) in phaseList" :key="index">
15
15
  <div class="single-phase" @click="selectPhase(index, item)" :class="preselectPhase == item.id ? 'single-phase-select' : ''">
16
16
  <div class="ped-icon">
17
- <PatternWalkSvg v-if="item.peddirection && item.peddirection.length" :showWalk="getshowped(item.peddirection)" Width="42" Height="44" />
17
+ <!-- <PatternWalkSvg v-if="item.peddirection && item.peddirection.length" :showWalk="getshowped(item.peddirection)" Width="42" Height="44" /> -->
18
18
  </div>
19
19
 
20
20
  <div class="phase-icon" v-if="item.direction">
21
- <xdr-dir-selector Width="44px" Height="44px" :showlist="getShowlist(item.direction)" :roadDirection="roadDirection"></xdr-dir-selector>
21
+ <xdr-dir-selector Width="44px" Height="44px" :showlist="getShowlist(item)" :roadDirection="roadDirection"></xdr-dir-selector>
22
22
  </div>
23
23
  </div>
24
24
  <div class="single-phase-name">{{$t('openatccomponents.channelizationmap.phase') + item.id}}</div>
@@ -103,13 +103,24 @@ export default {
103
103
  })
104
104
  return phaseDireacitonArr
105
105
  },
106
- getShowlist (direction) {
107
- return direction.map(dir => {
108
- return {
109
- id: dir,
110
- color: '#606266'
111
- }
112
- })
106
+ getShowlist (data) {
107
+ if (data.direction && data.direction.length > 0) {
108
+ return data.direction.map(dir => {
109
+ return {
110
+ id: dir,
111
+ peddirection: this.getshowped(data.peddirection),
112
+ color: '#606266'
113
+ }
114
+ })
115
+ } else {
116
+ return [
117
+ {
118
+ id: '',
119
+ peddirection: this.getshowped(data.peddirection),
120
+ color: '#606266'
121
+ }
122
+ ]
123
+ }
113
124
  },
114
125
  getshowped (peddirection) {
115
126
  let peddirarr = peddirection.map(peddir => ({
@@ -53,11 +53,11 @@
53
53
  <script>
54
54
  /* eslint-disable */
55
55
  import RingDataModel from '../../../utils/RingDataModel.js'
56
- import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
56
+ // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
57
57
  export default {
58
58
  name: 'Stages',
59
59
  components: {
60
- patternwalksvg
60
+ // patternwalksvg
61
61
  },
62
62
  props: {
63
63
  isShowCurrentStage: {
@@ -53,7 +53,7 @@ export default class RingDataModel {
53
53
  addPhaseInfo (phase) {
54
54
  let addphse = {}
55
55
  addphse.name = i18n.t('openatccomponents.overview.phase') + phase.id
56
- addphse.desc = this.getPhaseDescription(phase.direction)
56
+ addphse.desc = this.getPhaseDescription(phase)
57
57
  // 相位锁定选项默认都按照解锁状态显示
58
58
  addphse.locktype = 0
59
59
  addphse.close = 0
@@ -67,9 +67,25 @@ export default class RingDataModel {
67
67
 
68
68
  getPhaseDescription (phaseList) {
69
69
  let list = []
70
- for (let id of phaseList) {
70
+ let peddirections = []
71
+ let sidewalkPhaseData = this.getPedPhasePos()
72
+ for (let walk of sidewalkPhaseData) {
73
+ for (let ped of phaseList.peddirection) {
74
+ // if (stg === walk.phaseid) {
75
+ let obj = {}
76
+ obj.name = walk.name
77
+ obj.id = walk.id
78
+ if (ped === walk.id) {
79
+ peddirections.push(obj)
80
+ peddirections = Array.from(new Set(peddirections))
81
+ }
82
+ // }
83
+ }
84
+ }
85
+ for (let id of phaseList.direction) {
71
86
  let obj = {}
72
87
  obj.id = id
88
+ obj.peddirection = peddirections
73
89
  obj.color = '#454545'
74
90
  list.push(obj)
75
91
  }